本文整理汇总了C#中MessageBoxDefaultButton类的典型用法代码示例。如果您正苦于以下问题:C# MessageBoxDefaultButton类的具体用法?C# MessageBoxDefaultButton怎么用?C# MessageBoxDefaultButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MessageBoxDefaultButton类属于命名空间,在下文中一共展示了MessageBoxDefaultButton类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Show
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defButton, MessageBoxOptions options)
{
_owner = owner;
Initialize();
return MessageBox.Show(owner, text, caption, buttons, icon,
defButton, options);
}
示例2: KryptonMessageBox
private KryptonMessageBox(string text, string caption,
MessageBoxButtons buttons, MessageBoxIcon icon,
MessageBoxDefaultButton defaultButton, MessageBoxOptions options,
HelpInfo helpInfo)
{
// Store incoming values
_text = text;
_caption = caption;
_buttons = buttons;
_icon = icon;
_defaultButton = defaultButton;
_options = options;
_helpInfo = helpInfo;
// Create the form contents
InitializeComponent();
// Update contents to match requirements
UpdateText();
UpdateIcon();
UpdateButtons();
UpdateDefault();
UpdateHelp();
// Finally calculate and set form sizing
UpdateSizing();
}
示例3: ShowMessage
public static void ShowMessage(string message, string title = "HLSL Tools",
MessageBoxButtons messageBoxButtons = MessageBoxButtons.OK,
MessageBoxIcon messageBoxIcon = MessageBoxIcon.Warning,
MessageBoxDefaultButton messageBoxDefaultButton = MessageBoxDefaultButton.Button1)
{
MessageBox.Show(message, title, messageBoxButtons, messageBoxIcon, messageBoxDefaultButton);
}
示例4: ShowMessage
public static void ShowMessage(string message, string title = "NuspecPackager",
MessageBoxButtons messageBoxButtons = MessageBoxButtons.OK,
MessageBoxIcon messageBoxIcon = MessageBoxIcon.Warning,
MessageBoxDefaultButton messageBoxDefaultButton = MessageBoxDefaultButton.Button1)
{
Log(String.Format(CultureInfo.CurrentCulture, "{0}: {1}", title, message));
}
示例5: Show
/// <include file='doc\MessageBox.uex' path='docs/doc[@for="MessageBox.Show6"]/*' />
/// <devdoc>
/// <para>
/// Displays a message box with specified text, caption, and style.
/// Makes the dialog RTL if the resources for this dll have been localized to a RTL language.
/// </para>
/// </devdoc>
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon,
MessageBoxDefaultButton defaultButton, MessageBoxOptions options) {
if (RTLAwareMessageBox.IsRTLResources) {
options |= (MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading);
}
return MessageBox.Show(owner, text, caption, buttons, icon, defaultButton, options);
}
示例6: Show
public static DialogResult Show(IWin32Window owner,
string strText,
string strCaption,
MessageBoxButtons buttons,
MessageBoxDefaultButton defaultButton,
ref bool bChecked,
string [] button_texts = null,
string strCheckBoxText = "")
{
MessageDlg dlg = new MessageDlg();
Font font = GuiUtil.GetDefaultFont();
if (font != null)
dlg.Font = font;
if (string.IsNullOrEmpty(strCheckBoxText) == false)
dlg.checkBox_noAsk.Text = strCheckBoxText;
dlg.checkBox_noAsk.Checked = bChecked;
dlg.buttons = buttons;
dlg.defaultButton = defaultButton;
dlg.Message = strText;
dlg.Text = strCaption;
dlg.ButtonTexts = button_texts;
dlg.StartPosition = FormStartPosition.CenterScreen;
dlg.ShowDialog(owner);
bChecked = dlg.checkBox_noAsk.Checked;
return dlg.DialogResult;
}
示例7: Show
public static DialogResult Show(IWin32Window owner, string text,
MessageBoxButtons buttons, MessageBoxDefaultButton defaultButton,
MessageBoxIcon icon)
{
return Show(owner, text, "OpenVPN Manager", buttons, icon,
defaultButton, (MessageBoxOptions) 0);
}
示例8: Show
/// <summary>
/// Displays a message box in front of the specified object and with the specified
/// text, buttons, icon, and default button.
/// </summary>
/// <param name="text"></param>
/// <param name="buttons"></param>
/// <param name="icon"></param>
/// <param name="defaultButton">One of the System.Windows.Forms.MessageBoxDefaultButton
/// values the specifies the default button for the message box.</param>
/// <returns>One of the System.Windows.Forms.DialogResult values.</returns>
public static DialogResult Show(string text, MessageBoxButtons buttons,
MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
{
string caption = AssemblyHelper.Title;
return MessageBoxHelper.Show(text, caption, buttons,
icon, defaultButton, Localization.MessageBoxRtl);
}
示例9: Show
/// ------------------------------------------------------------------------------------
/// <summary>
/// This implementation displays the message in the Console and returns the first
/// button as dialog result.
/// </summary>
/// ------------------------------------------------------------------------------------
public DialogResult Show(IWin32Window owner, string text, string caption,
MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton,
MessageBoxOptions options, string helpFilePath, HelpNavigator navigator, object param)
{
Console.WriteLine("**** {0}: {1}{3}{2}", caption, text, buttons, Environment.NewLine);
return TranslateButtons(buttons);
}
示例10: Show
/// <summary>
/// 显示消息框
/// </summary>
/// <param name="message">消息文本</param>
/// <param name="caption">消息框标题</param>
/// <param name="attachMessage">附加消息</param>
/// <param name="buttons">按钮组合</param>
/// <param name="icon">图标</param>
/// <param name="defaultButton">默认按钮</param>
public static DialogResult Show(string message, string caption, string attachMessage, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
{
if (!Enum.IsDefined(typeof(MessageBoxButtons), buttons)) { throw new InvalidEnumArgumentException(InvalidButtonExString); }
if (!Enum.IsDefined(typeof(MessageBoxIcon), icon)) { throw new InvalidEnumArgumentException(InvalidIconExString); }
if (!Enum.IsDefined(typeof(MessageBoxDefaultButton), defaultButton)) { throw new InvalidEnumArgumentException(InvalidDfButtonExString); }
return ShowCore(message, caption, attachMessage, buttons, icon, defaultButton);
}
示例11: Show
///-------------------------------------------------------------------------------------------------
/// <summary> Shows. </summary>
///
/// <remarks> Justin, 7/11/2015. </remarks>
///
/// <param name="message"> The message. </param>
/// <param name="result"> The result. </param>
/// <param name="state"> The state. </param>
/// <param name="ok"> The ok. </param>
/// <param name="messageBoxIcon"> The message box icon. </param>
/// <param name="button1"> The first button. </param>
/// <param name="serviceNotification"> The service notification. </param>
///-------------------------------------------------------------------------------------------------
public static void Show(string message, string result, TcpState state, MessageBoxButtons ok, MessageBoxIcon messageBoxIcon,
MessageBoxDefaultButton button1, MessageBoxOptions serviceNotification)
{
MessageBox.Show(String.Format("{0} result: {1}, Tcp State: {2}", message, result, state),
@"Information", ok,
messageBoxIcon, button1,
serviceNotification);
}
示例12: ResetVars
public static void ResetVars()
{
response = DialogResult.Ignore;
message = "";
title = "[BridgeSQL: ERROR]";
interact = MessageBoxButtons.OKCancel;
icon = MessageBoxIcon.Error;
defaultButton = MessageBoxDefaultButton.Button1;
}
示例13: Show
public static DialogResult Show(
string text,
string caption,
MessageBoxButtons buttons,
MessageBoxIcon icon,
MessageBoxDefaultButton defaultButton )
{
return MessageBox.Show( text, caption, buttons, icon, defaultButton );
}
示例14: ShowWindow
private static DialogResult ShowWindow(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultbutton)
{
MsgWin = new frmBaseMessageForm();
MsgWin.StartPosition = FormStartPosition.CenterScreen;
DialogResult result = MsgWin.DrawWindow(owner, text, caption, buttons, icon, defaultbutton);
MsgWin.Dispose();
return result;
}
示例15: DialogEventArgs
//public DialogEventArgs(string text, string caption)
// : this(text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, 0)
//{
//}
public DialogEventArgs(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
{
this.text = text;
this.caption = caption;
this.buttons = buttons;
this.icon = icon;
this.defaultButton = defaultButton;
this.options = options;
}