CNAS取数仪器端升级
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

49 行
1.5KB

  1. using CnasSynchronusClient;
  2. using CnasSynchrousModel;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Windows.Forms;
  7. namespace CNASBalanceDBManage
  8. {
  9. static class Program
  10. {
  11. /// <summary>
  12. /// 应用程序的主入口点。
  13. /// </summary>
  14. [STAThread]
  15. static void Main()
  16. {
  17. Application.EnableVisualStyles();
  18. Application.SetCompatibleTextRenderingDefault(false);
  19. SystemFormatConfig systemFormat = FileOperation.GetSystemFormatConfigData();
  20. GlobalCommonOperation.strStartGeneralVersion = systemFormat.StartGeneralVersion;
  21. GlobalCommonOperation.strStartWebApi = systemFormat.StartWebApi;
  22. GlobalCommonOperation.strWebApiUrl = systemFormat.WebApiUrl;
  23. GlobalCommonOperation.strTargetDbType = systemFormat.TargetDBType;
  24. // 检查是否已激活
  25. if (!(new ActivationForm()).CheckActivation())
  26. {
  27. // 未激活,显示激活窗口
  28. using (var activationForm = new ActivationForm())
  29. {
  30. if (activationForm.ShowDialog() == DialogResult.OK)
  31. {
  32. // 激活成功,显示主窗口
  33. Application.Run(new frmBalanceDB());
  34. }
  35. }
  36. }
  37. else
  38. {
  39. // 已激活,直接显示主窗口
  40. Application.Run(new frmBalanceDB());
  41. }
  42. }
  43. }
  44. }