diff options
author | emkael <emkael@tlen.pl> | 2018-11-17 23:09:47 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-10-27 14:53:42 +0100 |
commit | 8af6e52d92921ecbfa48a46e8fa1940e57aa9256 (patch) | |
tree | 3376ec0dfcd8cbc44d14cf2d8cb31c044ff168a8 | |
parent | f187d18b4228b860f366ce4cbc4654caacd16b0c (diff) |
GUI for message logging
-rw-r--r-- | spedytor/Form1.Designer.cs | 26 | ||||
-rw-r--r-- | spedytor/Form1.cs | 19 |
2 files changed, 44 insertions, 1 deletions
diff --git a/spedytor/Form1.Designer.cs b/spedytor/Form1.Designer.cs index 8b1f21b..6dafac8 100644 --- a/spedytor/Form1.Designer.cs +++ b/spedytor/Form1.Designer.cs @@ -40,6 +40,8 @@ this.bExit = new System.Windows.Forms.Button(); this.bSettings = new System.Windows.Forms.Button(); this.bSave = new System.Windows.Forms.Button(); + this.bToggleLog = new System.Windows.Forms.Button(); + this.tbLog = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.nInterval)).BeginInit(); this.SuspendLayout(); // @@ -155,11 +157,31 @@ this.bSave.UseVisualStyleBackColor = true; this.bSave.Click += new System.EventHandler(this.bSave_Click); // + // bToggleLog + // + this.bToggleLog.Location = new System.Drawing.Point(115, 181); + this.bToggleLog.Name = "bToggleLog"; + this.bToggleLog.Size = new System.Drawing.Size(75, 23); + this.bToggleLog.TabIndex = 10; + this.bToggleLog.Text = "▼"; + this.bToggleLog.UseVisualStyleBackColor = true; + this.bToggleLog.Click += new System.EventHandler(this.bToggleLog_Click); + // + // tbLog + // + this.tbLog.Location = new System.Drawing.Point(12, 211); + this.tbLog.Multiline = true; + this.tbLog.Name = "tbLog"; + this.tbLog.Size = new System.Drawing.Size(282, 231); + this.tbLog.TabIndex = 11; + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(307, 187); + this.ClientSize = new System.Drawing.Size(307, 208); + this.Controls.Add(this.tbLog); + this.Controls.Add(this.bToggleLog); this.Controls.Add(this.label1); this.Controls.Add(this.nInterval); this.Controls.Add(this.bTimer); @@ -193,6 +215,8 @@ private System.Windows.Forms.NumericUpDown nInterval; private System.Windows.Forms.Label label1; private System.Windows.Forms.Timer tInterval; + private System.Windows.Forms.Button bToggleLog; + private System.Windows.Forms.TextBox tbLog; } } diff --git a/spedytor/Form1.cs b/spedytor/Form1.cs index 1d93ab4..603e78d 100644 --- a/spedytor/Form1.cs +++ b/spedytor/Form1.cs @@ -155,5 +155,24 @@ namespace spedytor string filePath = Path.Combine(this.repeatFilePath, this.cbDatabaseName.SelectedItem.ToString() + DateTime.Now.ToString("-yyyyMMdd-HHmmss") + ".sql"); this.saveFile(filePath, this.cbDatabaseName.SelectedItem.ToString(), this.getBucketID()); } + + private int prevHeight; + + private void bToggleLog_Click(object sender, EventArgs e) + { + this.prevHeight = this.Height; + if (bToggleLog.Text.Equals("▼")) + { + bToggleLog.Text = "▲"; + this.Height = this.prevHeight * 2; + this.prevHeight = this.Height; + } + else + { + bToggleLog.Text = "▼"; + this.Height = this.prevHeight / 2; + this.prevHeight = this.Height; + } + } } } |