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.

Form1.cs 1.0KB

5 years ago
1234567891011121314151617181920212223242526272829303132333435363738
  1. using CnasSynchronusClient;
  2. using CnasSynchrousModel;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.Data;
  7. using System.Drawing;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Windows.Forms;
  11. namespace WF_ChangeGUID
  12. {
  13. public partial class Form1 : Form
  14. {
  15. public Form1()
  16. {
  17. InitializeComponent();
  18. }
  19. private void button1_Click(object sender, EventArgs e)
  20. {
  21. List<SyncInstrumentItemInfo> lstSyncInstrument = FileOperation.GetLocalSyncInStrumentData();
  22. if (lstSyncInstrument != null)
  23. {
  24. foreach (SyncInstrumentItemInfo item in lstSyncInstrument)
  25. {
  26. item.GUID = Guid.NewGuid().ToString();
  27. }
  28. //保存
  29. if (FileOperation.SaveLocalSyncInStrumentData(lstSyncInstrument))
  30. MessageBox.Show("保存成功");
  31. else
  32. MessageBox.Show("保存失败");
  33. }
  34. }
  35. }
  36. }