コード例 #1
1
		/// <summary>
		/// Shows a wait window with the specified text while executing the passed method.
		/// </summary>
		/// <param name="workerMethod">Pointer to the method to execute while displaying the wait window.</param>
		/// <param name="message">The text to display.</param>
		/// <param name="args">Arguments to pass to the worker method.</param>
		/// <returns>The result argument from the worker method.</returns>
		public static object Show(EventHandler<WaitWindowEventArgs> workerMethod, string message, params object[] args){
			List<object> arguments = new List<object>();
			arguments.AddRange(args);
			
			WaitWindow instance = new WaitWindow();
			return instance.Show(workerMethod, message, arguments);
		}
コード例 #2
0
        /// <summary>
        /// Shows a wait window with the specified text while executing the passed method.
        /// </summary>
        /// <param name="workerMethod">Pointer to the method to execute while displaying the wait window.</param>
        /// <param name="message">The text to display.</param>
        /// <param name="args">Arguments to pass to the worker method.</param>
        /// <returns>The result argument from the worker method.</returns>
        public static object Show(EventHandler <WaitWindowEventArgs> workerMethod, string message, params object[] args)
        {
            List <object> arguments = new List <object>();

            arguments.AddRange(args);

            WaitWindow instance = new WaitWindow();

            return(instance.Show(workerMethod, message, arguments));
        }
コード例 #3
0
        public WaitWindowGUI(WaitWindow parent)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            this._Parent = parent;

            //	Position the window in the top right of the main screen.
            //this.Top = this.Parent.Top  //Screen.PrimaryScreen.WorkingArea.Top + 32;
            this.Left = Screen.PrimaryScreen.WorkingArea.Right - this.Width - 32;
        }
コード例 #4
0
		public WaitWindowGUI(WaitWindow parent){
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			_Parent = parent;
			
			//	Position the window in the top right of the main screen.
			//this.Top = Screen.PrimaryScreen.WorkingArea.Top + 32;
			//this.Left = Screen.PrimaryScreen.WorkingArea.Right - this.Width - 32;
            //this.CenterToScreen();
            StartPosition = FormStartPosition.CenterScreen;
		}
コード例 #5
0
        /// <summary>
        /// Shows a wait window with the specified text while executing the passed method.
        /// </summary>
        /// <param name="workerMethod">Pointer to the method to execute while displaying the wait window.</param>
        /// <param name="message">The text to display.</param>
        /// <returns>The result argument from the worker method.</returns>
        public static object Show(EventHandler <WaitWindowEventArgs> workerMethod, string message)
        {
            WaitWindow instance = new WaitWindow();

            return(instance.Show(workerMethod, message, new List <object>()));
        }
コード例 #6
0
 /// <summary>
 /// Initialises a new intance of the WaitWindowEventArgs class.
 /// </summary>
 /// <param name="GUI">The associated WaitWindow instance.</param>
 /// <param name="args">A list of arguments to be passed.</param>
 public WaitWindowEventArgs(WaitWindow GUI, List <object> args) : base()
 {
     this._Window    = GUI;
     this._Arguments = args;
 }
コード例 #7
0
 /// <summary>
 /// Shows a wait window with the text 'Please wait...' while executing the passed method.
 /// </summary>
 /// <param name="workerMethod">Pointer to the method to execute while displaying the wait window.</param>
 /// <returns>The result argument from the worker method.</returns>
 public static object Show(EventHandler <WaitWindowEventArgs> workerMethod)
 {
     return(WaitWindow.Show(workerMethod, null));
 }
コード例 #8
0
		/// <summary>
		/// Shows a wait window with the specified text while executing the passed method.
		/// </summary>
		/// <param name="workerMethod">Pointer to the method to execute while displaying the wait window.</param>
		/// <param name="message">The text to display.</param>
		/// <returns>The result argument from the worker method.</returns>
		public static object Show(EventHandler<WaitWindowEventArgs> workerMethod, string message){
			WaitWindow instance = new WaitWindow();
			return instance.Show(workerMethod, message, new List<object>());
		}
コード例 #9
0
		/// <summary>
		/// Initialises a new intance of the WaitWindowEventArgs class.
		/// </summary>
		/// <param name="GUI">The associated WaitWindow instance.</param>
		/// <param name="args">A list of arguments to be passed.</param>
		public WaitWindowEventArgs(WaitWindow GUI, List<object> args) : base() {
			this._Window = GUI;
			this._Arguments = args;
		}