コード例 #1
0
        private void AddMods_Click(object sender, RoutedEventArgs e)
        {
            if (_workshopFilesWindow != null)
            {
                return;
            }

            _workshopFilesWindow         = new WorkshopFilesWindow(this, _profile);
            _workshopFilesWindow.Owner   = this;
            _workshopFilesWindow.Closed += WorkshopFilesWindow_Closed;
            _workshopFilesWindow.Show();
        }
コード例 #2
0
        private async void WorkshopFilesWindow_Closed(object sender, EventArgs e)
        {
            _workshopFilesWindow = null;
            this.Activate();

            try
            {
                WorkshopFiles = await LoadWorkshopItemsAsync(_profile.SOTF_Enabled);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, _globalizer.GetResourceString("ModDetails_Load_FailedTitle"), MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }