コード例 #1
0
		private DlgBox() {}	// To remove the constructor from the documentation!

		///////////////////////////////////////////////////////////////////////
		// CommonDialog

		/// <summary>
		/// Show a command dialog box at the center of the active window.
		/// </summary>
		public static DialogResult ShowDialog(CommonDialog dlg)
		{
			CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
			DialogResult dlgResult = dlg.ShowDialog();
			centerWindow.Dispose();
			return dlgResult;
		}
コード例 #2
0
		///////////////////////////////////////////////////////////////////////
		// Form

		/// <summary>
		/// Show a form dialog box at the center of the active window.
		/// </summary>
		public static DialogResult ShowDialog(Form form)
		{
			CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
			DialogResult dlgResult = form.ShowDialog();
			centerWindow.Dispose();
			return dlgResult;
		}
コード例 #3
0
ファイル: DialogBox.cs プロジェクト: reichanan/HADASHA
 ///////////////////////////////////////////////////////////////////////
 // text
 /// <summary>
 /// See MSDN MessageBox() method. Caption is Application.ProductName.
 /// </summary>
 public static DialogResult Show(string text)
 {
     CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
     string caption = "מערכת מלאי";
     DialogResult dlgResult = MessageBox.Show(text, caption);
     centerWindow.Dispose();
     return dlgResult;
 }
コード例 #4
0
        }                               // To remove the constructor from the documentation!

        ///////////////////////////////////////////////////////////////////////
        // text

        /// <summary>
        /// See MSDN InputBox() method.
        /// </summary>
        public static DialogResult Show(string title, string promptText, ref string value)
        {
            CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
            DialogResult dlgResult    = InputBox.Show(title, promptText, ref value);

            centerWindow.Dispose();
            return(dlgResult);
        }
コード例 #5
0
        ///////////////////////////////////////////////////////////////////////
        // text, caption, buttons, defaultButton, icon, options

        /// <summary>
        /// See MSDN MessageBox() method.
        /// </summary>
        public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
        {
            CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
            DialogResult dlgResult    = MessageBox.Show(text, caption, buttons, icon, defaultButton, options);

            centerWindow.Dispose();
            return(dlgResult);
        }
コード例 #6
0
        }                       // To remove the constructor from the documentation!

        ///////////////////////////////////////////////////////////////////////
        // CommonDialog

        /// <summary>
        /// Show a command dialog box at the center of the active window.
        /// </summary>
        public static DialogResult ShowDialog(CommonDialog dlg)
        {
            CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
            DialogResult dlgResult    = dlg.ShowDialog();

            centerWindow.Dispose();
            return(dlgResult);
        }
コード例 #7
0
		/// <summary>
		/// Show a command dialog box at the center of the owner window.
		/// </summary>
		public static DialogResult ShowDialog(CommonDialog dlg, IWin32Window owner)
		{
			IntPtr handle = (owner == null) ? IntPtr.Zero: owner.Handle;
			CenterWindow centerWindow = new CenterWindow(handle);
			DialogResult dlgResult = dlg.ShowDialog();
			centerWindow.Dispose();
			return dlgResult;
		}
コード例 #8
0
        ///////////////////////////////////////////////////////////////////////
        // Form

        /// <summary>
        /// Show a form dialog box at the center of the active window.
        /// </summary>
        public static DialogResult ShowDialog(Form form)
        {
            CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
            DialogResult dlgResult    = form.ShowDialog();

            centerWindow.Dispose();
            return(dlgResult);
        }
コード例 #9
0
        ///////////////////////////////////////////////////////////////////////
        // text, caption

        /// <summary>
        /// See MSDN MessageBox() method.
        /// </summary>
        public static DialogResult Show(string text, string caption)
        {
            CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
            DialogResult dlgResult    = MessageBox.Show(text, caption);

            centerWindow.Dispose();
            return(dlgResult);
        }
コード例 #10
0
        /// <summary>
        /// Show a form dialog box at the center of the owner window.
        /// </summary>
        public static DialogResult ShowDialog(Form form, IWin32Window owner)
        {
            IntPtr       handle       = (owner == null) ? IntPtr.Zero : owner.Handle;
            CenterWindow centerWindow = new CenterWindow(handle);
            DialogResult dlgResult    = form.ShowDialog();

            centerWindow.Dispose();
            return(dlgResult);
        }
コード例 #11
0
        ///////////////////////////////////////////////////////////////////////
        // text, buttons, defaultButton, icon

        /// <summary>
        /// See MSDN MessageBox() method. Caption is Application.ProductName.
        /// </summary>
        public static DialogResult Show(string text, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
        {
            CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
            string       caption      = Application.ProductName;
            DialogResult dlgResult    = MessageBox.Show(text, caption, buttons, icon, defaultButton);

            centerWindow.Dispose();
            return(dlgResult);
        }
コード例 #12
0
        /// <summary>
        /// See MSDN MessageBox() method.
        /// </summary>
        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
        {
            IntPtr       handle       = (owner == null) ? IntPtr.Zero : owner.Handle;
            CenterWindow centerWindow = new CenterWindow(handle);
            DialogResult dlgResult    = MessageBox.Show(owner, text, caption, buttons, icon, defaultButton, options);

            centerWindow.Dispose();
            return(dlgResult);
        }
コード例 #13
0
        /// <summary>
        /// See MSDN MessageBox() method.
        /// </summary>
        public static DialogResult Show(IWin32Window owner, string text, string caption)
        {
            IntPtr       handle       = (owner == null) ? IntPtr.Zero : owner.Handle;
            CenterWindow centerWindow = new CenterWindow(handle);
            DialogResult dlgResult    = MessageBox.Show(owner, text, caption);

            centerWindow.Dispose();
            return(dlgResult);
        }
コード例 #14
0
ファイル: DialogBox.cs プロジェクト: reichanan/HADASHA
 /// <summary>
 /// See MSDN MessageBox() method. Caption is Application.ProductName.
 /// </summary>
 public static DialogResult Show(IWin32Window owner, string text)
 {
     IntPtr handle = (owner == null) ? IntPtr.Zero: owner.Handle;
     CenterWindow centerWindow = new CenterWindow(handle);
     string caption = "מערכת מלאי";
     DialogResult dlgResult = MessageBox.Show(owner, text, caption);
     centerWindow.Dispose();
     return dlgResult;
 }
コード例 #15
0
        /// <summary>
        /// See MSDN MessageBox() method. Caption is Application.ProductName.
        /// </summary>
        public static DialogResult Show(IWin32Window owner, string text, MessageBoxButtons buttons, MessageBoxIcon icon)
        {
            IntPtr       handle       = (owner == null) ? IntPtr.Zero : owner.Handle;
            CenterWindow centerWindow = new CenterWindow(handle);
            string       caption      = Application.ProductName;
            DialogResult dlgResult    = MessageBox.Show(owner, text, caption, buttons, icon);

            centerWindow.Dispose();
            return(dlgResult);
        }
コード例 #16
0
		///////////////////////////////////////////////////////////////////////
		// text, buttons, defaultButton, icon

		/// <summary>
		/// See MSDN MessageBox() method. Caption is Application.ProductName.
		/// </summary>
		public static DialogResult Show(string text, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
		{
			CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
			string caption = Application.ProductName;
			DialogResult dlgResult = MessageBox.Show(text, caption, buttons, icon, defaultButton);
			centerWindow.Dispose();
			return dlgResult;
		}
コード例 #17
0
		/// <summary>
		/// See MSDN MessageBox() method. Caption is Application.ProductName.
		/// </summary>
		public static DialogResult Show(IWin32Window owner, string text, MessageBoxButtons buttons, MessageBoxIcon icon)
		{
			IntPtr handle = (owner == null) ? IntPtr.Zero: owner.Handle;
			CenterWindow centerWindow = new CenterWindow(handle);
			string caption = Application.ProductName;
			DialogResult dlgResult = MessageBox.Show(owner, text, caption, buttons, icon);
			centerWindow.Dispose();
			return dlgResult;
		}
コード例 #18
0
ファイル: DialogBox.cs プロジェクト: reichanan/HADASHA
 ///////////////////////////////////////////////////////////////////////
 // text
 /// <summary>
 /// See MSDN MessageBox() method.
 /// </summary>
 public static DialogResult Show(string text)
 {
     CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
     string caption = Application.ProductName;
     DialogResult dlgResult = MessageBox.Show(text, caption);
     centerWindow.Dispose();
     return dlgResult;
 }
コード例 #19
0
ファイル: DialogBox.cs プロジェクト: reichanan/HADASHA
 ///////////////////////////////////////////////////////////////////////
 // text, caption, buttons, defaultButton, icon, options
 /// <summary>
 /// See MSDN MessageBox() method.
 /// </summary>
 public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
 {
     CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
     DialogResult dlgResult = MessageBox.Show(text, caption, buttons, icon, defaultButton, options);
     centerWindow.Dispose();
     return dlgResult;
 }
コード例 #20
0
ファイル: DialogBox.cs プロジェクト: reichanan/HADASHA
 /// <summary>
 /// See MSDN MessageBox() method.
 /// </summary>
 public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
 {
     IntPtr handle = (owner == null) ? IntPtr.Zero: owner.Handle;
     CenterWindow centerWindow = new CenterWindow(handle);
     DialogResult dlgResult = MessageBox.Show(owner, text, caption, buttons, icon, defaultButton, options);
     centerWindow.Dispose();
     return dlgResult;
 }
コード例 #21
0
		private InpBox() {}	// To remove the constructor from the documentation!

		///////////////////////////////////////////////////////////////////////
		// text

		/// <summary>
		/// See MSDN InputBox() method.
		/// </summary>
		public static DialogResult Show(string title, string promptText, ref string value)
		{
			CenterWindow centerWindow = new CenterWindow(IntPtr.Zero);
			DialogResult dlgResult = InputBox.Show(title, promptText, ref value);
			centerWindow.Dispose();
			return dlgResult;
		}