Esempio n. 1
0
        protected override async Task ScanInternal(ScannedImageSource.Concrete source)
        {
            var op = operationFactory.Create <WiaScanOperation>();

            using (CancelToken.Register(op.Cancel))
            {
                op.Start(ScanProfile, ScanDevice, ScanParams, DialogParent, source);
                Invoker.Current.SafeInvoke(() =>
                {
                    if (ScanParams.Modal && !ScanParams.NoUI)
                    {
                        operationProgress.ShowModalProgress(op);
                    }
                    else
                    {
                        operationProgress.ShowBackgroundProgress(op);
                    }
                });
                await op.Success;
            }

            if (op.ScanException != null)
            {
                op.ScanException.PreserveStackTrace();
                throw op.ScanException;
            }
        }
 private void OperationProgressNotifyWidget_Click(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         DoHideNotify();
         operationProgress.ShowModalProgress(op);
     }
 }
Esempio n. 3
0
        public UpdateOperation StartUpdate(UpdateInfo update)
        {
            var op = operationFactory.Create <UpdateOperation>();

            op.Start(update);
            operationProgress.ShowModalProgress(op);
            return(op);
        }