public static bool ValidateShortcut(string shortcut) { var valid = string.IsNullOrWhiteSpace(shortcut) || shortcut.Contains("+") || ShortcutIsAllowedWithoutModifier(shortcut); if (!valid) { MessageForms.WarningOk("Invalid shortcut. The shortcut should have modifiers and a normal key or be F13-F24."); } return(valid); }
public System.Windows.Forms.DialogResult Display(string i_strMsg, string i_TitleMsg, MessageForms.Msgs.MsgIconType i_IconType) { SetWidthHeightForm(i_strMsg); FormatFormMsg(i_TitleMsg, m_PanelCtrl); switch (i_IconType) { case MessageForms.Msgs.MsgIconType.ErrorIcon: PicIcon.Image = this.MsgIcons.Images[System.Convert.ToInt32(MessageForms.Msgs.MsgIconType.ErrorIcon)]; break; case MessageForms.Msgs.MsgIconType.InfomationIcon: PicIcon.Image = this.MsgIcons.Images[System.Convert.ToInt32(MessageForms.Msgs.MsgIconType.InfomationIcon)]; break; case MessageForms.Msgs.MsgIconType.QuestionIcon: PicIcon.Image = this.MsgIcons.Images[System.Convert.ToInt32(MessageForms.Msgs.MsgIconType.QuestionIcon)]; break; case MessageForms.Msgs.MsgIconType.WarningIcon: PicIcon.Image = this.MsgIcons.Images[System.Convert.ToInt32(MessageForms.Msgs.MsgIconType.WarningIcon)]; break; } this.ShowDialog(); return m_MsgResult; }