示例#1
0
        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(); })
            };
        }