示例#1
0
        public FM_MessageBox(string captionText, string message, EnumMessageBox messageBoxMode)
            : this()
        {
            this._Caption     = captionText;
            this._MessageMode = messageBoxMode;

            this._Message = message;
            this.ResetSize();
        }
示例#2
0
        public static bool Show(string title, string message, EnumMessageBox mode)
        {
            var messageBox          = new CustomMessageBoxView();
            var messageBoxViewModel = new CustomMesssageBox(title, message, mode, messageBox);

            messageBox.DataContext = messageBoxViewModel;
            messageBox.ShowDialog();
            return(messageBoxViewModel.Result);
        }
示例#3
0
 public MyMsgFrm(string captionText, string message, EnumMessageBox messageBoxMode)
     : this()
 {
     _CaptionText = captionText;
     _MessageMode = messageBoxMode;
     if (messageBoxMode == EnumMessageBox.Error)
     {
         base.CapitionLogo = Resources.logo;
     }
     _Message = message;
     ResetSize();
 }
示例#4
0
        public TXMessageBox(string captionText, string message, EnumMessageBox messageBoxMode)
            : this()
        {
            this._CaptionText = captionText;
            this._MessageMode = messageBoxMode;
            if (messageBoxMode == EnumMessageBox.Error)
            {
                this.CapitionLogo = Properties.Resources.logo3;
            }

            this._Message = message;
            this.ResetSize();
        }
示例#5
0
 public MyMsgFrm()
 {
     InitializeComponent();
     base.ResizeEnable = false;
     base.TopMost      = true;
     _CaptionText      = "开铭智能温馨提醒";
     _Message          = "开铭智能 引领科技潮流";
     _MessageMode      = EnumMessageBox.Info;
     MaximumSize       = new Size(_MaxWidth, _MaxHeight);
     ControlHelper.BindMouseMoveEvent(labMessage);
     ControlHelper.BindMouseMoveEvent(panel1);
     base.StartPosition = FormStartPosition.Manual;
     base.Location      = new Point(Screen.PrimaryScreen.WorkingArea.Width / 2 - base.Width / 2, Screen.PrimaryScreen.WorkingArea.Height / 2 - base.Height / 2);
 }
示例#6
0
 public TXMessageBox()
 {
     InitializeComponent();
     //this.ShowInTaskbar = false;
     //this.ResizeEnable = false;
     this.TopMost      = true;
     this._CaptionText = "";
     this._Message     = "";
     this._MessageMode = EnumMessageBox.Info;
     this.MaximumSize  = new Size(this._MaxWidth, this._MaxHeight);
     ControlHelper.BindMouseMoveEvent(this.labMessage);
     ControlHelper.BindMouseMoveEvent(this.panel1);
     //this.StartPosition = FormStartPosition.CenterParent;
     this.StartPosition = FormStartPosition.Manual;
     this.Location      = new Point(Screen.PrimaryScreen.WorkingArea.Width / 2 - this.Width / 2, Screen.PrimaryScreen.WorkingArea.Height / 2 - this.Height / 2);
 }
示例#7
0
        public CustomMesssageBox(string title, string message, EnumMessageBox mode, CustomMessageBoxView view)
        {
            _view       = view;
            Title       = title;
            Message     = message;
            TrueButton  = "Aceptar";
            FalseButton = "Cancelar";
            if (mode == EnumMessageBox.OkCancel)
            {
                TrueButton  = "Aceptar";
                FalseButton = "Cancelar";
            }
            else if (mode == EnumMessageBox.YesNo)
            {
                TrueButton  = "Si";
                FalseButton = "No";
            }

            TrueCommand  = new RelayCommand((o) => ResultMessage(true), (o) => true);
            FalseCommand = new RelayCommand((o) => ResultMessage(false), (o) => true);
        }
        private static DialogResult ShowMessageBox(string captionText, string message, EnumMessageBox infoType)
        {
            TXMessageBox frm    = new TXMessageBox(captionText, message, infoType);
            DialogResult result = frm.ShowDialog();

            frm.Dispose();
            return(result);
        }