mirror of
https://github.com/DaKerboul/perun.git
synced 2026-08-09 17:05:39 +02:00
Exeption handling
This commit is contained in:
@@ -354,32 +354,57 @@ namespace Perun_v1
|
|||||||
private void tim_10000ms_Tick(object sender, EventArgs e)
|
private void tim_10000ms_Tick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// Main timer to send JSON files to MySQL
|
// Main timer to send JSON files to MySQL
|
||||||
string strSRSJson;
|
string strSRSJson ="";
|
||||||
string strLotATCJson;
|
string strLotATCJson="";
|
||||||
|
|
||||||
|
bool SRSdefault = true;
|
||||||
|
bool LotATCdefault = true;
|
||||||
|
|
||||||
if (con_check_3rd_srs.Checked)
|
if (con_check_3rd_srs.Checked)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
strSRSJson = System.IO.File.ReadAllText(con_txt_3rd_srs.Text);
|
strSRSJson = System.IO.File.ReadAllText(con_txt_3rd_srs.Text);
|
||||||
|
JsonConvert.DeserializeObject(strSRSJson);
|
||||||
|
|
||||||
LogHistoryAdd(ref LogHistory, "SRS data loaded");
|
LogHistoryAdd(ref LogHistory, "SRS data loaded");
|
||||||
strSRSJson = "{'type':'100','payload':'" + strSRSJson + "'}";
|
strSRSJson = "{'type':'100','payload':'" + strSRSJson + "'}";
|
||||||
|
|
||||||
|
SRSdefault = false;
|
||||||
}
|
}
|
||||||
else
|
catch
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(SRSdefault)
|
||||||
{
|
{
|
||||||
strSRSJson = "{'type':'100','payload':{'ignore':'true'}}";
|
strSRSJson = "{'type':'100','payload':{'ignore':'true'}}";
|
||||||
}
|
}
|
||||||
|
|
||||||
SendToMySql(strSRSJson);
|
SendToMySql(strSRSJson);
|
||||||
|
|
||||||
if (con_check_3rd_lotatc.Checked)
|
if (con_check_3rd_lotatc.Checked)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
strLotATCJson = System.IO.File.ReadAllText(con_txt_3rd_lotatc.Text);
|
strLotATCJson = System.IO.File.ReadAllText(con_txt_3rd_lotatc.Text);
|
||||||
|
JsonConvert.DeserializeObject(strLotATCJson);
|
||||||
LogHistoryAdd(ref LogHistory, "LotATC data loaded");
|
LogHistoryAdd(ref LogHistory, "LotATC data loaded");
|
||||||
strLotATCJson = "{'type':'101','payload':'" + strLotATCJson + "'}";
|
strLotATCJson = "{'type':'101','payload':'" + strLotATCJson + "'}";
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
|
||||||
} else
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (LotATCdefault)
|
||||||
{
|
{
|
||||||
strLotATCJson = "{'type':'101','payload':{'ignore':'true'}}";
|
strLotATCJson = "{'type':'101','payload':{'ignore':'true'}}";
|
||||||
}
|
}
|
||||||
SendToMySql(strLotATCJson);
|
SendToMySql(strLotATCJson);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user