示例#1
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)
        {
            cWaitWindow instance = new cWaitWindow();

            System.Drawing.Font font = new System.Drawing.Font("", 9, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
            return(instance.Show(workerMethod, message, font, new System.Drawing.Color(), false, new List <object>()));
        }
示例#2
0
        /// <summary>
        /// /
        /// </summary>
        /// <param name="workerMethod"></param>
        /// <param name="message"></param>
        /// <param name="font"></param>
        /// <param name="args"></param>
        /// <returns></returns>
        public static object Show(EventHandler <WaitWindowEventArgs> workerMethod, string message, System.Drawing.Font font, params object[] args)
        {
            List <object> arguments = new List <object>();

            arguments.AddRange(args);

            cWaitWindow instance = new cWaitWindow();

            System.Drawing.Color color = new System.Drawing.Color();
            return(instance.Show(workerMethod, message, font, color, false, arguments));
        }
示例#3
0
        public static object Show(EventHandler <WaitWindowEventArgs> workerMethod, string message, bool CloseOnComplete, params object[] args)
        {
            List <object> arguments = new List <object>();

            arguments.AddRange(args);

            cWaitWindow instance = new cWaitWindow();

            System.Drawing.Font font = new System.Drawing.Font("Calibri", 9, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
            return(instance.Show(workerMethod, message, font, new System.Drawing.Color(), CloseOnComplete, arguments));
        }