public OneTimeAccessViewModel(Interfaces.IOneTimeAccessModel model) { this.model = (Models.OneTimeAccessModel)model; this.OneTimeAccessItems = this.model.OneTimeAccessItems; this.ReadCommand = this.model.ReadCommand; this.WriteCommand = this.model.WriteCommand; this.DeleteOneTimeAccessItemsCommand = this.model.DeleteOneTimeAccessItemsCommand; }
public NodeTreeModel( Interfaces.IConnection connector, Interfaces.IReference references, Interfaces.ISubscriptionModel subscriptionM, Interfaces.IOneTimeAccessModel oneTimeAccessM) { this.connector = connector; this.references = references; ReloadCommand = new Commands.DelegateCommand( (param) => { ForceUpdate(); }, (param) => connector.Connected); MouseDoubleClickedCommand = new DelegateCommand <IList>((items) => { subscriptionM.AddToSubscription(items); ChangeSelectedIndexForTabContorol(0); }, (param) => true); AddToReadWriteCommand = new Commands.DelegateCommand( (param) => { oneTimeAccessM.AddToReadWrite((IList)param); ChangeSelectedIndexForTabContorol(1); }, (param) => connector.Connected); NodeSelectedCommand = new Commands.DelegateCommand( (param) => { }, //nodeInfoDataGrid.Update((VariableNode)param); }, (param) => true); UpdateVariableNodeListCommand = new Commands.DelegateCommand( (param) => { UpdateVariableNodes((Interfaces.IReference)param); }, (param) => true); this.connector.ObserveProperty(x => x.Connected).Subscribe(c => Update(c)); Initialize(); }