Cleaning
8cdd6b8f
Aaron Campf
committed
32 changed files
Program.cs
/BetterExplorerShell/Program.cs-11+14
/BetterExplorerShell/Program.cs
Add comment 4 using System.Windows.Forms;
Add comment 5 using System.IO;
Add comment 6
Add comment 7 Minus  namespace BetterExplorerShell {
Add comment 8 Minus   static class Program {
Add comment 7 Plus  namespace BetterExplorerShell
Add comment 8 Plus  {
Add comment 9 Plus   static class Program
Add comment 10 Plus   {
Add comment 9 11
Add comment 10 12 /// <summary>
Add comment 11 13 /// The main entry point for the application.
Add comment 12 14 /// </summary>
Add comment 13 15 [STAThread]
Add comment 14 Minus   static void Main(string[] args) {
Add comment 15 Minus   if (!ExecuteControlPanelItem(args[0])) {
Add comment 16 Plus   static void Main(string[] args)
Add comment 17 Plus   {
Add comment 18 Plus   if (!ExecuteControlPanelItem(args[0]))
Add comment 19 Plus   {
Add comment 16 20 var bexplorerPath = Path.GetDirectoryName(Application.ExecutablePath) + @"\BetterExplorer.exe";
Add comment 17 Minus   var procStartInfo = new System.Diagnostics.ProcessStartInfo(bexplorerPath, String.Format("\"{0}\"", args[0]));
Add comment 21 Plus   var procStartInfo = new System.Diagnostics.ProcessStartInfo(bexplorerPath, $"\"{args[0]}\"");
Add comment 18 22
Add comment 19 23 // Now we create a process, assign its ProcessStartInfo and start it
Add comment 20 Minus   var proc = new System.Diagnostics.Process() { StartInfo = procStartInfo };
Add comment 21 Minus   proc.Start();
Add comment 24 Plus   new System.Diagnostics.Process() { StartInfo = procStartInfo }.Start();
Add comment 22 25 }
Add comment 23 26 }
Add comment 24 27
Add comment 25 Minus   static public bool ExecuteControlPanelItem(String cmd) {
Add comment 28 Plus   static public bool ExecuteControlPanelItem(String cmd)
Add comment 29 Plus   {
Add comment 26 30 // Discard control panel items
Add comment 27 31 const String cpName = @"::{26EE0668-A00A-44D7-9371-BEB064C98683}";
Add comment 28 32
Add comment 39 43
Add comment 40 44 cmd = cmd.Replace("Fonts", "::{BD84B380-8CA2-1069-AB1D-08000948F534}");
Add comment 41 45
Add comment 42 Minus   var procStartInfo = new System.Diagnostics.ProcessStartInfo(explorerPath, String.Format("shell:{0}", cmd));
Add comment 46 Plus   var procStartInfo = new System.Diagnostics.ProcessStartInfo(explorerPath, $"shell:{cmd}");
Add comment 43 47
Add comment 44 48 // Now we create a process, assign its ProcessStartInfo and start it
Add comment 45 Minus   var proc = new System.Diagnostics.Process() { StartInfo = procStartInfo };
Add comment 46 Minus   proc.Start();
Add comment 49 Plus   new System.Diagnostics.Process() { StartInfo = procStartInfo }.Start();
Add comment 47 50 return true;
Add comment 48 51 }
Add comment 49 52 }
ArchiveProcressScreen.cs
/BExplorer/BetterExplorer/ArchiveView/ArchiveProcressScreen.cs-3+3
/BExplorer/BetterExplorer/ArchiveView/ArchiveProcressScreen.cs
Add comment 440 {
Add comment 441 case ArchiveAction.Compress:
Add comment 442 _commpressingFileName = "Compressing \"{0}\"";
Add comment 443 Minus   lbl_compressing_to.Text = String.Format("Compressing to \"{0}\"", _archivePath);
Add comment 443 Plus   lbl_compressing_to.Text = $"Compressing to \"{_archivePath}\"";
Add comment 444 _thread = new SafeThread(new ThreadStart(Compress));
Add comment 445 _thread.ShouldReportThreadAbort = false;
Add comment 446
Add comment 449
Add comment 450 case ArchiveAction.Extract:
Add comment 451 _commpressingFileName = "Extracting \"{0}\"";
Add comment 452 Minus   lbl_compressing_to.Text = String.Format("Extracting to \"{0}\"", _archivePath);
Add comment 452 Plus   lbl_compressing_to.Text = $"Extracting to \"{_archivePath}\"";
Add comment 453 _thread = new SafeThread(new ThreadStart(Extract));
Add comment 454 break;
Add comment 455
Add comment 456 case ArchiveAction.RemoveFile:
Add comment 457 _commpressingFileName = "Compressing \"{0}\"";
Add comment 458 Minus   lbl_compressing_to.Text = String.Format("Compressing to \"{0}\"", _archivePath);
Add comment 458 Plus   lbl_compressing_to.Text = $"Compressing to \"{_archivePath}\"";
Add comment 459 _thread = new SafeThread(new ThreadStart(RemoveFile));
Add comment 460 break;
Add comment 461 }
SafeThread.cs
/BExplorer/BetterExplorer/HelperClasses/SafeThread.cs
/BExplorer/BetterExplorer/HelperClasses/SafeThread.cs
Legend.xaml.cs
/BExplorer/BetterExplorer/PieChart/PieChart/Legend.xaml.cs-30+14
/BExplorer/BetterExplorer/PieChart/PieChart/Legend.xaml.cs
Add comment 1 using System;
Add comment 2 Minus  using System.Collections.Generic;
Add comment 3 Minus  using System.Linq;
Add comment 4 Minus  using System.Text;
Add comment 5 2 using System.Windows;
Add comment 6 3 using System.Windows.Controls;
Add comment 7 4 using System.Windows.Data;
Add comment 8 Minus  using System.Windows.Documents;
Add comment 9 Minus  using System.Windows.Input;
Add comment 10 Minus  using System.Windows.Media;
Add comment 11 Minus  using System.Windows.Media.Imaging;
Add comment 12 Minus  using System.Windows.Navigation;
Add comment 13 Minus  using System.Windows.Shapes;
Add comment 14 Minus  
Add comment 15 5 using System.ComponentModel;
Add comment 16 6 using System.Collections.Specialized;
Add comment 17 7 using System.Threading;
Add comment 45 35
Add comment 46 36 #endregion
Add comment 47 37
Add comment 48 Minus   public Legend()
Add comment 49 Minus   {
Add comment 50 Minus   // register any dependency property change handlers
Add comment 51 Minus   DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.FromProperty(PieChartLayout.PlottedPropertyProperty, typeof(PiePlotter));
Add comment 52 Minus   dpd.AddValueChanged(this, PlottedPropertyChanged);
Add comment 53 Minus  
Add comment 54 Minus   this.DataContextChanged += new DependencyPropertyChangedEventHandler(DataContextChangedHandler);
Add comment 55 Minus  
Add comment 56 Minus   InitializeComponent();
Add comment 57 Minus   }
Add comment 58 Minus  
Add comment 59 Minus  
Add comment 60 38 #region property change handlers
Add comment 61 39
Add comment 62 40 /// <summary>
Add comment 97 75 /// </summary>
Add comment 98 76 /// <param name="sender"></param>
Add comment 99 77 /// <param name="e"></param>
Add comment 100 Minus   private void PlottedPropertyChanged(object sender, EventArgs e)
Add comment 101 Minus   {
Add comment 102 Minus   RefreshView();
Add comment 103 Minus   }
Add comment 78 Plus   private void PlottedPropertyChanged(object sender, EventArgs e) => RefreshView();
Add comment 104 79
Add comment 105 80 /// <summary>
Add comment 106 81 /// Iterates over the items inthe bound collection, adding handlers for PropertyChanged events
Add comment 139 114
Add comment 140 115 #endregion
Add comment 141 116
Add comment 117 Plus  
Add comment 118 Plus   public Legend()
Add comment 119 Plus   {
Add comment 120 Plus   // register any dependency property change handlers
Add comment 121 Plus   DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.FromProperty(PieChartLayout.PlottedPropertyProperty, typeof(PiePlotter));
Add comment 122 Plus   dpd.AddValueChanged(this, PlottedPropertyChanged);
Add comment 123 Plus  
Add comment 124 Plus   this.DataContextChanged += new DependencyPropertyChangedEventHandler(DataContextChangedHandler);
Add comment 125 Plus  
Add comment 126 Plus   InitializeComponent();
Add comment 127 Plus   }
Add comment 128 Plus  
Add comment 142 129 /// <summary>
Add comment 143 130 /// Refreshes the view, re-computing any value which is derived from the data bindings
Add comment 144 131 /// </summary>
Add comment 160 147 }));
Add comment 161 148 }
Add comment 162 149
Add comment 163 Minus   private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
Add comment 164 Minus   {
Add comment 165 Minus   legend.Height = this.ActualHeight - Head.ActualHeight;
Add comment 166 Minus   }
Add comment 150 Plus   private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e) => legend.Height = this.ActualHeight - Head.ActualHeight;
Add comment 167 151
Add comment 168 152 private void legend_SelectionChanged(object sender, SelectionChangedEventArgs e)
Add comment 169 153 {
PiePiece.cs
/BExplorer/BetterExplorer/PieChart/Shapes/PiePiece.cs-6+5
/BExplorer/BetterExplorer/PieChart/Shapes/PiePiece.cs
Add comment 64 public double WedgeAngle
Add comment 65 {
Add comment 66 get { return (double)GetValue(WedgeAngleProperty); }
Add comment 67 Minus   set {
Add comment 67 Plus   set
Add comment 68 Plus   {
Add comment 68 69 SetValue(WedgeAngleProperty, value);
Add comment 69 70 this.Percentage = (value / 360.0);
Add comment 70 71 }
Add comment 101 102 new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.AffectsMeasure));
Add comment 102 103
Add comment 103 104 /// <summary>
Add comment 104 Minus   /// The Y coordinate of centre of the circle from which this pie piece is cut.
Add comment 105 Plus   /// The Y coordinate of center of the circle from which this pie piece is cut.
Add comment 105 106 /// </summary>
Add comment 106 107 public double CentreY
Add comment 107 108 {
Add comment 123 124 }
Add comment 124 125
Add comment 125 126 public static readonly DependencyProperty PieceValueProperty =
Add comment 126 Minus   DependencyProperty.Register("PieceValueProperty", typeof(double), typeof(PiePiece),
Add comment 127 Minus   new FrameworkPropertyMetadata(0.0));
Add comment 127 Plus   DependencyProperty.Register("PieceValueProperty", typeof(double), typeof(PiePiece), new FrameworkPropertyMetadata(0.0));
Add comment 128
Add comment 129 /// <summary>
Add comment 130 /// The value that this pie piece represents.
Add comment 177 Point outerArcEndPoint = Utils.ComputeCartesianCoordinate(RotationAngle + WedgeAngle, Radius);
Add comment 178 outerArcEndPoint.Offset(CentreX, CentreY);
Add comment 179
Add comment 180 Minus   bool largeArc = WedgeAngle>180.0;
Add comment 180 Plus   bool largeArc = WedgeAngle > 180.0;
Add comment 181
Add comment 182 if (PushOut > 0)
Add comment 183 {
Add comment 199 context.ArcTo(innerArcStartPoint, innerArcSize, 0, largeArc, SweepDirection.Counterclockwise, true, true);
Add comment 200 }
Add comment 201 }
Add comment 202 Minus  
Add comment 203 202 }
Add comment 204 203
SavedTabsListGalleryItem.xaml.cs
/BExplorer/BetterExplorer/Tabs/SavedTabsListGalleryItem.xaml.cs-69+29
/BExplorer/BetterExplorer/Tabs/SavedTabsListGalleryItem.xaml.cs
Add comment 6 using System.Windows.Input;
Add comment 7 using System.Windows.Media;
Add comment 8
Add comment 9 Minus  namespace BetterExplorer {
Add comment 9 Plus  namespace BetterExplorer
Add comment 10 Plus  {
Add comment 10 11 /// <summary>
Add comment 11 12 /// Interaction logic for SavedTabsListGalleryItem.xaml
Add comment 12 13 /// </summary>
Add comment 13 Minus   public partial class SavedTabsListGalleryItem : UserControl {
Add comment 14 Plus   public partial class SavedTabsListGalleryItem : UserControl
Add comment 15 Plus   {
Add comment 14 16 private SavedTabsList lst;
Add comment 15 17 public string Directory { get; set; }
Add comment 16 18
Add comment 19 Plus   public delegate void PathStringEventHandler(object sender, Tuple<string> e);
Add comment 20 Plus   public event PathStringEventHandler Click; // An event that clients can use to be notified whenever the elements of the list change:
Add comment 21 Plus   protected virtual void OnClick(Tuple<string> e) => Click?.Invoke(this, e);
Add comment 22 Plus   private void UserControl_MouseUp(object sender, MouseButtonEventArgs e) => OnClick(new Tuple<string>(tabTitle.Text));
Add comment 23 Plus   public void PerformClickEvent() => OnClick(new Tuple<string>(tabTitle.Text));
Add comment 17 24
Add comment 18 Minus   /*
Add comment 19 Minus   public SavedTabsListGalleryItem() {
Add comment 20 Minus   Directory = "";
Add comment 25 Plus   public SavedTabsListGalleryItem(string loc)
Add comment 26 Plus   {
Add comment 21 27 InitializeComponent();
Add comment 22 Minus   }
Add comment 23 Minus   */
Add comment 24 Minus  
Add comment 25 Minus   public SavedTabsListGalleryItem(string loc) {
Add comment 26 Minus   InitializeComponent();
Add comment 27 28 Directory = "";
Add comment 28 29 Location = loc;
Add comment 29 30 }
Add comment 30 31
Add comment 31 Minus   public SavedTabsListGalleryItem(string loc, bool selected) {
Add comment 32 Plus   public SavedTabsListGalleryItem(string loc, bool selected)
Add comment 33 Plus   {
Add comment 32 34 InitializeComponent();
Add comment 33 35 Location = loc;
Add comment 34 Minus   if (selected) {
Add comment 36 Plus  
Add comment 37 Plus   if (selected)
Add comment 35 38 SetSelected();
Add comment 36 Minus   }
Add comment 37 Minus   else {
Add comment 39 Plus   else
Add comment 38 40 SetDeselected();
Add comment 39 41 }
Add comment 40 Minus   }
Add comment 41 42
Add comment 42 Minus   public string Location {
Add comment 43 Plus   public string Location
Add comment 44 Plus   {
Add comment 43 45 get { return tabTitle.Text; }
Add comment 44 46 set { tabTitle.Text = value; }
Add comment 45 47 }
Add comment 46 48
Add comment 47 Minus  
Add comment 48 Minus  
Add comment 49 Minus  
Add comment 50 Minus   public void SetUpTooltip(string tabs) {
Add comment 51 Minus   lst = SavedTabsList.LoadTabList(String.Format("{0}{1}.txt", Directory, Location));
Add comment 52 Minus   StringBuilder blah = new StringBuilder(lst.Count);
Add comment 53 Minus   foreach (string item in lst) {
Add comment 49 Plus   public void SetUpTooltip(string tabs)
Add comment 50 Plus   {
Add comment 51 Plus   lst = SavedTabsList.LoadTabList($"{Directory}{Location}.txt");
Add comment 52 Plus   var blah = new StringBuilder(lst.Count);
Add comment 53 Plus   foreach (string item in lst)
Add comment 54 Plus   {
Add comment 54 55 blah.AppendLine(item);
Add comment 55 56 }
Add comment 56 Minus   string de = String.Format("{0}: {1}\n\r", tabs, lst.Count.ToString()) + blah;
Add comment 57
Add comment 58 Plus   string de = $"{tabs}: {lst.Count.ToString()}\n\r" + blah;
Add comment 58 59 this.ToolTip = de.Remove(de.Length - 2);
Add comment 59 60 }
Add comment 60 61
Add comment 61 Minus   public delegate void PathStringEventHandler(object sender, Tuple<string> e);
Add comment 62 Minus  
Add comment 63 Minus   // An event that clients can use to be notified whenever the
Add comment 64 Minus   // elements of the list change:
Add comment 65 Minus   public event PathStringEventHandler Click;
Add comment 66 Minus   //public event EventHandler MouseDoubleClick;
Add comment 67 Minus  
Add comment 68 Minus   // Invoke the Changed event; called whenever list changes:
Add comment 69 Minus   protected virtual void OnClick(Tuple<string> e) {
Add comment 70 Minus   if (Click != null)
Add comment 71 Minus   Click(this, e);
Add comment 72 Minus   }
Add comment 73 Minus  
Add comment 74 Minus   private void UserControl_MouseUp(object sender, MouseButtonEventArgs e) {
Add comment 75 Minus   OnClick(new Tuple<string>(tabTitle.Text));
Add comment 76 Minus   }
Add comment 77 Minus  
Add comment 78 Minus   public void PerformClickEvent() {
Add comment 79 Minus   OnClick(new Tuple<string>(tabTitle.Text));
Add comment 80 Minus   }
Add comment 81 Minus  
Add comment 82 Minus   public void SetSelected() {
Add comment 62 Plus   public void SetSelected()
Add comment 63 Plus   {
Add comment 83 64 this.Background = new SolidColorBrush(Color.FromRgb(0, 50, 255));
Add comment 84 65 this.tabTitle.Foreground = new SolidColorBrush(Colors.White);
Add comment 85 66 }
Add comment 86 67
Add comment 87 Minus   public void SetDeselected() {
Add comment 68 Plus   public void SetDeselected()
Add comment 69 Plus   {
Add comment 88 70 this.Background = new SolidColorBrush(Color.FromArgb(1, 255, 255, 255));
Add comment 89 71 this.tabTitle.Foreground = new SolidColorBrush(Colors.Black);
Add comment 90 72 }
Add comment 91 Minus  
Add comment 92 Minus   }
Add comment 93 Minus  }
Add comment 94 Minus  
Add comment 95 Minus  /*
Add comment 96 Minus  public class PathStringEventArgs
Add comment 97 Minus  {
Add comment 98 Minus   string _obj;
Add comment 99 Minus  
Add comment 100 Minus   public PathStringEventArgs(string loc)
Add comment 101 Minus   {
Add comment 102 Minus   _obj = loc;
Add comment 103 Minus   }
Add comment 104 Minus  
Add comment 105 Minus   public string PathString
Add comment 106 Minus   {
Add comment 107 Minus   get
Add comment 108 Minus   {
Add comment 109 Minus   return _obj;
Add comment 110 Minus   }
Add comment 111 73 }
Add comment 112 74 }
Add comment 113 Minus  */
Add comment 114 Minus  
Updater.cs
/BExplorer/BetterExplorer/Updater/Updater.cs
/BExplorer/BetterExplorer/Updater/Updater.cs
UpdateWizard.cs
/BExplorer/BetterExplorer/Updater/UpdateWizard.cs
/BExplorer/BetterExplorer/Updater/UpdateWizard.cs
fmAbout.xaml
/BExplorer/BetterExplorer/fmAbout.xaml
/BExplorer/BetterExplorer/fmAbout.xaml
fmAbout.xaml.cs
/BExplorer/BetterExplorer/fmAbout.xaml.cs
/BExplorer/BetterExplorer/fmAbout.xaml.cs
MainWindow.xaml.cs
/BExplorer/BetterExplorer/MainWindow.xaml.cs
/BExplorer/BetterExplorer/MainWindow.xaml.cs
ApplyPropertiesEventArgs.cs
/BreadcrumbBar/BreadcrumbBar/ApplyPropertiesEventArgs.cs
/BreadcrumbBar/BreadcrumbBar/ApplyPropertiesEventArgs.cs
TaskbarIcon.cs
/NotifyIcon/NotifyIconWpf/TaskbarIcon.cs
/NotifyIcon/NotifyIconWpf/TaskbarIcon.cs
TaskbarIcon.Declarations.cs
/NotifyIcon/NotifyIconWpf/TaskbarIcon.Declarations.cs
/NotifyIcon/NotifyIconWpf/TaskbarIcon.Declarations.cs
Util.cs
/NotifyIcon/NotifyIconWpf/Util.cs
/NotifyIcon/NotifyIconWpf/Util.cs
FileSystemListItem.cs
/Shell/_Plugin Interfaces/FileSystemListItem.cs
/Shell/_Plugin Interfaces/FileSystemListItem.cs
IListItemEx.cs
/Shell/_Plugin Interfaces/IListItemEx.cs
/Shell/_Plugin Interfaces/IListItemEx.cs
FileOperationDialog.xaml.cs
/Shell/FileOperation/FileOperationDialog.xaml.cs
/Shell/FileOperation/FileOperationDialog.xaml.cs
FileOperationProgressSink.cs
/Shell/FileOperation/FileOperationProgressSink.cs
/Shell/FileOperation/FileOperationProgressSink.cs
ShellLink.cs
/Shell/Interop/ShellLink.cs
/Shell/Interop/ShellLink.cs
ShellNotifications.cs
/Shell/Interop/ShellNotifications.cs
/Shell/Interop/ShellNotifications.cs
ShellThumbnail.cs
/Shell/Interop/ShellThumbnail.cs
/Shell/Interop/ShellThumbnail.cs
User32.cs
/Shell/Interop/User32.cs
/Shell/Interop/User32.cs
KnownFolderSettings.cs
/Shell/KnownFolders/KnownFolderSettings.cs
/Shell/KnownFolders/KnownFolderSettings.cs
NonFileSystemKnownFolder.cs
/Shell/KnownFolders/NonFileSystemKnownFolder.cs
/Shell/KnownFolders/NonFileSystemKnownFolder.cs
Extensions.cs
/Shell/Extensions.cs
/Shell/Extensions.cs
FilterItem.cs
/Shell/FilterItem.cs
/Shell/FilterItem.cs
ShellComboBox.cs
/Shell/ShellComboBox.cs
/Shell/ShellComboBox.cs
ShellItem.cs
/Shell/ShellItem.cs
/Shell/ShellItem.cs
ShellTreeViewEx.cs
/Shell/ShellTreeViewEx.cs
/Shell/ShellTreeViewEx.cs
ShellViewEx.cs
/Shell/ShellViewEx.cs
/Shell/ShellViewEx.cs
PreviewControl.xaml.cs
/WpfDocumentPreviewer/PreviewControl.xaml.cs
/WpfDocumentPreviewer/PreviewControl.xaml.cs