Пример #1
0
        public override void Xian2_Bump()
        {
            if (stopok)
            {
                xian[1].Visable = false;
                xian[6].Visable = false;
                eform.toolStripStatusLabel1.Text = "状态:10";
                che.Moveto(280, 240, che.forward);
                che.JempStop();
                che.Moveto(255, 190, che.forward);
                try
                {
                    eform.timer1.Interval = eform.StateTime[10] * 1000 / che.StepCount;//根据配置计算状态10在设定时间内的速度(屏幕刷新速度)
                }
                catch
                {
                    eform.timer1.Interval = 10;
                }
                this.Close();
                StateManager.SwitchState("State10");
                eform.toolStripStatusLabel1.Text = "状态:10";
            }

            base.Xian2_Bump();
        }
Пример #2
0
 private void Timerfun(Object myObject, EventArgs myEventArgs)
 {
     if (eform.cm.CurrData.xian[3] == 1)
     {
         tmpcount++;
         if (tmpcount >= 2)
         {
             tmpcount = 0;
             tm.Stop();
             eform.toolStripStatusLabel2.Text = "离开4线";
             eform.toolStripStatusLabel1.Text = "状态:17";
             StateManager.SwitchState("State17");
             che.JempStop();
             che.Moveto(445, 75, che.forward);
             try
             {
                 eform.timer1.Interval = eform.StateTime[16] * 1000 / che.StepCount;//根据配置计算状态4在设定时间内的速度(屏幕刷新速度)
             }
             catch
             {
                 eform.timer1.Interval = 30;
             }
         }
     }
     else
     {
         tmpcount = 0;
     }
 }
Пример #3
0
        public override void Xian1_Bump()
        {
            if (jinku_line == 2)
            {
                if (eform.cm.CurrData.xian[6] == 0)
                {
                    this.Close();
                    StateManager.SwitchState("StateEnd");
                    che.SetWeizhi(200, che.Y + 10);
                    che.SetRangle(300);
                    eform.KaoShiEndFun(0, "压线1");
                }
            }
            else
            {
                if (xian1or2ok && eform.cm.CurrData.xian[6] == 0)
                {
                    this.Close();
                    StateManager.SwitchState("StateEnd");
                    che.SetWeizhi(200, che.Y + 10);
                    che.SetRangle(300);
                    eform.KaoShiEndFun(0, "压线1");
                }
            }

            base.Xian1_Bump();
        }
Пример #4
0
 public override void Xian2_Bump()
 {
     if (jinku_stopok)
     {
         StateManager.SwitchState("State5");
         eform.toolStripStatusLabel1.Text = "状态:5";
         che.Moveto(260, 190, che.forward);
         try
         {
             eform.timer1.Interval = eform.StateTime[5] * 1000 / che.StepCount;//根据配置计算状态5在设定时间内的速度(屏幕刷新速度)
         }
         catch
         {
             eform.timer1.Interval = 10;
         }
     }
     else
     {
         this.Close();
         StateManager.SwitchState("StateEnd");
         che.SetWeizhi(239, 294);
         che.SetRangle(300);
         eform.KaoShiEndFun(0, "压线2");
     }
     base.Xian2_Bump();
 }
Пример #5
0
 private void bump_xian(int x, int y, int range, int gannum)
 {
     StateManager.SwitchState("StateEnd");
     che.SetWeizhi(x, y);
     che.SetRangle(range);
     eform.KaoShiEndFun(0, "压线" + gannum.ToString());
 }
Пример #6
0
 private void checkxian4()
 {
     if (eform.cm.CurrData.xian[3] == 1)
     {
         fz++;
         if (fz >= 2)//大于2秒
         {
             tm.Stop();
             eform.toolStripStatusLabel2.Text = "离开4线";
             StateManager.SwitchState("State4i");
             eform.toolStripStatusLabel1.Text = "状态:4i";
             che.JempStop();
             che.Moveto(220, 305, che.back);
             try
             {
                 eform.timer1.Interval = eform.StateTime[17] * 1000 / che.StepCount;//根据配置计算状态4在设定时间内的速度(屏幕刷新速度)
             }
             catch
             {
                 eform.timer1.Interval = 30;
             }
         }
     }
     else
     {
         fz = 0;
     }
 }
Пример #7
0
 private void Timerfun(Object myObject, EventArgs myEventArgs)
 {
     if (eform.cm.CurrData.xian[3] == 1)
     {
         tmpcount++;
         if (tmpcount >= 2)
         {
             tm.Stop();
             if (che.State == che.run)
             {
                 che.JempStop();
             }
             StateManager.SwitchState("State11i");
             eform.toolStripStatusLabel1.Text = "状态:11i";
             che.Moveto(50, 75, che.forward);
             try
             {
                 eform.timer1.Interval = eform.StateTime[11] * 1000 / che.StepCount;//根据配置计算状态11在设定时间内的速度(屏幕刷新速度)
             }
             catch
             {
                 eform.timer1.Interval = 10;
             }
         }
     }
     else
     {
         tmpcount = 0;
     }
 }
Пример #8
0
 private void stopok_fun()
 {
     if (stopok)
     {
         return;
     }
     tm.Stop();
     tm3.Stop();
     stopok = true;
     if (che.State == che.run)
     {
         che.JempStop();
     }
     xian[1].Visable = true;
     if (eform.cm.CurrData.xian[1] == 0)
     {
         StateManager.SwitchState("StateEnd");
         che.SetWeizhi(278, 299);
         che.SetRangle(-120);
         eform.KaoShiEndFun(0, "移库不入");
         return;
     }
     eform.toolStripStatusLabel2.Text = "开始斜出库";
     //System.Console.Beep();
     // 播放语音
     if (eform.IsExam)
     {
         CVoice.Play(eform.student.Xm + "?开始斜出库");
     }
     else
     {
         CVoice.Play("开始斜出库");
     }
 }
Пример #9
0
 public override void Xian4_Bump()
 {
     //if (eform.cm.CurrData.xian[0] == 0)
     //{
     //    jinku_line = 1;
     //}
     //else
     //{
     //    jinku_line = 2;
     //}
     if (che.State == che.run)
     {
         che.JempStop();
     }
     StateManager.SwitchState("State4");
     eform.toolStripStatusLabel1.Text = "状态:4";
     che.Moveto(220, 140, che.back);
     try
     {
         eform.timer1.Interval = eform.StateTime[17] * 1000 / che.StepCount;//根据配置计算状态4在设定时间内的速度(屏幕刷新速度)
     }
     catch
     {
         eform.timer1.Interval = 30;
     }
     // che.SetRangle(270);
     base.Xian4_Bump();
 }
Пример #10
0
 private void Timerfun(Object myObject, EventArgs myEventArgs)
 {
     tm.Stop();
     if (eform.cm.CurrData.xian[6] == 1)//判断离开7线
     {
         StateManager.SwitchState("State8");
         eform.toolStripStatusLabel1.Text = "状态:8";
         if (che.State == che.run)
         {
             che.JempStop();
         }
         che.Moveto(305, 305, che.back);
         try
         {
             eform.timer1.Interval = eform.StateTime[8] * 1000 / che.StepCount;//根据配置计算状态5在设定时间内的速度(屏幕刷新速度)
         }
         catch
         {
             eform.timer1.Interval = 10;
         }
     }
     else
     {
         tm.Start();
     }
     return;
 }
Пример #11
0
        public override void Che_qj()
        {
            if (jinku_stopok)
            {
                this.Close();
                StateManager.SwitchState("State15");
                eform.toolStripStatusLabel1.Text = "状态:15";
                if (che.State == che.run)
                {
                    che.JempStop();
                }
                che.Moveto(305, 177, che.forward);
                try
                {
                    eform.timer1.Interval = eform.StateTime[15] * 1000 / che.StepCount;//根据配置计算状态14在设定时间内的速度(屏幕刷新速度)
                }
                catch
                {
                    eform.timer1.Interval = 10;
                }
            }
            else
            {
                this.Close();
                StateManager.SwitchState("StateEnd");
                che.SetWeizhi(che.X, che.Y);
                che.SetRangle(che.Rangle);
                eform.KaoShiEndFun(0, "路线错");
                return;
            }

            base.Che_qj();
        }
Пример #12
0
 private void check_xian4()
 {
     if (eform.cm.CurrData.xian[3] == 1)
     {
         tmpcount++;
         if (tmpcount >= 2)
         {
             tmpcount = 0;
             tm.Stop();
             eform.toolStripStatusLabel2.Text = "离开4线";
             eform.toolStripStatusLabel1.Text = "状态:14i";
             StateManager.SwitchState("State14i");
             che.JempStop();
             che.Moveto(305, 305, che.back);
             try
             {
                 eform.timer1.Interval = eform.StateTime[18] * 1000 / che.StepCount;//根据配置计算状态4在设定时间内的速度(屏幕刷新速度)
             }
             catch
             {
                 eform.timer1.Interval = 30;
             }
         }
     }
     else
     {
         tmpcount = 0;
     }
 }
Пример #13
0
 public override void Xian3_Bump()
 {
     if (jinku_line == 2)
     {
         if (eform.cm.CurrData.xian[6] == 0)
         {
             this.Close();
             StateManager.SwitchState("StateEnd");
             che.SetWeizhi(329, 154);
             che.SetRangle(-125);
             eform.KaoShiEndFun(0, "压线3");
         }
     }
     else
     {
         if (xian2or3ok && eform.cm.CurrData.xian[6] == 0)
         {
             this.Close();
             StateManager.SwitchState("StateEnd");
             che.SetWeizhi(329, 154);
             che.SetRangle(-125);
             eform.KaoShiEndFun(0, "压线3");
         }
     }
     base.Xian3_Bump();
 }
Пример #14
0
 public override void Che_tc()
 {
     if (passxian3)
     {
         this.Close();
         che.JempStop();
         StateManager.SwitchState("StateEnd");
         che.SetWeizhi(che.X, che.Y);
         che.SetRangle(che.Rangle);
         eform.toolStripStatusLabel2.Text = "©╪йт╨о╦Я";
         xian[7].Visable = true;
         ////╡╔╥есОрТ
         //if (eform.IsExam)
         //{
         //    CVoice.Play(eform.student.Xm + "?©╪йт╨о╦Я");
         //}
         //else
         //{
         //    CVoice.Play("©╪йт╨о╦Я");
         //}
         eform.KaoShiEndFun(1, "©╪йт╨о╦Я");
     }
     else
     {
         stopmark = true;
     }
     base.Che_tc();
 }
Пример #15
0
 private void Timerfun1(Object myObject, EventArgs myEventArgs)
 {
     if (jinku_stopok)
     {
         if (eform.cm.CurrData.xian[7] == 1)
         {
             tm.Stop();
             tm1.Stop();
             StateManager.SwitchState("State15");
             eform.toolStripStatusLabel1.Text = "状态:15";
             if (che.State == che.run)
             {
                 che.JempStop();
             }
             che.Moveto(305, 177, che.forward);
             try
             {
                 eform.timer1.Interval = eform.StateTime[15] * 1000 / che.StepCount;//根据配置计算状态14在设定时间内的速度(屏幕刷新速度)
             }
             catch
             {
                 eform.timer1.Interval = 10;
             }
         }
     }
     return;
 }
Пример #16
0
 public override void Che_qj()
 {
     if (stopok)
     {
         this.Close();
         StateManager.SwitchState("State9");
         eform.toolStripStatusLabel1.Text = "状态:9";
         xian[1].Visable = false;
         xian[6].Visable = false;
         che.Moveto(280, 240, che.forward);
         try
         {
             eform.timer1.Interval = eform.StateTime[9] * 1000 / che.StepCount;//根据配置计算状态9在设定时间内的速度(屏幕刷新速度)
         }
         catch
         {
             eform.timer1.Interval = 10;
         }
     }
     else
     {
         if (stopmark)
         {
             this.Close();
             StateManager.SwitchState("StateEnd");
             che.SetWeizhi(che.X, che.Y);
             che.SetRangle(che.Rangle);
             eform.KaoShiEndFun(0, "路线错");
         }
     }
     base.Che_qj();
 }
Пример #17
0
 public override void Gan3_Bump()
 {
     StateManager.SwitchState("StateEnd");
     che.SetWeizhi(329, 89);
     che.SetRangle(215);
     eform.KaoShiEndFun(0, "碰杆3");
     base.Gan3_Bump();
 }
Пример #18
0
 public override void Xian4_Bump()
 {
     StateManager.SwitchState("StateEnd");
     che.SetWeizhi(315, 90);
     che.SetRangle(310);
     eform.KaoShiEndFun(0, "路线错");
     base.Xian4_Bump();
 }
Пример #19
0
 public override void Xian6_Bump()
 {
     StateManager.SwitchState("StateEnd");
     che.SetWeizhi(che.X - 50, 50);
     che.SetRangle(340);
     eform.KaoShiEndFun(0, "压线6");
     base.Xian6_Bump();
 }
Пример #20
0
 public override void Gan1_Bump()
 {
     StateManager.SwitchState("StateEnd");
     che.SetWeizhi(195, 90);
     che.SetRangle(330);
     eform.KaoShiEndFun(0, "碰杆1");
     base.Gan1_Bump();
 }
Пример #21
0
 public override void Gan2_Bump() //2008年6月30日增加
 {
     StateManager.SwitchState("StateEnd");
     che.SetWeizhi(255, 113);
     che.SetRangle(320);
     eform.KaoShiEndFun(0, "碰杆2");
     base.Gan2_Bump();
 }
Пример #22
0
 public override void Xian2_Bump()
 {
     this.Close();
     StateManager.SwitchState("StateEnd");
     che.SetWeizhi(284, 102);
     che.SetRangle(230);
     eform.KaoShiEndFun(0, "路线错");
     base.Xian2_Bump();
 }
Пример #23
0
 public override void Xian5_Bump()
 {
     this.Close();
     StateManager.SwitchState("StateEnd");
     che.SetWeizhi(220, 330);
     che.SetRangle(270);
     eform.KaoShiEndFun(0, "压线5");
     base.Xian5_Bump();
 }
Пример #24
0
 public override void Xian3_Bump()
 {
     this.Close();
     StateManager.SwitchState("StateEnd");
     che.SetWeizhi(329, 76);
     che.SetRangle(180);
     eform.KaoShiEndFun(0, "行进方向错");
     base.Xian3_Bump();
 }
Пример #25
0
 public override void Gan2_Bump()
 {
     this.Close();
     StateManager.SwitchState("StateEnd");
     che.SetWeizhi(231, 116);
     che.SetRangle(230);
     eform.KaoShiEndFun(0, "碰杆2");
     base.Gan2_Bump();
 }
Пример #26
0
 public override void Xian1_Bump()
 {
     this.Close();
     StateManager.SwitchState("StateEnd");
     che.SetWeizhi(197, 304);
     che.SetRangle(240);
     eform.KaoShiEndFun(0, "压线1");
     base.Xian1_Bump();
 }
Пример #27
0
 public override void Gan2_Bump()
 {
     StateManager.SwitchState("StateEnd");
     che.SetWeizhi(285, 90);
     che.SetRangle(330);
     eform.KaoShiEndFun(0, "碰杆2");
     // gan[1].Stat = 0;
     base.Gan2_Bump();
 }
Пример #28
0
        public override void Gan4_Bump()
        {
            this.Close();
            StateManager.SwitchState("StateEnd");
            che.SetWeizhi(195, 329);
            che.SetRangle(-80);
            eform.KaoShiEndFun(0, "碰杆4");

            base.Gan4_Bump();
        }
Пример #29
0
        public override void Gan5_Bump()
        {
            this.Close();
            StateManager.SwitchState("StateEnd");
            che.SetWeizhi(235, 335);
            che.SetRangle(-100);
            eform.KaoShiEndFun(0, "碰杆5");

            base.Gan5_Bump();
        }
Пример #30
0
 public override void Che_ht()
 {
     if (stopmark)
     {
         StateManager.SwitchState("StateEnd");
         che.SetWeizhi(che.X, che.Y);
         che.SetRangle(che.Rangle);
         eform.KaoShiEndFun(0, "路线错");
     }
     base.Che_ht();
 }