B
bjm
I am writing a program that will automate a series of application
installations. I want to give the user the option of stopping the
program's execution in between installations (for example, give the
user the chance to stop the program after the second installation
before it continues on to the third installation). However, I want the
user to be able to start the installations and walk away as well, so I
can't ask the user if he wants to continue if that means execution will
stop and wait for his response. I thought of two ways to do this,
though there may be a better way I'm not thinking of.
First, I could have a button on my program's Form that says "Stop
Installation." I tried doing this, and having that button's click
event simply set a flag that says to stop execution after the current
installation. However, when an installation starts, I get an hour
glass and I am unable to hit the button that I created. If this is
going to work, I need to find a way to continue allowing the user to
enter input even while the program is running an installation (with the
Process class).
Second, I could pop up a dialog asking the user if he wants to
continue, which closes after X number of seconds without a response. I
think this would work, but I'm new to C# and I haven't found a
relativly easy way of doing this.
Does anyone have an idea of how I could accomplish this? Thank you in
advance!
installations. I want to give the user the option of stopping the
program's execution in between installations (for example, give the
user the chance to stop the program after the second installation
before it continues on to the third installation). However, I want the
user to be able to start the installations and walk away as well, so I
can't ask the user if he wants to continue if that means execution will
stop and wait for his response. I thought of two ways to do this,
though there may be a better way I'm not thinking of.
First, I could have a button on my program's Form that says "Stop
Installation." I tried doing this, and having that button's click
event simply set a flag that says to stop execution after the current
installation. However, when an installation starts, I get an hour
glass and I am unable to hit the button that I created. If this is
going to work, I need to find a way to continue allowing the user to
enter input even while the program is running an installation (with the
Process class).
Second, I could pop up a dialog asking the user if he wants to
continue, which closes after X number of seconds without a response. I
think this would work, but I'm new to C# and I haven't found a
relativly easy way of doing this.
Does anyone have an idea of how I could accomplish this? Thank you in
advance!