From 2f7d2d07bbd95cefb8e66ef239f4cf83fb6d0ee5 Mon Sep 17 00:00:00 2001 From: szporowolik Date: Sat, 19 Oct 2019 23:00:54 +0200 Subject: [PATCH] Added status icons and better connection handling --- .../Perun_v1/01_Classes/DatabaseController.cs | 17 +-- 02_Windows_App/Perun_v1/01_Classes/Globals.cs | 8 +- .../Perun_v1/01_Classes/LogController.cs | 9 +- .../Perun_v1/01_Classes/TCPController.cs | 88 +++++++------- .../Perun_v1/02_Forms/form_Main.Designer.cs | 107 ++++++++++-------- 02_Windows_App/Perun_v1/02_Forms/form_Main.cs | 97 ++++++++++++---- 02_Windows_App/Perun_v1/Perun_v1.csproj | 5 + .../Perun_v1/Properties/Resources.Designer.cs | 26 ++--- .../Perun_v1/Properties/Resources.resx | 19 ++-- .../Perun_v1/Resources/status-connected.png | Bin 0 -> 1024 bytes .../Perun_v1/Resources/status-connectedx.png | Bin 0 -> 9776 bytes .../Resources/status-disconnected-error.png | Bin 0 -> 1712 bytes .../Resources/status-disconnected-game.png | Bin 0 -> 1383 bytes .../Resources/status-disconnected.png | Bin 0 -> 909 bytes 14 files changed, 224 insertions(+), 152 deletions(-) create mode 100644 02_Windows_App/Perun_v1/Resources/status-connected.png create mode 100644 02_Windows_App/Perun_v1/Resources/status-connectedx.png create mode 100644 02_Windows_App/Perun_v1/Resources/status-disconnected-error.png create mode 100644 02_Windows_App/Perun_v1/Resources/status-disconnected-game.png create mode 100644 02_Windows_App/Perun_v1/Resources/status-disconnected.png diff --git a/02_Windows_App/Perun_v1/01_Classes/DatabaseController.cs b/02_Windows_App/Perun_v1/01_Classes/DatabaseController.cs index dbad5ce..5f6c0a0 100644 --- a/02_Windows_App/Perun_v1/01_Classes/DatabaseController.cs +++ b/02_Windows_App/Perun_v1/01_Classes/DatabaseController.cs @@ -109,24 +109,25 @@ public class DatabaseController { // General exception found Console.WriteLine(a_ex.ToString()); - PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "ERROR MySQL - package type: " + strUDPFrameType); + PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + strUDPFrameInstance + " > ERROR MySQL - package type: " + strUDPFrameType); + PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + strUDPFrameInstance + " > ERROR MySQL >" + a_ex.Message); bStatus = false; } catch (MySqlException m_ex) { // MySQL exception found - PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "ERROR MySQL - package type: " + strUDPFrameType); + PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + strUDPFrameInstance + " > ERROR MySQL - package type: " + strUDPFrameType); switch (m_ex.Number) { case 1042: // Unable to connect to any of the specified MySQL hosts (Check Server,Port) - PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "ERROR MySQL - unable to connect"); + PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + strUDPFrameInstance + " > ERROR MySQL - unable to connect >" + m_ex.Message); break; case 0: // Access denied (Check DB name,username,password) - PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "ERROR MySQL - access denied"); + PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + strUDPFrameInstance + " > ERROR MySQL - access denied > " + m_ex.Message); break; default: - PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "ERROR MySQL - " + m_ex.Number); - PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "ERROR MySQL - " + m_ex.Message); + PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + strUDPFrameInstance + " > ERROR MySQL > " + m_ex.Number); + PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + strUDPFrameInstance + " > ERROR MySQL > " + m_ex.Message); break; } bStatus = false; @@ -134,9 +135,9 @@ public class DatabaseController connMySQL.Close(); Console.WriteLine("Sending data to MySQL - Done"); } - catch (ArgumentException) + catch (ArgumentException x_ex) { - PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "ERROR MySQL - wrong connection parameters"); + PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + strUDPFrameInstance + " > ERROR MySQL - unable to connect > " + x_ex.Message); } diff --git a/02_Windows_App/Perun_v1/01_Classes/Globals.cs b/02_Windows_App/Perun_v1/01_Classes/Globals.cs index efa6ebe..dd0c22b 100644 --- a/02_Windows_App/Perun_v1/01_Classes/Globals.cs +++ b/02_Windows_App/Perun_v1/01_Classes/Globals.cs @@ -10,8 +10,14 @@ internal class Globals public static int intInstanceId = 0; // Instance ID public static bool bStatusIconsForce = true; // Force icons reload public static bool bdcConnection = false; // Historic db connection status - public static bool btcpcServer = false; // Historic tcp connection status + public static bool bTCPServer = false; // Historic tcp connection status public static bool bSRSStatus = false; // Historic srs connection status public static bool bLotATCStatus = false; // Historic lotatc connection status + public static bool bClientConnected = false; // Is TCP connection alive + public static int intMysqlErros = 0; // Error counter + public static int intGameErros = 0; // Error counter + public static int intGameErrosHistory = 0; // Error counter + public static int intSRSErros = 0; // Error counter + public static int intLotATCErros = 0; // Error counter } diff --git a/02_Windows_App/Perun_v1/01_Classes/LogController.cs b/02_Windows_App/Perun_v1/01_Classes/LogController.cs index d1ba151..be6d8a9 100644 --- a/02_Windows_App/Perun_v1/01_Classes/LogController.cs +++ b/02_Windows_App/Perun_v1/01_Classes/LogController.cs @@ -26,7 +26,14 @@ class LogController } else { - fileStream = new FileStream(logFilePath, FileMode.Append); + try + { + fileStream = new FileStream(logFilePath, FileMode.Append); + } + catch + { + + } } log = new StreamWriter(fileStream); log.WriteLine(strLog); diff --git a/02_Windows_App/Perun_v1/01_Classes/TCPController.cs b/02_Windows_App/Perun_v1/01_Classes/TCPController.cs index 49c11ca..8287a0a 100644 --- a/02_Windows_App/Perun_v1/01_Classes/TCPController.cs +++ b/02_Windows_App/Perun_v1/01_Classes/TCPController.cs @@ -61,56 +61,61 @@ public class TCPController { // Start listening - Console.WriteLine("TCP: Waiting for packet"); - tcpClient = tcpServer.AcceptTcpClient(); //if a connection exists, the server will accept it - ns = tcpClient.GetStream(); //networkstream is used to send/receive messages - //ns.ReadTimeout = 100; - - while (tcpClient.Connected && !bDone) //while the client is connected, we look for incoming messages + // Wait for pending connection + if (tcpServer.Pending()) { - StringBuilder CompleteMessage = new StringBuilder(); - - if (ns.CanRead) + Console.WriteLine("TCP: Waiting for packet"); + tcpClient = tcpServer.AcceptTcpClient(); //if a connection exists, the server will accept it + ns = tcpClient.GetStream(); //networkstream is used to send/receive messages + //ns.ReadTimeout = 100; + Globals.bClientConnected = true; + while (tcpClient.Connected && !bDone) //while the client is connected, we look for incoming messages { - byte[] ReadBuffer = new byte[1024]; - CompleteMessage = new StringBuilder(); - int numberOfBytesRead = 0; + StringBuilder CompleteMessage = new StringBuilder(); + Globals.bClientConnected = true; - // Incoming message may be larger than the buffer size. - do + if (ns.CanRead) { - numberOfBytesRead = ns.Read(ReadBuffer, 0, ReadBuffer.Length); - CompleteMessage.AppendFormat("{0}", Encoding.ASCII.GetString(ReadBuffer, 0, numberOfBytesRead)); - } - while (ns.DataAvailable && !bDone); - } - strReceivedData = CompleteMessage.ToString(); - Console.WriteLine("Sender: {0} Payload: {1}", null, strReceivedData); + byte[] ReadBuffer = new byte[1024]; + CompleteMessage = new StringBuilder(); + int numberOfBytesRead = 0; - try - { - dynamic dynamicRawTCPFrame = JsonConvert.DeserializeObject(strReceivedData); // Deserialize received frame - string strRawTCPFrameType = dynamicRawTCPFrame.type; - - PerunHelper.LogHistoryAdd(ref arrLogHistory, "#" + Globals.intInstanceId + "> TCP packet received, type: " + strRawTCPFrameType); - - // Add to mySQL send buffer (find first empty slot) - for (int i = 0; i < arrSendBuffer.Length - 1; i++) - { - if (arrSendBuffer[i] == null) + // Incoming message may be larger than the buffer size. + do { - arrSendBuffer[i] = strReceivedData; - break; + numberOfBytesRead = ns.Read(ReadBuffer, 0, ReadBuffer.Length); + CompleteMessage.AppendFormat("{0}", Encoding.ASCII.GetString(ReadBuffer, 0, numberOfBytesRead)); + } + while (ns.DataAvailable && !bDone); + } + strReceivedData = CompleteMessage.ToString(); + Console.WriteLine("Sender: {0} Payload: {1}", null, strReceivedData); + + try + { + dynamic dynamicRawTCPFrame = JsonConvert.DeserializeObject(strReceivedData); // Deserialize received frame + string strRawTCPFrameType = dynamicRawTCPFrame.type; + + PerunHelper.LogHistoryAdd(ref arrLogHistory, "#" + Globals.intInstanceId + "> TCP packet received, type: " + strRawTCPFrameType); + + // Add to mySQL send buffer (find first empty slot) + for (int i = 0; i < arrSendBuffer.Length - 1; i++) + { + if (arrSendBuffer[i] == null) + { + arrSendBuffer[i] = strReceivedData; + break; + } } } - } - catch(Exception e) - { - Console.WriteLine(e.ToString()); - PerunHelper.LogHistoryAdd(ref arrLogHistory, "TCP ERROR incorrect JSON"); + catch (Exception e) + { + Globals.intGameErros++; + Console.WriteLine(e.ToString()); + PerunHelper.LogHistoryAdd(ref arrLogHistory, "#" + Globals.intInstanceId + " > TCP ERROR incorrect JSON > " + e.Message); + } } } - } tcpServer.Stop(); bStatus = false; @@ -120,8 +125,9 @@ public class TCPController // General exception found if (e.HResult != -2147467259) { + Globals.intGameErros++; Console.WriteLine(e.ToString()); - PerunHelper.LogHistoryAdd(ref arrLogHistory, "TCP error - connection closed or port in use"); + PerunHelper.LogHistoryAdd(ref arrLogHistory, "#" + Globals.intInstanceId + " > TCP error - connection closed or port in use > " + e.Message); } } 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 fc3a6bf..c1ad029 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 @@ -65,14 +65,14 @@ this.con_txt_dcs_instance = new System.Windows.Forms.MaskedTextBox(); this.label7 = new System.Windows.Forms.Label(); this.con_txt_dcs_server_port = new System.Windows.Forms.MaskedTextBox(); - this.con_img_lotATC = 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_db = new System.Windows.Forms.PictureBox(); this.label9 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); + this.con_img_lotATC = 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_db = new System.Windows.Forms.PictureBox(); this.con_GroupBox_1.SuspendLayout(); this.con_GroupBox_2.SuspendLayout(); this.con_GroupBox_3.SuspendLayout(); @@ -89,10 +89,11 @@ this.con_List_Received.FormattingEnabled = true; this.con_List_Received.Items.AddRange(new object[] { "Not connected"}); - this.con_List_Received.Location = new System.Drawing.Point(6, 19); + this.con_List_Received.Location = new System.Drawing.Point(11, 19); this.con_List_Received.Name = "con_List_Received"; - this.con_List_Received.Size = new System.Drawing.Size(307, 147); + this.con_List_Received.Size = new System.Drawing.Size(307, 134); this.con_List_Received.TabIndex = 0; + this.con_List_Received.SelectedIndexChanged += new System.EventHandler(this.con_List_Received_SelectedIndexChanged); // // con_Button_Listen_ON // @@ -118,9 +119,9 @@ // con_GroupBox_1 // this.con_GroupBox_1.Controls.Add(this.con_List_Received); - this.con_GroupBox_1.Location = new System.Drawing.Point(12, 369); + this.con_GroupBox_1.Location = new System.Drawing.Point(12, 385); this.con_GroupBox_1.Name = "con_GroupBox_1"; - this.con_GroupBox_1.Size = new System.Drawing.Size(324, 176); + this.con_GroupBox_1.Size = new System.Drawing.Size(324, 162); this.con_GroupBox_1.TabIndex = 4; this.con_GroupBox_1.TabStop = false; this.con_GroupBox_1.Text = "Data log"; @@ -386,8 +387,53 @@ this.con_txt_dcs_server_port.Size = new System.Drawing.Size(207, 20); this.con_txt_dcs_server_port.TabIndex = 3; // + // label9 + // + this.label9.AutoSize = true; + this.label9.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label9.Location = new System.Drawing.Point(21, 369); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(61, 13); + this.label9.TabIndex = 1; + this.label9.Text = "Database"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label10.Location = new System.Drawing.Point(117, 369); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(39, 13); + this.label10.TabIndex = 14; + this.label10.Text = "Game"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label11.Location = new System.Drawing.Point(205, 369); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(32, 13); + this.label11.TabIndex = 15; + this.label11.Text = "SRS"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label12.Location = new System.Drawing.Point(282, 369); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(49, 13); + this.label12.TabIndex = 16; + this.label12.Text = "LotATC"; + // // con_img_lotATC // + this.con_img_lotATC.Image = global::Perun_v1.Properties.Resources.status_disconnected; this.con_img_lotATC.Location = new System.Drawing.Point(292, 335); this.con_img_lotATC.Name = "con_img_lotATC"; this.con_img_lotATC.Size = new System.Drawing.Size(29, 28); @@ -397,7 +443,8 @@ // // con_img_srs // - this.con_img_srs.Location = new System.Drawing.Point(208, 335); + this.con_img_srs.Image = global::Perun_v1.Properties.Resources.status_disconnected; + this.con_img_srs.Location = new System.Drawing.Point(207, 335); this.con_img_srs.Name = "con_img_srs"; this.con_img_srs.Size = new System.Drawing.Size(29, 28); this.con_img_srs.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -406,7 +453,8 @@ // // con_img_dcs // - this.con_img_dcs.Location = new System.Drawing.Point(135, 335); + this.con_img_dcs.Image = global::Perun_v1.Properties.Resources.status_disconnected; + this.con_img_dcs.Location = new System.Drawing.Point(122, 335); this.con_img_dcs.Name = "con_img_dcs"; this.con_img_dcs.Size = new System.Drawing.Size(29, 28); this.con_img_dcs.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -416,49 +464,14 @@ // con_img_db // this.con_img_db.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.con_img_db.Location = new System.Drawing.Point(69, 335); + this.con_img_db.Image = global::Perun_v1.Properties.Resources.status_disconnected; + this.con_img_db.Location = new System.Drawing.Point(37, 335); this.con_img_db.Name = "con_img_db"; this.con_img_db.Size = new System.Drawing.Size(29, 28); this.con_img_db.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.con_img_db.TabIndex = 10; this.con_img_db.TabStop = false; // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(15, 335); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(56, 13); - this.label9.TabIndex = 1; - this.label9.Text = "Database:"; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(101, 335); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(38, 13); - this.label10.TabIndex = 14; - this.label10.Text = "Game:"; - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(170, 335); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(32, 13); - this.label11.TabIndex = 15; - this.label11.Text = "SRS:"; - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(243, 335); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(46, 13); - this.label12.TabIndex = 16; - this.label12.Text = "LotATC:"; - // // form_Main // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 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 5cbb18a..fa21df8 100644 --- a/02_Windows_App/Perun_v1/02_Forms/form_Main.cs +++ b/02_Windows_App/Perun_v1/02_Forms/form_Main.cs @@ -157,8 +157,15 @@ namespace Perun_v1 Globals.intInstanceId= Int32.Parse(con_txt_dcs_instance.Text); Globals.bStatusIconsForce = true; - // Start listening - PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + Globals.intInstanceId + " > " + "Opening connections"); + Globals.intMysqlErros = 0; // Reset error counter + Globals.intGameErros = 0; // Reset error counter + Globals.intSRSErros = 0; // Reset error counter + Globals.intLotATCErros = 0; // Reset error counter + + Globals.bClientConnected = false; //no connection + + // Start listening + PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + Globals.intInstanceId + " > " + "Opening connections"); tcpcServer.Create(Int32.Parse(con_txt_dcs_server_port.Text), ref Globals.arrLogHistory, ref arrSendBuffer); tcpcServer.thrTCPListener = new Thread(tcpcServer.StartListen); tcpcServer.thrTCPListener.Start(); @@ -209,10 +216,10 @@ namespace Perun_v1 } form_Main_EnableControls(); // Enable controls - con_img_db.Image = null; - con_img_dcs.Image = null; - con_img_lotATC.Image = null; - con_img_srs.Image = null; + con_img_db.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected"); + con_img_dcs.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected"); + con_img_lotATC.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected"); + con_img_srs.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected"); // Stop timmers tim_1000ms.Enabled = false; @@ -232,9 +239,10 @@ namespace Perun_v1 // Set helpers for updates Globals.bLogHistoryUpdate = false; Globals.bdcConnection = false; - Globals.btcpcServer = false; + Globals.bTCPServer = false; Globals.bSRSStatus = false; Globals.bLotATCStatus = false; + Globals.bClientConnected = false; } private void con_lab_github_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) @@ -384,45 +392,70 @@ namespace Perun_v1 if ((dcConnection.bStatus != Globals.bdcConnection) || Globals.bStatusIconsForce) { if (dcConnection.bStatus) { - con_img_db.Image = (Image)Properties.Resources.ResourceManager.GetObject("ico_db"); + if (Globals.intMysqlErros == 0) + { + con_img_db.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_connected"); + } else + { + con_img_db.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected_game"); + } } else { - con_img_db.Image = (Image)Properties.Resources.ResourceManager.GetObject("ico_error"); + con_img_db.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected_error"); } Globals.bdcConnection = dcConnection.bStatus; } - if ((tcpcServer.bStatus != Globals.btcpcServer) || Globals.bStatusIconsForce) { - if (tcpcServer.bStatus) + if ((Globals.bClientConnected != Globals.bTCPServer) || Globals.bStatusIconsForce || Globals.intGameErros != Globals.intGameErrosHistory) { + if(Globals.bClientConnected) { - con_img_dcs.Image = (Image)Properties.Resources.ResourceManager.GetObject("ico_game"); + if (Globals.intGameErros == 0 ) + { + con_img_dcs.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_connected"); + } else + { + con_img_dcs.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected_game"); + } } else { - con_img_dcs.Image = (Image)Properties.Resources.ResourceManager.GetObject("ico_error"); + con_img_dcs.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected_error"); } - Globals.btcpcServer = tcpcServer.bStatus; + Globals.bTCPServer = Globals.bClientConnected; + Globals.intGameErrosHistory = Globals.intGameErros; } if ((bSRSStatus != Globals.bSRSStatus) || Globals.bStatusIconsForce) { - if (bSRSStatus) + if (bSRSStatus && con_check_3rd_srs.Checked) { - con_img_srs.Image = (Image)Properties.Resources.ResourceManager.GetObject("ico_srs"); + if (Globals.intSRSErros == 0) + { + con_img_srs.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_connected"); + } else + { + con_img_srs.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected_game"); + } } else - {; - con_img_srs.Image = (Image)Properties.Resources.ResourceManager.GetObject("ico_error"); + { + con_img_srs.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected_error"); } Globals.bSRSStatus = bSRSStatus; } if ((bLotATCStatus != Globals.bLotATCStatus) || Globals.bStatusIconsForce) { - if (bLotATCStatus) + if (bLotATCStatus && con_check_3rd_lotatc.Checked) { - con_img_lotATC.Image = (Image)Properties.Resources.ResourceManager.GetObject("ico_lotatc"); + if (Globals.intLotATCErros == 0) + { + con_img_lotATC.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_connected"); + } else + { + con_img_lotATC.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected_game"); + } } else { - con_img_lotATC.Image = (Image)Properties.Resources.ResourceManager.GetObject("ico_error"); + con_img_lotATC.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected_error"); } Globals.bLotATCStatus = bLotATCStatus; } @@ -490,10 +523,11 @@ namespace Perun_v1 PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + Int32.Parse(con_txt_dcs_instance.Text) + " > SRS data loaded"); bSRSStatus = true; } - catch + catch (Exception exc_srs) { - PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + Int32.Parse(con_txt_dcs_instance.Text) + " > SRS data ERROR"); + PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + Int32.Parse(con_txt_dcs_instance.Text) + " > SRS data ERROR > " + exc_srs.Message); bSRSStatus = false; + Globals.intSRSErros++; } @@ -517,10 +551,11 @@ namespace Perun_v1 PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + Int32.Parse(con_txt_dcs_instance.Text) + " > LotATC data loaded"); bLotATCStatus = true; } - catch + catch(Exception exc_lotatc) { - PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + Int32.Parse(con_txt_dcs_instance.Text) + " > LotATC data ERROR"); + PerunHelper.LogHistoryAdd(ref Globals.arrLogHistory, "#" + Int32.Parse(con_txt_dcs_instance.Text) + " > LotATC data ERROR > " + exc_lotatc.Message); bLotATCStatus = false; + Globals.intLotATCErros++; } @@ -530,7 +565,19 @@ namespace Perun_v1 strLotATCJson = "{'type':'101','instance':'" + Int32.Parse(con_txt_dcs_instance.Text) + "','payload':{'ignore':'true'}}"; // No LotATC controller connected } dcConnection.SendToMySql(strLotATCJson); + + // Let's do not risk int overload + Globals.intMysqlErros = (Globals.intMysqlErros > 999) ? 999 : Globals.intMysqlErros; + Globals.intGameErros = (Globals.intGameErros > 999) ? 999 : Globals.intGameErros; + Globals.intSRSErros = (Globals.intSRSErros > 999) ? 999 : Globals.intSRSErros; + Globals.intLotATCErros = (Globals.intLotATCErros > 999) ? 999 : Globals.intLotATCErros; + } + + private void con_List_Received_SelectedIndexChanged(object sender, EventArgs e) + { + + } } } diff --git a/02_Windows_App/Perun_v1/Perun_v1.csproj b/02_Windows_App/Perun_v1/Perun_v1.csproj index 2c076d4..efcb591 100644 --- a/02_Windows_App/Perun_v1/Perun_v1.csproj +++ b/02_Windows_App/Perun_v1/Perun_v1.csproj @@ -183,6 +183,11 @@ + + + + + diff --git a/02_Windows_App/Perun_v1/Properties/Resources.Designer.cs b/02_Windows_App/Perun_v1/Properties/Resources.Designer.cs index 5736650..66be48f 100644 --- a/02_Windows_App/Perun_v1/Properties/Resources.Designer.cs +++ b/02_Windows_App/Perun_v1/Properties/Resources.Designer.cs @@ -63,9 +63,9 @@ namespace Perun_v1.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap ico_db { + internal static System.Drawing.Bitmap status_connected { get { - object obj = ResourceManager.GetObject("ico_db", resourceCulture); + object obj = ResourceManager.GetObject("status_connected", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -73,9 +73,9 @@ namespace Perun_v1.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap ico_error { + internal static System.Drawing.Bitmap status_disconnected { get { - object obj = ResourceManager.GetObject("ico_error", resourceCulture); + object obj = ResourceManager.GetObject("status_disconnected", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -83,9 +83,9 @@ namespace Perun_v1.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap ico_game { + internal static System.Drawing.Bitmap status_disconnected_error { get { - object obj = ResourceManager.GetObject("ico_game", resourceCulture); + object obj = ResourceManager.GetObject("status_disconnected_error", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -93,19 +93,9 @@ namespace Perun_v1.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap ico_lotatc { + internal static System.Drawing.Bitmap status_disconnected_game { get { - object obj = ResourceManager.GetObject("ico_lotatc", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap ico_srs { - get { - object obj = ResourceManager.GetObject("ico_srs", resourceCulture); + object obj = ResourceManager.GetObject("status_disconnected_game", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } diff --git a/02_Windows_App/Perun_v1/Properties/Resources.resx b/02_Windows_App/Perun_v1/Properties/Resources.resx index 3bef010..78d4f3b 100644 --- a/02_Windows_App/Perun_v1/Properties/Resources.resx +++ b/02_Windows_App/Perun_v1/Properties/Resources.resx @@ -118,19 +118,16 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\ico_db.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\status-connected.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ico_error.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\status-disconnected.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ico_game.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\status-disconnected-error.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ico_lotatc.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\ico_srs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\status-connectedx.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/02_Windows_App/Perun_v1/Resources/status-connected.png b/02_Windows_App/Perun_v1/Resources/status-connected.png new file mode 100644 index 0000000000000000000000000000000000000000..729fb81b83eb95777b3a15ff866d8954f979a369 GIT binary patch literal 1024 zcmV+b1poVqP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1C>ccK~!i%?U_4h z6j2n0SA1Zhf;Qp{6?Yyi29h?xOimjCO?7iA3I=Tt3fDZ+JSqyK#dY&Y^Qb6{k~hpF&7(P( zq?J}(YaL(gu?D?;){wU&{j7bNsmfDB!??a^b+ot#{uoZs__eLP^Ul!8rTBcq!nmq^ zm94~MN6Ek8EoLDtZ2ByDletO8uM9l#M^D8R3N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}QmN2+Kp;;O9|j;Rq%~PQp4;!f=%1l2z|<-_ zhnO?9c)V+~kk%w2E|wj>>=|3J&?&?0TFA{E!&lDW>#Ui^l07F-^w)cEX|$_HNNXHD zB>=-fOq4#k>1JmTj-CMSYOr%BGS+lIX;^Qex7yhujmn$g1$s(T=T0$xSJ2JB$8zhW z(6TXmB^g{A?dov@J*ct!3@VgY&6K&!c9J<^Hd}_=<^Wv_+^*SxGgEiFFG?XdX|}Us zP{>Vgpd@N^8Q@=!QP_}x9RMWsIuK@3Mo>=8-Q8oi-hyS7bt>MBQpq_C;T8dXIYVn^GaKQDm-=mY$zya~JnY(&9EDeRpEUID&~I+9YM^MF+AY_(a6 zg%Ag`L-X%B7o5^<&hwC}y^Y)7H=+)1TYx)I=O$1yZ~;{nngG7G-;E{RM{qw-y`o1G z_MfxBKfu+Pg9y~(XtvA9v>cLBzKp2zZ?@#B5aO8CynLj6pg8ZpEl{=S0_qpvhpOtY piF{?OUJ&cl9XW&Gmndbd{{XoQ+~H)&CB^^%002ovPDHLkV1ga!e(nGO literal 0 HcmV?d00001 diff --git a/02_Windows_App/Perun_v1/Resources/status-disconnected.png b/02_Windows_App/Perun_v1/Resources/status-disconnected.png new file mode 100644 index 0000000000000000000000000000000000000000..7fd0e5758d3ffe2d21b514014727a2b3d42fcc2d GIT binary patch literal 909 zcmV;819JR{P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D10qR8K~!i%-P+m9 zO;H@i@z+?QxH1<-l37S1N+H7y7Zkaqlp%isB`IXOkP9wQ+(`Ze7hI7dE)0c)GL#`> z8NScUs{Jl&pR?9FYp=auPkqYS*?a$<(>eQ`z0TX!%QFji@f}CCp@|uc$(Vz2+E9|& zc!OUBD%gmqzyaLH4-|)dhbvf%zEE6cM8~N$!*K?7i88ma8E*^QjQyxJbMXxJU@;CM zOU7WppMUnq0(^pNxKLTj=#70HI^iQsg^AwmdSBRs#W;;D*@)taUqPkjBUKsElhy~7 zXDRH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