Beispiel #1
0
        public static DialogResult Show(string question, string title, string[] options, ref int result, IWin32Window owner, Icon sysIcon)
        {
            if (options == null)
            {
                options = new string[0];
            }

            if (question == null)
            {
                throw new ArgumentNullException("question", "question must be a valid string");
            }

            if (title == null)
            {
                throw new ArgumentNullException("title", "title must be a valid string");
            }

            using (PdnMessageBox messageBox = new PdnMessageBox())
            {
                messageBox.Text = title;
                messageBox.Icon = sysIcon;
                messageBox.InitMessages(question, options);
                messageBox.Result = result;

                messageBox.EnableInstanceOpacity = false;
                DialogResult dialogResult = Utility.ShowDialog(messageBox, owner);
                result = messageBox.Result;

                return(dialogResult);
            }
        }
Beispiel #2
0
        public static DialogResult Show(string question, string title, string[] options, ref int result, IWin32Window owner, Icon sysIcon)
        {
            if (options == null)
            {
                options = new string[0];
            }

            if (question == null)
            {
                throw new ArgumentNullException("question", "question must be a valid string");
            }

            if (title == null)
            {
                throw new ArgumentNullException("title", "title must be a valid string");
            }

            using (PdnMessageBox messageBox = new PdnMessageBox())
            {
                messageBox.Text = title;
                messageBox.Icon = sysIcon;
                messageBox.InitMessages(question, options);
                messageBox.Result = result;

                messageBox.EnableInstanceOpacity = false;
                DialogResult dialogResult = Utility.ShowDialog(messageBox, owner);
                result = messageBox.Result;

                return dialogResult;
            }
        }