Пример #1
0
        private async void DetailForm_Load(object sender, EventArgs e)
        {
            var filename = DetailWindowManager.GetReplayFilename(replaypath);

            GeneralGameFileLabel.Text = filename;

            try
            {
                fileinfo = await ReplayReader.ReadReplayFileAsync(replaypath);

                ImageDownloader.SetDataDragonVersion(fileinfo.MatchMetadata.GameVersion.ToString());
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error Parsing Replay: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Environment.Exit(1);
            }

            if (fileinfo != null)
            {
                DetailWindowManager.PopulatePlayerData(fileinfo.MatchMetadata, this);
                DetailWindowManager.PopulateGeneralReplayData(fileinfo, this);
            }
            else
            {
                MessageBox.Show("Error Parsing Replay", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Environment.Exit(1);
            }

            // Set version text in about tab
            this.AboutVersionLabel.Text = RoflSettings.Default.VersionString;
        }
Пример #2
0
        private async void DetailForm_Load(object sender, EventArgs e)
        {
            // Load in compatibility mode
            if (_replayFile.Type != REPLAYTYPES.ROFL)
            {
                this.Text = this.Text + " - Compatibility Mode";
                this.GeneralPlayReplaySplitButton.Enabled = false;
            }

            // Set version text in about tab
            this.AboutVersionLabel.Text    = RoflSettings.Default.VersionString;
            this.GeneralGameFileLabel.Text = _replayFile.Name;

            await _requestManager.SetDataDragonVersionAsync(_replayFile.Data.MatchMetadata.GameVersion);

            DetailWindowManager.PopulatePlayerData(_replayFile.Data.MatchMetadata, this);
            DetailWindowManager.PopulateGeneralReplayData(_requestManager, _replayFile.Data, this);
        }