diff --git a/CleanMachineHMI/FrmUserControl/frmMainDetail.cs b/CleanMachineHMI/FrmUserControl/frmMainDetail.cs index 6138622..b13281e 100644 --- a/CleanMachineHMI/FrmUserControl/frmMainDetail.cs +++ b/CleanMachineHMI/FrmUserControl/frmMainDetail.cs @@ -481,7 +481,7 @@ namespace CleanMachineHMI.FrmUserControl private void FinishWorkingPallet() { -#if !DEBUG +#if RELEASE try { #endif @@ -575,7 +575,7 @@ namespace CleanMachineHMI.FrmUserControl })); } } -#if !DEBUG +#if RELEASE } catch (Exception ex) { @@ -3144,7 +3144,7 @@ namespace CleanMachineHMI.FrmUserControl { kbtn_forceFinish.Enabled = false; -#if !DEBUG +#if RELEASE try { @@ -3384,7 +3384,7 @@ namespace CleanMachineHMI.FrmUserControl } } kryptonGroupBox1.Focus(); -#if !DEBUG +#if RELEASE } catch (Exception ex) { diff --git a/CleanMachineHMI/Utils/PlcOperationHelper.cs b/CleanMachineHMI/Utils/PlcOperationHelper.cs index 39932cd..b3f19c2 100644 --- a/CleanMachineHMI/Utils/PlcOperationHelper.cs +++ b/CleanMachineHMI/Utils/PlcOperationHelper.cs @@ -2,7 +2,7 @@ #if DEBUG -#define USE_LOCAL_TCP_DEBUG +//#define USE_LOCAL_TCP_DEBUG #endif //启用心跳检查 diff --git a/CleanMachineHMI/frmMainNew.cs b/CleanMachineHMI/frmMainNew.cs index 250be54..fe96b49 100644 --- a/CleanMachineHMI/frmMainNew.cs +++ b/CleanMachineHMI/frmMainNew.cs @@ -486,7 +486,7 @@ namespace CleanMachineHMI long lastTick = DateTime.Now.Ticks; while (GlobalHelper.SysThIsRunFlag) { -#if !DEBUG +#if RELEASE try { #endif @@ -646,7 +646,7 @@ namespace CleanMachineHMI PlcOperationHelper.Instance.HeartbeatDetection(); #endregion -#if !DEBUG +#if RELEASE } catch (Exception ex) diff --git a/LeadDataBaseUtility/LeadDbHelperSQLite.cs b/LeadDataBaseUtility/LeadDbHelperSQLite.cs index f61cdde..f1e94c3 100644 --- a/LeadDataBaseUtility/LeadDbHelperSQLite.cs +++ b/LeadDataBaseUtility/LeadDbHelperSQLite.cs @@ -28,7 +28,7 @@ namespace LeadDataBaseUtility public static int ExecuteSql(string sql) { int affectedRows = 0; -#if !DEBUG +#if RELEASE try { #endif @@ -42,7 +42,7 @@ namespace LeadDataBaseUtility } conn.Close(); } -#if !DEBUG +#if RELEASE } catch (Exception e) @@ -62,7 +62,7 @@ namespace LeadDataBaseUtility using (SQLiteConnection connection = new SQLiteConnection(connectionString)) { DataSet ds = new DataSet(); -#if !DEBUG +#if RELEASE try { #endif @@ -70,7 +70,7 @@ namespace LeadDataBaseUtility SQLiteDataAdapter command = new SQLiteDataAdapter(SQLString, connection); command.Fill(ds, "ds"); connection.Close(); -#if !DEBUG +#if RELEASE } catch (Exception e) { @@ -91,7 +91,7 @@ namespace LeadDataBaseUtility { using (SQLiteCommand cmd = new SQLiteCommand(SQLString, connection)) { -#if !DEBUG +#if RELEASE try { #endif @@ -107,7 +107,7 @@ namespace LeadDataBaseUtility connection.Close(); return obj; } -#if !DEBUG +#if RELEASE } catch (System.Data.SQLite.SQLiteException e) {