Exemplo n.º 1
0
        private string GetHotKeyName(HotKeyControl ctrl)
        {
            string name = "";

            switch (ctrl.Name)
            {
            case "txtTakePicture":
                name = "takePicture";
                break;

            case "txtZoomIn":
                name = "zoomIn";
                break;

            case "txtZoomOut":
                name = "zoomOut";
                break;

            case "txtStart":
                name = "startRecord";
                break;

            case "txtFire":
                name = "fireLaser";
                break;
            }
            return(name);
        }
Exemplo n.º 2
0
 public override void RefreshUI()
 {
     base.RefreshUI();
     this.Title = global::CII.LAR.Properties.Resources.StrShortcutTitle;
     foreach (var ctrl in this.Controls)
     {
         HotKeyControl hkc = ctrl as HotKeyControl;
         if (hkc != null)
         {
             hkc.updateWatermark();
         }
     }
     this.Invalidate();
 }
Exemplo n.º 3
0
 private void UnRegisterKey(object sender, EventArgs e)
 {
     try
     {
         var           keys = Program.SysConfig.LocalHotKeyContainer.ToList();
         HotKeyControl ctrl = sender as HotKeyControl;
         string        name = GetHotKeyName(ctrl);
         foreach (var shortkey in keys)
         {
             if (shortkey.Name == name)
             {
                 hotKeyManager.RemoveHotKey(shortkey.Name);
             }
         }
     }
     catch (Exception ex)
     {
     }
 }