private void MainForm_Load(object sender, EventArgs e) { if (_instance == null) _instance = this; Opacity = GetOpacity("BrowserOpacity"); Text = String.Format("ConnectUO Desktop - v.{0}.{1}.{3}.{2}", Core.Version.Major, Core.Version.Minor, Core.Version.Revision, Core.Version.Build); if (DateTime.Now.Ticks > AppSettings.Current.Get<long>("NextUpdateTime")) CheckForUpdates(); if (AppSettings.Current.Get<string>("RazorPath") == "Not Installed") AppSettings.Current.Set<string>("RazorPath", Utility.DetectRazor()); if (AppSettings.Current.Get<string>("ClientPath") == "Not Installed") AppSettings.Current.Set<string>("ClientPath", Utility.DetectClient("Ultima Online")); if (AppSettings.Current.Get<string>("ClientPath") == "Not Installed") AppSettings.Current.Set<string>("ClientPath", Utility.DetectClient("Ultima Online Third Dawn")); SplashScreen screen = new SplashScreen(); screen.Opacity = GetOpacity("SplashOpacity"); screen.ShowDialog(); FixAddressBar(); WebBrowser.DocumentTitleChanged += new EventHandler(OnDocumentTitleChanged); WebBrowser.ProgressChanged += new WebBrowserProgressChangedEventHandler(OnProgressChanged); WebBrowser.StatusTextChanged += new EventHandler(OnStatusTextChanged); Utility.OpenUrl("http://localhost.:1980/home.html?page=1"); }
private void MainForm_Load(object sender, EventArgs e) { _instance = this; MainForm.Instance.notifyIcon.ShowBalloonTip(10, "Serverlist", "Loading please wait...", ToolTipIcon.Info); ServerList.LoadServerList(); MainForm.Instance.notifyIcon.ShowBalloonTip(10, "Serverlist", "Complete", ToolTipIcon.Info); if( DateTime.Now > Properties.Settings.Default.NextUpdateTime ) CheckForUpdates(); Properties.Settings.Default.SettingChanging += new System.Configuration.SettingChangingEventHandler(Default_SettingChanging); if( Properties.Settings.Default.RazorPath == "Not Installed" ) Properties.Settings.Default.RazorPath = Utility.DetectRazor(); if( Properties.Settings.Default.ClientPath == "Not Installed" ) Properties.Settings.Default.ClientPath = Utility.DetectClient("Ultima Online"); if( Properties.Settings.Default.ClientPath == "Not Installed" ) Properties.Settings.Default.ClientPath = Utility.DetectClient("Ultima Online Third Dawn"); if( Properties.Settings.Default.OpenBrowserOnStartup ) Utility.OpenUrl(Core.StartAddress); }