internal ConfigurationEditorWindow( IConfigurationManager configurationManager, LabStateManager serviceInfoManager ) { this.Closed += ConfigurationEditorWindow_Closed; _viewModel = new ConfigurationEditorWindowViewModel( this, configurationManager, serviceInfoManager ); this.DataContext = _viewModel; InitializeComponent(); }
public CreateConfigurationItemWindowViewModel(LabStateManager serviceManager) { Debug.Assert(serviceManager != null); SelectedItem = null; SelectedStatus = ConfigurationStatus.Optional; _serviceInfoManager = serviceManager; _selectItemCommand = new RelayCommand(SelectItemExecute); }
public CreateConfigurationItemWindowViewModel( LabStateManager serviceManager ) { Debug.Assert( serviceManager != null ); SelectedItem = null; SelectedStatus = ConfigurationStatus.Optional; _serviceInfoManager = serviceManager; _selectItemCommand = new RelayCommand( SelectItemExecute ); }
public CreateConfigurationItemWindow(LabStateManager serviceManager) { Debug.Assert(serviceManager != null); ViewModel = new CreateConfigurationItemWindowViewModel(serviceManager); this.DataContext = ViewModel; InitializeComponent(); ServicesDropDownButton.Focus(); }
public CreateConfigurationItemWindow(LabStateManager serviceManager) { Debug.Assert( serviceManager != null ); ViewModel = new CreateConfigurationItemWindowViewModel( serviceManager ); this.DataContext = ViewModel; InitializeComponent(); ServicesDropDownButton.Focus(); }
bool _isChangingConfig = false; // Prevents reentrancy, and command being run twice. Use when adding/changing items. #endregion Fields #region Constructors internal ConfigurationEditorWindowViewModel( ConfigurationEditorWindow parentWindow, IConfigurationManager configManager, LabStateManager serviceManager ) { Debug.Assert( configManager != null ); Debug.Assert( serviceManager != null ); _configurationManager = configManager; _serviceInfoManager = serviceManager; _window = parentWindow; _addLayerCommand = new RelayCommand( ExecuteAddLayer ); _removeLayerCommand = new RelayCommand( ExecuteRemoveLayer ); _addConfigItemCommand = new RelayCommand( ExecuteAddConfigItem ); _removeConfigItemCommand = new RelayCommand( ExecuteRemoveConfigItem ); _setConfigItemStatusCommand = new RelayCommand( ExecuteSetConfigItemStatus ); _clearOptionalItemsCommand = new RelayCommand( ExecuteClearOptionalItems ); }
bool _isChangingConfig = false; // Prevents reentrancy, and command being run twice. Use when adding/changing items. /* When creating a ConfigurationItem that already exists, the existing item's status is changed. * In this editor, the existing item's status (in the ComboBox) is changed. * That raises its SelectedItemChanged event (used when changing the Status of each item manually), * and runs the SetConfigItemStatusCommand, effectively trying to set the ConfigurationStatus to the one it just changed to. * Get it? Here's a duck art I found on the net. * ..---.. * .' _ `. * __..' (o) : * `..__ ; * `. / * ; `..---...___ * .' `~-. .-') * . ' _.' * : : \ ' + J + `._ _.' + `~--....___...---~' mh * */ #endregion #region Constructor & init internal ConfigurationEditorWindowViewModel(ConfigurationEditorWindow parentWindow, IConfigurationManager configManager, LabStateManager serviceManager) { Debug.Assert(configManager != null); Debug.Assert(serviceManager != null); _configurationManager = configManager; _serviceInfoManager = serviceManager; _window = parentWindow; _addLayerCommand = new RelayCommand(ExecuteAddLayer); _removeLayerCommand = new RelayCommand(ExecuteRemoveLayer); _addConfigItemCommand = new RelayCommand(ExecuteAddConfigItem); _removeConfigItemCommand = new RelayCommand(ExecuteRemoveConfigItem); _setConfigItemStatusCommand = new RelayCommand(ExecuteSetConfigItemStatus); _clearOptionalItemsCommand = new RelayCommand(ExecuteClearOptionalItems); }
internal ConfigurationEditorWindow(IConfigurationManager configurationManager, LabStateManager serviceInfoManager) { this.Closed += ConfigurationEditorWindow_Closed; _viewModel = new ConfigurationEditorWindowViewModel(this, configurationManager, serviceInfoManager); this.DataContext = _viewModel; InitializeComponent(); }