Пример #1
0
        /// <summary>
        /// 显示一个定时标签消息框。
        /// </summary>
        /// <param name="owner">控件拥有者。</param>
        /// <param name="content">消息内容。</param>
        public static void ShowLabel(this Control owner, string content)
        {
            var parameters = new MessageLabelParameters();

            parameters.Content.Text = content;
            Msg.ShowLabel(owner, parameters);
        }
Пример #2
0
        /// <summary>
        /// 显示一个定时标签消息框。
        /// </summary>
        /// <param name="owner">控件拥有者。</param>
        /// <param name="content">消息内容。</param>
        /// <param name="messageBoxIcon">显示的图标。</param>
        public static void ShowLabel(this Control owner, string content, MessageBoxIconEx messageBoxIcon)
        {
            var parameters = new MessageLabelParameters();

            parameters.Content.Text        = content;
            parameters.Icon.MessageBoxIcon = messageBoxIcon;
            Msg.ShowLabel(owner, parameters);
        }
Пример #3
0
        /// <summary>
        /// 显示一个定时标签消息框。
        /// </summary>
        /// <param name="owner">控件拥有者。</param>
        /// <param name="content">消息内容。</param>
        /// <param name="seconds">定时的秒数。</param>
        public static void ShowLabel(this Control owner, string content, int seconds)
        {
            var parameters = new MessageLabelParameters();

            parameters.Content.Text     = content;
            parameters.CloseMillisecond = seconds * 1000;
            Msg.ShowLabel(owner, parameters);
        }
Пример #4
0
        /// <summary>
        /// 显示一个定时标签消息框。
        /// </summary>
        /// <param name="owner">控件拥有者。</param>
        /// <param name="content">消息内容。</param>
        /// <param name="alignment">对齐方式。</param>
        /// <param name="isAlignmentScreen">是否对齐于桌面。</param>
        public static void ShowLabel(this Control owner, string content, ContentAlignment alignment, bool isAlignmentScreen = false)
        {
            var parameters = new MessageLabelParameters();

            parameters.Content.Text      = content;
            parameters.Alignment         = alignment;
            parameters.IsAlignmentScreen = isAlignmentScreen;
            Msg.ShowLabel(owner, parameters);
        }
Пример #5
0
 /// <summary>
 /// 显示一个定时标签消息框。
 /// </summary>
 /// <param name="content">消息内容。</param>
 /// <param name="messageBoxIcon">显示的图标。</param>
 public static void ShowLabel(string content, MessageBoxIconEx messageBoxIcon)
 {
     Msg.ShowLabel(null, content, messageBoxIcon);
 }
Пример #6
0
 /// <summary>
 /// 显示一个定时标签消息框。
 /// </summary>
 /// <param name="content">消息内容。</param>
 public static void ShowLabel(string content)
 {
     Msg.ShowLabel(null, content);
 }