Added user marker button

This commit is contained in:
szporowolik
2019-10-21 14:51:19 +02:00
parent 9d06065d70
commit fb96745ede
2 changed files with 25 additions and 1 deletions

View File

@@ -76,6 +76,7 @@
this.con_img_srs = new System.Windows.Forms.PictureBox(); this.con_img_srs = new System.Windows.Forms.PictureBox();
this.con_img_dcs = 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_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_1.SuspendLayout();
this.con_GroupBox_2.SuspendLayout(); this.con_GroupBox_2.SuspendLayout();
this.con_GroupBox_3.SuspendLayout(); this.con_GroupBox_3.SuspendLayout();
@@ -512,11 +513,24 @@
this.con_img_db.TabIndex = 10; this.con_img_db.TabIndex = 10;
this.con_img_db.TabStop = false; 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 // form_Main
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(349, 653); 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.label14);
this.Controls.Add(this.label13); this.Controls.Add(this.label13);
this.Controls.Add(this.con_img_logo); this.Controls.Add(this.con_img_logo);
@@ -611,6 +625,7 @@
private System.Windows.Forms.PictureBox con_img_logo; private System.Windows.Forms.PictureBox con_img_logo;
private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label14;
private System.Windows.Forms.Button con_Button_Add_Marker;
} }
} }

View File

@@ -126,6 +126,7 @@ namespace Perun_v1
con_Button_Listen_OFF.Enabled = true; con_Button_Listen_OFF.Enabled = true;
con_Button_Quit.Enabled = false; con_Button_Quit.Enabled = false;
con_Button_Reset_Flags.Enabled = true; con_Button_Reset_Flags.Enabled = true;
con_Button_Add_Marker.Enabled = true;
con_txt_mysql_database.Enabled = false; con_txt_mysql_database.Enabled = false;
con_txt_mysql_username.Enabled = false; con_txt_mysql_username.Enabled = false;
con_txt_mysql_password.Enabled = false; con_txt_mysql_password.Enabled = false;
@@ -146,6 +147,7 @@ namespace Perun_v1
con_Button_Listen_OFF.Enabled = false; con_Button_Listen_OFF.Enabled = false;
con_Button_Quit.Enabled = true; con_Button_Quit.Enabled = true;
con_Button_Reset_Flags.Enabled = false; con_Button_Reset_Flags.Enabled = false;
con_Button_Add_Marker.Enabled = false;
con_txt_mysql_database.Enabled = true; con_txt_mysql_database.Enabled = true;
con_txt_mysql_username.Enabled = true; con_txt_mysql_username.Enabled = true;
con_txt_mysql_password.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) 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); DialogResult dialogResult = MessageBox.Show("Are you sure to reset error flags?", "Question", MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question);
if (dialogResult == DialogResult.Yes) if (dialogResult == DialogResult.Yes)
{ {
@@ -608,7 +611,7 @@ namespace Perun_v1
Globals.bStatusIconsForce = true; Globals.bStatusIconsForce = true;
// Add information // 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) else if (dialogResult == DialogResult.No)
{ {
@@ -616,6 +619,12 @@ 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");
} }
} }
} }