mirror of
https://github.com/DaKerboul/perun.git
synced 2026-08-09 18:05:40 +02:00
Improved, fixed #3
This commit is contained in:
6
02_Windows_App/Perun_v1/form_Main.Designer.cs
generated
6
02_Windows_App/Perun_v1/form_Main.Designer.cs
generated
@@ -58,6 +58,7 @@
|
|||||||
this.openFileDialog_SRS = new System.Windows.Forms.OpenFileDialog();
|
this.openFileDialog_SRS = new System.Windows.Forms.OpenFileDialog();
|
||||||
this.openFileDialog_LotATC = new System.Windows.Forms.OpenFileDialog();
|
this.openFileDialog_LotATC = new System.Windows.Forms.OpenFileDialog();
|
||||||
this.tim_10000ms = new System.Windows.Forms.Timer(this.components);
|
this.tim_10000ms = new System.Windows.Forms.Timer(this.components);
|
||||||
|
this.tim_200ms = new System.Windows.Forms.Timer(this.components);
|
||||||
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();
|
||||||
@@ -321,6 +322,10 @@
|
|||||||
this.tim_10000ms.Interval = 30000;
|
this.tim_10000ms.Interval = 30000;
|
||||||
this.tim_10000ms.Tick += new System.EventHandler(this.tim_10000ms_Tick);
|
this.tim_10000ms.Tick += new System.EventHandler(this.tim_10000ms_Tick);
|
||||||
//
|
//
|
||||||
|
// tim_200ms
|
||||||
|
//
|
||||||
|
this.tim_200ms.Tick += new System.EventHandler(this.tim_200ms_Tick);
|
||||||
|
//
|
||||||
// form_Main
|
// form_Main
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@@ -383,6 +388,7 @@
|
|||||||
private System.Windows.Forms.Timer tim_10000ms;
|
private System.Windows.Forms.Timer tim_10000ms;
|
||||||
private System.Windows.Forms.Label label6;
|
private System.Windows.Forms.Label label6;
|
||||||
private System.Windows.Forms.TextBox con_txt_mysql_port;
|
private System.Windows.Forms.TextBox con_txt_mysql_port;
|
||||||
|
private System.Windows.Forms.Timer tim_200ms;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Perun_v1
|
|||||||
public Thread thread_UDPListener; // Seperate thread for UDP
|
public Thread thread_UDPListener; // Seperate thread for UDP
|
||||||
public class_UDPListener UDPListener; // Helper class for UDP comunication
|
public class_UDPListener UDPListener; // Helper class for UDP comunication
|
||||||
public string[] LogHistory = new string[10]; // Log history for GUI
|
public string[] LogHistory = new string[10]; // Log history for GUI
|
||||||
public string[] SendBuffer = new string[10]; // Mysql send buffer
|
public string[] SendBuffer = new string[100]; // Mysql send buffer
|
||||||
public bool LetMeOut = false; // Helper to handle system tray
|
public bool LetMeOut = false; // Helper to handle system tray
|
||||||
public string MySql_connStr; // MySQL connection string
|
public string MySql_connStr; // MySQL connection string
|
||||||
public string publishVersion = "DEBUG"; // Helper for pulling version definition
|
public string publishVersion = "DEBUG"; // Helper for pulling version definition
|
||||||
@@ -182,9 +182,13 @@ namespace Perun_v1
|
|||||||
// Add to mySQL send buffer and rotate
|
// Add to mySQL send buffer and rotate
|
||||||
for (int i = 0; i < SendBuffer.Length - 1; i++)
|
for (int i = 0; i < SendBuffer.Length - 1; i++)
|
||||||
{
|
{
|
||||||
SendBuffer[i] = SendBuffer[i + 1];
|
if (SendBuffer[i]==null)
|
||||||
|
{
|
||||||
|
SendBuffer[i] = received_data;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
SendBuffer[9] = received_data;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -267,6 +271,7 @@ namespace Perun_v1
|
|||||||
// Start timmers
|
// Start timmers
|
||||||
tim_1000ms.Enabled = true;
|
tim_1000ms.Enabled = true;
|
||||||
tim_10000ms.Enabled = true;
|
tim_10000ms.Enabled = true;
|
||||||
|
tim_200ms.Enabled = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,6 +297,7 @@ namespace Perun_v1
|
|||||||
// Stop timmers
|
// Stop timmers
|
||||||
tim_1000ms.Enabled = false;
|
tim_1000ms.Enabled = false;
|
||||||
tim_10000ms.Enabled = false;
|
tim_10000ms.Enabled = false;
|
||||||
|
tim_200ms.Enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void timer1_Tick(object sender, EventArgs e)
|
private void timer1_Tick(object sender, EventArgs e)
|
||||||
@@ -307,15 +313,6 @@ namespace Perun_v1
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send buffer to MySQL
|
|
||||||
for (int i = 0; i < SendBuffer.Length - 1; i++)
|
|
||||||
{
|
|
||||||
if (SendBuffer[i] != null)
|
|
||||||
{
|
|
||||||
SendToMySql(SendBuffer[i]);
|
|
||||||
SendBuffer[i] = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void con_lab_github_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
private void con_lab_github_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
@@ -510,5 +507,18 @@ namespace Perun_v1
|
|||||||
SendToMySql(strLotATCJson);
|
SendToMySql(strLotATCJson);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tim_200ms_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// Send buffer to MySQL
|
||||||
|
for (int i = 0; i < SendBuffer.Length - 1; i++)
|
||||||
|
{
|
||||||
|
if (SendBuffer[i] != null)
|
||||||
|
{
|
||||||
|
SendToMySql(SendBuffer[i]);
|
||||||
|
SendBuffer[i] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -416,6 +416,9 @@
|
|||||||
<metadata name="tim_10000ms.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="tim_10000ms.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>563, 19</value>
|
<value>563, 19</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="tim_200ms.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>687, 19</value>
|
||||||
|
</metadata>
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
AAABAAEAQD8AAAEAIAAgQQAAFgAAACgAAABAAAAAfgAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
AAABAAEAQD8AAAEAIAAgQQAAFgAAACgAAABAAAAAfgAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
|||||||
Reference in New Issue
Block a user