public injectionNewPage()
        {
            InitializeComponent();

            cvsSet.Height = 0;

            valmoWin.dv.InjPr[21].addHandle(handle_inj021);
            valmoWin.dv.InjPr[29].addHandle(handle_Inj029);
            valmoWin.dv.InjPr[36].addHandle(handleInjPr_36);
            valmoWin.dv.InjPr[37].addHandle(handleInjPr_037);
            valmoWin.dv.InjPr[38].addHandle(handleInjPr_038);
            valmoWin.dv.InjPr[39].addHandle(handleInjPr_039);
            valmoWin.dv.InjPr[40].addHandle(handleInjPr_040);
            valmoWin.dv.InjPr[41].addHandle(handleInjPr_041);
            valmoWin.dv.InjPr[42].addHandle(handleInjPr_042);
            valmoWin.dv.InjPr[43].addHandle(handleInjPr_043);
            valmoWin.dv.InjPr[44].addHandle(handleInjPr_044);
            valmoWin.dv.InjPr[46].addHandle(handleInjPr_046);
            valmoWin.dv.InjPr[48].addHandle(handleInjPr_48);
            valmoWin.dv.InjPr[49].addHandle(handle_Inj049);
            valmoWin.dv.InjPr[50].addHandle(handle_Inj050);
            valmoWin.dv.InjPr[51].addHandle(handle_Inj051);
            valmoWin.dv.InjPr[52].addHandle(handle_Inj052);
            valmoWin.dv.InjPr[53].addHandle(handle_Inj053);
            valmoWin.dv.InjPr[54].addHandle(handle_Inj054);
            valmoWin.dv.InjPr[56].addHandle(handle_Inj056);
            valmoWin.dv.InjPr[57].addHandle(handle_Inj057);
            valmoWin.dv.InjPr[58].addHandle(handle_Inj058);
            valmoWin.dv.InjPr[59].addHandle(handle_Inj059);
            valmoWin.dv.InjPr[60].addHandle(handle_Inj060);
            valmoWin.dv.InjPr[61].addHandle(handle_Inj061);
            valmoWin.dv.InjPr[62].addHandle(cvsInjParamHead_backgroundUpdate);
            valmoWin.dv.InjPr[67].addHandle(handle_Inj067);
            valmoWin.dv.InjPr[68].addHandle(handle_Inj068);
            valmoWin.dv.InjPr[69].addHandle(handle_Inj069);
            valmoWin.dv.InjPr[71].addHandle(handleInjPr_71);
            valmoWin.dv.InjPr[72].addHandle(handleInjPr_72);
            valmoWin.dv.InjPr[73].addHandle(handleInjPr_73);
            valmoWin.dv.InjPr[74].addHandle(handleInjPr_74);
            valmoWin.dv.InjPr[75].addHandle(handle_Inj075);
            valmoWin.dv.InjPr[76].addHandle(handle_Inj076);
            valmoWin.dv.InjPr[77].addHandle(handle_Inj077);
            valmoWin.dv.InjPr[78].addHandle(handle_Inj078);
            valmoWin.dv.InjPr[189].addHandle(handle_Inj189);
            valmoWin.dv.InjPr[199].addHandle(handle_Inj199);
            valmoWin.dv.InjPr[245].addHandle(handle_Inj245);
            valmoWin.dv.InjPr[246].addHandle(handle_Inj246);
            valmoWin.dv.InjPr[247].addHandle(handle_Inj247);
            valmoWin.dv.InjPr[248].addHandle(handle_Inj248);
            valmoWin.dv.PrdPr[251].addHandle(InjectionCurveSave);
            valmoWin.dv.PrdPr[252].addHandle(InjectionCurveRefush);
            valmoWin.dv.PrdPr[256].addHandle(HoldingCurveSave);
            valmoWin.dv.PrdPr[257].addHandle(HoldingCurveRefush);
            valmoWin.dv.InjPr[255].addHandle(handle_Inj255);
            valmoWin.dv.InjPr[256].addHandle(handle_Inj256);
            valmoWin.dv.InjPr[257].addHandle(handle_Inj257);
            valmoWin.dv.InjPr[258].addHandle(handle_Inj258);
            valmoWin.dv.InjPr[450].addHandle(handle_Inj450);
            valmoWin.dv.InjPr[451].addHandle(handle_Inj451);
            valmoWin.dv.InjPr[452].addHandle(handle_Inj452);
            valmoWin.dv.InjPr[453].addHandle(handle_Inj453);
            valmoWin.dv.InjPr[454].addHandle(handle_Inj454);
            valmoWin.dv.InjPr[455].addHandle(handle_Inj455);
            valmoWin.dv.InjPr[456].addHandle(handle_Inj456);
            valmoWin.dv.InjPr[457].addHandle(handle_Inj457);
            valmoWin.dv.InjPr[458].addHandle(handle_Inj458);
            valmoWin.dv.InjPr[459].addHandle(handle_Inj459);

            for (int i = 0; i < 8; i++)
            {
                Line l = new Line();
                l.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xE4, 0x00, 0xBB));
                l.StrokeThickness = 2;
                l.ClipToBounds = true;
                l.SnapsToDevicePixels = true;
                l.Visibility = Visibility.Hidden;

                cvsMap.Children.Add(l);
                lstLineHold.Add(l);
            }

            for (int i = 0; i < 9; i++)
            {
                Ring r = new Ring();
                r.Color = new SolidColorBrush(Color.FromArgb(0xFF, 0xE4, 0x00, 0xBB));
                r.Visibility = Visibility.Hidden;
                r.RenderTransform = new TranslateTransform(4, 4);

                cvsMap.Children.Add(r);
                lstRingHold.Add(r);
            }

            for (int i = 0; i < 21; i++)
            {
                Line l = new Line();
                l.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x33, 0x79, 0xE2));
                l.StrokeThickness = 2;
                l.ClipToBounds = true;
                l.SnapsToDevicePixels = true;
                l.Visibility = Visibility.Hidden;

                cvsMap.Children.Add(l);
                lstLInjSpd.Add(l);
            }

            for (int i = 0; i < 20; i++)
            {
                Line l = new Line();
                l.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xE4, 0x00, 0xBB));
                l.StrokeThickness = 2;
                l.ClipToBounds = true;
                l.SnapsToDevicePixels = true;
                l.Visibility = Visibility.Hidden;

                cvsMap.Children.Add(l);
                lstLInjPrs.Add(l);
            }

            for (int i = 0; i < 23; i++)
            {
                Ring r = new Ring();
                r.Color = new SolidColorBrush(Color.FromArgb(0xFF, 0x33, 0x79, 0xE2));
                r.Visibility = Visibility.Hidden;
                r.RenderTransform = new TranslateTransform(-5, 4);

                cvsMap.Children.Add(r);
                lstRInjSpd.Add(r);
            }
        }
 private void setPointPressure(Ring r, double x, double y)
 {
     Canvas.SetLeft(r, (int)(x / MaxDisplacement * 830 - 5));
     Canvas.SetTop(r, (int)(246 - y / MaxPressure * 250));
     r.Visibility = Visibility.Visible;
 }
 private void setPointSpeed(Ring r, double x, double y)
 {
     Canvas.SetLeft(r, (int)(x / MaxDisplacement * 830 - 4));
     Canvas.SetTop(r, (int)(246 - y / MaxSpeed * 250));
     r.Visibility = Visibility.Visible;
 }
        public void init()
        {
            for (int i = 0; i < 5; i++)
            {
                Line lSpeed = new Line();
                lSpeed.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x33, 0x79, 0xE1));
                lSpeed.StrokeThickness = 1.5;
                lSpeed.ClipToBounds = true;
                lSpeed.Visibility = Visibility.Hidden;
                cvsMap.Children.Add(lSpeed);
                lstLineSpeed.Add(lSpeed);

                Line lPressure = new Line();
                lPressure.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x00, 0x95));
                lPressure.StrokeThickness = 1.5;
                lPressure.ClipToBounds = true;
                lPressure.Visibility = Visibility.Hidden;
                cvsMap.Children.Add(lPressure);
                lstLinePressure.Add(lPressure);
            }
            for (int i = 0; i < 6; i++)
            {
                Ring rSpeed = new Ring();
                rSpeed.Color = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x78, 0xE1));
                rSpeed.Visibility = Visibility.Hidden;
                cvsMap.Children.Add(rSpeed);
                lstRingSpeed.Add(rSpeed);

                Ring rPressure = new Ring();
                rPressure.Color = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x00, 0x95));
                rPressure.Visibility = Visibility.Hidden;
                cvsMap.Children.Add(rPressure);
                lstRingPressure.Add(rPressure);
            }
            lstPointSpeed[5].X = 0;
            lstPointPressure[5].X = 0;

            valmoWin.dv.InjPr[81].addHandle(handleInjPr_81);
            valmoWin.dv.InjPr[82].addHandle(handleInjPr_82);
            valmoWin.dv.InjPr[83].addHandle(handleInjPr_83);
            valmoWin.dv.InjPr[278].add();

            valmoWin.dv.InjPr[207].addHandle(handle_Inj207);
            valmoWin.dv.InjPr[154].addHandle(handle_Inj154);
            valmoWin.dv.InjPr[190].addHandle(handle_Inj190);
            valmoWin.dv.InjPr[146].addHandle(handle_Inj146);
            valmoWin.dv.InjPr[96].addHandle(handle_Inj096);
            valmoWin.dv.InjPr[97].addHandle(handle_Inj097);
            valmoWin.dv.InjPr[98].addHandle(handle_Inj098);
            valmoWin.dv.InjPr[90].addHandle(handle_Inj090);
            valmoWin.dv.InjPr[91].addHandle(handle_Inj091);
            valmoWin.dv.InjPr[92].addHandle(handle_Inj092);
            valmoWin.dv.InjPr[87].addHandle(handle_Inj087);
            valmoWin.dv.InjPr[88].addHandle(handle_Inj088);
            valmoWin.dv.InjPr[89].addHandle(handle_Inj089);
            valmoWin.dv.InjPr[31].addHandle(handle_Inj031);
            valmoWin.dv.InjPr[21].addHandle(handle_Inj021);
            valmoWin.dv.InjPr[85].addHandle(handle_Inj085);
            valmoWin.dv.InjPr[151].addHandle(handle_Inj151);
            valmoWin.dv.InjPr[99].addHandle(handle_Inj099);
        }