title: Making a publicly accessible flag for a method in a class
body: <p>I'm not sure if the title makes any sense, so I'll try to describe what I would like to do:</p>
  
  <p>Let's say I have a class for controlling some hardware device. The class contains a method for carrying out some procedure with the device, which involves both software and hardware operations and takes a long time. I will want to access this method in my form. However I would like to retain the possibility to cancel the procedure, enable or disable parts of it or just change some variable inside it. </p>
  
  <p>If the whole procedure was in my main form then I could simply add some global flags that could be changed at any time and the operation would depend on their values. How would I go with integrating this functionality into a separate class, though?</p>