Exemplo n.º 1
0
 private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         CompressorMap map = (CompressorMap)toolStripComboBox1.SelectedIndex;
         if (map != _compressor)
         {
             SetCompressorType(map);
         }
     }
     catch (Exception E)
     {
         Console.WriteLine(E.Message);
     }
 }
Exemplo n.º 2
0
 private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         CompressorMap map = (CompressorMap)toolStripComboBox1.SelectedIndex;
         if (map != _compressor)
         {
             SetCompressorType(map);
         }
         if (onRefreshData != null)
         {
             onRefreshData(this, EventArgs.Empty);
         }
     }
     catch (Exception E)
     {
         logger.Debug(E.Message);
     }
 }
Exemplo n.º 3
0
        public void SetCompressorType(CompressorMap compressorMap)
        {
            string imagename = "Trionic5Controls.Compressormaps.t25_55_saab.gif";

            switch (compressorMap)
            {
            case CompressorMap.T25_55:
                imagename = "Trionic5Controls.Compressormaps.t25_55_saab.gif";
                toolStripComboBox1.SelectedIndex = 0;
                break;

            case CompressorMap.T25_60:
                imagename = "Trionic5Controls.Compressormaps.t25-60trim.gif";
                toolStripComboBox1.SelectedIndex = 1;
                break;

            case CompressorMap.TD04:
                imagename = "Trionic5Controls.Compressormaps.td04-15g-cfm.gif";
                toolStripComboBox1.SelectedIndex = 2;
                break;

            case CompressorMap.TD0416T:
                imagename = "Trionic5Controls.Compressormaps.td04h-16t-cfm.gif";
                toolStripComboBox1.SelectedIndex = 3;
                break;

            case CompressorMap.TD0418T:
                imagename = "Trionic5Controls.Compressormaps.td04h-18t-cfm.gif";
                toolStripComboBox1.SelectedIndex = 4;
                break;

            case CompressorMap.TD0419T:
                imagename = "Trionic5Controls.Compressormaps.td04h-19t-cfm.gif";
                toolStripComboBox1.SelectedIndex = 5;
                break;

            case CompressorMap.TD0620G:
                imagename = "Trionic5Controls.Compressormaps.td06h-20g-cfm.gif";
                toolStripComboBox1.SelectedIndex = 6;
                break;

            case CompressorMap.GT2871R:
                imagename = "Trionic5Controls.Compressormaps.gt2871r-48.jpg";
                toolStripComboBox1.SelectedIndex = 7;
                break;

            case CompressorMap.GT28RS:
                imagename = "Trionic5Controls.Compressormaps.gt28rscompress.gif";
                toolStripComboBox1.SelectedIndex = 8;
                break;

            case CompressorMap.GT3071R86:
                imagename = "Trionic5Controls.Compressormaps.GT3071R86.jpg";
                toolStripComboBox1.SelectedIndex = 9;
                break;

            case CompressorMap.GT30R:
                imagename = "Trionic5Controls.Compressormaps.gt30rcompress.gif";
                toolStripComboBox1.SelectedIndex = 10;
                break;

            case CompressorMap.GT40R:
                imagename = "Trionic5Controls.Compressormaps.gt40rcompress.gif";
                toolStripComboBox1.SelectedIndex = 11;
                break;

            case CompressorMap.HX40W:
                toolStripComboBox1.SelectedIndex = 12;
                imagename = "Trionic5Controls.Compressormaps.hx40w.jpg";
                break;
            }
            _compressor = compressorMap;

            Bitmap bmp = new Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(imagename));

            ori_width  = bmp.Width;
            ori_height = bmp.Height;
            DrawLineonImage(bmp);
            chartControl1.BackImage.Image   = null;
            chartControl1.BackImage.Stretch = true;

            string tempImagePath = @"C:\currimage.bmp";

            if (File.Exists(tempImagePath))
            {
                File.Delete(tempImagePath);
            }
            bmp.Save(tempImagePath, System.Drawing.Imaging.ImageFormat.Bmp);
            Bitmap bmp2 = new Bitmap(tempImagePath);

            chartControl1.BackImage.Image = bmp2;

            //this.Invalidate();
        }
        public void SetCompressorType(CompressorMap compressorMap)
        {
            string imagename = "Trionic5Controls.Compressormaps.t25_55_saab.gif";

            switch (compressorMap)
            {
            case CompressorMap.T25_55:
                imagename = "Trionic5Controls.Compressormaps.t25_55_saab.gif";
                toolStripComboBox1.SelectedIndex = 0;
                break;

            case CompressorMap.T25_60:
                imagename = "Trionic5Controls.Compressormaps.t25-60trim.gif";
                toolStripComboBox1.SelectedIndex = 1;
                break;

            case CompressorMap.TD04:
                imagename = "Trionic5Controls.Compressormaps.td04-15g-cfm.gif";
                toolStripComboBox1.SelectedIndex = 2;
                break;

            case CompressorMap.TD0416T:
                imagename = "Trionic5Controls.Compressormaps.td04h-16t-cfm.gif";
                toolStripComboBox1.SelectedIndex = 3;
                break;

            case CompressorMap.TD0418T:
                imagename = "Trionic5Controls.Compressormaps.td04h-18t-cfm.gif";
                toolStripComboBox1.SelectedIndex = 4;
                break;

            case CompressorMap.TD0419T:
                imagename = "Trionic5Controls.Compressormaps.td04h-19t-cfm.gif";
                toolStripComboBox1.SelectedIndex = 5;
                break;

            case CompressorMap.TD0620G:
                imagename = "Trionic5Controls.Compressormaps.td06h-20g-cfm.gif";
                toolStripComboBox1.SelectedIndex = 6;
                break;

            case CompressorMap.GT2871R:
                imagename = "Trionic5Controls.Compressormaps.gt2871r-48.jpg";
                toolStripComboBox1.SelectedIndex = 7;
                break;

            case CompressorMap.GT28RS:
                imagename = "Trionic5Controls.Compressormaps.gt28rscompress.gif";
                toolStripComboBox1.SelectedIndex = 8;
                break;

            case CompressorMap.GT3071R86:
                imagename = "Trionic5Controls.Compressormaps.GT3071R86.jpg";
                toolStripComboBox1.SelectedIndex = 9;
                break;

            case CompressorMap.GT30R:
                imagename = "Trionic5Controls.Compressormaps.gt30rcompress.gif";
                toolStripComboBox1.SelectedIndex = 10;
                break;

            case CompressorMap.GT40R:
                imagename = "Trionic5Controls.Compressormaps.gt40rcompress.gif";
                toolStripComboBox1.SelectedIndex = 11;
                break;

            case CompressorMap.HX40W:
                toolStripComboBox1.SelectedIndex = 12;
                imagename = "Trionic5Controls.Compressormaps.hx40w.jpg";
                break;
            }
            Bitmap bmp = new Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(imagename));

            ori_width         = bmp.Width;
            ori_height        = bmp.Height;
            pictureBox1.Image = bmp;
            _compressor       = compressorMap;

            this.Invalidate();
        }
 public void SetCompressorType(CompressorMap compressorMap)
 {
     string imagename = "T8SuitePro.Compressormaps.t25_55_saab.gif";
     switch (compressorMap)
     {
         case CompressorMap.GT17:
             imagename = "T8SuitePro.Compressormaps.GT17.jpg";
             toolStripComboBox1.SelectedIndex = 0;
             break;
         case CompressorMap.T25_55:
             imagename = "T8SuitePro.Compressormaps.t25_55_saab.gif";
             toolStripComboBox1.SelectedIndex = 1;
             break;
         case CompressorMap.T25_60:
             imagename = "T8SuitePro.Compressormaps.t25-60trim.gif";
             toolStripComboBox1.SelectedIndex = 2;
             break;
         case CompressorMap.TD04:
             imagename = "T8SuitePro.Compressormaps.td04-15g-cfm.gif";
             toolStripComboBox1.SelectedIndex = 3;
             break;
         case CompressorMap.TD0416T:
             imagename = "T8SuitePro.Compressormaps.td04h-16t-cfm.gif";
             toolStripComboBox1.SelectedIndex = 4;
             break;
         case CompressorMap.TD0418T:
             imagename = "T8SuitePro.Compressormaps.td04h-18t-cfm.gif";
             toolStripComboBox1.SelectedIndex = 5;
             break;
         case CompressorMap.TD0419T:
             imagename = "T8SuitePro.Compressormaps.td04h-19t-cfm.gif";
             toolStripComboBox1.SelectedIndex = 6;
             break;
         case CompressorMap.TD0620G:
             imagename = "T8SuitePro.Compressormaps.td06h-20g-cfm.gif";
             toolStripComboBox1.SelectedIndex = 7;
             break;
         case CompressorMap.GT2871R:
             imagename = "T8SuitePro.Compressormaps.gt2871r-48.jpg";
             toolStripComboBox1.SelectedIndex = 8;
             break;
         case CompressorMap.GT28RS:
             imagename = "T8SuitePro.Compressormaps.gt28rscompress.gif";
             toolStripComboBox1.SelectedIndex = 9;
             break;
         case CompressorMap.GT3071R86:
             imagename = "T8SuitePro.Compressormaps.GT3071R86.jpg";
             toolStripComboBox1.SelectedIndex = 10;
             break;
         case CompressorMap.GT30R:
             imagename = "T8SuitePro.Compressormaps.gt30rcompress.gif";
             toolStripComboBox1.SelectedIndex = 11;
             break;
         case CompressorMap.GT40R:
             imagename = "T8SuitePro.Compressormaps.gt40rcompress.gif";
             toolStripComboBox1.SelectedIndex = 12;
             break;
         case CompressorMap.HX40W:
             toolStripComboBox1.SelectedIndex = 13;
             imagename = "T8SuitePro.Compressormaps.hx40w.jpg";
             break;
     }
     Bitmap bmp = new Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(imagename));
     ori_width = bmp.Width;
     ori_height = bmp.Height;
     pictureBox1.Image = bmp;
     _compressor = compressorMap;
     this.Invalidate();
 }
Exemplo n.º 6
0
        public void SetCompressorType(CompressorMap compressorMap)
        {
            string imagename = "MotronicSuite.Compressormaps.t25_55_saab.JPG";
            switch (compressorMap)
            {
                case CompressorMap.T25_55:
                    imagename = "MotronicSuite.Compressormaps.t25_55_saab.JPG";
                    toolStripComboBox1.SelectedIndex = 0;
                    break;
                case CompressorMap.T25_60:
                    imagename = "MotronicSuite.Compressormaps.t25-60trim.JPG";
                    toolStripComboBox1.SelectedIndex = 1;
                    break;
                case CompressorMap.TD04:
                    imagename = "MotronicSuite.Compressormaps.td04-15g-cfm.JPG";
                    toolStripComboBox1.SelectedIndex = 2;
                    break;
                case CompressorMap.TD0416T:
                    imagename = "MotronicSuite.Compressormaps.td04h-16t-cfm.JPG";
                    toolStripComboBox1.SelectedIndex = 3;
                    break;
                case CompressorMap.TD0418T:
                    imagename = "MotronicSuite.Compressormaps.td04h-18t-cfm.JPG";
                    toolStripComboBox1.SelectedIndex = 4;
                    break;
                case CompressorMap.TD0419T:
                    imagename = "MotronicSuite.Compressormaps.td04h-19t-cfm.JPG";
                    toolStripComboBox1.SelectedIndex = 5;
                    break;
                case CompressorMap.TD0620G:
                    imagename = "MotronicSuite.Compressormaps.td06h-20g-cfm.JPG";
                    toolStripComboBox1.SelectedIndex = 6;
                    break;
                case CompressorMap.GT2871R:
                    imagename = "MotronicSuite.Compressormaps.gt2871r-48.jpg";
                    toolStripComboBox1.SelectedIndex = 7;
                    break;
                case CompressorMap.GT28RS:
                    imagename = "MotronicSuite.Compressormaps.gt28rscompress.JPG";
                    toolStripComboBox1.SelectedIndex = 8;
                    break;
                case CompressorMap.GT3071R86:
                    imagename = "MotronicSuite.Compressormaps.GT3071R86.jpg";
                    toolStripComboBox1.SelectedIndex = 9;
                    break;
                case CompressorMap.GT30R:
                    imagename = "MotronicSuite.Compressormaps.gt30rcompress.JPG";
                    toolStripComboBox1.SelectedIndex = 10;
                    break;
                case CompressorMap.GT40R:
                    imagename = "MotronicSuite.Compressormaps.gt40rcompress.JPG";
                    toolStripComboBox1.SelectedIndex = 11;
                    break;
                case CompressorMap.HX40W:
                    toolStripComboBox1.SelectedIndex = 12;
                    imagename = "MotronicSuite.Compressormaps.hx40w.jpg";
                    break;
            }
            _compressor = compressorMap;

            Bitmap bmp = new Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(imagename));
            ori_width = bmp.Width;
            ori_height = bmp.Height;
            DrawLineonImage(bmp);
            scalablePictureBox1.Picture = null;
            string tempImagePath = Path.GetTempPath() + "\\VMCMImage.bmp";
            if (File.Exists(tempImagePath)) File.Delete(tempImagePath);
            bmp.Save(tempImagePath, System.Drawing.Imaging.ImageFormat.Bmp);
            Bitmap bmp2 = new Bitmap(tempImagePath);
            scalablePictureBox1.Picture = bmp2;
        }
Exemplo n.º 7
0
        public void SetCompressorType(CompressorMap compressorMap)
        {
            string imagename = "Trionic5Controls.Compressormaps.t25_55_saab.JPG";

            switch (compressorMap)
            {
            case CompressorMap.T25_55:
                imagename = "Trionic5Controls.Compressormaps.t25_55_saab.JPG";
                toolStripComboBox1.SelectedIndex = 0;
                break;

            case CompressorMap.T25_60:
                imagename = "Trionic5Controls.Compressormaps.t25-60trim.JPG";
                toolStripComboBox1.SelectedIndex = 1;
                break;

            case CompressorMap.TD04:
                imagename = "Trionic5Controls.Compressormaps.td04-15g-cfm.JPG";
                toolStripComboBox1.SelectedIndex = 2;
                break;

            case CompressorMap.TD0416T:
                imagename = "Trionic5Controls.Compressormaps.td04h-16t-cfm.JPG";
                toolStripComboBox1.SelectedIndex = 3;
                break;

            case CompressorMap.TD0418T:
                imagename = "Trionic5Controls.Compressormaps.td04h-18t-cfm.JPG";
                toolStripComboBox1.SelectedIndex = 4;
                break;

            case CompressorMap.TD0419T:
                imagename = "Trionic5Controls.Compressormaps.td04h-19t-cfm.JPG";
                toolStripComboBox1.SelectedIndex = 5;
                break;

            case CompressorMap.TD0620G:
                imagename = "Trionic5Controls.Compressormaps.td06h-20g-cfm.JPG";
                toolStripComboBox1.SelectedIndex = 6;
                break;

            case CompressorMap.GT2871R:
                imagename = "Trionic5Controls.Compressormaps.gt2871r-48.jpg";
                toolStripComboBox1.SelectedIndex = 7;
                break;

            case CompressorMap.GT28RS:
                imagename = "Trionic5Controls.Compressormaps.gt28rscompress.JPG";
                toolStripComboBox1.SelectedIndex = 8;
                break;

            case CompressorMap.GT3071R86:
                imagename = "Trionic5Controls.Compressormaps.GT3071R86.jpg";
                toolStripComboBox1.SelectedIndex = 9;
                break;

            case CompressorMap.GT30R:
                imagename = "Trionic5Controls.Compressormaps.gt30rcompress.JPG";
                toolStripComboBox1.SelectedIndex = 10;
                break;

            case CompressorMap.GT40R:
                imagename = "Trionic5Controls.Compressormaps.gt40rcompress.JPG";
                toolStripComboBox1.SelectedIndex = 11;
                break;

            case CompressorMap.HX40W:
                toolStripComboBox1.SelectedIndex = 12;
                imagename = "Trionic5Controls.Compressormaps.hx40w.jpg";
                break;

            case CompressorMap.S400SX371:
                toolStripComboBox1.SelectedIndex = 13;
                imagename = "Trionic5Controls.Compressormaps.S400SX3-71.jpg";
                break;

            case CompressorMap.GT17:
                toolStripComboBox1.SelectedIndex = 14;
                imagename = "Trionic5Controls.Compressormaps.GT17.jpg";
                break;

            case CompressorMap.T25_NG900:
                toolStripComboBox1.SelectedIndex = 15;
                imagename = "Trionic5Controls.Compressormaps.T25_54mm_60trim_Map.jpg";
                break;
            }
            _compressor = compressorMap;

            Bitmap bmp = new Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(imagename));

            ori_width  = bmp.Width;
            ori_height = bmp.Height;
            DrawLineonImage(bmp);
            scalablePictureBox1.Picture = null;
            string tempImagePath = Path.GetTempPath() + "\\T5CMImage.bmp";

            if (File.Exists(tempImagePath))
            {
                File.Delete(tempImagePath);
            }
            bmp.Save(tempImagePath, System.Drawing.Imaging.ImageFormat.Bmp);
            Bitmap bmp2 = new Bitmap(tempImagePath);

            scalablePictureBox1.Picture = bmp2;
        }