SystemInf.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. using System;
  2. using System.Collections.Generic;
  3. namespace UAS_MES.Entity
  4. {
  5. class SystemInf
  6. {
  7. /// <summary>
  8. /// 连接字符串,用户登录的时候选择了数据库之后会使用该字符串作为连接字符串
  9. /// </summary>
  10. public static string ConnectionString;
  11. /// <summary>
  12. /// 用户登录的时间
  13. /// </summary>
  14. public static string LoginTime;
  15. /// <summary>
  16. /// 当前的连接数据库
  17. /// </summary>
  18. public static string CurrentDB;
  19. /// <summary>
  20. /// 配置文件默认的数据库
  21. /// </summary>
  22. public static string DefaultDB;
  23. /// <summary>
  24. /// 屏幕的宽度
  25. /// </summary>
  26. public static int ScreenWidth;
  27. /// <summary>
  28. /// 屏幕的高度
  29. /// </summary>
  30. public static int ScreenHeight;
  31. /// <summary>
  32. /// 当前岗位资源对应的Caller
  33. /// </summary>
  34. public static Dictionary<string, Dictionary<string, bool>> Caller = new Dictionary<string, Dictionary<string, bool>>();
  35. /// <summary>
  36. /// 打开的串口的名称
  37. /// </summary>
  38. public static List<string> OpenPort=new List<string>();
  39. /// <summary>
  40. /// 检测音频是否可用
  41. /// </summary>
  42. public static bool CheckAudioEnable=true;
  43. /// <summary>
  44. /// 导航宽度
  45. /// </summary>
  46. public static int NavWidth = 0;
  47. /// <summary>
  48. /// HeadBar的高度
  49. /// </summary>
  50. public static int HeadBarHeight = 0;
  51. /// <summary>
  52. /// 当前程序进程ID
  53. /// </summary>
  54. public static int ProcessesID;
  55. /// <summary>
  56. /// 是否允许打印程序
  57. /// </summary>
  58. public static bool EnablePrint;
  59. /// <summary>
  60. /// 缓存数据的文件夹
  61. /// </summary>
  62. public static string CacheFolder= Environment.GetEnvironmentVariable("windir").Substring(0, 1)+@":\UAS_MES\CacheFile\";
  63. /// <summary>
  64. /// 日志文件的缓存路径
  65. /// </summary>
  66. public static string LogFolder = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\Log\";
  67. /// <summary>
  68. /// 缓存的XML文件的路径和名称
  69. /// </summary>
  70. public static string CacheFilePath= Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\CacheFile\CacheInfo.xml";
  71. public static bool UpperCollection = true;
  72. public static bool GetRelation = false;
  73. public static DataOperate.DataHelper dh;
  74. }
  75. }