public List <RuleData> GetTokExcitationRulePointerLine()
 {
     RulePointerLine.Add(new RuleData
     {
         Pen         = yellow_pen,
         FirstPoint  = new Point((10 + Convert.ToInt32(pixel_pro_meter * _mineConfig.MainViewConfig.MaxTokExcitation.Value) + Convert.ToInt32(pixel_pro_meter * _parameters.tok_excitation)), x2_long),
         SecondPoint = new Point((10 + Convert.ToInt32(pixel_pro_meter * _mineConfig.MainViewConfig.MaxTokExcitation.Value) + Convert.ToInt32(pixel_pro_meter * _parameters.tok_excitation)), 3)
     });
     RulePointer.Add(new Pointer
     {
         Pen      = yellow_pen,
         Triangle = new Point[3]
         {
             new Point((10 + Convert.ToInt32(pixel_pro_meter * _mineConfig.MainViewConfig.MaxTokExcitation.Value) + Convert.ToInt32(pixel_pro_meter * _parameters.tok_excitation)), x1_long - 2),
             new Point((5 + Convert.ToInt32(pixel_pro_meter * _mineConfig.MainViewConfig.MaxTokExcitation.Value) + Convert.ToInt32(pixel_pro_meter * _parameters.tok_excitation)), 3),
             new Point((15 + Convert.ToInt32(pixel_pro_meter * _mineConfig.MainViewConfig.MaxTokExcitation.Value) + Convert.ToInt32(pixel_pro_meter * _parameters.tok_excitation)), 3)
         }
     });
     RuleFillPointer.Add(new FillPointer
     {
         Brush    = yellow,
         Triangle = new Point[3]
         {
             new Point((10 + Convert.ToInt32(pixel_pro_meter * _mineConfig.MainViewConfig.MaxTokExcitation.Value) + Convert.ToInt32(pixel_pro_meter * _parameters.tok_excitation)), x1_long - 2),
             new Point((5 + Convert.ToInt32(pixel_pro_meter * _mineConfig.MainViewConfig.MaxTokExcitation.Value) + Convert.ToInt32(pixel_pro_meter * _parameters.tok_excitation)), 3),
             new Point((15 + Convert.ToInt32(pixel_pro_meter * _mineConfig.MainViewConfig.MaxTokExcitation.Value) + Convert.ToInt32(pixel_pro_meter * _parameters.tok_excitation)), 3)
         }
     });
     return(RulePointerLine);
 }
示例#2
0
 public List <RuleData> GetSpeedRulePointerLine()
 {
     RulePointerLine.Add(new RuleData
     {
         Pen         = green_pen,
         FirstPoint  = new Point((10 + Convert.ToInt32(pixel_pro_meter * _parameters.v)), x2_long),
         SecondPoint = new Point((10 + Convert.ToInt32(pixel_pro_meter * _parameters.v)), 3)
     });
     RulePointer.Add(new Pointer
     {
         Pen      = green_pen,
         Triangle = new Point[3]
         {
             new Point((10 + Convert.ToInt32(pixel_pro_meter * _parameters.v)), x1_long - 2),
             new Point((5 + Convert.ToInt32(pixel_pro_meter * _parameters.v)), 3),
             new Point((15 + Convert.ToInt32(pixel_pro_meter * _parameters.v)), 3)
         }
     });
     RuleFillPointer.Add(new FillPointer
     {
         Brush    = green,
         Triangle = new Point[3]
         {
             new Point((10 + Convert.ToInt32(pixel_pro_meter * _parameters.v)), x1_long - 2),
             new Point((5 + Convert.ToInt32(pixel_pro_meter * _parameters.v)), 3),
             new Point((15 + Convert.ToInt32(pixel_pro_meter * _parameters.v)), 3)
         }
     });
     return(RulePointerLine);
 }
示例#3
0
        public void InitVm(Parameters parameters)
        {
            RuleDatas.Clear();
            RuleInscriptions.Clear();
            RulePointerLine.Clear();
            RulePointer.Clear();
            RuleFillPointer.Clear();
            SpeedMeaningZone.Clear();

            _parameters = parameters;
            SetLength();
            SetPointsValue();
        }
示例#4
0
        public void InitVm(Parameters parameters)
        {
            RuleDatas.Clear();
            RuleInscriptions.Clear();
            RulePointerLine.Clear();
            RulePointer.Clear();
            RuleFillPointer.Clear();
            PanelBorderLine.Clear();
            LevelsInscriptions.Clear();

            _parameters = parameters;
            SetLength();
            SetPointsValue();
        }
示例#5
0
 public List <RuleData> GetDopRulePointerLine()
 {
     if (_parameters.v <= _mineConfig.MainViewConfig.MaxDopRuleSpeed.Value)
     {
         RulePointerLine.Add(new RuleData
         {
             Pen         = red_pen,
             FirstPoint  = new Point(x1_long, panelHeight / 2),
             SecondPoint = new Point(panelWidth - 15, panelHeight / 2)
         });
         RulePointer.Add(new Pointer
         {
             Pen      = red_pen,
             Triangle = new Point[3]
             {
                 new Point(panelWidth - 40, panelHeight / 2),
                 new Point(panelWidth - 15, panelHeight / 2 - 10),
                 new Point(panelWidth - 15, panelHeight / 2 + 10)
             }
         });
         RuleFillPointer.Add(new FillPointer
         {
             Brush    = red,
             Triangle = new Point[3]
             {
                 new Point(panelWidth - 40, panelHeight / 2),
                 new Point(panelWidth - 15, panelHeight / 2 - 10),
                 new Point(panelWidth - 15, panelHeight / 2 + 10)
             }
         });
         LevelsInscriptions.Add(new RuleInscription
         {
             Text     = "1",
             Font     = levelsFont,
             Brush    = white,
             Position = new Point(panelWidth - 25, panelHeight / 2 - 8)
         });
         if (_mineConfig.KletConfig.KletLevelsCount.Value > 1 && _mineConfig.MainViewConfig.LeftSosud == SosudType.Skip)
         {
             RulePointerLine.Add(new RuleData
             {
                 Pen         = red_pen,
                 FirstPoint  = new Point(x1_long, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * _mineConfig.KletConfig.FirstLevelHight.Value)),
                 SecondPoint = new Point(panelWidth - 15, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * _mineConfig.KletConfig.FirstLevelHight.Value))
             });
             RulePointer.Add(new Pointer
             {
                 Pen      = red_pen,
                 Triangle = new Point[3]
                 {
                     new Point(panelWidth - 40, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * _mineConfig.KletConfig.FirstLevelHight.Value)),
                     new Point(panelWidth - 15, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * _mineConfig.KletConfig.FirstLevelHight.Value) - 10),
                     new Point(panelWidth - 15, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * _mineConfig.KletConfig.FirstLevelHight.Value) + 10)
                 }
             });
             RuleFillPointer.Add(new FillPointer
             {
                 Brush    = red,
                 Triangle = new Point[3]
                 {
                     new Point(panelWidth - 40, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * _mineConfig.KletConfig.FirstLevelHight.Value)),
                     new Point(panelWidth - 15, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * _mineConfig.KletConfig.FirstLevelHight.Value) - 10),
                     new Point(panelWidth - 15, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * _mineConfig.KletConfig.FirstLevelHight.Value) + 10)
                 }
             });
             LevelsInscriptions.Add(new RuleInscription
             {
                 Text     = "2",
                 Font     = levelsFont,
                 Brush    = white,
                 Position = new Point(panelWidth - 25, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * _mineConfig.KletConfig.FirstLevelHight.Value) - 8)
             });
         }
         if (_mineConfig.KletConfig.KletLevelsCount.Value > 2 && _mineConfig.MainViewConfig.LeftSosud == SosudType.Skip)
         {
             RulePointerLine.Add(new RuleData
             {
                 Pen         = red_pen,
                 FirstPoint  = new Point(x1_long, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * (_mineConfig.KletConfig.FirstLevelHight.Value + _mineConfig.KletConfig.SecondLevelHight.Value))),
                 SecondPoint = new Point(panelWidth - 15, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * (_mineConfig.KletConfig.FirstLevelHight.Value + _mineConfig.KletConfig.SecondLevelHight.Value)))
             });
             RulePointer.Add(new Pointer
             {
                 Pen      = red_pen,
                 Triangle = new Point[3]
                 {
                     new Point(panelWidth - 40, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * (_mineConfig.KletConfig.FirstLevelHight.Value + _mineConfig.KletConfig.SecondLevelHight.Value))),
                     new Point(panelWidth - 15, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * (_mineConfig.KletConfig.FirstLevelHight.Value + _mineConfig.KletConfig.SecondLevelHight.Value)) - 10),
                     new Point(panelWidth - 15, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * (_mineConfig.KletConfig.FirstLevelHight.Value + _mineConfig.KletConfig.SecondLevelHight.Value)) + 10)
                 }
             });
             RuleFillPointer.Add(new FillPointer
             {
                 Brush    = red,
                 Triangle = new Point[3]
                 {
                     new Point(panelWidth - 40, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * (_mineConfig.KletConfig.FirstLevelHight.Value + _mineConfig.KletConfig.SecondLevelHight.Value))),
                     new Point(panelWidth - 15, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * (_mineConfig.KletConfig.FirstLevelHight.Value + _mineConfig.KletConfig.SecondLevelHight.Value)) - 10),
                     new Point(panelWidth - 15, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * (_mineConfig.KletConfig.FirstLevelHight.Value + _mineConfig.KletConfig.SecondLevelHight.Value)) + 10)
                 }
             });
             LevelsInscriptions.Add(new RuleInscription
             {
                 Text     = "3",
                 Font     = levelsFont,
                 Brush    = white,
                 Position = new Point(panelWidth - 25, Convert.ToInt32(panelHeight / 2 - pixel_pro_ten_santimeter * (_mineConfig.KletConfig.FirstLevelHight.Value + _mineConfig.KletConfig.SecondLevelHight.Value)) - 8)
             });
         }
     }
     return(RulePointerLine);
 }