Ejemplo n.º 1
0
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        Keys k = Keys.A | Keys.Control;

        WindowsShell.RegisterHotKey(this, k);
    }
Ejemplo n.º 2
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            WindowsShell.UnregisterHotKey(this);

            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
Ejemplo n.º 3
0
 private void MainClass_FormClosing(object sender, FormClosingEventArgs e)
 {
     WindowsShell.UnregisterHotKey(this);
 }
Ejemplo n.º 4
0
        private void MainClass_Load(object sender, EventArgs e)
        {
            const Keys k = Keys.Space | Keys.Control | Keys.Alt;

            WindowsShell.RegisterHotKey(this, k);
        }
Ejemplo n.º 5
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);
        }