Ejemplo n.º 1
0
        private void ParseSettings()
        {
            try
            {
                for (int iPluginCount = 0; iPluginCount < dsSettings.Tables["Plugins"].Rows.Count; iPluginCount++)
                {
                    Krellsoft.Core.SystemHotkey newHotkey = new Krellsoft.Core.SystemHotkey(this.components);
                    newHotkey.Name     = dsSettings.Tables["Plugins"].Rows[iPluginCount]["Name"].ToString();
                    newHotkey.Shortcut = Globals.GetShortcutKey(dsSettings.Tables["Plugins"].Rows[iPluginCount]["Shortcut"].ToString());
                    newHotkey.Pressed += new System.EventHandler(this.MenuEventHandler);

                    arlHotkeys.Add(newHotkey);
                }
            }
            catch (Exception ex)
            {
                //TODO: Handle Exception
                System.Windows.Forms.MessageBox.Show(ex.Message + "\n" + ex.StackTrace);
            }
        }
Ejemplo n.º 2
0
 private void MenuEventHandler(object sender, System.EventArgs e)
 {
     Krellsoft.Core.SystemHotkey htk = (Krellsoft.Core.SystemHotkey)sender;
     LaunchPlugin(htk.Name);
 }