예제 #1
0
        public void View()
        {
            bindRunWithStartAction();
            btnRun.IsEnabled     = false;
            btnRecover.IsEnabled = false;
            // runSelect_listBox.IsEnabled = false;
            btnStop.IsEnabled = false;
            //btnRStart.IsEnabled = false;
            for (int i = 1; i < tabControl.Items.Count; i++)
            {
                ((TabItem)tabControl.Items[i]).IsEnabled = false;
            }
            TubesView tubesView1 = new TubesView();

            //   panelTubeView.Children.Add(tubesView1);
            tubesView1.labelRotationName.Content = "";
            tabItem1.Content          = tubesView1;
            tubesView1.NextStepEvent += new NextStepHandler(Button_Click_1);
            //tubesView1.onNextStepScan += new NextStepScan(NextStepScanEvent);
            experimentRunView                          = new ExperimentRunView();
            ExperimentRunView.Content                  = experimentRunView;
            experimentRunView.NewExperimentEvent      += new NewExperimentHandler(NextRotationEvent);
            experimentRunView.ExperimentRunViewEvent  += new ExperimentRunViewHandler(ExperimentRunViewEvent);
            experimentRunView.ExperimentRunErrEvent   += new ExperimentRunErrHandler(ExperimentRunErrEvent);
            experimentRunView.ExperimentRunRutrnEvent += new ExperimentRunRutrnHandler(ExperimentRunRutrnEvent);
            tabControl.SelectedIndex                   = 0;
        }
예제 #2
0
        private void _NextRotationEvent()
        {
            btnRun.IsEnabled     = false;
            btnRecover.IsEnabled = false;
            //runSelect_listBox.IsEnabled = false;
            btnStop.IsEnabled = false;
            //btnRStart.IsEnabled = false;
            // btnStart.Content = "启动";
            this.bindRunWithStartAction();
            List <RotationInfo> rotations = new List <RotationInfo>();

            rotations = new ConfigRotationController().GetCurrentRotationInfos(SessionInfo.ExperimentID);
            if (rotations.Count == 0)
            {
                MessageBox.Show("该实验没有建立轮次。", "系统提示");
                return;
            }

            if (SessionInfo.PraperRotation == null)
            {
                SessionInfo.PraperRotation = rotations.FirstOrDefault();
            }
            else
            {
                foreach (RotationInfo rotation in rotations)
                {
                    if (rotation.RotationSequence == SessionInfo.PraperRotation.RotationSequence + 1)
                    {
                        SessionInfo.PraperRotation = rotation;
                        break;
                    }
                }
            }
            tabControl.SelectedIndex = 0;
            ((TabItem)tabControl.Items[2]).IsEnabled = false;
            TubesView tubesView1 = new TubesView();

            tabItem1.Content          = tubesView1;
            tubesView1.NextStepEvent += new NextStepHandler(Button_Click_1);
            SessionInfo.NextTurnStep  = 99;
        }
예제 #3
0
        private void onShowNextRotationEvent()
        {
            //WanTai.Common.CommonFunction.WriteLog("onShowNextRotationEvent");
            //
            //if (this.Dispatcher.Thread != System.Threading.Thread.CurrentThread)
            //{
            //    this.Dispatcher.Invoke(new onShowNextRotation(this.onShowNextRotationEvent), null);
            //    return;
            //}
            //else
            //{
            SessionInfo.NextTurnStep = 0;
            WanTai.Common.CommonFunction.WriteLog("onShowNextRotationEvent-----else");
            //btnRun.IsEnabled = false;
            //btnRecover.IsEnabled = false;
            ////runSelect_listBox.IsEnabled = false;
            //btnStop.IsEnabled = false;
            //btnRStart.IsEnabled = false;
            // btnStart.Content = "启动";
            // this.bindRunWithStartAction();
            List <RotationInfo> rotations = new List <RotationInfo>();

            rotations = new ConfigRotationController().GetCurrentRotationInfos(SessionInfo.ExperimentID);
            if (rotations.Count == 0)
            {
                MessageBox.Show("该实验没有建立轮次。", "系统提示");
                return;
            }

            if (SessionInfo.PraperRotation == null)
            {
                SessionInfo.PraperRotation = rotations.FirstOrDefault();
            }
            else
            {
                foreach (RotationInfo rotation in rotations)
                {
                    if (rotation.RotationSequence == SessionInfo.PraperRotation.RotationSequence + 1)
                    {
                        SessionInfo.PraperRotation = rotation;
                        break;
                    }
                }
            }

            tabControl.SelectedIndex = 0;
            ((TabItem)tabControl.Items[2]).IsEnabled = false;

            TubesView tubesView1 = new TubesView();

            tabItem1.Content           = tubesView1;
            tubesView1.onNextStepScan += new NextStepScan(NextStepScanEvent);
            tubesView1.NextStepEvent  += new NextStepHandler(Button_Click_1);

            //open the lamp and set it green flashing
            WanTai.Controller.EVO.IProcessor processor = WanTai.Controller.EVO.ProcessorFactory.GetProcessor();
            processor.SetLampStatus(2);
            tabControl.SelectedIndex = 0;
            MessageBox.Show("请为下一轮实验准备样品!", "系统提示!", MessageBoxButton.OK);
            tabControl.SelectedIndex = 0;
            //change the lamp and set it green
            processor.SetLampStatus(0);
            //}
        }