private UIManager()
: base()
{
this.AddToSystemTray();
this.LoginWindow = new Setup.Login(this);
this.readyWindow = new Ready();
Program.Controller.ShowSetupWindowEvent += delegate(GreenQloud.AbstractApplicationController.PageType page_type)
{
if (page_type == GreenQloud.AbstractApplicationController.PageType.Login) {
this.LoginWindow.ShowDialog();
}
else if (page_type == GreenQloud.AbstractApplicationController.PageType.ConfigureFolders)
{
this.confFoldersWindow = new ConfFolders();
this.confFoldersWindow.ShowDialog();
}
};
this.LoginWindow.OnLoginDone += (() =>
{
this.isLoged = true;
this.LoginWindow.Done();
this.confFoldersWindow = new ConfFolders();
this.confFoldersWindow.ShowDialog();
});
this.LoginWindow.FormClosed += ((sender, args) =>
{
if (this.isLoged)
{
Application.DoEvents();
}
});
this.About = new AboutWindow();
Program.Controller.ShowAboutWindowEvent += (() => this.About.ShowDialog());
}