Esempio n. 1
0
        private void button5_Click(object sender, EventArgs e)
        {
            // Open config window
            if (dataGridView1.CurrentRow == null || dataGridView1.CurrentRow.Index < 0)
            {
                return;
            }
            DataGridViewRow selected = dataGridView1.CurrentRow;
            IHotkeyAction   action   = ActionContainer.GetAction((string)selected.Cells["Name"].Value,
                                                                 (Version)selected.Cells["Version"].Value);

            if (action != null)
            {
                if (action.ConfigWindow != null)
                {
                    action.ConfigWindow.ShowDialog(this);
                }
            }
        }
Esempio n. 2
0
 public bool Equals(IHotkeyAction other)
 {
     return((other.Name == Name) && (other.Version == Version));
 }
 public bool Equals(IHotkeyAction other)
 {
     return (other.Name == Name) && (other.Version == Version);
 }
Esempio n. 4
0
        /// <summary>
        ///     Get Action by name and version
        /// </summary>
        /// <param name="name">Action Name</param>
        /// <param name="version">Action Version</param>
        /// <returns>returns object</returns>
        public static IHotkeyAction GetAction(string name, Version version)
        {
            IHotkeyAction ret = ActionList.FirstOrDefault(x => x.Name == name && x.Version == version);

            return(ret);
        }