コード例 #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // Create Patcher shortcut on user's desktop if not already present.
            CheckForShortcut();

            btnPlay.Enabled = false;

            // Load user's profiles, refresh from web if necessary.
            _settings = new SettingsManager();
            _settings.Refresh();

            // Get the default profile settings.
            PatcherSettings ps = _settings.GetDefault();

            // Load the type of client patcher we need for scanning the default profile.
            // Adds event handlers.
            _patcher = GetClientPatcher(ps, _patcher);

            // Set the create account button to display "create account" text.
            SetCreateAccountText(_patcher.CurrentProfile);

            SetWebAddress("http://openmeridian.org/forums/latestnews.php");

            if (ApplicationDeployment.IsNetworkDeployed)
            {
                Version myVersion = ApplicationDeployment.CurrentDeployment.CurrentVersion;
                Text += string.Concat("- Version: v", myVersion);
            }

            // Make sure the default is our current selection, and the data is displayed in options.
            InitDdl();
            SetPatcherProfile(ps);
        }
コード例 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            btnPlay.Enabled = false;

            _settings = new SettingsManager();
            _settings.LoadSettings();
            _settings.SaveSettings();

            _patcher = new ClientPatcher(_settings.GetDefault());
            _patcher.FileScanned += Patcher_FileScanned;
            _patcher.StartedDownload += Patcher_StartedDownload;
            _patcher.ProgressedDownload += Patcher_ProgressedDownload;
            _patcher.EndedDownload += Patcher_EndedDownload;

            if (ApplicationDeployment.IsNetworkDeployed)
            {
                Version myVersion = ApplicationDeployment.CurrentDeployment.CurrentVersion;
                Text += string.Concat("- Version: v", myVersion);
            }

            RefreshDdl();
        }
コード例 #3
0
ファイル: ClientPatchForm.cs プロジェクト: M59Gar/Meridian59
        private void Form1_Load(object sender, EventArgs e)
        {
            btnPlay.Enabled = false;

            _settings = new SettingsManager();
            _settings.LoadSettings();

            _patcher = new ClientPatcher(_settings.GetDefault());
            _patcher.FileScanned += Patcher_FileScanned;
            _patcher.StartedDownload += Patcher_StartedDownload;
            _patcher.ProgressedDownload += Patcher_ProgressedDownload;
            _patcher.EndedDownload += Patcher_EndedDownload;

            RefreshDdl();
        }