public ExecuteClientCommand ( Action |
||
action | Action |
|
command | string | |
requiresWriteAccess | bool | |
리턴 | void |
private void Pull() { OperationStatusDialog.Start("Pull"); m_AreaVM.ExecuteClientCommand((c) => c.Pull(true, Name), "pull"); if (IsCurrent) { m_AreaVM.Area.Update(new Versionr.Area.MergeSpecialOptions()); } OperationStatusDialog.Finish(); }
private void Commit() { if (string.IsNullOrEmpty(CommitMessage)) { MainWindow.Instance.Dispatcher.Invoke(() => { MainWindow.ShowMessage("Not so fast...", "Please provide a commit message", MessageDialogStyle.Affirmative); }); return; } // Tag has been typed in but not added if (!string.IsNullOrEmpty(TagString) && CustomTags.All(x => x.Tag != TagString)) { MessageDialogResult result = MessageDialogResult.Negative; MainWindow.Instance.Dispatcher.Invoke(async() => { result = await MainWindow.ShowMessage("Missing Tag", "You seem to have a tag that has not been added. Do you want to continue without adding the tag?", MessageDialogStyle.AffirmativeAndNegative); }).Wait(); if (result == MessageDialogResult.Negative) { return; } } OperationStatusDialog.Start("Commit"); bool commitSuccessful = _areaVM.Area.Commit(CommitMessage, false, GetCommitTags()); if (commitSuccessful && PushOnCommit) { _areaVM.ExecuteClientCommand((c) => c.Push(), "push", true); } OperationStatusDialog.Finish(); CommitMessage = string.Empty; TagPresets.ForEach(x => x.IsChecked = false); MainWindow.Instance.Dispatcher.Invoke(() => CustomTags.Clear()); Refresh(); }