public void ShowVaultNumberEditorView() { if (settingsWindow == null) { settingsWindow = new DialogWindow(); } VaultNumberEditorViewModel vaultNumberEditorViewModel = new VaultNumberEditorViewModel(this); vaultNumberEditorViewModel.Content = vaultNumberEditorViewModel; settingsWindow.DataContext = vaultNumberEditorViewModel; settingsWindow.Content = vaultNumberEditorViewModel; }
public void ShowLocationEditorView() { if (settingsWindow == null) { settingsWindow = new DialogWindow(); } LocationEditorViewModel locationEditorViewModel = new LocationEditorViewModel(this); locationEditorViewModel.Content = locationEditorViewModel; settingsWindow.DataContext = locationEditorViewModel; settingsWindow.Content = locationEditorViewModel; }
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(); } }
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; } } }