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() private void InitializeComponent()
{ {
this.splitMain = new VAR.Toolbox.Controls.CSplitContainer(); this.splitMain = new VAR.Toolbox.Controls.CSplitContainer();
this.txtOutput = new VAR.Toolbox.Controls.TextBoxMonospace();
this.txtInput = new VAR.Toolbox.Controls.TextBoxMonospace(); this.txtInput = new VAR.Toolbox.Controls.TextBoxMonospace();
this.ddlCurrentConfig = new VAR.Toolbox.Controls.CComboBox(); this.ddlCurrentConfig = new VAR.Toolbox.Controls.CComboBox();
this.btnConfig = new VAR.Toolbox.Controls.CButton(); this.btnConfig = new VAR.Toolbox.Controls.CButton();
this.ctrOutput = new VAR.Toolbox.Controls.CtrOutput();
((System.ComponentModel.ISupportInitialize)(this.splitMain)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitMain)).BeginInit();
this.splitMain.Panel1.SuspendLayout(); this.splitMain.Panel1.SuspendLayout();
this.splitMain.Panel2.SuspendLayout(); this.splitMain.Panel2.SuspendLayout();
@@ -45,13 +45,14 @@
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.splitMain.BackColor = System.Drawing.SystemColors.ControlDark; 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.Location = new System.Drawing.Point(0, 28);
this.splitMain.Name = "splitMain"; this.splitMain.Name = "splitMain";
this.splitMain.Orientation = System.Windows.Forms.Orientation.Horizontal; this.splitMain.Orientation = System.Windows.Forms.Orientation.Horizontal;
// //
// splitMain.Panel1 // splitMain.Panel1
// //
this.splitMain.Panel1.Controls.Add(this.txtOutput); this.splitMain.Panel1.Controls.Add(this.ctrOutput);
// //
// splitMain.Panel2 // splitMain.Panel2
// //
@@ -62,24 +63,12 @@
this.splitMain.TabIndex = 3; this.splitMain.TabIndex = 3;
this.splitMain.TabStop = false; 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 // txtInput
// //
this.txtInput.BackColor = System.Drawing.Color.Black; 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.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtInput.Font = new System.Drawing.Font("Consolas", 9F);
this.txtInput.ForeColor = System.Drawing.Color.Silver; this.txtInput.ForeColor = System.Drawing.Color.Silver;
this.txtInput.Location = new System.Drawing.Point(0, 0); this.txtInput.Location = new System.Drawing.Point(0, 0);
this.txtInput.Multiline = true; this.txtInput.Multiline = true;
@@ -93,7 +82,10 @@
// //
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))); | 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.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.FormattingEnabled = true;
this.ddlCurrentConfig.Location = new System.Drawing.Point(0, 1); this.ddlCurrentConfig.Location = new System.Drawing.Point(0, 1);
this.ddlCurrentConfig.Name = "ddlCurrentConfig"; this.ddlCurrentConfig.Name = "ddlCurrentConfig";
@@ -112,16 +104,25 @@
this.btnConfig.UseVisualStyleBackColor = true; this.btnConfig.UseVisualStyleBackColor = true;
this.btnConfig.Click += new System.EventHandler(this.BtnConfig_Click); 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 // FrmProxyCmd
// //
this.ClientSize = new System.Drawing.Size(413, 446); this.ClientSize = new System.Drawing.Size(413, 446);
this.Controls.Add(this.btnConfig); this.Controls.Add(this.btnConfig);
this.Controls.Add(this.ddlCurrentConfig); this.Controls.Add(this.ddlCurrentConfig);
this.Controls.Add(this.splitMain); this.Controls.Add(this.splitMain);
this.Location = new System.Drawing.Point(0, 0);
this.Name = "FrmProxyCmd"; this.Name = "FrmProxyCmd";
this.Text = "ProxyCmd"; this.Text = "ProxyCmd";
this.splitMain.Panel1.ResumeLayout(false); this.splitMain.Panel1.ResumeLayout(false);
this.splitMain.Panel1.PerformLayout();
this.splitMain.Panel2.ResumeLayout(false); this.splitMain.Panel2.ResumeLayout(false);
this.splitMain.Panel2.PerformLayout(); this.splitMain.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitMain)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.splitMain)).EndInit();
@@ -133,9 +134,9 @@
#endregion #endregion
private VAR.Toolbox.Controls.CSplitContainer splitMain; private VAR.Toolbox.Controls.CSplitContainer splitMain;
private VAR.Toolbox.Controls.TextBoxMonospace txtOutput;
private VAR.Toolbox.Controls.TextBoxMonospace txtInput; private VAR.Toolbox.Controls.TextBoxMonospace txtInput;
private VAR.Toolbox.Controls.CComboBox ddlCurrentConfig; private VAR.Toolbox.Controls.CComboBox ddlCurrentConfig;
private VAR.Toolbox.Controls.CButton btnConfig; private VAR.Toolbox.Controls.CButton btnConfig;
private Controls.CtrOutput ctrOutput;
} }
} }

View File

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