public void MenuUndoGit_Click(object sende, RoutedEventArgs e) { var selectedFiles = FolderBrowser.GetSelectedItems(); if (selectedFiles.Count < 1) { return; } var gh = new GitHelper(); foreach (var selected in selectedFiles) { if (selected == null) { continue; } if (selected.FileStatus != LibGit2Sharp.FileStatus.ModifiedInIndex && selected.FileStatus != LibGit2Sharp.FileStatus.ModifiedInWorkdir) { continue; } gh.UndoChanges(selected.FullPath); } // force editors to update DocumentFileWatcher.CheckFileChangeInOpenDocuments(); }
public void MenuUndoGit_Click(object sende, RoutedEventArgs e) { var selected = TreeFolderBrowser.SelectedItem as PathItem; if (selected == null) { return; } if (selected.FileStatus != LibGit2Sharp.FileStatus.ModifiedInIndex && selected.FileStatus != LibGit2Sharp.FileStatus.ModifiedInWorkdir) { return; } var gh = new GitHelper(); gh.UndoChanges(selected.FullPath); // force editors to update DocumentFileWatcher.CheckFileChangeInOpenDocuments(); }
public DocumentWatcher(DocumentFileWatcher watcher, DocumentViewModel documentRoot) { _documentRoot = documentRoot; watcher.Path = documentRoot.Path; _subscription = watcher.Subscribe(OnDocumentFileChanged); }
public MainViewModel(IServiceProvider serviceProvider, ITelemetryProvider telemetryProvider, ICommandProvider commands, IApplicationSettings settings, NuGetViewModel nugetViewModel, DocumentFileWatcher documentWatcher) : base(serviceProvider, telemetryProvider, commands, settings, nugetViewModel, documentWatcher) { }
public MainViewModel(IServiceProvider serviceProvider, IExceptionManager exceptionManager, ICommandProvider commands, IApplicationSettings settings, NuGetViewModel nugetViewModel, DocumentFileWatcher documentFileWatcher) : base(serviceProvider, exceptionManager, commands, settings, nugetViewModel, documentFileWatcher) { }