/// <summary>
        /// Initializes a new instance of the <see cref="AxAsyncProgress"/> class.
        /// </summary>
        public AsyncDialogForm(string formCaption, IExecutorService executorService,
            int minimum, int maximum,
            AsyncWaitCallback callback,
            AsyncWaitCallback finishedCallback,
            AsyncWaitCallback abortCallback)
        {
            InitializeComponent();
            SetTagProperty();
            this.ResolveResources();
            _elapsedTimer = AsyncProgressTimerFactory.Create();
            _executorService = executorService;
            _actualCallback = new WaitCallback(this.ExecAsync);
            _updateStatus = new UpdateAsyncStatusHandler(this.UpdateStatus);
            _updateStatusProgress = new UpdateAsyncStatusProgressHandler(this.UpdateStatusProgress);
            _enableButton = new EnableButtonHandler(this.EnableOKButton);
            this.InitializeProgress(minimum, maximum);

            btnCancel.Enabled = (_executorService != null);
            if (_executorService != null)
            {
                IExecutorService2 executor2 = _executorService as IExecutorService2;
                if (executor2 != null)
                {
                    executor2.Reset();
                }
            }

            this.Text = formCaption;
            lblStatus.Text = formCaption;
            this.Initialize(callback, finishedCallback, abortCallback, this);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AxAsyncProgress"/> class.
 /// </summary>
 public AxAsyncProgress()
 {
     _elapsedTimer   = AsyncProgressTimerFactory.Create();
     _actualCallback = new WaitCallback(this.ExecAsync);
     _updateStatus   = new UpdateAsyncStatusHandler(this.UpdateStatus);
     InitializeComponent();
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="AxAsyncProgress"/> class.
        /// </summary>
        public AsyncDialogForm(string formCaption, IExecutorService executorService,
                               int minimum, int maximum,
                               AsyncWaitCallback callback,
                               AsyncWaitCallback finishedCallback,
                               AsyncWaitCallback abortCallback)
        {
            InitializeComponent();
            SetTagProperty();
            this.ResolveResources();
            _elapsedTimer         = AsyncProgressTimerFactory.Create();
            _executorService      = executorService;
            _actualCallback       = new WaitCallback(this.ExecAsync);
            _updateStatus         = new UpdateAsyncStatusHandler(this.UpdateStatus);
            _updateStatusProgress = new UpdateAsyncStatusProgressHandler(this.UpdateStatusProgress);
            _enableButton         = new EnableButtonHandler(this.EnableOKButton);
            this.InitializeProgress(minimum, maximum);

            btnCancel.Enabled = (_executorService != null);
            if (_executorService != null)
            {
                IExecutorService2 executor2 = _executorService as IExecutorService2;
                if (executor2 != null)
                {
                    executor2.Reset();
                }
            }

            this.Text      = formCaption;
            lblStatus.Text = formCaption;
            this.Initialize(callback, finishedCallback, abortCallback, this);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AxAsyncProgress"/> class.
 /// </summary>
 public AxWpfAsyncProgress()
 {
     _actualCallback = new WaitCallback(this.ExecAsync);
     _updateStatus = new UpdateAsyncStatusHandler(this.UpdateStatus);
     _updateStatusProgress = new UpdateAsyncStatusProgressHandler(this.UpdateStatusProgress);
     _enableButton = new EnableButtonHandler(this.EnableOKButton);
     InitializeComponent();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AxAsyncProgress"/> class.
 /// </summary>
 public AxWpfAsyncProgress()
 {
     _actualCallback       = new WaitCallback(this.ExecAsync);
     _updateStatus         = new UpdateAsyncStatusHandler(this.UpdateStatus);
     _updateStatusProgress = new UpdateAsyncStatusProgressHandler(this.UpdateStatusProgress);
     _enableButton         = new EnableButtonHandler(this.EnableOKButton);
     InitializeComponent();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AxAsyncProgress"/> class.
 /// </summary>
 public AxAsyncProgress2()
 {
     _elapsedTimer = AsyncProgressTimerFactory.Create();
     _actualCallback = new WaitCallback(this.ExecAsync);
     _updateStatus = new UpdateAsyncStatusHandler(this.UpdateStatus);
     _updateStatusProgress = new UpdateAsyncStatusProgressHandler(this.UpdateStatusProgress);
     InitializeComponent();
     SetTagProperty();
     this.ResolveResources();
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AxAsyncProgress"/> class.
 /// </summary>
 public AxAsyncProgress2()
 {
     _elapsedTimer         = AsyncProgressTimerFactory.Create();
     _actualCallback       = new WaitCallback(this.ExecAsync);
     _updateStatus         = new UpdateAsyncStatusHandler(this.UpdateStatus);
     _updateStatusProgress = new UpdateAsyncStatusProgressHandler(this.UpdateStatusProgress);
     InitializeComponent();
     SetTagProperty();
     this.ResolveResources();
 }