Esempio n. 1
0
        public virtual IEnumerator <ITask> StopLegoProgramHandler(StopProgram stopLegoProgram)
        {
            yield return(Arbiter.Choice(_legoBrickPort.SendNxtCommand(new nxtcmd.LegoStopProgram()),
                                        delegate(nxtcmd.LegoResponse ok)
            {
                stopLegoProgram.ResponsePort.Post(DefaultSubmitResponseType.Instance);
            },
                                        delegate(Fault fault)
            {
                stopLegoProgram.ResponsePort.Post(fault);
            }));

            yield break;
        }
Esempio n. 2
0
        private async void btnStopProgramm(object sender, RoutedEventArgs e)
        {
            var dialog = new StopProgram();

            // Show Dialog
            await dialog.ShowAsync();

            if (dialog.Stop)
            {
                //_vessel.Stop();
                _mainViewModel.ProcessIsRunning = false;
                _mainController.Stop();
            }
        }
        public virtual IEnumerator<ITask> StopLegoProgramHandler(StopProgram stopLegoProgram)
        {
            yield return Arbiter.Choice(_legoBrickPort.SendNxtCommand(new nxtcmd.LegoStopProgram()),
                delegate(nxtcmd.LegoResponse ok)
                {
                    stopLegoProgram.ResponsePort.Post(DefaultSubmitResponseType.Instance);
                },
                delegate(Fault fault)
                {
                    stopLegoProgram.ResponsePort.Post(fault);
                });

            yield break;
        }