Exemplo n.º 1
0
        public static bool?ShowDialog(Window owner, bool topMost, string windowTitle, string fieldCaption)
        {
            try
            {
                InputBox.InputModel = new InputBoxModel();

                InputBox.viewer = new ViewerWindow(windowTitle, fieldCaption, InputBox.InputModel);

                InputBox.viewer.Owner = owner;

                InputBox.viewer.Topmost = topMost;

                return(InputBox.viewer.ShowDialog());
            }
            catch (Exception err)
            {
                MessageDisplay.Show(err.InnerExceptionMessage());
            }
            finally
            {
                InputBox.viewer = null;
            }

            return(null);
        }
Exemplo n.º 2
0
        public static bool?ShowDialog(string windowTitle, string fieldCaption)
        {
            try
            {
                InputBox.InputModel = new InputBoxModel();

                InputBox.viewer = new ViewerWindow(windowTitle, fieldCaption, InputBox.InputModel);

                return(InputBox.viewer.ShowDialog());
            }
            catch (Exception err)
            {
                MessageBox.Show(err.InnerExceptionMessage());
            }
            finally
            {
                InputBox.viewer = null;
            }

            return(null);
        }