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.DownloadUpdates() , i show a reusable ProgressForm ,
and update it in the downloadProgress 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.PendingUpdate)
{
Application.EnableVisualStyles();
DialogResult result = MessageBox.Show("There is an
update availiable , would you want to download and install it?",
"Updater", MessageBoxButtons.YesNo);
if (result == DialogResult.Yes)
{
updater.DownloadUpdates(); // 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.Completed);
}
Thanks so much
Gideon