コード例 #1
0
 private async void RepositoryManager_FilesChanged(object sender, GitFilesUpdateEventArgs e)
 {
     try
     {
         await TaskScheduler.Default;
         await ProcessMultiFileChange((GitRepository)sender, e);
     }
     catch (Exception ex)
     {
         Debug.WriteLine("Error in RepositoryManager_FilesChanged: " + ex.Message);
     }
 }
コード例 #2
0
        private async Task ProcessMultiFileChange(GitRepository repo, GitFilesUpdateEventArgs e)
        {
            //lock (_glyphsLock)
            //{
            HashSet <IVsSccProject2> nodes = new HashSet <IVsSccProject2>();

            foreach (var file in e.Files)
            {
                var items = _fileCache.GetProjectsSelectionForFile(file);
                if (items != null)
                {
                    foreach (var vsitemselection in items)
                    {
                        nodes.Add(vsitemselection);
                    }
                }
            }
            if (nodes.Count > 0)
            {
                Debug.WriteLine("Updating Multiple Files");
                await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

                foreach (var project in nodes)
                {
                    project.SccGlyphChanged(0, null, null, null);
                }
            }

            //todo maybe move this
            var    caption = "Solution Explorer";
            string branch  = await GetCurrentBranchNameAsync();

            if (!string.IsNullOrEmpty(branch))
            {
                caption += " (" + branch + ")";
                SetSolutionExplorerTitle(caption);
            }
            // }
        }
コード例 #3
0
 private void FireFilesChangedEvent(object sender, GitFilesUpdateEventArgs e)
 {
     _onFilesUpdateEventHandler?.Invoke(sender, e);
 }
コード例 #4
0
 private void Repo_FilesChanged(object sender, GitFilesUpdateEventArgs e)
 {
     FireFilesChangedEvent(sender, e);
 }
 private async void CurrentTracker_FilesChanged(object sender, GitFilesUpdateEventArgs e)
 {
     await Refresh();
 }
コード例 #6
0
 private void FireFilesChangedEvent(object sender, GitFilesUpdateEventArgs e)
 {
     _onFilesUpdateEventHandler?.Invoke(sender, e);
 }
コード例 #7
0
 private void Repo_FilesChanged(object sender, GitFilesUpdateEventArgs e)
 {
     FireFilesChangedEvent(sender, e);
 }
コード例 #8
0
        private async Task ProcessMultiFileChange(GitRepository repo, GitFilesUpdateEventArgs e)
        {
            //lock (_glyphsLock)
            //{
                HashSet<IVsSccProject2> nodes = new HashSet<IVsSccProject2>();
                foreach (var file in e.Files)
                {
                    var items = _fileCache.GetProjectsSelectionForFile(file);
                    if (items != null)
                    {
                        foreach (var vsitemselection in items)
                        {
                           
                            nodes.Add(vsitemselection);
                        }
                    }
                }
                if (nodes.Count > 0)
                {
                Debug.WriteLine("Updating Multiple Files");
                await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
                foreach (var project in nodes)
                {
                   
                    project.SccGlyphChanged(0, null, null, null);
                }
            }

                //todo maybe move this
                var caption = "Solution Explorer";
                string branch = await GetCurrentBranchNameAsync();
                if (!string.IsNullOrEmpty(branch))
                {
                    caption += " (" + branch + ")";
                    SetSolutionExplorerTitle(caption);
                }
           // }
        }
コード例 #9
0
 private async void RepositoryManager_FilesChanged(object sender, GitFilesUpdateEventArgs e)
 {
     try
     {
         await TaskScheduler.Default;
         await ProcessMultiFileChange((GitRepository) sender, e);
     }
     catch (Exception ex)
     {
         Debug.WriteLine("Error in RepositoryManager_FilesChanged: " + ex.Message);
     }
 }