internal void Refresh(GitFileStatusTracker tracker, bool force = false)
{
//var frame = this.Frame as IVsWindowFrame;
//if (frame == null || frame.IsVisible() == 1) return;
try
{
var repository = (tracker == null || !tracker.HasGitRepository) ? "" :
string.Format(" - {0}", tracker.CurrentBranch, tracker.GitWorkingDirectory);
this.Caption = Resources.ResourceManager.GetString("PendingChangesToolWindowCaption") + repository;
if (!GitSccOptions.Current.DisableAutoRefresh || force || tracker == null)
{
((BBPendingChanges)control).RefreshPendingChanges(tracker);
}
if (GitSccOptions.Current.DisableAutoRefresh)
{
this.Caption += " - [AUTO REFRESH DISABLED]";
}
sccProviderService.lastTimeRefresh = DateTime.Now;
}
catch (Exception ex)
{
Log.WriteLine("Pending Changes Tool Window Refresh: {0}", ex.ToString());
}
}