Exemple #1
0
        private void setupViewModels()
        {
            setupRuntime();

            camInfoList   = new List <CameraInfo>();
            IP2CameraInfo = new Dictionary <string, CameraInfo>();
            // initialize camera list view
            CamListVM      = new CameraListVM(camInfoList, cameraNameList);
            cameraExplorer = new CameraExplorer(camInfoList, IP2CameraInfo, IP2CameraName, cameraNameList);

            // initialize preview View
            PreviewVM = new PreviewVM();

            // initialize output view

            OutputVM = new OutputVM(IP2CameraInfo);

            // set up bottom right area: presetting
            PresetVM = new PresetVM(presetList, camInfoList, PresetName2Preset, cameraNameList);

            // set up bottom right area: program
            ProgramVM       = new ProgramVM(programList, camInfoList, cameraNameList, presetList);
            ProgramRunBarVM = new ProgramRunBarVM(programList, PresetName2Preset, CameraName2IP);

            // set up menu bar
            MenuBarVM = new MenuVM(camInfoList, cameraNameList);

            // set up status bar
            StatusBarVM = new StatusBarVM();

            // change to dark mode when program starts up
            changeModeShortCut(modeColors);

            notificationCenter.GetEvent <RelaunchRuntimeEvent>().Subscribe(relaunchRuntime);
        }
Exemple #2
0
 public async Task FullUpdateAsync()
 {
     foreach (ProjectViewModel project in Children)
     {
         try
         {
             await project.ProjectInfo.FullUpdateAsync();
         }
         catch (Exception e)
         {
             OutputVM.Error("Could not run a full update on project '{0}': {1}", project.Name.Value, e.GetFullMessage());
         }
     }
 }