using Casic.Birmm.RbFreqStandMeasure.Db; using Casic.Birmm.RbFreqStandMeasure.info; using Casic.Birmm.RbFreqStandMeasure.setting; using Casic.Birmm.RbFreqStandMeasure.Tools; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Reflection; using System.Text; using System.Windows.Forms; namespace Casic.Birmm.RbFreqStandMeasure { public partial class RbFreqStandMeasureForm : Form { public RbFreqStandMeasureForm() { InitializeComponent(); } private void RbFreqStandMeasureForm_Load(object sender, EventArgs e) { // 系统启动时即打开数据库 int iRetval = -1; iRetval = SqliteHelper.OpenDB(); if (iRetval != 0) { MessageBox.Show("启动异常,请检查数据库服务", "错误"); LogHelper.logger.Error("启动异常,连接数据库服务失败,请检查数据库服务[code=" + iRetval + "]"); return; } else { LogHelper.logger.Info("启动正常"); return; } } private void btnInfoMan_Click(object sender, EventArgs e) { // 清除panel上的所有控件 this.panelMain.Controls.Clear(); InfoManForm infoForm = new InfoManForm(); infoForm.Show(); this.panelMain.Controls.Add(infoForm); } private void btnSetting_Click(object sender, EventArgs e) { // 清除panel上的所有控件 this.panelMain.Controls.Clear(); SettingForm settingForm = new SettingForm(); settingForm.Show(); this.panelMain.Controls.Add(settingForm); } } }