CNAS取数仪器端升级
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 line
1.9KB

  1. using CNAS_DBSync;
  2. using CnasSynchronusClient;
  3. using CnasSynchrousModel;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.Data;
  8. using System.Drawing;
  9. using System.IO;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Windows.Forms;
  13. using System.Xml.Serialization;
  14. namespace CNAS_RunSync
  15. {
  16. public partial class frmSyncShow : Form
  17. {
  18. //private log4net.ILog log = log4net.LogManager.GetLogger("frmSyncShow");
  19. public List<SyncInstrumentItemInfo> lstSyncInstrument = new List<SyncInstrumentItemInfo>();
  20. public frmSyncShow()
  21. {
  22. InitializeComponent();
  23. }
  24. private void frmSyncShow_Load(object sender, EventArgs e)
  25. {
  26. //1.读取本地存储的仪器信息
  27. //2.每一个仪器创建一个TabPage
  28. //3.每个TabPage页内加载一个ucSyncShow,展示这个仪器的详细信息和操作
  29. //读取本地文件中存储的配置信息
  30. lstSyncInstrument = FileOperation.GetLocalSyncInStrumentData();
  31. if (lstSyncInstrument.Count > 0)
  32. {
  33. int index = 0;
  34. foreach (var item in lstSyncInstrument)
  35. {
  36. tabcSyncData.TabPages.Add(index.ToString(), item.Code);
  37. ucSyncShow show = new ucSyncShow(item);
  38. tabcSyncData.TabPages[index].Controls.Add(show);
  39. show.Dock = DockStyle.Fill;
  40. index++;
  41. }
  42. }
  43. else
  44. {
  45. MessageBox.Show("未找到相关仪器配置。");
  46. }
  47. }
  48. private void btnAutoService1_Click(object sender, EventArgs e)
  49. {
  50. if (new frmOperationPwd().ShowDialog() == DialogResult.OK)
  51. {
  52. frmServiceConfig frmServiceConfig = new frmServiceConfig();
  53. frmServiceConfig.ShowDialog();
  54. }
  55. }
  56. }
  57. }