private void OnCreatePatchnoteFlyoutClosed(CreatePatchnoteFlyoutVM flyoutVm) { if (flyoutVm.IsProceed) { this.CreatePatchnote(flyoutVm.SelectedRepositoryPair.Target, flyoutVm.SelectedRepositoryPair.Reference); } }
private void ExecuteCreatePatchnote(string id) { if (RepositoryManager.Instance.Repositories.Count < 2) { DialogManager.Instance.ShowMessageAsync(this.L("patchnote_generator", "insufficient_game_clients_message_title"), this.L("patchnote_generator", "insufficient_game_clients_message")); return; } var flyoutVm = new CreatePatchnoteFlyoutVM(id); var flyout = new Flyout { Header = this.L("patchnote_generator", "create_patchnote_flyout_title"), IsModal = true, Content = new CreatePatchnoteFlyoutView { ViewModel = flyoutVm }, CloseCommand = new RelayCommand(() => this.OnCreatePatchnoteFlyoutClosed(flyoutVm)), Position = FlyoutPosition.Left, MinWidth = 200 }; FlyoutManager.Instance.Open(flyout); flyoutVm.Closed += (o, e) => { FlyoutManager.Instance.Close(flyout); this.OnCreatePatchnoteFlyoutClosed(flyoutVm); }; }