From fb96745ede4eb51e06cb4b37f5c194a7516674be Mon Sep 17 00:00:00 2001 From: szporowolik Date: Mon, 21 Oct 2019 14:51:19 +0200 Subject: [PATCH] Added user marker button --- .../Perun_v1/02_Forms/form_Main.Designer.cs | 15 +++++++++++++++ 02_Windows_App/Perun_v1/02_Forms/form_Main.cs | 11 ++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/02_Windows_App/Perun_v1/02_Forms/form_Main.Designer.cs b/02_Windows_App/Perun_v1/02_Forms/form_Main.Designer.cs index 45b18f8..70436fe 100644 --- a/02_Windows_App/Perun_v1/02_Forms/form_Main.Designer.cs +++ b/02_Windows_App/Perun_v1/02_Forms/form_Main.Designer.cs @@ -76,6 +76,7 @@ this.con_img_srs = new System.Windows.Forms.PictureBox(); this.con_img_dcs = new System.Windows.Forms.PictureBox(); this.con_img_db = new System.Windows.Forms.PictureBox(); + this.con_Button_Add_Marker = new System.Windows.Forms.Button(); this.con_GroupBox_1.SuspendLayout(); this.con_GroupBox_2.SuspendLayout(); this.con_GroupBox_3.SuspendLayout(); @@ -512,11 +513,24 @@ this.con_img_db.TabIndex = 10; this.con_img_db.TabStop = false; // + // con_Button_Add_Marker + // + this.con_Button_Add_Marker.Enabled = false; + this.con_Button_Add_Marker.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.con_Button_Add_Marker.Location = new System.Drawing.Point(12, 414); + this.con_Button_Add_Marker.Name = "con_Button_Add_Marker"; + this.con_Button_Add_Marker.Size = new System.Drawing.Size(114, 20); + this.con_Button_Add_Marker.TabIndex = 21; + this.con_Button_Add_Marker.Text = "Add log marker"; + this.con_Button_Add_Marker.UseVisualStyleBackColor = true; + this.con_Button_Add_Marker.Click += new System.EventHandler(this.con_Button_Add_Marker_Click); + // // form_Main // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(349, 653); + this.Controls.Add(this.con_Button_Add_Marker); this.Controls.Add(this.label14); this.Controls.Add(this.label13); this.Controls.Add(this.con_img_logo); @@ -611,6 +625,7 @@ private System.Windows.Forms.PictureBox con_img_logo; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label14; + private System.Windows.Forms.Button con_Button_Add_Marker; } } diff --git a/02_Windows_App/Perun_v1/02_Forms/form_Main.cs b/02_Windows_App/Perun_v1/02_Forms/form_Main.cs index 975aacc..633fabd 100644 --- a/02_Windows_App/Perun_v1/02_Forms/form_Main.cs +++ b/02_Windows_App/Perun_v1/02_Forms/form_Main.cs @@ -126,6 +126,7 @@ namespace Perun_v1 con_Button_Listen_OFF.Enabled = true; con_Button_Quit.Enabled = false; con_Button_Reset_Flags.Enabled = true; + con_Button_Add_Marker.Enabled = true; con_txt_mysql_database.Enabled = false; con_txt_mysql_username.Enabled = false; con_txt_mysql_password.Enabled = false; @@ -146,6 +147,7 @@ namespace Perun_v1 con_Button_Listen_OFF.Enabled = false; con_Button_Quit.Enabled = true; con_Button_Reset_Flags.Enabled = false; + con_Button_Add_Marker.Enabled = false; con_txt_mysql_database.Enabled = true; con_txt_mysql_username.Enabled = true; con_txt_mysql_password.Enabled = true; @@ -594,6 +596,7 @@ namespace Perun_v1 private void con_Button_Reset_Flags_Click(object sender, EventArgs e) { + // Reset error flags DialogResult dialogResult = MessageBox.Show("Are you sure to reset error flags?", "Question", MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question); if (dialogResult == DialogResult.Yes) { @@ -608,7 +611,7 @@ namespace Perun_v1 Globals.bStatusIconsForce = true; // Add information - PerunHelper.GUILogHistoryAdd(ref Globals.arrGUILogHistory, "#" + Globals.intInstanceId + " > " + "Reseted error counter"); + PerunHelper.GUILogHistoryAdd(ref Globals.arrGUILogHistory, "#" + Globals.intInstanceId + " > " + "Resetted error counter"); } else if (dialogResult == DialogResult.No) { @@ -617,5 +620,11 @@ namespace Perun_v1 } + + private void con_Button_Add_Marker_Click(object sender, EventArgs e) + { + // Added user marker + PerunHelper.GUILogHistoryAdd(ref Globals.arrGUILogHistory, "#" + Globals.intInstanceId + " > " + "User marker"); + } } }