Exemplo n.º 1
0
        public override void ExecuteKeyScript(MouseAction mouse, IntPtr ActiveWnd, bool selectWnd, Point location)
        {
            switch (this.Name)
            {
            case EXTRAS_VOLUME:
                if (mouse == MouseAction.WheelUp)
                {
                    VolumeOptions.TurnVolume(VolumeOptions.Volume.Up, 0);
                }
                else if (mouse == MouseAction.WheelDown)
                {
                    VolumeOptions.TurnVolume(VolumeOptions.Volume.Down, 0);
                }
                break;

            case EXTRAS_TRANSPARENCY:
                //Win32.SetForegroundWindow(ActiveWnd);
                //Win32.SetActiveWindow(ActiveWnd);
                if (mouse == MouseAction.WheelUp)
                {
                    WindowOptions.ChangeWndTransparency(ActiveWnd, true);
                }
                else if (mouse == MouseAction.WheelDown)
                {
                    WindowOptions.ChangeWndTransparency(ActiveWnd, false);
                }
                break;

            case EXTRAS_ZOOM:
            case EXTRAS_TASK_SWITCHER:
            case EXTRAS_TAB_SWITCHER:
            case EXTRAS_CUSTOM_WHEEL_BTN:
            default:     //actions from other categories
                base.ExecuteKeyScript(mouse, ActiveWnd, selectWnd, location);
                break;
            }
        }
Exemplo n.º 2
0
 public WindowOptions(WindowOptions action) : base(action) { }
Exemplo n.º 3
0
 private static BaseActionClass InitializeAction(string category, string actionName)
 {
     BaseActionClass action = null;
     switch (category)
     {
         case InternetOptions.NAME:
             if (category != actionName)
                 action = new InternetOptions(actionName);
             else
                 action = new InternetOptions();
             break;
         case WinampOptions.NAME:
             if (category != actionName)
                 action = new WinampOptions(actionName);
             else
                 action = new WinampOptions();
             break;
         case MediaControl.NAME:
             if (category != actionName)
                 action = new MediaControl(actionName);
             else
                 action = new MediaControl();
             break;
         case WindowOptions.NAME:
             if (category != actionName)
                 action = new WindowOptions(actionName);
             else
                 action = new WindowOptions();
             break;
         case WindowsShell.NAME:
             if (category != actionName)
                 action = new WindowsShell(actionName);
             else
                 action = new WindowsShell();
             break;
         case KeystrokesOptions.NAME:
             if (category != actionName)
                 action = new KeystrokesOptions(actionName);
             else
                 action = new KeystrokesOptions();
             break;
         case SpecialOptions.NAME:
             if (category != actionName)
                 action = new SpecialOptions(actionName);
             else
                 action = new SpecialOptions();
             break;
         case AppGroupOptions.NAME:
             if (category != actionName)
                 action = new AppGroupOptions(actionName);
             else
                 action = new AppGroupOptions();
             break;
         case ExtrasOptions.NAME:
             if (category != actionName)
                 action = new ExtrasOptions(actionName);
             else
                 action = new ExtrasOptions();
             break;
         case VolumeOptions.NAME:
             if (category != actionName)
                 action = new VolumeOptions(actionName);
             else
                 action = new VolumeOptions();
             break;
         default:
             //if (category != actionName)
             //    action = new BaseActionClass(actionName);
             //else
                 action = new BaseActionClass();
             break;
     }
     return action;  
 }
Exemplo n.º 4
0
 public WindowOptions(WindowOptions action) : base(action)
 {
 }