コード例 #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);
                }
            }
        }
コード例 #2
0
 public bool Equals(IHotkeyAction other)
 {
     return((other.Name == Name) && (other.Version == Version));
 }
コード例 #3
0
 public bool Equals(IHotkeyAction other)
 {
     return (other.Name == Name) && (other.Version == Version);
 }
コード例 #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);
        }