- revert the treeview to windows forms one since is more performant
119417ab
Dimitar Tsenev
committed
11 changed files
BetterExplorer.csproj
/BExplorer/BetterExplorer/BetterExplorer.csproj-4+1
/BExplorer/BetterExplorer/BetterExplorer.csproj
Add comment 191 <Reference Include="UIAutomationProvider" />
Add comment 192 <Reference Include="UIAutomationTypes" />
Add comment 193 <Reference Include="Windows.Data" />
Add comment 194 Minus   <Reference Include="Windows.Foundation.UniversalApiContract">
Add comment 195 Minus   <HintPath>..\..\packages\Microsoft.Windows.SDK.Contracts.10.0.17763.1000\ref\netstandard2.0\Windows.Foundation.UniversalApiContract.winmd</HintPath>
Add comment 196 Minus   </Reference>
Add comment 197 194 <Reference Include="WindowsBase" />
Add comment 198 195 <Reference Include="PresentationCore" />
Add comment 199 196 <Reference Include="PresentationFramework" />
Add comment 1218 1215 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Add comment 1219 1216 <ProjectExtensions>
Add comment 1220 1217 <VisualStudio>
Add comment 1221 Minus   <UserProperties BuildVersion_UseGlobalSettings="True" BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.None.Increment" />
Add comment 1218 Plus   <UserProperties BuildVersion_BuildVersioningStyle="None.None.None.Increment" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" BuildVersion_UseGlobalSettings="True" />
Add comment 1222 1219 </VisualStudio>
Add comment 1223 1220 </ProjectExtensions>
Add comment 1224 1221 <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
MainWindow.xaml
/BExplorer/BetterExplorer/MainWindow.xaml-2+5
/BExplorer/BetterExplorer/MainWindow.xaml
Add comment 4188 <ColumnDefinition Width="2" />
Add comment 4189 <ColumnDefinition Width="*" />
Add comment 4190 </Grid.ColumnDefinitions>
Add comment 4191 Minus   <shell:ShellTreeView x:Name="stvTreeView"></shell:ShellTreeView>
Add comment 4191 Plus   <!--<shell:ShellTreeView x:Name="stvTreeView"></shell:ShellTreeView>-->
Add comment 4192 Plus   <Helper:NoFlickerWindowsFormsHost
Add comment 4193 Plus   x:Name="ShellTreeViewHost"
Add comment 4194 Plus   Background="{DynamicResource WhiteBrush}" />
Add comment 4192 4195 <GridSplitter
Add comment 4193 4196 x:Name="TreeSplitter"
Add comment 4194 4197 Grid.Column="1"
Add comment 4204 4207 <Helper:NoFlickerWindowsFormsHost
Add comment 4205 4208 x:Name="ShellViewHost"
Add comment 4206 4209 Background="{DynamicResource WhiteBrush}" />
Add comment 4207 Minus   <ScrollBar x:Name="sbLVVertical" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Minimum="0" Maximum="100" SmallChange="0.5" LargeChange="1" Scroll="ScrollBar_OnScroll"></ScrollBar>
Add comment 4210 Plus   <!--<ScrollBar x:Name="sbLVVertical" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Minimum="0" Maximum="100" SmallChange="0.5" LargeChange="1" Scroll="ScrollBar_OnScroll"></ScrollBar>-->
Add comment 4208 4211 </Grid>
Add comment 4209 4212 </Grid>
Add comment 4210 4213 <GridSplitter
MainWindow.xaml.cs
/BExplorer/BetterExplorer/MainWindow.xaml.cs-26+32
/BExplorer/BetterExplorer/MainWindow.xaml.cs
Add comment 83 private bool _IsCalledFromLoading, isOnLoad;
Add comment 84 private MenuItem misa, misd, misag, misdg;
Add comment 85 private ShellView _ShellListView = new ShellView();
Add comment 86 Plus   private ShellTreeViewEx _ShellTreeView = new ShellTreeViewEx();
Add comment 86 87 private bool IsNeedEnsureVisible;
Add comment 87 88 private ClipboardMonitor cbm = new ClipboardMonitor();
Add comment 88 89 private ContextMenu _CMHistory = new ContextMenu();
Add comment 1616 1617 }
Add comment 1617 1618
Add comment 1618 1619 private void Window_Loaded(object sender, RoutedEventArgs e) {
Add comment 1619 Minus   this.sbLVVertical.Track.Thumb.DragDelta += (o, args) => {
Add comment 1620 Minus   this._IsScrollingManually = true;
Add comment 1621 Minus   User32.SendMessage(this._ShellListView.LVHandle, 0x1000 + 20, 0, (Int32)Math.Ceiling(args.VerticalChange * (8.5)));
Add comment 1622 Minus   //args.Handled = true;
Add comment 1623 Minus   //this.sbLVVertical.Value = this.sbLVVertical.Value + args.VerticalChange;
Add comment 1624 Minus   };
Add comment 1620 Plus   //this.sbLVVertical.Track.Thumb.DragDelta += (o, args) => {
Add comment 1621 Plus   // this._IsScrollingManually = true;
Add comment 1622 Plus   // User32.SendMessage(this._ShellListView.LVHandle, 0x1000 + 20, 0, (Int32)Math.Ceiling(args.VerticalChange * (8.5)));
Add comment 1623 Plus   // //args.Handled = true;
Add comment 1624 Plus   // //this.sbLVVertical.Value = this.sbLVVertical.Value + args.VerticalChange;
Add comment 1625 Plus   //};
Add comment 1625 1626 this._ScrollDeferer.Interval = 100;
Add comment 1626 1627 this._ScrollDeferer.Stop();
Add comment 1627 1628 this._ScrollDeferer.Tick += (o, args) => {
Add comment 1628 1629 this._ScrollDeferer.Stop();
Add comment 1629 1630
Add comment 1630 1631 this._IsScrollingManually = true;
Add comment 1631 Minus   var delta = this.sbLVVertical.Value - this._ScrollOldValue;
Add comment 1632 Plus   //var delta = this.sbLVVertical.Value - this._ScrollOldValue;
Add comment 1632 1633
Add comment 1633 1634 //User32.LockWindowUpdate(this._ShellListView.LVHandle);
Add comment 1634 Minus   if (Math.Abs(delta) > 0) {
Add comment 1635 Minus   //User32.LockWindowUpdate(this._ShellListView.LVHandle);
Add comment 1636 Minus   User32.SendMessage(this._ShellListView.LVHandle, 0x1000 + 20, 0, (Int32)Math.Round(delta * (this._ShellListView.View == ShellViewStyle.Details ? 1 : 1)));
Add comment 1637 Minus   this._ScrollOldValue = this.sbLVVertical.Value;
Add comment 1638 Minus   //User32.LockWindowUpdate(IntPtr.Zero);
Add comment 1639 Minus   } else {
Add comment 1640 Minus   User32.SendMessage(this._ShellListView.LVHandle, 0x1000 + 20, 0, (Int32)Math.Round(delta * (this._ShellListView.View == ShellViewStyle.Details ? 1 : 1)));
Add comment 1641 Minus   this._ScrollOldValue = this.sbLVVertical.Value;
Add comment 1642 Minus   }
Add comment 1635 Plus   //if (Math.Abs(delta) > 0) {
Add comment 1636 Plus   // //User32.LockWindowUpdate(this._ShellListView.LVHandle);
Add comment 1637 Plus   // User32.SendMessage(this._ShellListView.LVHandle, 0x1000 + 20, 0, (Int32)Math.Round(delta * (this._ShellListView.View == ShellViewStyle.Details ? 1 : 1)));
Add comment 1638 Plus   // //this._ScrollOldValue = this.sbLVVertical.Value;
Add comment 1639 Plus   // //User32.LockWindowUpdate(IntPtr.Zero);
Add comment 1640 Plus   //} else {
Add comment 1641 Plus   // User32.SendMessage(this._ShellListView.LVHandle, 0x1000 + 20, 0, (Int32)Math.Round(delta * (this._ShellListView.View == ShellViewStyle.Details ? 1 : 1)));
Add comment 1642 Plus   // //this._ScrollOldValue = this.sbLVVertical.Value;
Add comment 1643 Plus   //}
Add comment 1643 1644
Add comment 1644 1645 //User32.LockWindowUpdate(IntPtr.Zero);
Add comment 1645 1646 };
Add comment 1654 1655
Add comment 1655 1656 this._ProgressTimer.Stop();
Add comment 1656 1657 this.TheRibbon.UpdateLayout();
Add comment 1658 Plus   this._ShellTreeView.ShellListView = this._ShellListView;
Add comment 1657 1659 this.grdItemTextColor.ItemsSource = this.LVItemsColorCol;
Add comment 1658 1660 this._keyjumpTimer.Interval = 1000;
Add comment 1659 1661 this._keyjumpTimer.Tick += this._keyjumpTimer_Tick;
Add comment 1660 Minus   //this.ShellTreeHost.Child = this.ShellTree;
Add comment 1662 Plus   this.ShellTreeViewHost.Child = this._ShellTreeView;
Add comment 1661 1663 this.ShellViewHost.Child = this._ShellListView;
Add comment 1662 1664
Add comment 1663 Minus   this.stvTreeView.ShellListView = this._ShellListView;
Add comment 1664 Minus   this.stvTreeView.NodeClick += (o, args) => { this.tcMain.NewTab(args.Item, false); };
Add comment 1665 Plus   //this.stvTreeView.ShellListView = this._ShellListView;
Add comment 1666 Plus   //this.stvTreeView.NodeClick += (o, args) => { this.tcMain.NewTab(args.Item, false); };
Add comment 1665 1667 //this.ctrlConsole.ShellListView = this._ShellListView;
Add comment 1666 1668 //this.autoUpdater.UpdateAvailable += this.AutoUpdater_UpdateAvailable;
Add comment 1667 1669 this.updateCheckTimer.Interval = 18000000 * 3;
Add comment 1690 1692 BExplorer.Shell.Interop.Shell32.SHGetSetSettings(ref statef, BExplorer.Shell.Interop.Shell32.SSF.SSF_SHOWALLOBJECTS | BExplorer.Shell.Interop.Shell32.SSF.SSF_SHOWEXTENSIONS, false);
Add comment 1691 1693 this.chkHiddenFiles.IsChecked = statef.fShowAllObjects == 1;
Add comment 1692 1694 this._ShellListView.ShowHidden = this.chkHiddenFiles.IsChecked.Value;
Add comment 1693 Minus   this.stvTreeView.IsShowHiddenItems = this.chkHiddenFiles.IsChecked.Value;
Add comment 1695 Plus   //this.stvTreeView.IsShowHiddenItems = this.chkHiddenFiles.IsChecked.Value;
Add comment 1694 1696 this.chkExtensions.IsChecked = statef.fShowExtensions == 1;
Add comment 1695 1697 this._ShellListView.IsFileExtensionShown = statef.fShowExtensions == 1;
Add comment 1696 1698 this._IsCalledFromLoading = false;
Add comment 2265 2267 var state = new BExplorer.Shell.Interop.Shell32.SHELLSTATE() { fShowAllObjects = 1 };
Add comment 2266 2268 BExplorer.Shell.Interop.Shell32.SHGetSetSettings(ref state, BExplorer.Shell.Interop.Shell32.SSF.SSF_SHOWALLOBJECTS, true);
Add comment 2267 2269 this._ShellListView.ShowHidden = true;
Add comment 2268 Minus  
Add comment 2269 Minus   this.stvTreeView.IsShowHiddenItems = true;
Add comment 2270 Minus   this.stvTreeView.RefreshContents();
Add comment 2270 Plus   this._ShellTreeView.IsShowHiddenItems = true;
Add comment 2271 Plus   this._ShellTreeView.RefreshContents();
Add comment 2272 Plus   //this.stvTreeView.IsShowHiddenItems = true;
Add comment 2273 Plus   //this.stvTreeView.RefreshContents();
Add comment 2271 2274 }
Add comment 2272 2275 ));
Add comment 2273 2276 }
Add comment 2280 2283 var state = new BExplorer.Shell.Interop.Shell32.SHELLSTATE() { fShowAllObjects = 0 };
Add comment 2281 2284 BExplorer.Shell.Interop.Shell32.SHGetSetSettings(ref state, BExplorer.Shell.Interop.Shell32.SSF.SSF_SHOWALLOBJECTS, true);
Add comment 2282 2285 this._ShellListView.ShowHidden = false;
Add comment 2283 Minus  
Add comment 2284 Minus   this.stvTreeView.IsShowHiddenItems = false;
Add comment 2285 Minus   this.stvTreeView.RefreshContents();
Add comment 2286 Plus   this._ShellTreeView.IsShowHiddenItems = false;
Add comment 2287 Plus   this._ShellTreeView.RefreshContents();
Add comment 2288 Plus   //this.stvTreeView.IsShowHiddenItems = false;
Add comment 2289 Plus   //this.stvTreeView.RefreshContents();
Add comment 2286 2290 }
Add comment 2287 2291 ));
Add comment 2288 2292 }
Add comment 4205 4209 private void BtnTheme_OnChecked(Object sender, RoutedEventArgs e) {
Add comment 4206 4210 this.ChangeRibbonTheme("Dark");
Add comment 4207 4211 this._ShellListView.ChangeTheme(ThemeColors.Dark);
Add comment 4212 Plus   this._ShellTreeView.ChangeTheme(ThemeColors.Dark);
Add comment 4208 4213 this.KeepBackstageOpen = true;
Add comment 4209 4214 }
Add comment 4210 4215
Add comment 4211 4216 private void BtnTheme_OnUnchecked(Object sender, RoutedEventArgs e) {
Add comment 4212 4217 this.ChangeRibbonTheme("Light");
Add comment 4213 4218 this._ShellListView.ChangeTheme(ThemeColors.Light);
Add comment 4219 Plus   this._ShellTreeView.ChangeTheme(ThemeColors.Light);
Add comment 4214 4220 this.KeepBackstageOpen = true;
Add comment 4215 4221 }
Add comment 4216 4222
LVTheme.cs
/Settings/LVTheme.cs+3
/Settings/LVTheme.cs
Add comment 3 namespace Settings {
Add comment 4 public class LVTheme {
Add comment 5 public Color BackgroundColor { get; private set; }
Add comment 6 Plus   public Color BackgroundColorTree { get; private set; }
Add comment 6 7
Add comment 7 8 public Color TextColor { get; private set; }
Add comment 8 9
Add comment 34 35 this.SortColumnColor = Color.FromRgb(235, 244, 254);
Add comment 35 36 this.HeaderDividerColor = Color.FromRgb(235, 244, 254);
Add comment 36 37 this.HeaderArrowColor = Color.FromArgb(75, 10, 127, 237);
Add comment 38 Plus   this.BackgroundColorTree = Colors.White;
Add comment 37 39 break;
Add comment 38 40 case ThemeColors.Dark:
Add comment 39 41 this.MouseOverColor = Color.FromArgb(75, 107, 105, 105);
Add comment 46 48 this.SortColumnColor = Color.FromRgb(35,35,35);
Add comment 47 49 this.HeaderDividerColor = Color.FromRgb(79,79,79);
Add comment 48 50 this.HeaderArrowColor = Color.FromArgb(75, 220, 220, 220);
Add comment 51 Plus   this.BackgroundColorTree = Color.FromArgb(255, 22, 22, 22);
Add comment 49 52 break;
Add comment 50 53 }
Add comment 51 54
FileSystemListItem.cs
/Shell/_Plugin Interfaces/FileSystemListItem.cs
/Shell/_Plugin Interfaces/FileSystemListItem.cs
ImageListEx.cs
/Shell/ImageListEx.cs
/Shell/ImageListEx.cs
ShellTreeView.xaml.cs
/Shell/ShellTreeView.xaml.cs
/Shell/ShellTreeView.xaml.cs
ShellTreeViewEx.cs
/Shell/ShellTreeViewEx.cs
/Shell/ShellTreeViewEx.cs
ShellViewEx.cs
/Shell/ShellViewEx.cs
/Shell/ShellViewEx.cs
ToolTip.xaml.cs
/Shell/ToolTip.xaml.cs
/Shell/ToolTip.xaml.cs
TreeViewBase.cs
/Shell/TreeViewBase.cs
/Shell/TreeViewBase.cs