hi ,
I'm in a slight dilemma.
I have an updater program that checks for pending updates and
downloads them if the users chooses to.
Since i dont need a windows form to check if there is an update , I
dont use a form unless i have two. This , creates either one of two
problems. When i'm downloading asynchonously , the main thread exits!
Or if use a blocked download , how do i display progress!?
In the updater.Downloa dUpdates() , i show a reusable ProgressForm ,
and update it in the downloadProgres s changed event, but it just shows
and nothing happens and the App never closes!?
[STAThread]
static void Main(string[] args)
{
Updater updater = new Updater();
if (updater.Pendin gUpdate)
{
Application.Ena bleVisualStyles ();
DialogResult result = MessageBox.Show ("There is an
update availiable , would you want to download and install it?",
"Updater", MessageBoxButto ns.YesNo);
if (result == DialogResult.Ye s)
{
updater.Downloa dUpdates(); // since the download
is threaded this just returns!?
}
}
else if (args[0] == "/shownot")
{
MessageBox.Show ("Hotel Management Studio is up to
date");
}
//do {} //this does'nt work!?
//while (updater.Comple ted);
}
Thanks so much
Gideon