I have a form that loads quite a lot of data from an SQL server. Below is the code that will give some good advice:
private void BranchCenter_Load(object sender, EventArgs e) {
LoadCities();
LoadCoordinators();
LoadComputerSystems();
LoadBranch();
}
private void LoadCities() {
}
private void LoadCoordinators() {
}
private void LoadComputerSystems() {
}
private void LoadBranch() {
LoadBranchInit();
LoadBranchDetails();
LoadBranchTimings();
LoadBranchServices();
LoadBranchLocumsHistory();
LoadBranchJobs();
LoadBranchNotes();
}
private void LoadBranchInit() {
}
private void LoadBranchDetails() {
}
private void LoadBranchTimings() {
}
private void LoadBranchServices() {
}
private void LoadBranchLocumsHistory() {
}
private void LoadBranchJobs() {
}
private void LoadBranchNotes() {
}
The user interface is a form with tab controls. each part on top goes to the tab. I need to download and show the form to the user as quickly as possible. as soon as the form is shown, I need to run a series of background workers to get data for each page.
I tried to get confused with the background worker, but could not understand its use. I get the message that "another thread tried to access control on your main thread ... or something like that ..."
, , .
? .