Skip to content

A linux-style simple progress window for async reporting of operations

License

Notifications You must be signed in to change notification settings

esimiele/SimpleProgressWindow

Repository files navigation

Simple code that can be used to asynchronously report the progress of operations

  • Code is available on nuget.
  • search simpleprogresswindow
  • author: esimiele
  • Follow 'To Use' steps below to use the code
  • Code is supplied here so others can see how I achieved this solution

v1.2 updates:

  • fixed issue with auto close of progress window when operations are completed (it would close whether operations finished successfully or failed)
  • now only closes automatically if operations were successful
  • default closeout time set to 3 seconds

v1.1 updates:

  • Option to set the window to close once operations are finished (SetCloseOnFinish method)
    • first argument is bool option to close window, second is timeout before close in msec
    • call this method in the constructor of the new class (default is set to leave window up until user closes window)
  • Updated UI to report the time elapsed since start of running
  • Added protected method to grab the elapsed time in the class derived from simplemtbase

To use:

  • In your code, create a new class
  • add 'using SimpleProgressWindow;' to using directives
  • Make the class derive from SimpleMTBase
  • Implement override of virtual function Run in the newly created class: e.g., public override bool Run() { }
  • Create an instance of this new class.
  • Call the execute function of this class (contained in SimpleMTBase)
  • Add function calls inside the overridden Run function in the newly created class
  • Use UpdateUILabel and ProvideUIUpdate to update the progress window

Alt text

About

A linux-style simple progress window for async reporting of operations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages