private void AddHotkey(HotkeyTask hotkeyEnum, bool resetKeys) { object dfltHotkey = Engine.conf.GetFieldValue("DefaultHotkey" + hotkeyEnum.ToString()); if (!resetKeys) { object userHotKey = Engine.conf.GetFieldValue("Hotkey" + hotkeyEnum.ToString()); if (userHotKey != null && userHotKey.GetType() == typeof(Keys)) { dgvHotkeys.Rows.Add(hotkeyEnum.GetDescription(), ((Keys)userHotKey).ToSpecialString(), ((Keys)dfltHotkey).ToSpecialString()); } } else { dgvHotkeys.Rows.Add(hotkeyEnum, ((Keys)dfltHotkey).ToSpecialString(), ((Keys)dfltHotkey).ToSpecialString()); } }