Ejemplo n.º 1
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;
        }
Ejemplo n.º 2
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);
            //}
        }