Exemplo n.º 1
0
 public void ShowMessage(string message, Action closeAction = null, Func<bool> closePredicate = null)
 {
     var dialog = new MessageDialog();
     dialog.Closing += (sender, e) => this.Controls.Remove(dialog);
     this.Controls.Add(dialog);
     dialog.ShowMessage(message, closePredicate, closeAction);
 }
Exemplo n.º 2
0
        public void ShowMessage(string message, Action closeAction = null, Func<bool> closePredicate = null, int dgSizeX = 800, int dgSizeY = 200)
        {
            this.CloseDialog();

            var dialog = new MessageDialog(dgSizeX, dgSizeY);
            dialog.Closing += (sender, e) => this.Controls.Remove(dialog);
            this.Controls.Add(dialog);
            dialog.ShowMessage(message, closePredicate, closeAction);

            if (this.MessageShowed != null)
                this.MessageShowed(message);
        }