コード例 #1
0
 private static MessageBoxResult InlineShow(Window owner, IAMessageBox messageBox)
 {
     if (messageBox.NeedOwner)
     {
         if (owner != null)
         {
             messageBox.Owner = owner;
         }
         else if (messageBox.Owner != WindowHelper.MainFrame)
         {
             messageBox.Owner = WindowHelper.MainFrame;
         }
     }
     if (messageBox.MessageBoxImage == MessageBoxImage.None)
     {
         messageBox.MessageBoxImage = MessageBoxImage.Asterisk;
     }
     messageBox.Init();
     if (messageBox.DoModel)
     {
         messageBox.ShowDialog();
     }
     else
     {
         messageBox.Show();
     }
     return(messageBox.MessageBoxResult);
 }
コード例 #2
0
        public static void InvalidUinMsg(Window owner, string uin)
        {
            Paragraph paragraph = new Paragraph();

            AddNormalText(paragraph.Inlines, Global.InvalidUinMsg);
            AddLinkText(paragraph.Inlines, "[详情请点击]", new HyperLinkObj_Url(string.Format("http://exp.qq.com/cgi-bin/present/tec_cgi_index?source_flag=0&uin={0}", uin)));
            IAMessageBox.Show(owner, paragraph.Inlines, "QQ");
        }
コード例 #3
0
        public static MessageBoxResult ServerKickoutMsgBox(Window owner)
        {
            Paragraph paragraph = new Paragraph();

            AddNormalText(paragraph.Inlines, "您的QQ帐号在另一个地方登录了,您已被迫下线。\r\n\r\n请注意: 如果这不是您本人的操作,那么您的密码很可能已经泄露,建议您立刻");
            AddLinkText(paragraph.Inlines, "修改密码", new HyperLinkObj_Url(CoreMessenger.Instance.MiscHelper.TXLoadString("ConfigCenter_ChangePwd_URL")));
            AddNormalText(paragraph.Inlines, "。\n\n\n 是否重新登录?");
            return(IAMessageBox.Show(owner, paragraph.Inlines, "系统消息", MessageBoxButton.YesNo, MessageBoxImage.Exclamation));
        }
コード例 #4
0
        public static MessageBoxResult CustomHeadMsgBox(Window owner)
        {
            Paragraph paragraph = new Paragraph();

            AddNormalText(paragraph.Inlines, "您没有上传自定义头像的权限,");
            AddLinkText(paragraph.Inlines, "查看详情", new HyperLinkObj_Url("http://im.qq.com/client/description/avatar.shtml"));
            AddNormalText(paragraph.Inlines, "。");
            return(IAMessageBox.Show(owner, paragraph.Inlines, "提示"));
        }
コード例 #5
0
        public static void ShowNormal(string messageBoxText)
        {
            IAMessageBox box2 = new IAMessageBox
            {
                MessageBoxText = messageBoxText,
                DoModel        = false,
                NeedOwner      = false
            };
            IAMessageBox bamaMessageBox = box2;

            InlineShow(null, bamaMessageBox);
        }
コード例 #6
0
        public static MessageBoxResult Show(Window owner, InlineCollection inlines, string caption, MessageBoxButton messageBoxButton, MessageBoxImage messageBoxImage)
        {
            IAMessageBox box2 = new IAMessageBox
            {
                Inlines          = inlines,
                Caption          = caption,
                MessageBoxButton = messageBoxButton,
                MessageBoxImage  = messageBoxImage
            };
            IAMessageBox bamaMessageBox = box2;

            return(InlineShow(owner, bamaMessageBox));
        }
コード例 #7
0
        public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon)
        {
            IAMessageBox box2 = new IAMessageBox
            {
                MessageBoxText   = messageBoxText,
                Caption          = caption,
                MessageBoxButton = button,
                MessageBoxImage  = icon
            };
            IAMessageBox iAMessageBox = box2;

            return(InlineShow(owner, iAMessageBox));
        }
コード例 #8
0
 public static void ShowNormal(string messageBoxText)
 {
     IAMessageBox box2 = new IAMessageBox
     {
         MessageBoxText = messageBoxText,
         DoModel = false,
         NeedOwner = false
     };
     IAMessageBox bamaMessageBox = box2;
     InlineShow(null, bamaMessageBox);
 }
コード例 #9
0
 public static MessageBoxResult Show(Window owner, InlineCollection inlines, string caption, MessageBoxButton messageBoxButton, MessageBoxImage messageBoxImage)
 {
     IAMessageBox box2 = new IAMessageBox
     {
         Inlines = inlines,
         Caption = caption,
         MessageBoxButton = messageBoxButton,
         MessageBoxImage = messageBoxImage
     };
     IAMessageBox bamaMessageBox = box2;
     return InlineShow(owner, bamaMessageBox);
 }
コード例 #10
0
 public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon)
 {
     IAMessageBox box2 = new IAMessageBox
     {
         MessageBoxText = messageBoxText,
         Caption = caption,
         MessageBoxButton = button,
         MessageBoxImage = icon
     };
     IAMessageBox iAMessageBox = box2;
     return InlineShow(owner, iAMessageBox);
 }
コード例 #11
0
 private static MessageBoxResult InlineShow(Window owner, IAMessageBox messageBox)
 {
     if (messageBox.NeedOwner)
     {
         if (owner != null)
         {
             messageBox.Owner = owner;
         }
         else if (messageBox.Owner != WindowHelper.MainFrame)
         {
             messageBox.Owner = WindowHelper.MainFrame;
         }
     }
     if (messageBox.MessageBoxImage == MessageBoxImage.None)
     {
         messageBox.MessageBoxImage = MessageBoxImage.Asterisk;
     }
     messageBox.Init();
     if (messageBox.DoModel)
     {
         messageBox.ShowDialog();
     }
     else
     {
         messageBox.Show();
     }
     return messageBox.MessageBoxResult;
 }