Пример #1
0
        public static DialogResult Show(string sText, string sBtnSi, string sBtnNo, FlatMessageBoxIcon icon)
        {
            _FlatMessageBox = new FlatMessageBox();
            Form frmSet = Application.OpenForms["FPrincipal"];

            _FlatMessageBox.StartPosition = FormStartPosition.CenterScreen;

            if (string.IsNullOrEmpty(sBtnNo))
            {
                _FlatMessageBox.btnNo.Visible   = false;
                _FlatMessageBox.btnYes.Location = new Point(167, 185);
            }
            _FlatMessageBox.asignarIcono(icon);

            _FlatMessageBox.lblMessage.Text = sText;
            _FlatMessageBox.btnYes.Text     = sBtnSi;
            _FlatMessageBox.btnNo.Text      = sBtnNo;



            _DialogResult = DialogResult.No;

            _FlatMessageBox.Activate();
            _FlatMessageBox.ShowDialog();

            return(_DialogResult);
        }