/// <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)); }
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 = Screen.PrimaryScreen.WorkingArea.Top + 32; this.Left = Screen.PrimaryScreen.WorkingArea.Right - this.Width - 32; }
/// <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; }
/// <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>())); }
/// <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)); }