IProgressEvents.cs 780 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows.Forms;
  7. namespace SmartCoalApplication.Base
  8. {
  9. public interface IProgressEvents<TItemInfo>
  10. {
  11. void BeginOperation(IWin32Window owner, EventHandler callWhenUIShown, ICancelable cancelSink);
  12. void SetItemCount(int itemCount);
  13. void SetItemOrdinal(int itemOrdinal);
  14. void SetItemInfo(TItemInfo itemInfo);
  15. void SetItemWorkTotal(long totalWork);
  16. void BeginItem();
  17. void SetItemWorkProgress(long totalProgress);
  18. WorkItemFailureAction ReportItemFailure(Exception ex);
  19. void EndItem(WorkItemResult result);
  20. void EndOperation(OperationResult result);
  21. }
  22. }