Exemplo n.º 1
0
        private void frameDeskTop_ContentRendered(object sender, EventArgs e)
        {
            DeskTop deskTop = (DeskTop)frameDeskTop.Content;

            deskTop.labelRotationName.Content = "";
            deskTop.NextStepEvent            += new NextStepHandler(Button_Click_1);
        }
Exemplo n.º 2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            if ((sender as Button).CommandParameter != null && (sender as Button).CommandParameter.ToString() == "ConfigRotationNext")
            {
                experimentRunView.BindView();
                return;
            }
            if (tabControl.SelectedIndex < tabControl.Items.Count)
            {
                tabControl.SelectedIndex++;
                ((TabItem)tabControl.SelectedItem).IsEnabled = true;
            }
            if (tabControl.SelectedIndex == 2)
            {
                if (SessionInfo.CurrentExperimentsInfo.State != (short)ExperimentStatus.Stop)
                {
                    DeskTop deskTop = (DeskTop)frameDeskTop.Content;
                    deskTop.InitDeskTop(900);
                }
            }
            if (tabControl.SelectedIndex == 3)
            {
                btnRun.IsEnabled = true;

                if (SessionInfo.NextTurnStep == 1)
                {
                    SessionInfo.NextTurnStep = -1;
                    server.SendMessage("NextStepRun");
                    //change the lamp and set it green
                    WanTai.Controller.EVO.IProcessor processor = WanTai.Controller.EVO.ProcessorFactory.GetProcessor();
                    processor.SetLampStatus(0);
                }
                else if (SessionInfo.NextTurnStep == 99)
                {
                    SessionInfo.NextTurnStep = -1;
                    ExperimentRun();
                }
                // btnRecover.IsEnabled = false;
                //runSelect_listBox.IsEnabled = true;
            }
        }