Example #1
0
 private Button scalelinechartBtn; //button to normalize y scaling on linechart
 private void InversionControl_Load(object sender, EventArgs e)
 {
     this.BackColor = Color.FromArgb(33, 33, 33);
     _maxdifference = -1;
     _maxaverageres = -1;
     _minaverageres = -1;
     #region init_blockinfo
     _blockinfo = new OverlayPanel();
     _blockinfo.SuspendLayout();
     _blockinfo.Hide();
     lblId                                        = new Label();
     lblId.ForeColor                              = SystemColors.ControlDark;
     lblId.Location                               = new Point(0, 0);
     lblId.Height                                 = 15;
     lblRes                                       = new Label();
     lblRes.ForeColor                             = SystemColors.ControlDark;
     lblRes.Location                              = new Point(0, 28);
     lblRes.Width                                 = 140;
     lblRes.Height                                = 15;
     lblCord                                      = new Label();
     lblCord.ForeColor                            = SystemColors.ControlDark;
     lblCord.Location                             = new Point(0, 47);
     lblCord.Width                                = 150;
     lblCord.Height                               = 30;
     linechartBtn                                 = new Button();
     linechartBtn.BackColor                       = SystemColors.ControlDark;
     linechartBtn.BackgroundImage                 = Properties.Resources.line2;
     linechartBtn.BackgroundImageLayout           = ImageLayout.Stretch;
     linechartBtn.FlatAppearance.BorderColor      = SystemColors.ControlDarkDark;
     linechartBtn.FlatStyle                       = FlatStyle.Flat;
     linechartBtn.Location                        = new Point(150, 0);
     linechartBtn.Size                            = new Size(24, 24);
     linechartBtn.UseVisualStyleBackColor         = false;
     linechartBtn.Click                          += new EventHandler(this.linechartBtn_Click);
     scalelinechartBtn                            = new Button();
     scalelinechartBtn.BackColor                  = SystemColors.ControlDark;
     scalelinechartBtn.BackgroundImage            = Properties.Resources.scaley2;
     scalelinechartBtn.BackgroundImageLayout      = ImageLayout.Stretch;
     scalelinechartBtn.FlatAppearance.BorderColor = SystemColors.ControlDarkDark;
     scalelinechartBtn.FlatStyle                  = FlatStyle.Flat;
     scalelinechartBtn.Size                       = new Size(24, 24);
     scalelinechartBtn.UseVisualStyleBackColor    = false;
     scalelinechartBtn.Click                     += new EventHandler(this.scalelinechartBtn_Click);
     scalelinechartBtn.Hide();
     _blockinfo.Controls.Add(lblId);
     _blockinfo.Controls.Add(lblRes);
     _blockinfo.Controls.Add(lblCord);
     _blockinfo.Controls.Add(linechartBtn);
     _blockinfo.ResumeLayout();
     Controls.Add(_blockinfo);
     #endregion
     _defaultSize = new Size(_blockinfo.Width, _blockinfo.Height);
 }
Example #2
0
        private TextBox txbmax;         //textbox that sets the red value
        private void MainForm_Load(object sender, EventArgs e)
        {
            settingsPanel.BackColor = Color.FromArgb(66, 66, 66);
            _boldFont = new Font("Microsoft Sans Serif", 9, FontStyle.Bold);

            #region init_viewpanel
            _viewpanel = new OverlayPanel();
            _viewpanel.Hide();
            _viewpanel.SuspendLayout();
            inversionControl.Controls.Add(_viewpanel);

            MyTrackBar bar = new MyTrackBar();
            bar.Minimum   = 0;
            bar.Maximum   = 60;
            bar.Size      = new Size(300, 40);
            bar.BackColor = Color.FromArgb(66, 66, 66);
            bar.Scroll   += huebar_ValueChanged;

            cbxenable                 = new CheckBox();
            cbxenable.BackColor       = Color.FromArgb(66, 66, 66);
            cbxenable.FlatStyle       = FlatStyle.Flat;
            cbxenable.ForeColor       = SystemColors.ControlDark;
            cbxenable.Location        = new Point(10, bar.Location.Y + bar.Height + 20);
            cbxenable.Size            = new Size(100, 29);
            cbxenable.TabIndex        = 2;
            cbxenable.Text            = "View Change Rate";
            cbxenable.CheckedChanged += cbxenable_CheckedChanged;

            txbmin              = new TextBox();
            txbmin.Enabled      = false;
            txbmin.BackColor    = Color.FromArgb(66, 66, 66);
            txbmin.ForeColor    = SystemColors.ControlDark;
            txbmin.Location     = new Point(cbxenable.Location.X + cbxenable.Width + 10, cbxenable.Location.Y);
            txbmin.Size         = new Size(150, 30);
            txbmin.Text         = "-1";
            txbmin.TextChanged += txbmin_TextChanged;

            txbmax              = new TextBox();
            txbmax.Enabled      = false;
            txbmax.BackColor    = Color.FromArgb(66, 66, 66);
            txbmax.ForeColor    = SystemColors.ControlDark;
            txbmax.Location     = new Point(txbmin.Location.X, txbmin.Location.Y + txbmin.Height + 10);
            txbmax.Size         = new Size(150, 30);
            txbmax.Text         = "-1";
            txbmax.TextChanged += txbmax_TextChanged;

            cbxenableavg                 = new CheckBox();
            cbxenableavg.BackColor       = Color.FromArgb(66, 66, 66);
            cbxenableavg.FlatStyle       = FlatStyle.Flat;
            cbxenableavg.ForeColor       = SystemColors.ControlDark;
            cbxenableavg.Location        = new Point(10, txbmax.Location.Y + txbmax.Height + 20);
            cbxenableavg.Size            = new Size(100, 29);
            cbxenableavg.TabIndex        = 2;
            cbxenableavg.Text            = "View Average Resistivity";
            cbxenableavg.CheckedChanged += cbxenableavg_CheckedChanged;

            _viewpanel.Controls.Add(bar);
            _viewpanel.Controls.Add(cbxenable);
            _viewpanel.Controls.Add(txbmin);
            _viewpanel.Controls.Add(txbmax);
            _viewpanel.Controls.Add(cbxenableavg);
            _viewpanel.ResumeLayout();
            #endregion

            #region init_loadingpanel
            _loadingpanel = new OverlayPanel();
            _loadingpanel.Hide();
            _loadingpanel.SuspendLayout();
            inversionControl.Controls.Add(_loadingpanel);

            Button loadFolderBtn = new Button();
            loadFolderBtn.BackColor                  = System.Drawing.SystemColors.ControlDark;
            loadFolderBtn.BackgroundImage            = Properties.Resources.folderopen2;
            loadFolderBtn.BackgroundImageLayout      = System.Windows.Forms.ImageLayout.Stretch;
            loadFolderBtn.FlatAppearance.BorderColor = System.Drawing.SystemColors.ControlDarkDark;
            loadFolderBtn.FlatStyle                  = System.Windows.Forms.FlatStyle.Flat;
            loadFolderBtn.Location = new System.Drawing.Point(0, 0);
            loadFolderBtn.Name     = "loadBtn";
            loadFolderBtn.Size     = new System.Drawing.Size(24, 24);
            loadFolderBtn.TabIndex = 0;
            loadFolderBtn.UseVisualStyleBackColor = false;
            loadFolderBtn.Click += new System.EventHandler(this.loadFolderBtn_Click);

            lblpath           = new Label();
            lblpath.AutoSize  = true;
            lblpath.Text      = "Loading Path...";
            lblpath.ForeColor = SystemColors.ControlDark;
            lblpath.Location  = new Point(loadFolderBtn.Location.X + loadBtn.Width - 10, 15);

            _loadingpanel.Controls.Add(loadFolderBtn);
            _loadingpanel.Controls.Add(lblpath);
            _loadingpanel.ResumeLayout();
            #endregion

            #region init_datepanel
            _datepanel = new OverlayPanel();
            _datepanel.Hide();
            _datepanel.SuspendLayout();
            inversionControl.Controls.Add(_datepanel);

            lbldate           = new Label();
            lbldate.AutoSize  = true;
            lbldate.Text      = "Date: ...";
            lbldate.Font      = _boldFont;
            lbldate.Location  = new Point(0, 0);
            lbldate.ForeColor = SystemColors.ControlDark;

            timechanger           = new MyTrackBar();
            timechanger.Scroll   += timechanger_ValueChanged;
            timechanger.Size      = new Size(600, 40);
            timechanger.BackColor = Color.FromArgb(66, 66, 66);
            timechanger.Location  = new Point(0, lbldate.Location.Y + lbldate.Height + 20);

            _datepanel.Controls.Add(lbldate);
            _datepanel.Controls.Add(timechanger);
            _datepanel.ResumeLayout();
            #endregion
        }