From 72c0450d403dc3782511f8be5e332557517ec8ff Mon Sep 17 00:00:00 2001 From: Valeriano Alfonso Rodriguez Date: Thu, 13 May 2021 21:38:58 +0200 Subject: [PATCH] FrmProxyCmd: Replace TextBox with CtrOutput. --- VAR.Toolbox/UI/Tools/FrmProxyCmd.Designer.cs | 43 ++++++++++---------- VAR.Toolbox/UI/Tools/FrmProxyCmd.cs | 3 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/VAR.Toolbox/UI/Tools/FrmProxyCmd.Designer.cs b/VAR.Toolbox/UI/Tools/FrmProxyCmd.Designer.cs index 04cbb19..bb7d091 100644 --- a/VAR.Toolbox/UI/Tools/FrmProxyCmd.Designer.cs +++ b/VAR.Toolbox/UI/Tools/FrmProxyCmd.Designer.cs @@ -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; } } \ No newline at end of file diff --git a/VAR.Toolbox/UI/Tools/FrmProxyCmd.cs b/VAR.Toolbox/UI/Tools/FrmProxyCmd.cs index e7f1fa6..fc2a9d4 100644 --- a/VAR.Toolbox/UI/Tools/FrmProxyCmd.cs +++ b/VAR.Toolbox/UI/Tools/FrmProxyCmd.cs @@ -170,8 +170,7 @@ namespace VAR.Toolbox.UI { BeginInvoke(new MethodInvoker(delegate { - txtOutput.AppendText(line); - txtOutput.AppendText(Environment.NewLine); + ctrOutput.AddLine(line); Application.DoEvents(); })); }