public FM_MessageBox(string captionText, string message, EnumMessageBox messageBoxMode) : this() { this._Caption = captionText; this._MessageMode = messageBoxMode; this._Message = message; this.ResetSize(); }
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); }
public MyMsgFrm(string captionText, string message, EnumMessageBox messageBoxMode) : this() { _CaptionText = captionText; _MessageMode = messageBoxMode; if (messageBoxMode == EnumMessageBox.Error) { base.CapitionLogo = Resources.logo; } _Message = message; ResetSize(); }
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(); }
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); }
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); }
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); }