private TSVNTreeViewItem CreateFileTreeViewItem(string text, string solutionDir, string path, string change) { var filePath = Path.Combine(solutionDir, path); var item = new TSVNTreeViewFileItem { Path = filePath, Tooltip = $"Name: {text}\nFolder: {Path.GetDirectoryName(filePath)}\nType: {GetTypeOfChange(change[0])}", Label = text, ChangeType = GetTypeOfChangeShort(change[0]), ImageSource = File.Exists(filePath) ? ToImageSource(Icon.ExtractAssociatedIcon(filePath)) : new BitmapImage(new Uri("Resources\\Document_16x.png", UriKind.Relative)), Foreground = ToBrush(EnvironmentColors.ToolWindowTextColorKey) }; return(item); }
private TSVNTreeViewItem CreateFileTreeViewItem(string text, string solutionDir, string path, string change) { var filePath = Path.Combine(solutionDir, path); var item = new TSVNTreeViewFileItem { Path = filePath, Tooltip = $"Name: {text}\nFolder: {Path.GetDirectoryName(filePath)}\nType: {GetTypeOfChange(change[0])}", Label = text, ChangeType = GetTypeOfChangeShort(change[0]), PendingIconSource = GetPendingIconOfChange(change[0]), PendingTooltip = GetPendingTooltipOfChange(change[0]), FileIconSource = ToImageSource(Icon.ExtractAssociatedIcon(filePath)), FileIconVisibility = File.Exists(filePath) ? Visibility.Visible : Visibility.Collapsed, IconVisibility = File.Exists(filePath) ? Visibility.Collapsed : Visibility.Visible, IconSource = "Resources\\XAML\\Document_16x.xaml", Foreground = ToBrush(EnvironmentColors.ToolWindowTextColorKey) }; return(item); }