Пример #1
0
 internal UserControl CreatePage(string name, DBDataProvider dataProvider)
 {
     if (name == PanelManager.StationIntroduction)
     {
         return new StationInfoPage();
     }
     else if (name == PanelManager.CurrentCommStatus)
     {
         return new CommStatusPage();
     }
     else if (name == PanelManager.HistoryCommStatus)
     {
         return new CommStatusPage2();
     }
     else if (name == PanelManager.DataCounter)
     {
         return new DataCounterPane();
     }
     else if (name == PanelManager.CinderellaRunStatus)
     {
         this.cinderellaPage = new CinderellaPage();
         this.cinderellaPage.SetDataProvider(dataProvider);
         return this.cinderellaPage;
     }
     else if (name == PanelManager.DevicesRunStatus)
     {
         if (!Settings.Instance.IsCAS)
         {
             AllDevicesPage page = new AllDevicesPage();
             page.SetDataProvider(dataProvider);
             return page;
         }
         else
         {
             AllDevicesPage2 page = new AllDevicesPage2();
             page.SetDataProvider(dataProvider);
             return page;
         }
     }
     return null;
 }