Beispiel #1
0
        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);
            }
        }
        private void EndUpdate()
        {
            _splashScreen.Status = "Loading the serverlist...";
            ServerList.LoadServerList();

            _isBusy = false;

            if (UpdateComplete != null)
            {
                UpdateComplete(this, new EventArgs());
            }

            if (_splashScreen.Visible)
            {
                _splashScreen.Invoke((MethodInvoker) delegate { _splashScreen.Close(); });
            }

            _thread.Abort();
        }