using CNAS_DBSync; using CnasSynchronusClient; using CnasSynchrousModel; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Windows.Forms; using System.Xml.Serialization; namespace CNAS_RunSync { public partial class frmSyncShow : Form { //private log4net.ILog log = log4net.LogManager.GetLogger("frmSyncShow"); public List lstSyncInstrument = new List(); public frmSyncShow() { InitializeComponent(); } private void frmSyncShow_Load(object sender, EventArgs e) { //1.读取本地存储的仪器信息 //2.每一个仪器创建一个TabPage //3.每个TabPage页内加载一个ucSyncShow,展示这个仪器的详细信息和操作 //读取本地文件中存储的配置信息 lstSyncInstrument = FileOperation.GetLocalSyncInStrumentData(); if (lstSyncInstrument.Count > 0) { int index = 0; foreach (var item in lstSyncInstrument) { tabcSyncData.TabPages.Add(index.ToString(), item.Code); ucSyncShow show = new ucSyncShow(item); tabcSyncData.TabPages[index].Controls.Add(show); show.Dock = DockStyle.Fill; index++; } } else { MessageBox.Show("未找到相关仪器配置。"); } } private void btnAutoService1_Click(object sender, EventArgs e) { if (new frmOperationPwd().ShowDialog() == DialogResult.OK) { frmServiceConfig frmServiceConfig = new frmServiceConfig(); frmServiceConfig.ShowDialog(); } } } }