示例#1
0
        private void bt_go_Click(object sender, EventArgs e)
        {
            //检查是否已经初始化,要不要弹出初始化窗口
            if (!Global.ready2Go)
            {
                //弹出用来初始化的框
                using (InitFrm initfrm = new InitFrm())
                {
                    if (initfrm.ShowDialog() == DialogResult.OK)
                    {
                        showList();
                    }
                }
            }

            if (Global.ready2Go)
            {
                if (Global.mySwitch1)
                {
                    Global.mySwitch1 = false;
                    listBoxShowMessage("继续工作");
                }

                if (Global.mMState == MachineState.Free)
                {
                    listBoxShowMessage("开始工作");
                    Global.mMState = MachineState.Run;
                }
            }
        }
示例#2
0
 private void button1_Click(object sender, EventArgs e)
 {
     using (InitFrm initfrm = new InitFrm())
     {
         if (initfrm.ShowDialog() == DialogResult.OK)
         {
             showList();
         }
     }
 }