Пример #1
0
 //设置COM信息
 public static void Init()
 {
     com            = Common.GetComInfo();
     callbtnsetting = GetCallBtnSetting();
     orderby        = GetOrederBy();
     timecolor      = GetTimeColor();
     TimeOut        = 5;
     UnFinish       = 20;
     users          = szwlForm.mainForm.dm.selectUser();
     employees      = szwlForm.mainForm.dm.selectEmployee();
     employeeRFID   = szwlForm.mainForm.dm.selectEmployeeRFID();
     list_zone      = szwlForm.mainForm.dm.selectZone();
     list_caller    = szwlForm.mainForm.dm.selectCaller();
     program        = new UserProgram(LogOnForm.currentUser);
 }
Пример #2
0
 //设置COM信息
 public static void Clear()
 {
     com                   = null;
     callbtnsetting        = null;
     orderby               = null;
     timecolor             = null;
     TimeOut               = 5;
     UnFinish              = 20;
     users                 = null;
     employees             = null;
     employeeRFID          = null;
     list_zone             = null;
     list_caller           = null;
     program               = null;
     LogOnForm.currentUser = null;
 }
Пример #3
0
 //获取CallBtnSetting信息
 public static CallBtnSetting GetCallBtnSetting()
 {
     try
     {
         CallBtnSetting set = new CallBtnSetting();
         System.Type    tmp = typeof(CallBtnSetting.CallBtnType);
         foreach (var type in Enum.GetNames(tmp))
         {
             if (set.callBtnSettings == null)
             {
                 set.callBtnSettings = new Dictionary <CallBtnSetting.CallBtnType, string>();
             }
             set.callBtnSettings.Add((CallBtnSetting.CallBtnType)Enum.Parse(typeof(CallBtnSetting.CallBtnType), type), ChangeAppConfig.getValueFromKey(type) == null ? "" : ChangeAppConfig.getValueFromKey(type));
         }
         return(set);
     }
     catch (Exception ex)
     {
         LogHelper.LibraryLogger.Instance.WriteLog(LogHelper.LibraryLogger.libLogLevel.Error, ex.ToString());
         return(null);
     }
 }