Пример #1
0
 // a = +1 if press button plus and a = -1 if press minus
 private void PlusOrMinusParametr(int a)
 {
     if (inputInfoMode)
     {
         TrainParametrs[inputInfoParametr] += a;
         Klub_u.SetInfo(InputInfoParametrs[inputInfoParametr] + " - " + TrainParametrs[inputInfoParametr].ToString() + " ");
     }
     else if (inputPathMode)
     {
         PathNumber += (byte)a;
         Klub_u.SetInfo("Номер пути = " + PathNumber.ToString() + " ");
     }
     else if (inputPathCorrectnessMode)
     {
         CorrectPath = !CorrectPath;
         Klub_u.SetInfo("Признак правильности пути = " + (CorrectPath ? "1" : "0") + " ");
     }
 }
Пример #2
0
 public override void PressButtonP()
 {
     if (inputPathMode)
     {
         NextInputPath();
     }
     else
     {
         if (inputPathCorrectnessMode)
         {
             NextInputPathCorrectness();
         }
         else
         {
             inputCommandMode = false;
             inputInfoMode    = false;
             inputPathMode    = true;
             Klub_u.SetInfo("Номер пути = " + PathNumber.ToString() + " ");
         }
     }
 }
Пример #3
0
 private void PressNumberButtonN(byte n)
 {
     if (inputInfoMode)
     {
         TrainParametrs[inputInfoParametr] = TrainParametrs[inputInfoParametr] * 10 + n;
         Klub_u.SetInfo(InputInfoParametrs[inputInfoParametr] + " - " + TrainParametrs[inputInfoParametr].ToString() + " ");
     }
     else if (inputPathMode)
     {
         PathNumber = (byte)(PathNumber * 10 + n);
         Klub_u.SetInfo("Номер пути = " + PathNumber.ToString() + " ");
     }
     else if (inputPathCorrectnessMode)
     {
         CorrectPath = n == 1;
         Klub_u.SetInfo("Признак правильности пути = " + (CorrectPath ? "1" : "0") + " ");
     }
     else
     {
         inputNumberTool.AddSimvol(n);
     }
 }