Esempio n. 1
0
        public DialogResult ShowDialog(Control parent)
        {
            var caption = Caption ?? ((parent != null && parent.ParentWindow != null) ? parent.ParentWindow.Title : null);

            swf.Control      c      = (parent == null) ? null : (swf.Control)parent.ControlObject;
            swf.DialogResult result = swf.MessageBox.Show(c, Text, caption, Convert(Buttons), Convert(Type), Convert(DefaultButton, Buttons));
            return(result.ToEto());
        }
Esempio n. 2
0
        public DialogResult ShowDialog(Control parent)
        {
            var parentWindow = parent?.ParentWindow;

            if (parentWindow?.HasFocus == false)
            {
                parentWindow.Focus();
            }

            var caption = Caption ?? parentWindow?.Title;

            swf.Control      c      = (parent == null) ? null : (swf.Control)parent.ControlObject;
            swf.DialogResult result = swf.MessageBox.Show(c, Text, caption, Convert(Buttons), Convert(Type), Convert(DefaultButton, Buttons));
            return(result.ToEto());
        }