Source/Ribbon/MessageBoxEx.cs
(开头部分) 12KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
namespace DevComponents.DotNetBar
{
/// <summary>
/// Represents the class that provides MessageBox like functionality with the styled Office 2007 dialog and text markup support.
/// </summary>
public class MessageBoxEx
{
/// <summary>
/// Occurs when text markup link on Message Box is clicked. Markup links can be created using "a" tag, for example:
/// <a name="MyLink">Markup link</a>
/// </summary>
public static event MarkupLinkClickEventHandler MarkupLinkClick;
internal static void InvokeMarkupLinkClick(object sender, MarkupLinkClickEventArgs e)
{
MarkupLinkClickEventHandler h = MarkupLinkClick;
if (h != null)
h(sender, e);
}
/// <summary>
/// Displays a message box with specified text.
/// </summary>
/// <param name="text">The text to display in the message box.</param>
/// <returns>One of the DialogResult values.</returns>
public static DialogResult Show(string text)
{
return ShowInternal(null, text, "", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, false);
}
/// <summary>
/// Displays a message box in front of the specified object and with the specified text.
/// </summary>
/// <param name="owner">The IWin32Window the message box will display in front of. </param>
/// <param name="text">The text to display in the message box. </param>
/// <returns>One of the DialogResult values.</returns>
public static DialogResult Show(IWin32Window owner, string text)
{
return ShowInternal(null, text, "", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, GetTopMost(owner));
}
/// <summary>
/// Displays a message box with specified text and caption.
/// </summary>
/// <param name="text">The text to display in the message box.</param>
/// <param name="caption">The text to display in the title bar of the message box.</param>
/// <returns>One of the DialogResult values.</returns>
public static DialogResult Show(string text, string caption)
{
return ShowInternal(null, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, false);
}
/// <summary>
/// Displays a message box with specified text and caption.
/// </summary>
后面还有 156 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。