Esempio n. 1
0
 private void bg_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (workingInfoForm != null)
     {
         workingInfoForm.Close();
     }
 }
Esempio n. 2
0
        private void bg_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            mainPanel.Controls.Clear();
            switch (workingInfoEnum)
            {
                case PanelLoadingEnum.LoadingDashboardPanel:
                    if (dashboardPanel != null)
                    {
                        calendarSynchronizer.SynchronizeEvents(ezkoController);
                        mainPanel.Controls.Add(dashboardPanel);
                        dashboardPanel.Dock = DockStyle.Fill;
                        dashboardPanel.UpdateControl();
                    }
                    break;
                case PanelLoadingEnum.LoadingAmbulantionPanel:
                    if(ambulantionPanel != null)
                    {
                        calendarSynchronizer.SynchronizeEvents(ezkoController);
                        mainPanel.Controls.Add(ambulantionPanel);
                        ambulantionPanel.Dock = DockStyle.Fill;
                        ambulantionPanel.UpdateControl();
                        ambulantionPanel.LoadEvents();
                    }
                    break;
                case PanelLoadingEnum.LoadingPatientsPanel:
                    if (patientsPanel != null)
                    {
                        mainPanel.Controls.Add(patientsPanel);
                        patientsPanel.Dock = DockStyle.Fill;
                    }
                    break;
                case PanelLoadingEnum.LoadingAdministrationPanel:
                    if (administrationPanel != null)
                    {
                        mainPanel.Controls.Add(administrationPanel);
                        administrationPanel.Dock = DockStyle.Fill;
                    }
                    break;
                case PanelLoadingEnum.LoadAll:
                    if (dashboardPanel != null)
                    {
                        mainPanel.Controls.Add(dashboardPanel);
                        dashboardPanel.Dock = DockStyle.Fill;
                    }
                    if (ambulantionPanel != null)
                    {
                        mainPanel.Controls.Add(ambulantionPanel);
                        ambulantionPanel.Dock = DockStyle.Fill;
                    }
                    if (patientsPanel != null)
                    {
                        mainPanel.Controls.Add(patientsPanel);
                        patientsPanel.Dock = DockStyle.Fill;
                    }
                    if (administrationPanel != null)
                    {
                        mainPanel.Controls.Add(administrationPanel);
                        administrationPanel.Dock = DockStyle.Fill;
                    }
                    break;
                default:
                    break;
            }

            workingInfoForm.Close();
        }