protected override void InitializeCommands() { SetScopeCommand = new PresenterCommand { CanExecuteDelegate = s => true, ExecuteDelegate = s => { string scope = (string)s; PnrpScope newScope = PnrpScope.All; switch (scope.ToUpper()) { case "ALL": newScope = PnrpScope.All; break; case "GLOBAL": newScope = PnrpScope.Global; break; case "LINKLOCAL": newScope = PnrpScope.LinkLocal; break; } _pnrpService.CurrentScope = newScope; } }; }
protected override void InitializeCommands() { SendCommand = new PresenterCommand() { CanExecuteDelegate = (code => { return(_intelClient.IsConnected); }), ExecuteDelegate = (code => { SendIntel(); }) }; LoadImageCommand = new PresenterCommand() { CanExecuteDelegate = (code => { return(true); }), ExecuteDelegate = (code => { LoadImage(); }) }; }
protected override void InitializeCommands() { SendCommand = new PresenterCommand() { CanExecuteDelegate = (code => { return _intelClient.IsConnected; }), ExecuteDelegate = (code => {SendIntel();}) }; LoadImageCommand = new PresenterCommand() { CanExecuteDelegate = (code => { return true; }), ExecuteDelegate = (code => { LoadImage(); }) }; }
protected override void InitializeCommands() { this.StartCommand = new PresenterCommand() { CanExecuteDelegate = (x => { return(!this.IsOpen && !string.IsNullOrEmpty(this.HostClassifier)); }), ExecuteDelegate = (x => { StartService(x as string); }) }; this.StopCommand = new PresenterCommand() { CanExecuteDelegate = (x => { return(this.IsOpen); }), ExecuteDelegate = (x => { StopService(); }) }; }
protected override void InitializeCommands() { this.DeleteRegistrationCommand = new PresenterCommand { CanExecuteDelegate = code => true, ExecuteDelegate = code => { PeerNameRegistration reg = code as PeerNameRegistration; if (reg != null) { _service.DeleteRegistration(reg); } } }; }
protected override void InitializeCommands() { this.StartCommand = new PresenterCommand() { CanExecuteDelegate = (code => { return(!this.IsConnected); }), ExecuteDelegate = (code => { _client.Start(this.HostClassifier); }) }; this.StopCommand = new PresenterCommand() { CanExecuteDelegate = (code => { return(this.IsConnected); }), ExecuteDelegate = (code => { /*_client.Leave(this.Agent); */ _client.Stop(); }) }; this.OpenImageCommand = new PresenterCommand() { CanExecuteDelegate = (code => { return(true); }), ExecuteDelegate = (code => { OpenImage(); }) }; }
protected override void InitializeCommands() { this.StartCommand = new PresenterCommand() { CanExecuteDelegate = (x => { return (!this.IsOpen && !string.IsNullOrEmpty(this.HostClassifier)); }), ExecuteDelegate = (x => { StartService(x as string); }) }; this.StopCommand = new PresenterCommand() { CanExecuteDelegate = (x => { return this.IsOpen; }), ExecuteDelegate = (x => { StopService(); }) }; }
protected override void InitializeCommands() { this.StartCommand = new PresenterCommand() { CanExecuteDelegate = (code => { return (!this.IsConnected); }), ExecuteDelegate = (code => { _client.Start(this.HostClassifier); }) }; this.StopCommand = new PresenterCommand() { CanExecuteDelegate = (code => { return this.IsConnected; }), ExecuteDelegate = (code => { /*_client.Leave(this.Agent); */ _client.Stop(); }) }; this.OpenImageCommand = new PresenterCommand() { CanExecuteDelegate = (code => { return true; }), ExecuteDelegate = (code => { OpenImage(); }) }; }