FrmProxyCmd: Replace TextBox with CtrOutput.

This commit is contained in:
2021-05-13 21:38:58 +02:00
parent 92e5ce837a
commit 72c0450d40
2 changed files with 23 additions and 23 deletions

View File

@@ -29,10 +29,10 @@
private void InitializeComponent()
{
this.splitMain = new VAR.Toolbox.Controls.CSplitContainer();
this.txtOutput = new VAR.Toolbox.Controls.TextBoxMonospace();
this.txtInput = new VAR.Toolbox.Controls.TextBoxMonospace();
this.ddlCurrentConfig = new VAR.Toolbox.Controls.CComboBox();
this.btnConfig = new VAR.Toolbox.Controls.CButton();
this.ctrOutput = new VAR.Toolbox.Controls.CtrOutput();
((System.ComponentModel.ISupportInitialize)(this.splitMain)).BeginInit();
this.splitMain.Panel1.SuspendLayout();
this.splitMain.Panel2.SuspendLayout();
@@ -41,17 +41,18 @@
//
// splitMain
//
this.splitMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.splitMain.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.splitMain.BackColor = System.Drawing.SystemColors.ControlDark;
this.splitMain.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.splitMain.Location = new System.Drawing.Point(0, 28);
this.splitMain.Name = "splitMain";
this.splitMain.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitMain.Panel1
//
this.splitMain.Panel1.Controls.Add(this.txtOutput);
this.splitMain.Panel1.Controls.Add(this.ctrOutput);
//
// splitMain.Panel2
//
@@ -62,24 +63,12 @@
this.splitMain.TabIndex = 3;
this.splitMain.TabStop = false;
//
// txtOutput
//
this.txtOutput.BackColor = System.Drawing.Color.Black;
this.txtOutput.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtOutput.ForeColor = System.Drawing.Color.Silver;
this.txtOutput.Location = new System.Drawing.Point(0, 0);
this.txtOutput.Multiline = true;
this.txtOutput.Name = "txtOutput";
this.txtOutput.ReadOnly = true;
this.txtOutput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtOutput.Size = new System.Drawing.Size(413, 353);
this.txtOutput.TabIndex = 1;
this.txtOutput.TabStop = false;
//
// txtInput
//
this.txtInput.BackColor = System.Drawing.Color.Black;
this.txtInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtInput.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtInput.Font = new System.Drawing.Font("Consolas", 9F);
this.txtInput.ForeColor = System.Drawing.Color.Silver;
this.txtInput.Location = new System.Drawing.Point(0, 0);
this.txtInput.Multiline = true;
@@ -91,9 +80,12 @@
//
// ddlCurrentConfig
//
this.ddlCurrentConfig.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.ddlCurrentConfig.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ddlCurrentConfig.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.ddlCurrentConfig.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.ddlCurrentConfig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.ddlCurrentConfig.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.ddlCurrentConfig.FormattingEnabled = true;
this.ddlCurrentConfig.Location = new System.Drawing.Point(0, 1);
this.ddlCurrentConfig.Name = "ddlCurrentConfig";
@@ -112,16 +104,25 @@
this.btnConfig.UseVisualStyleBackColor = true;
this.btnConfig.Click += new System.EventHandler(this.BtnConfig_Click);
//
// ctrOutput
//
this.ctrOutput.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrOutput.Location = new System.Drawing.Point(0, 0);
this.ctrOutput.Name = "ctrOutput";
this.ctrOutput.Size = new System.Drawing.Size(413, 353);
this.ctrOutput.TabIndex = 0;
this.ctrOutput.Text = "ctrOutput1";
//
// FrmProxyCmd
//
this.ClientSize = new System.Drawing.Size(413, 446);
this.Controls.Add(this.btnConfig);
this.Controls.Add(this.ddlCurrentConfig);
this.Controls.Add(this.splitMain);
this.Location = new System.Drawing.Point(0, 0);
this.Name = "FrmProxyCmd";
this.Text = "ProxyCmd";
this.splitMain.Panel1.ResumeLayout(false);
this.splitMain.Panel1.PerformLayout();
this.splitMain.Panel2.ResumeLayout(false);
this.splitMain.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitMain)).EndInit();
@@ -133,9 +134,9 @@
#endregion
private VAR.Toolbox.Controls.CSplitContainer splitMain;
private VAR.Toolbox.Controls.TextBoxMonospace txtOutput;
private VAR.Toolbox.Controls.TextBoxMonospace txtInput;
private VAR.Toolbox.Controls.CComboBox ddlCurrentConfig;
private VAR.Toolbox.Controls.CButton btnConfig;
private Controls.CtrOutput ctrOutput;
}
}

View File

@@ -170,8 +170,7 @@ namespace VAR.Toolbox.UI
{
BeginInvoke(new MethodInvoker(delegate
{
txtOutput.AppendText(line);
txtOutput.AppendText(Environment.NewLine);
ctrOutput.AddLine(line);
Application.DoEvents();
}));
}