Esempio n. 1
0
        /// <summary>
        /// Show with up to 4 custom buttons
        /// </summary>
        /// <param name="message"></param>
        /// <param name="caption"></param>
        /// <param name="button1"></param>
        /// <param name="button2"></param>
        /// <param name="button3"></param>
        /// <param name="button4"></param>
        /// <param name="icon"></param>
        /// <returns>Value of 1 - 4 corresponding to button pressed </returns>

        public static int ShowWithCustomButtons(
            string message,
            string caption,
            string button1,
            string button2,
            string button3,
            string button4,
            MessageBoxIcon icon,
            int width  = -1,
            int height = -1)
        {
            if (!SS.I.Attended)
            {
                ClientLog.Message("Show: " + message);
                return((int)DialogResult.OK);
            }

            Progress.Hide(); // hide any progress message

            MessageBoxMx mb = new MessageBoxMx();

            if (JupyterGuiConverter.ConversionsEnabled)
            {
                MessageBoxMx2 mb2 = new MessageBoxMx2();
                new JupyterGuiConverter().ConvertFormOrUserControl(mb2);
            }

            int rc = mb.ShowInstance(message, caption, button1, button2, button3, button4, icon, width, height);

            return(rc);
        }