• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# MessageBoxDefaultButton类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MessageBoxDefaultButton的典型用法代码示例。如果您正苦于以下问题:C# MessageBoxDefaultButton类的具体用法?C# MessageBoxDefaultButton怎么用?C# MessageBoxDefaultButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MessageBoxDefaultButton类属于命名空间,在下文中一共展示了MessageBoxDefaultButton类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
 }
开发者ID:gitsly,项目名称:CodingSandbox,代码行数:7,代码来源:MessageBoxCentered.cs


示例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();
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:27,代码来源:KryptonMessageBox.cs


示例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);
 }
开发者ID:pminiszewski,项目名称:HlslTools,代码行数:7,代码来源:Logger.cs


示例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));
 }
开发者ID:landofjoe,项目名称:NuspecPackager,代码行数:7,代码来源:Logger.cs


示例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);
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:14,代码来源:RTLAwareMessageBox.cs


示例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;
        }
开发者ID:renyh1013,项目名称:dp2weixin,代码行数:28,代码来源:MessageDlg.cs


示例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);
 }
开发者ID:fikalefaza,项目名称:openvpn-manager,代码行数:7,代码来源:RTLMessageBox.cs


示例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);
        }
开发者ID:Gamer2020,项目名称:toolsfactory,代码行数:18,代码来源:MessageBoxHelper.cs


示例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);
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:14,代码来源:MessageBoxStub.cs


示例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);
        }
开发者ID:JodenSoft,项目名称:JodenSoft,代码行数:17,代码来源:MessageBoxEx.cs


示例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);
 }
开发者ID:jwillj2k4,项目名称:TCPServer,代码行数:21,代码来源:TcpMessageService.cs


示例12: ResetVars

 public static void ResetVars()
 {
     response = DialogResult.Ignore;
     message = "";
     title = "[BridgeSQL: ERROR]";
     interact = MessageBoxButtons.OKCancel;
     icon = MessageBoxIcon.Error;
     defaultButton = MessageBoxDefaultButton.Button1;
 }
开发者ID:kahshiu,项目名称:BridgeSQLV1,代码行数:9,代码来源:Popups.cs


示例13: Show

 public static DialogResult Show(
     string text,
     string caption,
     MessageBoxButtons buttons,
     MessageBoxIcon icon,
     MessageBoxDefaultButton defaultButton )
 {
     return MessageBox.Show( text, caption, buttons, icon, defaultButton );
 }
开发者ID:Glain,项目名称:FFTPatcher,代码行数:9,代码来源:MyMessageBox.cs


示例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;
 }
开发者ID:FeelingMars,项目名称:DispatchPlatform,代码行数:9,代码来源:MessageBoxEx.cs


示例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;
        }
开发者ID:Powerino73,项目名称:paradox,代码行数:14,代码来源:DialogEventArgs.cs


示例16: Show

 public static DialogResult Show(String p_text, String p_caption)
 {
     m_text = p_text.ToString();
     m_caption = p_caption.ToString();
     m_icon = MessageBoxIcon.Information;
     m_buttons = MessageBoxButtons.OK;
     m_default = MessageBoxDefaultButton.Button1;
     return ShowForm();
 }
开发者ID:balasmani,项目名称:texpro,代码行数:9,代码来源:PCMSG.cs


示例17: Show

 /// <summary>
 /// 一般的なダイアログ表示用メソッドです。
 /// </summary>
 public static DialogResult Show(IWin32Window owner, string message,
                                 string title,
                                 MessageBoxButtons buttons,
                                 MessageBoxDefaultButton defaultButton)
 {
     return WinForms.MessageBox.Show(
         owner, message, title, buttons,
         MessageBoxIcon.None, defaultButton);
 }
开发者ID:leontius,项目名称:Ragnarok,代码行数:12,代码来源:DialogUtil.cs


示例18: Show

 public static DialogResult Show(
     IWin32Window owner, string text, string caption, MessageBoxButtons buttons,
     Bitmap icon, MessageBoxDefaultButton defaultButton, MessageBoxIcon beepType)
 {
     NativeMethods.MessageBeep((int)beepType);
     MessageBoxForm form = new MessageBoxForm();
     return form.ShowMessageBoxDialog(new MessageBoxArgs(
         owner, text, caption, buttons, icon, defaultButton));
 }
开发者ID:panshuiqing,项目名称:winform-ui,代码行数:9,代码来源:MessageBoxEx.cs


示例19: Show

        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons,
            MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
        {
            if (IsRightToLeft(owner))
            {
                options |= MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign;
            }

            return MessageBox.Show(owner, text, caption, buttons, icon, defaultButton, options);
        }
开发者ID:psyCHOder,项目名称:conferencexp,代码行数:10,代码来源:RtlAwareMessageBox.cs


示例20: ConfirmMessage

 public static bool ConfirmMessage(string messageKey, string complementStr)
 {
     _msgStr = string.Format("{0} {1}?", messageKey, complementStr);
     _msgCaption = Resources.MsgCaptionConfirm;
     _msgButton = MessageBoxButtons.YesNo;
     _msgIcon = MessageBoxIcon.Question;
     _msgDefaultButton = MessageBoxDefaultButton.Button2;
     _dialogResult = MessageBox.Show(_msgStr, _msgCaption, _msgButton, _msgIcon, _msgDefaultButton);
     return (_dialogResult == DialogResult.Yes);
 }
开发者ID:ViniciusConsultor,项目名称:campos,代码行数:10,代码来源:FrmExtendedMessageBox.cs



注:本文中的MessageBoxDefaultButton类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# MessageBoxForm类代码示例发布时间:2022-05-24
下一篇:
C# MessageBoxButtons类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap