public ChannelTableViewModel( ISwitchExecutiveDriverOperations driverOperations) { this.driverOperations = driverOperations; this.driverOperations.PropertyChanged += DriverOperations_PropertyChanged; }
public ConnectedRoute( string name, string displayColor, ISwitchExecutiveDriverOperations driverOperations, ISave saveOperation, IStatus status) { this.Name = name; this.DisplayColor = displayColor; this.driverOperations = driverOperations; this.saveOperation = saveOperation; this.status = status; Action disconnectAction = async() => { await Task.Run(() => this.OnDisconnect(null)); this.Save(); }; this.DisconnectRouteCommand = new NationalInstruments.RelayCommand( execute: o => disconnectAction(), canExecute: this.CanDisconnect); }
public VisualizationViewModel( ISwitchExecutiveDriverOperations driverOperations) { this.driverOperations = driverOperations; this.DeviceTableViewModel = new DeviceTableViewModel(driverOperations); this.ChannelTableViewModel = new ChannelTableViewModel(driverOperations); this.RouteTableViewModel = new RouteTableViewModel(driverOperations); }
public ConnectedRouteTableViewModel( ISwitchExecutiveDriverOperations driverOperations, ISave saveOperation, IStatus status) { this.driverOperations = driverOperations; this.saveOperation = saveOperation; this.status = status; this.driverOperations.PropertyChanged += DriverOperations_PropertyChanged; }
public HeaderViewModel( bool isSwitchExecutiveInstalled, ISwitchExecutiveDriverOperations driverOperations, ISave saveOperation, IStatus status) { this.IsSwitchExecutiveInstalled = isSwitchExecutiveInstalled; this.driverOperations = driverOperations; this.status = status; this.HeaderMenuViewModel = new HeaderMenuViewModel(driverOperations, saveOperation, status); this.driverOperations.PropertyChanged += DriverOperations_PropertyChanged; this.status.PropertyChanged += Status_PropertyChanged; }
public HeaderMenuViewModel( ISwitchExecutiveDriverOperations driverOperations, ISave saveOperation, IStatus status) { this.driverOperations = driverOperations; this.saveOperation = saveOperation; this.status = status; this.MenuProvider = new MenuProvider(this); this.MenuProvider.AddMenuDataProvider(this); this.driverOperations.PropertyChanged += DriverOperations_PropertyChanged; this.driverOperations.RefreshOptions(auto: true); }
public ConfigurationViewModel( ISwitchExecutiveDriverOperations driverOperations, ISave saveOperation, IStatus status) { this.driverOperations = driverOperations; this.saveOperation = saveOperation; this.status = status; this.ConnectedRouteTableViewModel = new ConnectedRouteTableViewModel(driverOperations, saveOperation, status); // these commands ask the driver to do work that could take time, so they execute in a separate thread this.ConnectRouteCommand = this.CreateConnectCommand(); this.DisconnectRouteCommand = this.CreateDisconnectCommand(); this.DisconnectAllRouteCommand = this.CreateDisconnectAllCommand(); this.driverOperations.PropertyChanged += DriverOperations_PropertyChanged; }
public SwitchExecutiveControlViewModel( PanelPresentation requestedPresentation, bool isSwitchExecutiveInstalled, ISwitchExecutiveDriverOperations driverOperations, ISave saveOperation, IStatus status) { this.driverOperations = driverOperations; this.saveOperation = saveOperation; this.status = status; // create view models if (requestedPresentation == PanelPresentation.ConfigurationWithVisualization) { this.VisualizationViewModel = new VisualizationViewModel(driverOperations); } this.HeaderViewModel = new HeaderViewModel(isSwitchExecutiveInstalled, driverOperations, saveOperation, status); this.ConfigurationViewModel = new ConfigurationViewModel(driverOperations, saveOperation, status); // we're ready to go, so let's hook up to recieve events from our model and other views models this.driverOperations.PropertyChanged += DriverOperations_PropertyChanged; }