This commit is contained in:
sc committed 2024-08-16 00:55:54 +08:00
commit eac600a892
1 file changed
+15 -3
+15 -3
View File
@@ -34,6 +34,10 @@ namespace DyeingComputer
private SQLiteHelper SQLiteHelpers = null; //定义数据库 private SQLiteHelper SQLiteHelpers = null; //定义数据库
private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径 private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
/// <summary>
/// 数据库检查读取
/// </summary>
/// <returns></returns>
private bool SQLiteStrat() private bool SQLiteStrat()
{ {
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径 SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
@@ -49,16 +53,20 @@ namespace DyeingComputer
if (!result_ProgramSteps) LogGing.LogGingDATA("Master_ProgramSteps_Table_Loss"); if (!result_ProgramSteps) LogGing.LogGingDATA("Master_ProgramSteps_Table_Loss");
if (!result_System || !result_IOName || !result_ProgramName || !result_ProgramSteps) if (!result_System || !result_IOName || !result_ProgramName || !result_ProgramSteps)
{ {
SQLiteHelpers.Close();
MessageBox.Show(Properties.Resources.SysDatLoss); MessageBox.Show(Properties.Resources.SysDatLoss);
return true; return true;
}else }else
{ {
SQLiteHelpers.Close();
return false; return false;
} }
} }
/// <summary>
/// 工具栏状态
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void RadioButton_toolbar(object sender, RoutedEventArgs e) private void RadioButton_toolbar(object sender, RoutedEventArgs e)
{ {
if (!(sender is RadioButton button)) return; if (!(sender is RadioButton button)) return;
@@ -97,7 +105,11 @@ namespace DyeingComputer
break; break;
} }
} }
/// <summary>
/// 功能页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void RadioButton_Page(object sender, RoutedEventArgs e) private void RadioButton_Page(object sender, RoutedEventArgs e)
{ {
if (!(sender is RadioButton button)) return; if (!(sender is RadioButton button)) return;