Beispiel #1
0
        public ProgressRunnerResult RunModal(string caption, ProgressRunnerArgs args, EventHandler <ProgressWorkerArgs> action)
        {
            if (action == null)
            {
                throw new ArgumentNullException("action");
            }
            else if (args == null)
            {
                throw new ArgumentNullException("args");
            }
            else if (string.IsNullOrEmpty(caption))
            {
                caption = AnkhId.PlkProduct;
            }

            ProgressRunner pr = new ProgressRunner(this, action);

            pr.CreateUpdateReport = args.CreateLog;
            pr.Start(caption);

            return(new ProgressRunnerResult(!pr.Cancelled));
        }
Beispiel #2
0
        public ProgressRunnerResult RunModal(string caption, ProgressRunnerArgs args, EventHandler<ProgressWorkerArgs> action)
        {
            if (action == null)
                throw new ArgumentNullException("action");
            else if (args == null)
                throw new ArgumentNullException("args");
            else if (string.IsNullOrEmpty(caption))
                caption = AnkhId.PlkProduct;

            ProgressRunner pr = new ProgressRunner(this, action);
            pr.CreateUpdateReport = args.CreateLog;
            pr.Start(caption);

            return new ProgressRunnerResult(!pr.Cancelled);
        }