Exemple #1
0
        public OptionForm()
        {
            InitializeComponent();

            Combobox = comboBox1;
            Button1 = myButton1;
            Button2 = myButton2;
        }
        void doButtontoUI(string name, int x, int y)
        {
            MyLabel  lbl       = new MyLabel();
            ComboBox cmbbutton = new ComboBox();

            ArdupilotMega.Controls.MyButton mybut = new ArdupilotMega.Controls.MyButton();
            HorizontalProgressBar           hbar  = new HorizontalProgressBar();
            ComboBox cmbaction = new ComboBox();

            // do this here so putting in text works
            this.Controls.AddRange(new Control[] { lbl, cmbbutton, mybut, hbar, cmbaction });

            lbl.Location = new Point(x, y);
            lbl.Size     = new Size(47, 13);
            lbl.Text     = "Button " + name;

            cmbbutton.Location      = new Point(72, y);
            cmbbutton.Size          = new Size(70, 21);
            cmbbutton.DataSource    = getButtonNumbers();
            cmbbutton.DropDownStyle = ComboBoxStyle.DropDownList;
            cmbbutton.Name          = "cmbbutton" + name;
            if (MainV2.config["butno" + name] != null)
            {
                cmbbutton.Text = (MainV2.config["butno" + name].ToString());
            }
            cmbbutton.SelectedIndexChanged += new EventHandler(cmbbutton_SelectedIndexChanged);

            mybut.Location = new Point(BUT_detch1.Left, y);
            mybut.Size     = BUT_detch1.Size;
            mybut.Text     = BUT_detch1.Text;
            mybut.Name     = "mybut" + name;
            mybut.Click   += new EventHandler(BUT_detbutton_Click);

            hbar.Location = new Point(progressBar1.Left, y);
            hbar.Size     = progressBar1.Size;
            hbar.Name     = "hbar" + name;

            cmbaction.Location = new Point(hbar.Right + 5, y);
            cmbaction.Size     = new Size(100, 21);

            cmbaction.DataSource    = Common.getModesList();
            cmbaction.ValueMember   = "Key";
            cmbaction.DisplayMember = "Value";

            cmbaction.DropDownStyle = ComboBoxStyle.DropDownList;
            cmbaction.Name          = "cmbaction" + name;
            if (MainV2.config["butaction" + name] != null)
            {
                cmbaction.Text = MainV2.config["butaction" + name].ToString();
            }

            this.Height += 25;
        }
Exemple #3
0
        private static void ApplyTestTheme(Control temp, int level)
        {
            foreach (Control ctl in temp.Controls)
            {
                if (ctl.GetType() == typeof(MyButton))
                {
                    ArdupilotMega.Controls.MyButton but = (MyButton)ctl;
                    but.BGGradTop = SystemColors.ControlLight;
                    but.BGGradBot = SystemColors.ControlDark;
                    but.TextColor = SystemColors.ControlText;
                    but.Outline   = SystemColors.ControlDark;
                }

                if (ctl.Controls.Count > 0)
                {
                    ApplyTestTheme(ctl, 1);
                }
            }
        }
Exemple #4
0
        private static void ApplyNone(Control temp, int level)
        {
            foreach (Control ctl in temp.Controls)
            {
                if (ctl.GetType() == typeof(MyButton))
                {
                    ArdupilotMega.Controls.MyButton but = (MyButton)ctl;
                    but.BGGradTop = Color.FromArgb(242, 242, 242);
                    but.BGGradBot = Color.FromArgb(207, 207, 207);
                    but.ForeColor = Color.Black;
                    but.TextColor = Color.Black;
                    but.Outline   = Color.FromArgb(112, 112, 112);
                }

                if (ctl.Controls.Count > 0)
                {
                    ApplyNone(ctl, 1);
                }
            }
        }
        void doButtontoUI(string name, int x, int y)
        {
            MyLabel lbl = new MyLabel();
            ComboBox cmbbutton = new ComboBox();
            ArdupilotMega.Controls.MyButton mybut = new ArdupilotMega.Controls.MyButton();
            HorizontalProgressBar hbar = new HorizontalProgressBar();
            ComboBox cmbaction = new ComboBox();

            // do this here so putting in text works
            this.Controls.AddRange(new Control[] { lbl, cmbbutton, mybut, hbar, cmbaction });

            lbl.Location = new Point(x, y);
            lbl.Size = new Size(47, 13);
            lbl.Text = "Button " + name;

            cmbbutton.Location = new Point(72, y);
            cmbbutton.Size = new Size(70, 21);
            cmbbutton.DataSource = getButtonNumbers();
            cmbbutton.DropDownStyle = ComboBoxStyle.DropDownList;
            cmbbutton.Name = "cmbbutton" + name;
            if (MainV2.config["butno" + name] != null)
                cmbbutton.Text = (MainV2.config["butno" + name].ToString());
            cmbbutton.SelectedIndexChanged += new EventHandler(cmbbutton_SelectedIndexChanged);

            mybut.Location = new Point(BUT_detch1.Left, y);
            mybut.Size = BUT_detch1.Size;
            mybut.Text = BUT_detch1.Text;
            mybut.Name = "mybut" + name;
            mybut.Click += new EventHandler(BUT_detbutton_Click);

            hbar.Location = new Point(progressBar1.Left, y);
            hbar.Size = progressBar1.Size;
            hbar.Name = "hbar" + name;

            cmbaction.Location = new Point(hbar.Right + 5, y);
            cmbaction.Size = new Size(100, 21);

            cmbaction.DataSource = Common.getModesList();
            cmbaction.ValueMember = "Key";
            cmbaction.DisplayMember = "Value";

            cmbaction.DropDownStyle = ComboBoxStyle.DropDownList;
            cmbaction.Name = "cmbaction" + name;
            if (MainV2.config["butaction" + name] != null)
                cmbaction.Text = MainV2.config["butaction" + name].ToString();

            this.Height += 25;
        }
Exemple #6
0
        private void flightPlannerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Control ctl in splitContainer1.Panel2.Controls)
            {
                ctl.Visible = false;
            }

            foreach (MainSwitcher.Screen sc in MainV2.View.screens)
            {
                if (sc.Name == "FlightPlanner")
                {
                    MyButton but = new MyButton() { Location = new Point(splitContainer1.Panel2.Width / 2, 0), Text = "Close" };
                    but.Click += new EventHandler(but_Click);

                    splitContainer1.Panel2.Controls.Add(but);
                    splitContainer1.Panel2.Controls.Add(sc.Control);
                    ThemeManager.ApplyThemeTo(sc.Control);

                    sc.Control.Dock = DockStyle.Fill;
                    sc.Control.Visible = true;

                    if (sc.Control is IActivate)
                    {
                        ((IActivate)(sc.Control)).Activate();
                    }

                    but.BringToFront();
                    break;
                }
            }
        }
Exemple #7
0
 private void InitializeComponent()
 {
     this.openFileDialog1      = new System.Windows.Forms.OpenFileDialog();
     this.TXT_logfile          = new System.Windows.Forms.TextBox();
     this.TXT_jpgdir           = new System.Windows.Forms.TextBox();
     this.TXT_offsetseconds    = new System.Windows.Forms.TextBox();
     this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
     this.TXT_outputlog        = new System.Windows.Forms.TextBox();
     this.label1                = new System.Windows.Forms.Label();
     this.BUT_Geotagimages      = new ArdupilotMega.Controls.MyButton();
     this.BUT_estoffset         = new ArdupilotMega.Controls.MyButton();
     this.BUT_doit              = new ArdupilotMega.Controls.MyButton();
     this.BUT_browsedir         = new ArdupilotMega.Controls.MyButton();
     this.BUT_browselog         = new ArdupilotMega.Controls.MyButton();
     this.numericUpDown1        = new System.Windows.Forms.NumericUpDown();
     this.numericUpDown2        = new System.Windows.Forms.NumericUpDown();
     this.numericUpDown3        = new System.Windows.Forms.NumericUpDown();
     this.numericUpDown4        = new System.Windows.Forms.NumericUpDown();
     this.label2                = new System.Windows.Forms.Label();
     this.label3                = new System.Windows.Forms.Label();
     this.label4                = new System.Windows.Forms.Label();
     this.label5                = new System.Windows.Forms.Label();
     this.label6                = new System.Windows.Forms.Label();
     this.BUT_networklinkgeoref = new ArdupilotMega.Controls.MyButton();
     ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();
     this.SuspendLayout();
     //
     // openFileDialog1
     //
     this.openFileDialog1.FileName = "openFileDialog1";
     //
     // TXT_logfile
     //
     this.TXT_logfile.Location     = new System.Drawing.Point(28, 14);
     this.TXT_logfile.Name         = "TXT_logfile";
     this.TXT_logfile.Size         = new System.Drawing.Size(317, 20);
     this.TXT_logfile.TabIndex     = 2;
     this.TXT_logfile.TextChanged += new System.EventHandler(this.TXT_logfile_TextChanged);
     //
     // TXT_jpgdir
     //
     this.TXT_jpgdir.Location = new System.Drawing.Point(28, 43);
     this.TXT_jpgdir.Name     = "TXT_jpgdir";
     this.TXT_jpgdir.Size     = new System.Drawing.Size(317, 20);
     this.TXT_jpgdir.TabIndex = 3;
     //
     // TXT_offsetseconds
     //
     this.TXT_offsetseconds.Location = new System.Drawing.Point(180, 69);
     this.TXT_offsetseconds.Name     = "TXT_offsetseconds";
     this.TXT_offsetseconds.Size     = new System.Drawing.Size(100, 20);
     this.TXT_offsetseconds.TabIndex = 4;
     this.TXT_offsetseconds.Text     = "0";
     //
     // TXT_outputlog
     //
     this.TXT_outputlog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                        | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.TXT_outputlog.Location   = new System.Drawing.Point(28, 190);
     this.TXT_outputlog.Multiline  = true;
     this.TXT_outputlog.Name       = "TXT_outputlog";
     this.TXT_outputlog.ReadOnly   = true;
     this.TXT_outputlog.ScrollBars = System.Windows.Forms.ScrollBars.Both;
     this.TXT_outputlog.Size       = new System.Drawing.Size(397, 160);
     this.TXT_outputlog.TabIndex   = 6;
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(94, 75);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(78, 13);
     this.label1.TabIndex = 7;
     this.label1.Text     = "Seconds offset";
     //
     // BUT_Geotagimages
     //
     this.BUT_Geotagimages.Enabled  = false;
     this.BUT_Geotagimages.Location = new System.Drawing.Point(259, 161);
     this.BUT_Geotagimages.Name     = "BUT_Geotagimages";
     this.BUT_Geotagimages.Size     = new System.Drawing.Size(75, 23);
     this.BUT_Geotagimages.TabIndex = 9;
     this.BUT_Geotagimages.Text     = "GeoTag Images";
     this.BUT_Geotagimages.UseVisualStyleBackColor = true;
     this.BUT_Geotagimages.Click += new System.EventHandler(this.BUT_Geotagimages_Click);
     //
     // BUT_estoffset
     //
     this.BUT_estoffset.Location = new System.Drawing.Point(286, 67);
     this.BUT_estoffset.Name     = "BUT_estoffset";
     this.BUT_estoffset.Size     = new System.Drawing.Size(75, 23);
     this.BUT_estoffset.TabIndex = 8;
     this.BUT_estoffset.Text     = "Estimate Offset";
     this.BUT_estoffset.UseVisualStyleBackColor = true;
     this.BUT_estoffset.Click += new System.EventHandler(this.BUT_estoffset_Click);
     //
     // BUT_doit
     //
     this.BUT_doit.Location = new System.Drawing.Point(97, 161);
     this.BUT_doit.Name     = "BUT_doit";
     this.BUT_doit.Size     = new System.Drawing.Size(75, 23);
     this.BUT_doit.TabIndex = 5;
     this.BUT_doit.Text     = "Do It";
     this.BUT_doit.UseVisualStyleBackColor = true;
     this.BUT_doit.Click += new System.EventHandler(this.BUT_doit_Click);
     //
     // BUT_browsedir
     //
     this.BUT_browsedir.Location = new System.Drawing.Point(351, 41);
     this.BUT_browsedir.Name     = "BUT_browsedir";
     this.BUT_browsedir.Size     = new System.Drawing.Size(75, 23);
     this.BUT_browsedir.TabIndex = 1;
     this.BUT_browsedir.Text     = "Browse Directory";
     this.BUT_browsedir.UseVisualStyleBackColor = true;
     this.BUT_browsedir.Click += new System.EventHandler(this.BUT_browsedir_Click);
     //
     // BUT_browselog
     //
     this.BUT_browselog.Location = new System.Drawing.Point(351, 12);
     this.BUT_browselog.Name     = "BUT_browselog";
     this.BUT_browselog.Size     = new System.Drawing.Size(75, 23);
     this.BUT_browselog.TabIndex = 0;
     this.BUT_browselog.Text     = "Browse Log";
     this.BUT_browselog.UseVisualStyleBackColor = true;
     this.BUT_browselog.Click += new System.EventHandler(this.BUT_browselog_Click);
     //
     // numericUpDown1
     //
     this.numericUpDown1.Location = new System.Drawing.Point(130, 116);
     this.numericUpDown1.Name     = "numericUpDown1";
     this.numericUpDown1.Size     = new System.Drawing.Size(42, 20);
     this.numericUpDown1.TabIndex = 10;
     this.numericUpDown1.Value    = new decimal(new int[] {
         4,
         0,
         0,
         0
     });
     //
     // numericUpDown2
     //
     this.numericUpDown2.Location = new System.Drawing.Point(178, 116);
     this.numericUpDown2.Name     = "numericUpDown2";
     this.numericUpDown2.Size     = new System.Drawing.Size(42, 20);
     this.numericUpDown2.TabIndex = 11;
     this.numericUpDown2.Value    = new decimal(new int[] {
         5,
         0,
         0,
         0
     });
     //
     // numericUpDown3
     //
     this.numericUpDown3.Location = new System.Drawing.Point(226, 116);
     this.numericUpDown3.Name     = "numericUpDown3";
     this.numericUpDown3.Size     = new System.Drawing.Size(42, 20);
     this.numericUpDown3.TabIndex = 12;
     this.numericUpDown3.Value    = new decimal(new int[] {
         7,
         0,
         0,
         0
     });
     //
     // numericUpDown4
     //
     this.numericUpDown4.Location = new System.Drawing.Point(274, 116);
     this.numericUpDown4.Name     = "numericUpDown4";
     this.numericUpDown4.Size     = new System.Drawing.Size(42, 20);
     this.numericUpDown4.TabIndex = 13;
     this.numericUpDown4.Value    = new decimal(new int[] {
         9,
         0,
         0,
         0
     });
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(127, 100);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(22, 13);
     this.label2.TabIndex = 14;
     this.label2.Text     = "Lat";
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.Location = new System.Drawing.Point(175, 100);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(25, 13);
     this.label3.TabIndex = 15;
     this.label3.Text     = "Lon";
     //
     // label4
     //
     this.label4.AutoSize = true;
     this.label4.Location = new System.Drawing.Point(223, 100);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(19, 13);
     this.label4.TabIndex = 16;
     this.label4.Text     = "Alt";
     //
     // label5
     //
     this.label5.AutoSize = true;
     this.label5.Location = new System.Drawing.Point(271, 100);
     this.label5.Name     = "label5";
     this.label5.Size     = new System.Drawing.Size(47, 13);
     this.label5.TabIndex = 17;
     this.label5.Text     = "Heading";
     //
     // label6
     //
     this.label6.AutoSize = true;
     this.label6.Location = new System.Drawing.Point(63, 118);
     this.label6.Name     = "label6";
     this.label6.Size     = new System.Drawing.Size(61, 13);
     this.label6.TabIndex = 18;
     this.label6.Text     = "Log Offsets";
     //
     // BUT_networklinkgeoref
     //
     this.BUT_networklinkgeoref.Location = new System.Drawing.Point(178, 161);
     this.BUT_networklinkgeoref.Name     = "BUT_networklinkgeoref";
     this.BUT_networklinkgeoref.Size     = new System.Drawing.Size(75, 23);
     this.BUT_networklinkgeoref.TabIndex = 19;
     this.BUT_networklinkgeoref.Text     = "Location Kml";
     this.BUT_networklinkgeoref.UseVisualStyleBackColor = true;
     this.BUT_networklinkgeoref.Click += new System.EventHandler(this.BUT_networklinkgeoref_Click);
     //
     // Georefimage
     //
     this.ClientSize = new System.Drawing.Size(452, 362);
     this.Controls.Add(this.BUT_networklinkgeoref);
     this.Controls.Add(this.label6);
     this.Controls.Add(this.label5);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.numericUpDown4);
     this.Controls.Add(this.numericUpDown3);
     this.Controls.Add(this.numericUpDown2);
     this.Controls.Add(this.numericUpDown1);
     this.Controls.Add(this.BUT_Geotagimages);
     this.Controls.Add(this.BUT_estoffset);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.TXT_outputlog);
     this.Controls.Add(this.BUT_doit);
     this.Controls.Add(this.TXT_offsetseconds);
     this.Controls.Add(this.TXT_jpgdir);
     this.Controls.Add(this.TXT_logfile);
     this.Controls.Add(this.BUT_browsedir);
     this.Controls.Add(this.BUT_browselog);
     this.Name = "Georefimage";
     this.Text = "Geo Ref Images";
     ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Georefimage));
     this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
     this.TXT_logfile = new System.Windows.Forms.TextBox();
     this.TXT_jpgdir = new System.Windows.Forms.TextBox();
     this.TXT_offsetseconds = new System.Windows.Forms.TextBox();
     this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
     this.TXT_outputlog = new System.Windows.Forms.TextBox();
     this.label1 = new System.Windows.Forms.Label();
     this.BUT_Geotagimages = new ArdupilotMega.Controls.MyButton();
     this.BUT_estoffset = new ArdupilotMega.Controls.MyButton();
     this.BUT_doit = new ArdupilotMega.Controls.MyButton();
     this.BUT_browsedir = new ArdupilotMega.Controls.MyButton();
     this.BUT_browselog = new ArdupilotMega.Controls.MyButton();
     this.NUM_latpos = new System.Windows.Forms.NumericUpDown();
     this.NUM_lngpos = new System.Windows.Forms.NumericUpDown();
     this.NUM_altpos = new System.Windows.Forms.NumericUpDown();
     this.NUM_headingpos = new System.Windows.Forms.NumericUpDown();
     this.label2 = new System.Windows.Forms.Label();
     this.label3 = new System.Windows.Forms.Label();
     this.label4 = new System.Windows.Forms.Label();
     this.label5 = new System.Windows.Forms.Label();
     this.label6 = new System.Windows.Forms.Label();
     this.BUT_networklinkgeoref = new ArdupilotMega.Controls.MyButton();
     this.num_vfov = new System.Windows.Forms.NumericUpDown();
     this.num_hfov = new System.Windows.Forms.NumericUpDown();
     this.label7 = new System.Windows.Forms.Label();
     this.label8 = new System.Windows.Forms.Label();
     this.num_camerarotation = new System.Windows.Forms.NumericUpDown();
     this.label9 = new System.Windows.Forms.Label();
     this.NUM_time = new System.Windows.Forms.NumericUpDown();
     this.label10 = new System.Windows.Forms.Label();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_latpos)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_lngpos)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_altpos)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_headingpos)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_vfov)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_hfov)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_camerarotation)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_time)).BeginInit();
     this.SuspendLayout();
     //
     // openFileDialog1
     //
     this.openFileDialog1.FileName = "openFileDialog1";
     //
     // TXT_logfile
     //
     resources.ApplyResources(this.TXT_logfile, "TXT_logfile");
     this.TXT_logfile.Name = "TXT_logfile";
     this.TXT_logfile.TextChanged += new System.EventHandler(this.TXT_logfile_TextChanged);
     //
     // TXT_jpgdir
     //
     resources.ApplyResources(this.TXT_jpgdir, "TXT_jpgdir");
     this.TXT_jpgdir.Name = "TXT_jpgdir";
     //
     // TXT_offsetseconds
     //
     resources.ApplyResources(this.TXT_offsetseconds, "TXT_offsetseconds");
     this.TXT_offsetseconds.Name = "TXT_offsetseconds";
     //
     // TXT_outputlog
     //
     resources.ApplyResources(this.TXT_outputlog, "TXT_outputlog");
     this.TXT_outputlog.Name = "TXT_outputlog";
     this.TXT_outputlog.ReadOnly = true;
     //
     // label1
     //
     resources.ApplyResources(this.label1, "label1");
     this.label1.Name = "label1";
     //
     // BUT_Geotagimages
     //
     resources.ApplyResources(this.BUT_Geotagimages, "BUT_Geotagimages");
     this.BUT_Geotagimages.Name = "BUT_Geotagimages";
     this.BUT_Geotagimages.UseVisualStyleBackColor = true;
     this.BUT_Geotagimages.Click += new System.EventHandler(this.BUT_Geotagimages_Click);
     //
     // BUT_estoffset
     //
     resources.ApplyResources(this.BUT_estoffset, "BUT_estoffset");
     this.BUT_estoffset.Name = "BUT_estoffset";
     this.BUT_estoffset.UseVisualStyleBackColor = true;
     this.BUT_estoffset.Click += new System.EventHandler(this.BUT_estoffset_Click);
     //
     // BUT_doit
     //
     resources.ApplyResources(this.BUT_doit, "BUT_doit");
     this.BUT_doit.Name = "BUT_doit";
     this.BUT_doit.UseVisualStyleBackColor = true;
     this.BUT_doit.Click += new System.EventHandler(this.BUT_doit_Click);
     //
     // BUT_browsedir
     //
     resources.ApplyResources(this.BUT_browsedir, "BUT_browsedir");
     this.BUT_browsedir.Name = "BUT_browsedir";
     this.BUT_browsedir.UseVisualStyleBackColor = true;
     this.BUT_browsedir.Click += new System.EventHandler(this.BUT_browsedir_Click);
     //
     // BUT_browselog
     //
     resources.ApplyResources(this.BUT_browselog, "BUT_browselog");
     this.BUT_browselog.Name = "BUT_browselog";
     this.BUT_browselog.UseVisualStyleBackColor = true;
     this.BUT_browselog.Click += new System.EventHandler(this.BUT_browselog_Click);
     //
     // NUM_latpos
     //
     resources.ApplyResources(this.NUM_latpos, "NUM_latpos");
     this.NUM_latpos.Name = "NUM_latpos";
     this.NUM_latpos.Value = new decimal(new int[] {
     3,
     0,
     0,
     0});
     //
     // NUM_lngpos
     //
     resources.ApplyResources(this.NUM_lngpos, "NUM_lngpos");
     this.NUM_lngpos.Name = "NUM_lngpos";
     this.NUM_lngpos.Value = new decimal(new int[] {
     4,
     0,
     0,
     0});
     //
     // NUM_altpos
     //
     resources.ApplyResources(this.NUM_altpos, "NUM_altpos");
     this.NUM_altpos.Name = "NUM_altpos";
     this.NUM_altpos.Value = new decimal(new int[] {
     5,
     0,
     0,
     0});
     //
     // NUM_headingpos
     //
     resources.ApplyResources(this.NUM_headingpos, "NUM_headingpos");
     this.NUM_headingpos.Name = "NUM_headingpos";
     this.NUM_headingpos.Value = new decimal(new int[] {
     8,
     0,
     0,
     0});
     //
     // label2
     //
     resources.ApplyResources(this.label2, "label2");
     this.label2.Name = "label2";
     //
     // label3
     //
     resources.ApplyResources(this.label3, "label3");
     this.label3.Name = "label3";
     //
     // label4
     //
     resources.ApplyResources(this.label4, "label4");
     this.label4.Name = "label4";
     //
     // label5
     //
     resources.ApplyResources(this.label5, "label5");
     this.label5.Name = "label5";
     //
     // label6
     //
     resources.ApplyResources(this.label6, "label6");
     this.label6.Name = "label6";
     //
     // BUT_networklinkgeoref
     //
     resources.ApplyResources(this.BUT_networklinkgeoref, "BUT_networklinkgeoref");
     this.BUT_networklinkgeoref.Name = "BUT_networklinkgeoref";
     this.BUT_networklinkgeoref.UseVisualStyleBackColor = true;
     this.BUT_networklinkgeoref.Click += new System.EventHandler(this.BUT_networklinkgeoref_Click);
     //
     // num_vfov
     //
     resources.ApplyResources(this.num_vfov, "num_vfov");
     this.num_vfov.Maximum = new decimal(new int[] {
     900,
     0,
     0,
     0});
     this.num_vfov.Name = "num_vfov";
     this.num_vfov.Value = new decimal(new int[] {
     130,
     0,
     0,
     0});
     //
     // num_hfov
     //
     resources.ApplyResources(this.num_hfov, "num_hfov");
     this.num_hfov.Maximum = new decimal(new int[] {
     900,
     0,
     0,
     0});
     this.num_hfov.Name = "num_hfov";
     this.num_hfov.Value = new decimal(new int[] {
     200,
     0,
     0,
     0});
     //
     // label7
     //
     resources.ApplyResources(this.label7, "label7");
     this.label7.Name = "label7";
     //
     // label8
     //
     resources.ApplyResources(this.label8, "label8");
     this.label8.Name = "label8";
     //
     // num_camerarotation
     //
     resources.ApplyResources(this.num_camerarotation, "num_camerarotation");
     this.num_camerarotation.Maximum = new decimal(new int[] {
     180,
     0,
     0,
     0});
     this.num_camerarotation.Minimum = new decimal(new int[] {
     180,
     0,
     0,
     -2147483648});
     this.num_camerarotation.Name = "num_camerarotation";
     this.num_camerarotation.Value = new decimal(new int[] {
     90,
     0,
     0,
     0});
     //
     // label9
     //
     resources.ApplyResources(this.label9, "label9");
     this.label9.Name = "label9";
     //
     // NUM_time
     //
     resources.ApplyResources(this.NUM_time, "NUM_time");
     this.NUM_time.Name = "NUM_time";
     this.NUM_time.Value = new decimal(new int[] {
     2,
     0,
     0,
     0});
     //
     // label10
     //
     resources.ApplyResources(this.label10, "label10");
     this.label10.Name = "label10";
     //
     // Georefimage
     //
     resources.ApplyResources(this, "$this");
     this.Controls.Add(this.label10);
     this.Controls.Add(this.NUM_time);
     this.Controls.Add(this.label9);
     this.Controls.Add(this.num_camerarotation);
     this.Controls.Add(this.label8);
     this.Controls.Add(this.label7);
     this.Controls.Add(this.num_hfov);
     this.Controls.Add(this.num_vfov);
     this.Controls.Add(this.BUT_networklinkgeoref);
     this.Controls.Add(this.label6);
     this.Controls.Add(this.label5);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.NUM_headingpos);
     this.Controls.Add(this.NUM_altpos);
     this.Controls.Add(this.NUM_lngpos);
     this.Controls.Add(this.NUM_latpos);
     this.Controls.Add(this.BUT_Geotagimages);
     this.Controls.Add(this.BUT_estoffset);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.TXT_outputlog);
     this.Controls.Add(this.BUT_doit);
     this.Controls.Add(this.TXT_offsetseconds);
     this.Controls.Add(this.TXT_jpgdir);
     this.Controls.Add(this.TXT_logfile);
     this.Controls.Add(this.BUT_browsedir);
     this.Controls.Add(this.BUT_browselog);
     this.Name = "Georefimage";
     ((System.ComponentModel.ISupportInitialize)(this.NUM_latpos)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_lngpos)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_altpos)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_headingpos)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_vfov)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_hfov)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_camerarotation)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_time)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Exemple #9
0
        private static void ApplyBurntKermitTheme(Control temp, int level)
        {
            Color BGColor        = Color.FromArgb(0x26, 0x27, 0x28); // background
            Color ControlBGColor = Color.FromArgb(0x43, 0x44, 0x45); // editable bg color
            Color TextColor      = Color.White;

            if (level == 0)
            {
                temp.BackColor = BGColor;
                temp.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
            }

            //temp.Font = new Font("Lucida Console", 8.25f);

            foreach (Control ctl in temp.Controls)
            {
                if (ctl.GetType() == typeof(Button))
                {
                    ctl.ForeColor = Color.Black;
                }
                else if (ctl.GetType() == typeof(MyButton))
                {
                    Color PrimeColor = Color.FromArgb(0x94, 0xc1, 0x1f);

                    ArdupilotMega.Controls.MyButton but = (MyButton)ctl;
                    //but.BGGradTop = Color.FromArgb(PrimeColor.R, PrimeColor.G, PrimeColor.B);
                    //but.BGGradBot = Color.FromArgb(255 - (int)(PrimeColor.R * 0.27), 255 - (int)(PrimeColor.G * 0.14), 255 - (int)(PrimeColor.B * 0.79));
                    //but.ForeColor = Color.FromArgb(0x40, 0x57, 0x04); //Color.FromArgb(255 - (int)(PrimeColor.R * 0.7), 255 - (int)(PrimeColor.G * 0.8), 255 - (int)(PrimeColor.B * 0.1));
                    //but.Outline = ControlBGColor;
                }
                else if (ctl.GetType() == typeof(TextBox))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
                    TextBox txt = (TextBox)ctl;
                    txt.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(DomainUpDown))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
                    DomainUpDown txt = (DomainUpDown)ctl;
                    txt.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(GroupBox))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
                }

                else if (ctl.GetType() == typeof(Form))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
                }
                else if (ctl.GetType() == typeof(RichTextBox))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                    RichTextBox txtr = (RichTextBox)ctl;
                    txtr.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(CheckedListBox))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                    CheckedListBox txtr = (CheckedListBox)ctl;
                    txtr.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(TabPage))
                {
                    ctl.BackColor = BGColor;  //ControlBGColor
                    ctl.ForeColor = TextColor;
                    TabPage txtr = (TabPage)ctl;
                    txtr.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(TabControl))
                {
                    ctl.BackColor = BGColor;  //ControlBGColor
                    ctl.ForeColor = TextColor;
                    TabControl txtr = (TabControl)ctl;
                }
                else if (ctl.GetType() == typeof(DataGridView))
                {
                    ctl.ForeColor = TextColor;
                    DataGridView dgv = (DataGridView)ctl;
                    dgv.EnableHeadersVisualStyles = false;
                    dgv.BorderStyle     = BorderStyle.None;
                    dgv.BackgroundColor = BGColor;
                    DataGridViewCellStyle rs = new DataGridViewCellStyle();
                    rs.BackColor             = ControlBGColor;
                    rs.ForeColor             = TextColor;
                    dgv.RowsDefaultCellStyle = rs;

                    DataGridViewCellStyle hs = new DataGridViewCellStyle(dgv.ColumnHeadersDefaultCellStyle);
                    hs.BackColor = BGColor;
                    hs.ForeColor = TextColor;

                    dgv.ColumnHeadersDefaultCellStyle = hs;
                    dgv.RowHeadersDefaultCellStyle    = hs;
                }
                else if (ctl.GetType() == typeof(ComboBox))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                    ComboBox CMB = (ComboBox)ctl;
                    CMB.FlatStyle = FlatStyle.Flat;
                }
                else if (ctl.GetType() == typeof(NumericUpDown))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                }
                else if (ctl.GetType() == typeof(TrackBar))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;
                }
                else if (ctl.GetType() == typeof(LinkLabel))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;
                    LinkLabel LNK = (LinkLabel)ctl;
                    LNK.ActiveLinkColor  = TextColor;
                    LNK.LinkColor        = TextColor;
                    LNK.VisitedLinkColor = TextColor;
                }
                else if (ctl.GetType() == typeof(BackstageView))
                {
                    var bsv = ctl as BackstageView;

                    bsv.BackColor              = BGColor;
                    bsv.ButtonsAreaBgColor     = ControlBGColor;
                    bsv.HighlightColor2        = Color.FromArgb(0x94, 0xc1, 0x1f);
                    bsv.HighlightColor1        = Color.FromArgb(0x40, 0x57, 0x04);
                    bsv.SelectedTextColor      = Color.White;
                    bsv.UnSelectedTextColor    = Color.Gray;
                    bsv.ButtonsAreaPencilColor = Color.DarkGray;
                }

                if (ctl.Controls.Count > 0)
                {
                    ApplyBurntKermitTheme(ctl, 1);
                }
            }
        }
Exemple #10
0
        private static void ApplyCustomTheme(Control temp, int level)
        {
            if (level == 0)
            {
                temp.BackColor = BGColor;
                temp.ForeColor = TextColor;
            }

            foreach (Control ctl in temp.Controls)
            {
                if (ctl.GetType() == typeof(Panel))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;
                }
                else if (ctl.GetType() == typeof(GroupBox))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;
                }
                else if (ctl.GetType() == typeof(MyLabel))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;
                }
                else if (ctl.GetType() == typeof(Button))
                {
                    ctl.ForeColor = TextColor;
                    ctl.BackColor = ButBG;
                }
                else if (ctl.GetType() == typeof(MyButton))
                {
                    ArdupilotMega.Controls.MyButton but = (MyButton)ctl;
                    but.BGGradTop = ButBG;
                    try
                    {
                        but.BGGradBot = Color.FromArgb(ButBG.ToArgb() - 0x333333);
                    }
                    catch { }
                    but.TextColor = TextColor;
                    but.Outline   = ButBorder;
                }
                else if (ctl.GetType() == typeof(TextBox))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                    TextBox txt = (TextBox)ctl;
                    txt.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(DomainUpDown))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                    DomainUpDown txt = (DomainUpDown)ctl;
                    txt.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(GroupBox) || ctl.GetType() == typeof(UserControl))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;
                }
                else if (ctl.GetType() == typeof(ZedGraph.ZedGraphControl))
                {
                    var zg1 = (ZedGraph.ZedGraphControl)ctl;
                    zg1.GraphPane.Chart.Fill = new ZedGraph.Fill(ControlBGColor);
                    zg1.GraphPane.Fill       = new ZedGraph.Fill(BGColor);

                    foreach (ZedGraph.LineItem li in zg1.GraphPane.CurveList)
                    {
                        li.Line.Width = 2;
                    }

                    zg1.GraphPane.Title.FontSpec.FontColor = TextColor;

                    zg1.GraphPane.XAxis.MajorTic.Color  = TextColor;
                    zg1.GraphPane.XAxis.MinorTic.Color  = TextColor;
                    zg1.GraphPane.YAxis.MajorTic.Color  = TextColor;
                    zg1.GraphPane.YAxis.MinorTic.Color  = TextColor;
                    zg1.GraphPane.Y2Axis.MajorTic.Color = TextColor;
                    zg1.GraphPane.Y2Axis.MinorTic.Color = TextColor;

                    zg1.GraphPane.XAxis.MajorGrid.Color  = TextColor;
                    zg1.GraphPane.YAxis.MajorGrid.Color  = TextColor;
                    zg1.GraphPane.Y2Axis.MajorGrid.Color = TextColor;

                    zg1.GraphPane.YAxis.Scale.FontSpec.FontColor  = TextColor;
                    zg1.GraphPane.YAxis.Title.FontSpec.FontColor  = TextColor;
                    zg1.GraphPane.Y2Axis.Title.FontSpec.FontColor = TextColor;
                    zg1.GraphPane.Y2Axis.Scale.FontSpec.FontColor = TextColor;

                    zg1.GraphPane.XAxis.Scale.FontSpec.FontColor = TextColor;
                    zg1.GraphPane.XAxis.Title.FontSpec.FontColor = TextColor;

                    zg1.GraphPane.Legend.Fill = new ZedGraph.Fill(ControlBGColor);
                    zg1.GraphPane.Legend.FontSpec.FontColor = TextColor;
                }
                else if (ctl.GetType() == typeof(BSE.Windows.Forms.Panel) || ctl.GetType() == typeof(SplitterPanel))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
                }
                else if (ctl.GetType() == typeof(Form))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
                }
                else if (ctl.GetType() == typeof(RichTextBox))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                    RichTextBox txtr = (RichTextBox)ctl;
                    txtr.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(CheckedListBox))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                    CheckedListBox txtr = (CheckedListBox)ctl;
                    txtr.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(TabPage))
                {
                    ctl.BackColor = BGColor;  //ControlBGColor
                    ctl.ForeColor = TextColor;
                    TabPage txtr = (TabPage)ctl;
                    txtr.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(TabControl))
                {
                    ctl.BackColor = BGColor;  //ControlBGColor
                    ctl.ForeColor = TextColor;
                    TabControl txtr = (TabControl)ctl;
                }
                else if (ctl.GetType() == typeof(DataGridView))
                {
                    ctl.ForeColor = TextColor;
                    DataGridView dgv = (DataGridView)ctl;
                    dgv.EnableHeadersVisualStyles = false;
                    dgv.BorderStyle     = BorderStyle.None;
                    dgv.BackgroundColor = BGColor;
                    DataGridViewCellStyle rs = new DataGridViewCellStyle();
                    rs.BackColor             = ControlBGColor;
                    rs.ForeColor             = TextColor;
                    dgv.RowsDefaultCellStyle = rs;

                    DataGridViewCellStyle hs = new DataGridViewCellStyle(dgv.ColumnHeadersDefaultCellStyle);
                    hs.BackColor = BGColor;
                    hs.ForeColor = TextColor;

                    dgv.ColumnHeadersDefaultCellStyle = hs;
                    dgv.RowHeadersDefaultCellStyle    = hs;
                }
                else if (ctl.GetType() == typeof(CheckBox) || ctl.GetType() == typeof(MavlinkCheckBox))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;
                    CheckBox CHK = (CheckBox)ctl;
                    // CHK.FlatStyle = FlatStyle.Flat;
                }
                else if (ctl.GetType() == typeof(ComboBox) || ctl.GetType() == typeof(MavlinkComboBox))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                    ComboBox CMB = (ComboBox)ctl;
                    CMB.FlatStyle = FlatStyle.Flat;
                }
                else if (ctl.GetType() == typeof(NumericUpDown) || ctl.GetType() == typeof(MavlinkNumericUpDown))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                }
                else if (ctl.GetType() == typeof(TrackBar))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;
                }
                else if (ctl.GetType() == typeof(LinkLabel))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;
                    LinkLabel LNK = (LinkLabel)ctl;
                    LNK.ActiveLinkColor  = TextColor;
                    LNK.LinkColor        = TextColor;
                    LNK.VisitedLinkColor = TextColor;
                }
                else if (ctl.GetType() == typeof(BackstageView))
                {
                    var bsv = ctl as BackstageView;

                    bsv.BackColor              = BGColor;
                    bsv.ButtonsAreaBgColor     = ControlBGColor;
                    bsv.HighlightColor2        = Color.FromArgb(0x94, 0xc1, 0x1f);
                    bsv.HighlightColor1        = Color.FromArgb(0x40, 0x57, 0x04);
                    bsv.SelectedTextColor      = Color.White;
                    bsv.UnSelectedTextColor    = Color.Gray;
                    bsv.ButtonsAreaPencilColor = Color.DarkGray;
                }
                else if (ctl.GetType() == typeof(HorizontalProgressBar2) || ctl.GetType() == typeof(VerticalProgressBar2))
                {
                    ((HorizontalProgressBar2)ctl).BackgroundColor = ControlBGColor;
                    ((HorizontalProgressBar2)ctl).ValueColor      = Color.FromArgb(148, 193, 31);
                }

                if (ctl.Controls.Count > 0)
                {
                    ApplyCustomTheme(ctl, 1);
                }
            }
        }
        private void InitializeComponent()
        {
            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
            this.TXT_logfile = new System.Windows.Forms.TextBox();
            this.TXT_jpgdir = new System.Windows.Forms.TextBox();
            this.TXT_offsetseconds = new System.Windows.Forms.TextBox();
            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
            this.TXT_outputlog = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.BUT_Geotagimages = new ArdupilotMega.Controls.MyButton();
            this.BUT_estoffset = new ArdupilotMega.Controls.MyButton();
            this.BUT_doit = new ArdupilotMega.Controls.MyButton();
            this.BUT_browsedir = new ArdupilotMega.Controls.MyButton();
            this.BUT_browselog = new ArdupilotMega.Controls.MyButton();
            this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
            this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
            this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();
            this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();
            this.label2 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.label6 = new System.Windows.Forms.Label();
            this.BUT_networklinkgeoref = new ArdupilotMega.Controls.MyButton();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();
            this.SuspendLayout();
            // 
            // openFileDialog1
            // 
            this.openFileDialog1.FileName = "openFileDialog1";
            // 
            // TXT_logfile
            // 
            this.TXT_logfile.Location = new System.Drawing.Point(28, 14);
            this.TXT_logfile.Name = "TXT_logfile";
            this.TXT_logfile.Size = new System.Drawing.Size(317, 20);
            this.TXT_logfile.TabIndex = 2;
            this.TXT_logfile.TextChanged += new System.EventHandler(this.TXT_logfile_TextChanged);
            // 
            // TXT_jpgdir
            // 
            this.TXT_jpgdir.Location = new System.Drawing.Point(28, 43);
            this.TXT_jpgdir.Name = "TXT_jpgdir";
            this.TXT_jpgdir.Size = new System.Drawing.Size(317, 20);
            this.TXT_jpgdir.TabIndex = 3;
            // 
            // TXT_offsetseconds
            // 
            this.TXT_offsetseconds.Location = new System.Drawing.Point(180, 69);
            this.TXT_offsetseconds.Name = "TXT_offsetseconds";
            this.TXT_offsetseconds.Size = new System.Drawing.Size(100, 20);
            this.TXT_offsetseconds.TabIndex = 4;
            this.TXT_offsetseconds.Text = "0";
            // 
            // TXT_outputlog
            // 
            this.TXT_outputlog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
            | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.TXT_outputlog.Location = new System.Drawing.Point(28, 190);
            this.TXT_outputlog.Multiline = true;
            this.TXT_outputlog.Name = "TXT_outputlog";
            this.TXT_outputlog.ReadOnly = true;
            this.TXT_outputlog.ScrollBars = System.Windows.Forms.ScrollBars.Both;
            this.TXT_outputlog.Size = new System.Drawing.Size(397, 160);
            this.TXT_outputlog.TabIndex = 6;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(94, 75);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(78, 13);
            this.label1.TabIndex = 7;
            this.label1.Text = "Seconds offset";
            // 
            // BUT_Geotagimages
            // 
            this.BUT_Geotagimages.Enabled = false;
            this.BUT_Geotagimages.Location = new System.Drawing.Point(259, 161);
            this.BUT_Geotagimages.Name = "BUT_Geotagimages";
            this.BUT_Geotagimages.Size = new System.Drawing.Size(75, 23);
            this.BUT_Geotagimages.TabIndex = 9;
            this.BUT_Geotagimages.Text = "GeoTag Images";
            this.BUT_Geotagimages.UseVisualStyleBackColor = true;
            this.BUT_Geotagimages.Click += new System.EventHandler(this.BUT_Geotagimages_Click);
            // 
            // BUT_estoffset
            // 
            this.BUT_estoffset.Location = new System.Drawing.Point(286, 67);
            this.BUT_estoffset.Name = "BUT_estoffset";
            this.BUT_estoffset.Size = new System.Drawing.Size(75, 23);
            this.BUT_estoffset.TabIndex = 8;
            this.BUT_estoffset.Text = "Estimate Offset";
            this.BUT_estoffset.UseVisualStyleBackColor = true;
            this.BUT_estoffset.Click += new System.EventHandler(this.BUT_estoffset_Click);
            // 
            // BUT_doit
            // 
            this.BUT_doit.Location = new System.Drawing.Point(97, 161);
            this.BUT_doit.Name = "BUT_doit";
            this.BUT_doit.Size = new System.Drawing.Size(75, 23);
            this.BUT_doit.TabIndex = 5;
            this.BUT_doit.Text = "Do It";
            this.BUT_doit.UseVisualStyleBackColor = true;
            this.BUT_doit.Click += new System.EventHandler(this.BUT_doit_Click);
            // 
            // BUT_browsedir
            // 
            this.BUT_browsedir.Location = new System.Drawing.Point(351, 41);
            this.BUT_browsedir.Name = "BUT_browsedir";
            this.BUT_browsedir.Size = new System.Drawing.Size(75, 23);
            this.BUT_browsedir.TabIndex = 1;
            this.BUT_browsedir.Text = "Browse Directory";
            this.BUT_browsedir.UseVisualStyleBackColor = true;
            this.BUT_browsedir.Click += new System.EventHandler(this.BUT_browsedir_Click);
            // 
            // BUT_browselog
            // 
            this.BUT_browselog.Location = new System.Drawing.Point(351, 12);
            this.BUT_browselog.Name = "BUT_browselog";
            this.BUT_browselog.Size = new System.Drawing.Size(75, 23);
            this.BUT_browselog.TabIndex = 0;
            this.BUT_browselog.Text = "Browse Log";
            this.BUT_browselog.UseVisualStyleBackColor = true;
            this.BUT_browselog.Click += new System.EventHandler(this.BUT_browselog_Click);
            // 
            // numericUpDown1
            // 
            this.numericUpDown1.Location = new System.Drawing.Point(130, 116);
            this.numericUpDown1.Name = "numericUpDown1";
            this.numericUpDown1.Size = new System.Drawing.Size(42, 20);
            this.numericUpDown1.TabIndex = 10;
            this.numericUpDown1.Value = new decimal(new int[] {
            4,
            0,
            0,
            0});
            // 
            // numericUpDown2
            // 
            this.numericUpDown2.Location = new System.Drawing.Point(178, 116);
            this.numericUpDown2.Name = "numericUpDown2";
            this.numericUpDown2.Size = new System.Drawing.Size(42, 20);
            this.numericUpDown2.TabIndex = 11;
            this.numericUpDown2.Value = new decimal(new int[] {
            5,
            0,
            0,
            0});
            // 
            // numericUpDown3
            // 
            this.numericUpDown3.Location = new System.Drawing.Point(226, 116);
            this.numericUpDown3.Name = "numericUpDown3";
            this.numericUpDown3.Size = new System.Drawing.Size(42, 20);
            this.numericUpDown3.TabIndex = 12;
            this.numericUpDown3.Value = new decimal(new int[] {
            7,
            0,
            0,
            0});
            // 
            // numericUpDown4
            // 
            this.numericUpDown4.Location = new System.Drawing.Point(274, 116);
            this.numericUpDown4.Name = "numericUpDown4";
            this.numericUpDown4.Size = new System.Drawing.Size(42, 20);
            this.numericUpDown4.TabIndex = 13;
            this.numericUpDown4.Value = new decimal(new int[] {
            9,
            0,
            0,
            0});
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(127, 100);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(22, 13);
            this.label2.TabIndex = 14;
            this.label2.Text = "Lat";
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(175, 100);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(25, 13);
            this.label3.TabIndex = 15;
            this.label3.Text = "Lon";
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(223, 100);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(19, 13);
            this.label4.TabIndex = 16;
            this.label4.Text = "Alt";
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(271, 100);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(47, 13);
            this.label5.TabIndex = 17;
            this.label5.Text = "Heading";
            // 
            // label6
            // 
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(63, 118);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(61, 13);
            this.label6.TabIndex = 18;
            this.label6.Text = "Log Offsets";
            // 
            // BUT_networklinkgeoref
            // 
            this.BUT_networklinkgeoref.Location = new System.Drawing.Point(178, 161);
            this.BUT_networklinkgeoref.Name = "BUT_networklinkgeoref";
            this.BUT_networklinkgeoref.Size = new System.Drawing.Size(75, 23);
            this.BUT_networklinkgeoref.TabIndex = 19;
            this.BUT_networklinkgeoref.Text = "Location Kml";
            this.BUT_networklinkgeoref.UseVisualStyleBackColor = true;
            this.BUT_networklinkgeoref.Click += new System.EventHandler(this.BUT_networklinkgeoref_Click);
            // 
            // Georefimage
            // 
            this.ClientSize = new System.Drawing.Size(452, 362);
            this.Controls.Add(this.BUT_networklinkgeoref);
            this.Controls.Add(this.label6);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.numericUpDown4);
            this.Controls.Add(this.numericUpDown3);
            this.Controls.Add(this.numericUpDown2);
            this.Controls.Add(this.numericUpDown1);
            this.Controls.Add(this.BUT_Geotagimages);
            this.Controls.Add(this.BUT_estoffset);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.TXT_outputlog);
            this.Controls.Add(this.BUT_doit);
            this.Controls.Add(this.TXT_offsetseconds);
            this.Controls.Add(this.TXT_jpgdir);
            this.Controls.Add(this.TXT_logfile);
            this.Controls.Add(this.BUT_browsedir);
            this.Controls.Add(this.BUT_browselog);
            this.Name = "Georefimage";
            this.Text = "Geo Ref Images";
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Georefimage));
     this.openFileDialog1      = new System.Windows.Forms.OpenFileDialog();
     this.TXT_logfile          = new System.Windows.Forms.TextBox();
     this.TXT_jpgdir           = new System.Windows.Forms.TextBox();
     this.TXT_offsetseconds    = new System.Windows.Forms.TextBox();
     this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
     this.TXT_outputlog        = new System.Windows.Forms.TextBox();
     this.label1                = new System.Windows.Forms.Label();
     this.BUT_Geotagimages      = new ArdupilotMega.Controls.MyButton();
     this.BUT_estoffset         = new ArdupilotMega.Controls.MyButton();
     this.BUT_doit              = new ArdupilotMega.Controls.MyButton();
     this.BUT_browsedir         = new ArdupilotMega.Controls.MyButton();
     this.BUT_browselog         = new ArdupilotMega.Controls.MyButton();
     this.NUM_latpos            = new System.Windows.Forms.NumericUpDown();
     this.NUM_lngpos            = new System.Windows.Forms.NumericUpDown();
     this.NUM_altpos            = new System.Windows.Forms.NumericUpDown();
     this.NUM_headingpos        = new System.Windows.Forms.NumericUpDown();
     this.label2                = new System.Windows.Forms.Label();
     this.label3                = new System.Windows.Forms.Label();
     this.label4                = new System.Windows.Forms.Label();
     this.label5                = new System.Windows.Forms.Label();
     this.label6                = new System.Windows.Forms.Label();
     this.BUT_networklinkgeoref = new ArdupilotMega.Controls.MyButton();
     this.num_vfov              = new System.Windows.Forms.NumericUpDown();
     this.num_hfov              = new System.Windows.Forms.NumericUpDown();
     this.label7                = new System.Windows.Forms.Label();
     this.label8                = new System.Windows.Forms.Label();
     this.num_camerarotation    = new System.Windows.Forms.NumericUpDown();
     this.label9                = new System.Windows.Forms.Label();
     this.NUM_time              = new System.Windows.Forms.NumericUpDown();
     this.label10               = new System.Windows.Forms.Label();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_latpos)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_lngpos)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_altpos)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_headingpos)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_vfov)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_hfov)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_camerarotation)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_time)).BeginInit();
     this.SuspendLayout();
     //
     // openFileDialog1
     //
     this.openFileDialog1.FileName = "openFileDialog1";
     //
     // TXT_logfile
     //
     resources.ApplyResources(this.TXT_logfile, "TXT_logfile");
     this.TXT_logfile.Name         = "TXT_logfile";
     this.TXT_logfile.TextChanged += new System.EventHandler(this.TXT_logfile_TextChanged);
     //
     // TXT_jpgdir
     //
     resources.ApplyResources(this.TXT_jpgdir, "TXT_jpgdir");
     this.TXT_jpgdir.Name = "TXT_jpgdir";
     //
     // TXT_offsetseconds
     //
     resources.ApplyResources(this.TXT_offsetseconds, "TXT_offsetseconds");
     this.TXT_offsetseconds.Name = "TXT_offsetseconds";
     //
     // TXT_outputlog
     //
     resources.ApplyResources(this.TXT_outputlog, "TXT_outputlog");
     this.TXT_outputlog.Name     = "TXT_outputlog";
     this.TXT_outputlog.ReadOnly = true;
     //
     // label1
     //
     resources.ApplyResources(this.label1, "label1");
     this.label1.Name = "label1";
     //
     // BUT_Geotagimages
     //
     resources.ApplyResources(this.BUT_Geotagimages, "BUT_Geotagimages");
     this.BUT_Geotagimages.Name = "BUT_Geotagimages";
     this.BUT_Geotagimages.UseVisualStyleBackColor = true;
     this.BUT_Geotagimages.Click += new System.EventHandler(this.BUT_Geotagimages_Click);
     //
     // BUT_estoffset
     //
     resources.ApplyResources(this.BUT_estoffset, "BUT_estoffset");
     this.BUT_estoffset.Name = "BUT_estoffset";
     this.BUT_estoffset.UseVisualStyleBackColor = true;
     this.BUT_estoffset.Click += new System.EventHandler(this.BUT_estoffset_Click);
     //
     // BUT_doit
     //
     resources.ApplyResources(this.BUT_doit, "BUT_doit");
     this.BUT_doit.Name = "BUT_doit";
     this.BUT_doit.UseVisualStyleBackColor = true;
     this.BUT_doit.Click += new System.EventHandler(this.BUT_doit_Click);
     //
     // BUT_browsedir
     //
     resources.ApplyResources(this.BUT_browsedir, "BUT_browsedir");
     this.BUT_browsedir.Name = "BUT_browsedir";
     this.BUT_browsedir.UseVisualStyleBackColor = true;
     this.BUT_browsedir.Click += new System.EventHandler(this.BUT_browsedir_Click);
     //
     // BUT_browselog
     //
     resources.ApplyResources(this.BUT_browselog, "BUT_browselog");
     this.BUT_browselog.Name = "BUT_browselog";
     this.BUT_browselog.UseVisualStyleBackColor = true;
     this.BUT_browselog.Click += new System.EventHandler(this.BUT_browselog_Click);
     //
     // NUM_latpos
     //
     resources.ApplyResources(this.NUM_latpos, "NUM_latpos");
     this.NUM_latpos.Name  = "NUM_latpos";
     this.NUM_latpos.Value = new decimal(new int[] {
         3,
         0,
         0,
         0
     });
     //
     // NUM_lngpos
     //
     resources.ApplyResources(this.NUM_lngpos, "NUM_lngpos");
     this.NUM_lngpos.Name  = "NUM_lngpos";
     this.NUM_lngpos.Value = new decimal(new int[] {
         4,
         0,
         0,
         0
     });
     //
     // NUM_altpos
     //
     resources.ApplyResources(this.NUM_altpos, "NUM_altpos");
     this.NUM_altpos.Name  = "NUM_altpos";
     this.NUM_altpos.Value = new decimal(new int[] {
         5,
         0,
         0,
         0
     });
     //
     // NUM_headingpos
     //
     resources.ApplyResources(this.NUM_headingpos, "NUM_headingpos");
     this.NUM_headingpos.Name  = "NUM_headingpos";
     this.NUM_headingpos.Value = new decimal(new int[] {
         8,
         0,
         0,
         0
     });
     //
     // label2
     //
     resources.ApplyResources(this.label2, "label2");
     this.label2.Name = "label2";
     //
     // label3
     //
     resources.ApplyResources(this.label3, "label3");
     this.label3.Name = "label3";
     //
     // label4
     //
     resources.ApplyResources(this.label4, "label4");
     this.label4.Name = "label4";
     //
     // label5
     //
     resources.ApplyResources(this.label5, "label5");
     this.label5.Name = "label5";
     //
     // label6
     //
     resources.ApplyResources(this.label6, "label6");
     this.label6.Name = "label6";
     //
     // BUT_networklinkgeoref
     //
     resources.ApplyResources(this.BUT_networklinkgeoref, "BUT_networklinkgeoref");
     this.BUT_networklinkgeoref.Name = "BUT_networklinkgeoref";
     this.BUT_networklinkgeoref.UseVisualStyleBackColor = true;
     this.BUT_networklinkgeoref.Click += new System.EventHandler(this.BUT_networklinkgeoref_Click);
     //
     // num_vfov
     //
     resources.ApplyResources(this.num_vfov, "num_vfov");
     this.num_vfov.Maximum = new decimal(new int[] {
         900,
         0,
         0,
         0
     });
     this.num_vfov.Name  = "num_vfov";
     this.num_vfov.Value = new decimal(new int[] {
         130,
         0,
         0,
         0
     });
     //
     // num_hfov
     //
     resources.ApplyResources(this.num_hfov, "num_hfov");
     this.num_hfov.Maximum = new decimal(new int[] {
         900,
         0,
         0,
         0
     });
     this.num_hfov.Name  = "num_hfov";
     this.num_hfov.Value = new decimal(new int[] {
         200,
         0,
         0,
         0
     });
     //
     // label7
     //
     resources.ApplyResources(this.label7, "label7");
     this.label7.Name = "label7";
     //
     // label8
     //
     resources.ApplyResources(this.label8, "label8");
     this.label8.Name = "label8";
     //
     // num_camerarotation
     //
     resources.ApplyResources(this.num_camerarotation, "num_camerarotation");
     this.num_camerarotation.Maximum = new decimal(new int[] {
         180,
         0,
         0,
         0
     });
     this.num_camerarotation.Minimum = new decimal(new int[] {
         180,
         0,
         0,
         -2147483648
     });
     this.num_camerarotation.Name  = "num_camerarotation";
     this.num_camerarotation.Value = new decimal(new int[] {
         90,
         0,
         0,
         0
     });
     //
     // label9
     //
     resources.ApplyResources(this.label9, "label9");
     this.label9.Name = "label9";
     //
     // NUM_time
     //
     resources.ApplyResources(this.NUM_time, "NUM_time");
     this.NUM_time.Name  = "NUM_time";
     this.NUM_time.Value = new decimal(new int[] {
         2,
         0,
         0,
         0
     });
     //
     // label10
     //
     resources.ApplyResources(this.label10, "label10");
     this.label10.Name = "label10";
     //
     // Georefimage
     //
     resources.ApplyResources(this, "$this");
     this.Controls.Add(this.label10);
     this.Controls.Add(this.NUM_time);
     this.Controls.Add(this.label9);
     this.Controls.Add(this.num_camerarotation);
     this.Controls.Add(this.label8);
     this.Controls.Add(this.label7);
     this.Controls.Add(this.num_hfov);
     this.Controls.Add(this.num_vfov);
     this.Controls.Add(this.BUT_networklinkgeoref);
     this.Controls.Add(this.label6);
     this.Controls.Add(this.label5);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.NUM_headingpos);
     this.Controls.Add(this.NUM_altpos);
     this.Controls.Add(this.NUM_lngpos);
     this.Controls.Add(this.NUM_latpos);
     this.Controls.Add(this.BUT_Geotagimages);
     this.Controls.Add(this.BUT_estoffset);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.TXT_outputlog);
     this.Controls.Add(this.BUT_doit);
     this.Controls.Add(this.TXT_offsetseconds);
     this.Controls.Add(this.TXT_jpgdir);
     this.Controls.Add(this.TXT_logfile);
     this.Controls.Add(this.BUT_browsedir);
     this.Controls.Add(this.BUT_browselog);
     this.Name = "Georefimage";
     ((System.ComponentModel.ISupportInitialize)(this.NUM_latpos)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_lngpos)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_altpos)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_headingpos)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_vfov)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_hfov)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_camerarotation)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_time)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
        private static void ApplyBurntKermitTheme(Control temp, int level)
        {
            Color BGColor        = Color.FromArgb(0x26, 0x27, 0x28); // background
            Color ControlBGColor = Color.FromArgb(0x43, 0x44, 0x45); // editable bg color
            Color TextColor      = Color.White;

            if (level == 0)
            {
                temp.BackColor = BGColor;
                temp.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
            }

            //temp.Font = new Font("Lucida Console", 8.25f);

            foreach (Control ctl in temp.Controls)
            {
                if (ctl.GetType() == typeof(Button))
                {
                    ctl.ForeColor = Color.Black;
                }
                else if (ctl.GetType() == typeof(MyButton))
                {
                    Color PrimeColor = Color.FromArgb(0x94, 0xc1, 0x1f);

                    ArdupilotMega.Controls.MyButton but = (MyButton)ctl;
                    //but.BGGradTop = Color.FromArgb(PrimeColor.R, PrimeColor.G, PrimeColor.B);
                    //but.BGGradBot = Color.FromArgb(255 - (int)(PrimeColor.R * 0.27), 255 - (int)(PrimeColor.G * 0.14), 255 - (int)(PrimeColor.B * 0.79));
                    //but.ForeColor = Color.FromArgb(0x40, 0x57, 0x04); //Color.FromArgb(255 - (int)(PrimeColor.R * 0.7), 255 - (int)(PrimeColor.G * 0.8), 255 - (int)(PrimeColor.B * 0.1));
                    //but.Outline = ControlBGColor;
                }
                else if (ctl.GetType() == typeof(TextBox))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
                    TextBox txt = (TextBox)ctl;
                    txt.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(DomainUpDown))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
                    DomainUpDown txt = (DomainUpDown)ctl;
                    txt.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(GroupBox))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
                }
                else if (ctl.GetType() == typeof(ZedGraph.ZedGraphControl))
                {
                    var zg1 = (ZedGraph.ZedGraphControl)ctl;
                    zg1.GraphPane.Chart.Fill = new ZedGraph.Fill(Color.FromArgb(0x1f, 0x1f, 0x20));
                    zg1.GraphPane.Fill       = new ZedGraph.Fill(Color.FromArgb(0x37, 0x37, 0x38));

                    foreach (ZedGraph.LineItem li in zg1.GraphPane.CurveList)
                    {
                        li.Line.Width = 4;
                    }

                    zg1.GraphPane.Title.FontSpec.FontColor = TextColor;

                    zg1.GraphPane.XAxis.MajorTic.Color  = Color.White;
                    zg1.GraphPane.XAxis.MinorTic.Color  = Color.White;
                    zg1.GraphPane.YAxis.MajorTic.Color  = Color.White;
                    zg1.GraphPane.YAxis.MinorTic.Color  = Color.White;
                    zg1.GraphPane.Y2Axis.MajorTic.Color = Color.White;
                    zg1.GraphPane.Y2Axis.MinorTic.Color = Color.White;

                    zg1.GraphPane.XAxis.MajorGrid.Color  = Color.White;
                    zg1.GraphPane.YAxis.MajorGrid.Color  = Color.White;
                    zg1.GraphPane.Y2Axis.MajorGrid.Color = Color.White;

                    zg1.GraphPane.YAxis.Scale.FontSpec.FontColor  = Color.White;
                    zg1.GraphPane.YAxis.Title.FontSpec.FontColor  = Color.White;
                    zg1.GraphPane.Y2Axis.Title.FontSpec.FontColor = Color.White;
                    zg1.GraphPane.Y2Axis.Scale.FontSpec.FontColor = Color.White;

                    zg1.GraphPane.XAxis.Scale.FontSpec.FontColor = Color.White;
                    zg1.GraphPane.XAxis.Title.FontSpec.FontColor = Color.White;

                    zg1.GraphPane.Legend.Fill = new ZedGraph.Fill(Color.FromArgb(0x85, 0x84, 0x83));
                    zg1.GraphPane.Legend.FontSpec.FontColor = TextColor;
                }
                else if (ctl.GetType() == typeof(BSE.Windows.Forms.Panel) || ctl.GetType() == typeof(SplitterPanel))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
                }
                else if (ctl.GetType() == typeof(Form))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;// Color.FromArgb(0xe6, 0xe8, 0xea);
                }
                else if (ctl.GetType() == typeof(RichTextBox))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                    RichTextBox txtr = (RichTextBox)ctl;
                    txtr.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(CheckedListBox))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                    CheckedListBox txtr = (CheckedListBox)ctl;
                    txtr.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(TabPage))
                {
                    ctl.BackColor = BGColor;  //ControlBGColor
                    ctl.ForeColor = TextColor;
                    TabPage txtr = (TabPage)ctl;
                    txtr.BorderStyle = BorderStyle.None;
                }
                else if (ctl.GetType() == typeof(TabControl))
                {
                    ctl.BackColor = BGColor;  //ControlBGColor
                    ctl.ForeColor = TextColor;
                    TabControl txtr = (TabControl)ctl;
                }
                else if (ctl.GetType() == typeof(DataGridView))
                {
                    ctl.ForeColor = TextColor;
                    DataGridView dgv = (DataGridView)ctl;
                    dgv.EnableHeadersVisualStyles = false;
                    dgv.BorderStyle     = BorderStyle.None;
                    dgv.BackgroundColor = BGColor;
                    DataGridViewCellStyle rs = new DataGridViewCellStyle();
                    rs.BackColor             = ControlBGColor;
                    rs.ForeColor             = TextColor;
                    dgv.RowsDefaultCellStyle = rs;

                    DataGridViewCellStyle hs = new DataGridViewCellStyle(dgv.ColumnHeadersDefaultCellStyle);
                    hs.BackColor = BGColor;
                    hs.ForeColor = TextColor;

                    dgv.ColumnHeadersDefaultCellStyle = hs;
                    dgv.RowHeadersDefaultCellStyle    = hs;
                }
                else if (ctl.GetType() == typeof(ComboBox))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                    ComboBox CMB = (ComboBox)ctl;
                    CMB.FlatStyle = FlatStyle.Flat;
                }
                else if (ctl.GetType() == typeof(NumericUpDown))
                {
                    ctl.BackColor = ControlBGColor;
                    ctl.ForeColor = TextColor;
                }
                else if (ctl.GetType() == typeof(TrackBar))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;
                }
                else if (ctl.GetType() == typeof(LinkLabel))
                {
                    ctl.BackColor = BGColor;
                    ctl.ForeColor = TextColor;
                    LinkLabel LNK = (LinkLabel)ctl;
                    LNK.ActiveLinkColor  = TextColor;
                    LNK.LinkColor        = TextColor;
                    LNK.VisitedLinkColor = TextColor;
                }
                else if (ctl.GetType() == typeof(BackstageView))
                {
                    var bsv = ctl as BackstageView;

                    bsv.BackColor              = BGColor;
                    bsv.ButtonsAreaBgColor     = ControlBGColor;
                    bsv.HighlightColor2        = Color.FromArgb(0x94, 0xc1, 0x1f);
                    bsv.HighlightColor1        = Color.FromArgb(0x40, 0x57, 0x04);
                    bsv.SelectedTextColor      = Color.White;
                    bsv.UnSelectedTextColor    = Color.Gray;
                    bsv.ButtonsAreaPencilColor = Color.DarkGray;
                }
                else if (ctl.GetType() == typeof(HorizontalProgressBar2) || ctl.GetType() == typeof(VerticalProgressBar2))
                {
                    ((HorizontalProgressBar2)ctl).BackgroundColor = ControlBGColor;
                    ((HorizontalProgressBar2)ctl).ValueColor      = Color.FromArgb(148, 193, 31);
                }

                if (ctl.Controls.Count > 0)
                {
                    ApplyBurntKermitTheme(ctl, 1);
                }
            }
        }