Beispiel #1
0
        public static MBS_Risultato Show(String contenuto, string titolo = "", MBX_Button pulsanti = MBX_Button.OK, bool showOnScreen = false)
        {
            MetroMessageBox msgbx = new MetroMessageBox(contenuto, titolo, pulsanti, showOnScreen);

            msgbx.BeginDarken();
            msgbx.ShowDialog();
            msgbx.EndDarken();

            return(msgbx.Risultato);
        }
Beispiel #2
0
        private MetroMessageBox(String contenuto, string titolo, MBX_Button pulsanti, bool showOnScreen)
        {
            InitializeComponent();

            LoadFont();

            Contenuto    = contenuto;
            Pulsanti     = pulsanti;
            Titolo       = titolo;
            Risultato    = MBS_Risultato.OK;
            ShowOnScreen = showOnScreen;

            _darkenScreen = new DarkenScreen();
            _darkenScreen.ColoreOscurazione = HideFormColor;
            _darkenScreen.ShowOnScreen      = ShowOnScreen;

            InitDimensioni();
            InitPulsanti();
        }