Example #1
0
 public void ShowVaultNumberEditorView()
 {
     if (settingsWindow == null)
     {
         settingsWindow = new DialogWindow();
     }
     VaultNumberEditorViewModel vaultNumberEditorViewModel = new VaultNumberEditorViewModel(this);
     vaultNumberEditorViewModel.Content = vaultNumberEditorViewModel;
     settingsWindow.DataContext = vaultNumberEditorViewModel;
     settingsWindow.Content = vaultNumberEditorViewModel;
 }
Example #2
0
 public void ShowLocationEditorView()
 {
     if (settingsWindow == null)
     {
         settingsWindow = new DialogWindow();
     }
     LocationEditorViewModel locationEditorViewModel = new LocationEditorViewModel(this);
     locationEditorViewModel.Content = locationEditorViewModel;
     settingsWindow.DataContext = locationEditorViewModel;
     settingsWindow.Content = locationEditorViewModel;
 }
Example #3
0
        public void ShowSettingsView()
        {
            SettingsViewModel settingsViewModel = new SettingsViewModel(this, portController, videoCameraController);

            if (settingsWindow == null)
            {
                settingsWindow = new DialogWindow();
            }
            settingsViewModel.Content = settingsViewModel;
            settingsWindow.DataContext = settingsViewModel;
            settingsWindow.Content = settingsViewModel;
            settingsWindow.Closed += settingsWindow_Closed;

            if (!settingsWindow.IsVisible)
            {
                settingsWindow.ShowDialog();
            }
        }
Example #4
0
        public void CloseSettingsWindow(Boolean isClosed = false)
        {
            if(settingsWindow != null)
            {
                if(!isClosed)
                {
                    settingsWindow.Close();
                }
                settingsWindow = null;

                if(currentViewModel.GetType() == typeof(HomeViewModel))
                {
                    HomeViewModel homeviewModel = (HomeViewModel)currentViewModel;
                    homeviewModel.VideoCameraController = videoCameraController;
                }
            }
        }