예제 #1
0
        public static bool Execute(SimpleDelegate functionToExecute)
        {
            LongOpertationExecutor form = new LongOpertationExecutor();

            form.FunctionToExecute = functionToExecute;
            form.Args = null;
            form.backgroundWorker.RunWorkerAsync();
            return(form.ShowDialog() == DialogResult.OK);
        }
예제 #2
0
        public static bool Execute(DelegateWithParams functionToExecute, params object[] args)
        {
            LongOpertationExecutor form = new LongOpertationExecutor();

            form.FunctionToExecute = functionToExecute;
            form.Args = args;
            form.backgroundWorker.RunWorkerAsync();
            return(form.ShowDialog() == DialogResult.OK);
        }