public WindowMain() { Instance = this; Activated += new EventHandler(WindowMain_Activated); Closing += new System.ComponentModel.CancelEventHandler(WindowMain_Closing); Application.Current.Exit += new ExitEventHandler(Current_Exit); InitializeComponent(); if (Rawr.WPF.Properties.Settings.Default.UpgradeRequired) { Rawr.WPF.Properties.Settings.Default.Upgrade(); Rawr.WPF.Properties.Settings.Default.UpgradeRequired = false; Rawr.WPF.Properties.Settings.Default.Save(); } Height = Rawr.WPF.Properties.Settings.Default.WindowHeight; Width = Rawr.WPF.Properties.Settings.Default.WindowWidth; Top = Rawr.WPF.Properties.Settings.Default.WindowTop; Left = Rawr.WPF.Properties.Settings.Default.WindowLeft; if (Rawr.WPF.Properties.Settings.Default.WindowState == System.Windows.WindowState.Maximized) { WindowState = Rawr.WPF.Properties.Settings.Default.WindowState; } LoadScreen.StartLoading(new EventHandler(LoadFinished)); }