public void CloneRepository(string path) { RepositoryClosed(); TabManager.AddMainTab(); var v = LibGitService.GetInstance().IsValidRepository(path); if (v != RepositoryValidation.Invalid) { TabManager.CloseAll(); MessageBox.Show("There is already a repository", "", MessageBoxButton.OK, MessageBoxImage.Error); return; } var dialog = new InputDialog() { Text = "Enter clone url", Validator = text => true, Owner = Application.Current.MainWindow }; var ans = dialog.ShowDialog(); if (ans == null || ans == false) { return; } v = RepositoryManager.Clone(path, dialog.ResponseText); if (v != RepositoryValidation.Valid) { TabManager.CloseAll(); } else { Graph.GetInstance().ResetTranslate(); } }
void EditCommit() { if (_conflict) { TabManager.NewConflictEditor(); } else { TabManager.NewCommitEditor(); } }
void OpenRepository(Func <bool> func) { RepositoryClosed(); TabManager.AddMainTab(); if (!func()) { TabManager.CloseAll(); } else { Graph.GetInstance().ResetTranslate(); } }
public void CheckConflicts() { _conflict = LibGitService.GetInstance().IsInConflictState; if (_conflict) { ActionsManager.TurnConflictState(); TabManager.TurnConflictState(); } else { ActionsManager.TurnNoConflictState(); TabManager.TurnNoConflictState(); } }
public void CreateRepository(string path) { RepositoryClosed(); TabManager.AddMainTab(); var v = RepositoryManager.Create(path); if (v != RepositoryValidation.Invalid) { TabManager.CloseAll(); MessageBox.Show("There is already a repository", "", MessageBoxButton.OK, MessageBoxImage.Error); } else { Graph.GetInstance().ResetTranslate(); } }
void CreateManagers(ActionPanelModel localAM, ActionPanelModel remoteLeftAM, ActionPanelModel remoteRightAM) { ActionsManager = new ActionsManager(); ActionsManager.LocalRepoPanel = localAM; ActionsManager.RemoteRepoLeftGroupPanel = remoteLeftAM; ActionsManager.RemoteRepoRightGroupPanel = remoteRightAM; TabManager = new TabManager(Data.MainWindowModel, localAM); TabManager.CommitRequested += Commit; TabManager.AbortRequested += AbortMerge; TabManager.CanvasMouseDown += OnMouseDown; TabManager.CanvasMouseUp += OnMouseUp; SubscribeActionsManager(); CommitManager = CommitManager.GetInstance(); RepositoryManager = new RepositoryManager(_dataFolder); UserManager = new UserManager(_dataFolder); StashingManager = new StashingManager(_dataFolder); RemoteManager = new RemoteManager(_dataFolder); }
public void CloseCurrentRepository() { TabManager.CloseAll(); RepositoryManager.CloseCurrent(); }
void OnShowChanges(CommitNodeModel m) { TabManager.NewCommitViewer(m); }
public void Show(GraphItemModel item) { CommitManager.Mark(item); TabManager.ShowItem(item); ActionsManager.OnMarkedItem(item != null); }
private void Commit(string message, IEnumerable <string> stagedFiles, IEnumerable <string> unstagedFiles) { CommitManager.Commit(null, message, stagedFiles, unstagedFiles); TabManager.CloseCommitEditorTab(); }
void RepositoryClosed() { TabManager.CloseAll(); }