Beispiel #1
0
        /// <summary>
        /// 消息响应
        /// </summary>
        /// <param name="para"></param>
        public void OnMessage(string name, int lPara, int wPara)
        {
            if (name == "F6")
            {
                FrmClient.CreateInstance().Show();
            }
            else if (name == "F7")
            {
                if (CYOHOOApp.DogLock == CYOHOOApp.DogRelease) //不检查加密狗
                {
                    return;
                }

                CSentinel dog = new CSentinel();

                string er = string.Empty;

                int leftDay = 0;

                string serialNo = string.Empty;

                if (!dog.check_safe_dog(CYOHOOApp.DogID, out leftDay, out serialNo, out er))
                {
                    MessageBox.Show(CLanguage.Lan("未找不到软件加密狗,请确认已插上加密狗?") + "\r\n" +
                                    CLanguage.Lan("错误信息") + ":" + er, CLanguage.Lan("软件加密狗"),
                                    MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }

                FrmDogLock.CreateInstance(serialNo).Show();
            }
        }
Beispiel #2
0
 /// <summary>
 /// 创建唯一实例
 /// </summary>
 public static FrmDogLock CreateInstance(string name)
 {
     lock (syncRoot)
     {
         if (dlg == null || dlg.IsDisposed)
         {
             dlg = new FrmDogLock(name);
         }
     }
     return(dlg);
 }