diff --git a/mdfinder.installer/Product.wxs b/mdfinder.installer/Product.wxs new file mode 100644 index 0000000..0fd5374 --- /dev/null +++ b/mdfinder.installer/Product.wxs @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mdfinder.installer/mdfinder.installer.wixproj b/mdfinder.installer/mdfinder.installer.wixproj new file mode 100644 index 0000000..f2c1d58 --- /dev/null +++ b/mdfinder.installer/mdfinder.installer.wixproj @@ -0,0 +1,55 @@ + + + + Debug + x86 + 3.10 + a8185834-0eea-4255-86df-fea9dfdf9752 + 2.0 + mdfinder.installer + Package + + + bin\$(Configuration)\ + obj\$(Configuration)\ + Debug + + + bin\$(Configuration)\ + obj\$(Configuration)\ + + + + + + + mdfinder.hashprovider + {f383e2d1-f62e-44cf-9e58-63542dcbd06e} + True + True + Binaries;Content;Satellites + INSTALLFOLDER + + + mdfinder + {e0f831fa-fce1-471e-8767-d3fd7edc7ccf} + True + True + Binaries;Content;Satellites + INSTALLFOLDER + + + + + + + + + \ No newline at end of file diff --git a/mdfinder.sln b/mdfinder.sln index 7416fc6..fc1cb42 100644 --- a/mdfinder.sln +++ b/mdfinder.sln @@ -7,20 +7,38 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mdfinder", "mdfinder\mdfind EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mdfinder.hashprovider", "mdfinder.hashprovider\mdfinder.hashprovider.csproj", "{F383E2D1-F62E-44CF-9E58-63542DCBD06E}" EndProject +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "mdfinder.installer", "mdfinder.installer\mdfinder.installer.wixproj", "{A8185834-0EEA-4255-86DF-FEA9DFDF9752}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E0F831FA-FCE1-471E-8767-D3FD7EDC7CCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E0F831FA-FCE1-471E-8767-D3FD7EDC7CCF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0F831FA-FCE1-471E-8767-D3FD7EDC7CCF}.Debug|x86.ActiveCfg = Debug|Any CPU + {E0F831FA-FCE1-471E-8767-D3FD7EDC7CCF}.Debug|x86.Build.0 = Debug|Any CPU {E0F831FA-FCE1-471E-8767-D3FD7EDC7CCF}.Release|Any CPU.ActiveCfg = Release|Any CPU {E0F831FA-FCE1-471E-8767-D3FD7EDC7CCF}.Release|Any CPU.Build.0 = Release|Any CPU + {E0F831FA-FCE1-471E-8767-D3FD7EDC7CCF}.Release|x86.ActiveCfg = Release|Any CPU + {E0F831FA-FCE1-471E-8767-D3FD7EDC7CCF}.Release|x86.Build.0 = Release|Any CPU {F383E2D1-F62E-44CF-9E58-63542DCBD06E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F383E2D1-F62E-44CF-9E58-63542DCBD06E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F383E2D1-F62E-44CF-9E58-63542DCBD06E}.Debug|x86.ActiveCfg = Debug|Any CPU + {F383E2D1-F62E-44CF-9E58-63542DCBD06E}.Debug|x86.Build.0 = Debug|Any CPU {F383E2D1-F62E-44CF-9E58-63542DCBD06E}.Release|Any CPU.ActiveCfg = Release|Any CPU {F383E2D1-F62E-44CF-9E58-63542DCBD06E}.Release|Any CPU.Build.0 = Release|Any CPU + {F383E2D1-F62E-44CF-9E58-63542DCBD06E}.Release|x86.ActiveCfg = Release|Any CPU + {F383E2D1-F62E-44CF-9E58-63542DCBD06E}.Release|x86.Build.0 = Release|Any CPU + {A8185834-0EEA-4255-86DF-FEA9DFDF9752}.Debug|Any CPU.ActiveCfg = Debug|x86 + {A8185834-0EEA-4255-86DF-FEA9DFDF9752}.Debug|x86.ActiveCfg = Debug|x86 + {A8185834-0EEA-4255-86DF-FEA9DFDF9752}.Debug|x86.Build.0 = Debug|x86 + {A8185834-0EEA-4255-86DF-FEA9DFDF9752}.Release|Any CPU.ActiveCfg = Release|x86 + {A8185834-0EEA-4255-86DF-FEA9DFDF9752}.Release|x86.ActiveCfg = Release|x86 + {A8185834-0EEA-4255-86DF-FEA9DFDF9752}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/mdfinder/DBHelper.cs b/mdfinder/DBHelper.cs index 65027c1..d288766 100644 --- a/mdfinder/DBHelper.cs +++ b/mdfinder/DBHelper.cs @@ -1,11 +1,7 @@ using LiteDB; using System; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace mdfinder { @@ -35,6 +31,16 @@ namespace mdfinder } } + /// Gets the database statistics string. + /// The database statistics. + public string DbStatistics + { + get + { + return string.Format("{0} Files In Database.", this.FileRecordCollection.Count()); + } + } + #endregion Properties #region Constructors @@ -42,7 +48,7 @@ namespace mdfinder /// Default constructor. public DBHelper() { - this.Database = new LiteDatabase(DEFAULT_DB_FILE_NAME); + this.Database = new LiteDatabase(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), DEFAULT_DB_FILE_NAME)); } /// Constructor. @@ -65,6 +71,8 @@ namespace mdfinder { var fileRecord = new FileRecord(path, size, hash, hashProvider); this.FileRecordCollection.Upsert(fileRecord); + + this.OnPropertyChanged("DbStatistics"); } /// Removes the file record described by its path. @@ -72,6 +80,8 @@ namespace mdfinder public void RemoveFileRecord(string id) { this.FileRecordCollection.Delete(fr => fr.Id == id); + + this.OnPropertyChanged("DbStatistics"); } /// Gets the file records in this collection. @@ -97,6 +107,8 @@ namespace mdfinder public void Clear() { this.FileRecordCollection.Delete(Query.All()); + + this.OnPropertyChanged("DbStatistics"); } #endregion Methods diff --git a/mdfinder/Icon/icon.ico b/mdfinder/Icon/icon.ico index e353060..9b7e36e 100644 Binary files a/mdfinder/Icon/icon.ico and b/mdfinder/Icon/icon.ico differ diff --git a/mdfinder/Icon/icon.png b/mdfinder/Icon/icon.png index 31c8543..a2b0459 100644 Binary files a/mdfinder/Icon/icon.png and b/mdfinder/Icon/icon.png differ diff --git a/mdfinder/Icon/icon.svg b/mdfinder/Icon/icon.svg index 92a7db7..3e887d3 100644 --- a/mdfinder/Icon/icon.svg +++ b/mdfinder/Icon/icon.svg @@ -1,6 +1,4 @@ - - + id="SVGRoot"> + id="defs833" /> + inkscape:window-y="357" + inkscape:window-x="1072" + inkscape:window-height="1417" + inkscape:window-width="3440" + showgrid="true" + inkscape:document-rotation="0" + inkscape:current-layer="layer1" + inkscape:document-units="px" + inkscape:cy="89.76195" + inkscape:cx="48.534596" + inkscape:zoom="5.6568542" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + borderopacity="1.0" + bordercolor="#666666" + pagecolor="#ffffff" + id="base"> + + + id="metadata836"> @@ -51,102 +53,107 @@ + inkscape:label="Layer 1"> - - - - - - - - + transform="translate(0.22489393,-25.677048)" + id="g1585"> + + + + + + + + + + + + + + + + + + - - - - - - - - - diff --git a/mdfinder/Icons.xaml b/mdfinder/Icons.xaml index 96877c5..a2bc7e1 100644 --- a/mdfinder/Icons.xaml +++ b/mdfinder/Icons.xaml @@ -1,51 +1,75 @@  + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - @@ -53,10 +77,10 @@ - + - + @@ -66,7 +90,7 @@ - + @@ -75,7 +99,7 @@ - + @@ -84,7 +108,7 @@ - + @@ -93,7 +117,7 @@ - + @@ -102,7 +126,7 @@ - + @@ -111,7 +135,7 @@ - + @@ -120,7 +144,7 @@ - + @@ -129,7 +153,7 @@ - + @@ -138,7 +162,7 @@ - + @@ -147,7 +171,7 @@ - + @@ -156,7 +180,7 @@ - + @@ -165,7 +189,7 @@ - + @@ -174,7 +198,7 @@ - + @@ -183,7 +207,7 @@ - + @@ -192,7 +216,7 @@ - + @@ -201,7 +225,7 @@ - + @@ -210,7 +234,7 @@ - + diff --git a/mdfinder/Localization/Localization.Designer.cs b/mdfinder/Localization/Localization.Designer.cs index 796ebce..7a0c324 100644 --- a/mdfinder/Localization/Localization.Designer.cs +++ b/mdfinder/Localization/Localization.Designer.cs @@ -132,6 +132,15 @@ namespace mdfinder.Localization { } } + /// + /// Looks up a localized string similar to Keep the largest item from each duplicate file group. + /// + public static string ActionLargestTooltip { + get { + return ResourceManager.GetString("ActionLargestTooltip", resourceCulture); + } + } + /// /// Looks up a localized string similar to KeepSelected. /// @@ -141,6 +150,15 @@ namespace mdfinder.Localization { } } + /// + /// Looks up a localized string similar to Keep the selected items from each duplicate file group. + /// + public static string ActionSelectedTooltip { + get { + return ResourceManager.GetString("ActionSelectedTooltip", resourceCulture); + } + } + /// /// Looks up a localized string similar to Keep Smallest. /// @@ -150,6 +168,15 @@ namespace mdfinder.Localization { } } + /// + /// Looks up a localized string similar to Keep the smallest item from each duplicate file group. + /// + public static string ActionSmallestTooltip { + get { + return ResourceManager.GetString("ActionSmallestTooltip", resourceCulture); + } + } + /// /// Looks up a localized string similar to Archive Folder. /// @@ -204,6 +231,15 @@ namespace mdfinder.Localization { } } + /// + /// Looks up a localized string similar to Clear the file database completely. + /// + public static string ClearTooltip { + get { + return ResourceManager.GetString("ClearTooltip", resourceCulture); + } + } + /// /// Looks up a localized string similar to Keep File. /// @@ -384,6 +420,15 @@ namespace mdfinder.Localization { } } + /// + /// Looks up a localized string similar to Mark this set of files as unique. + /// + public static string NotDuplicateTooltip { + get { + return ResourceManager.GetString("NotDuplicateTooltip", resourceCulture); + } + } + /// /// Looks up a localized string similar to OK. /// @@ -493,7 +538,7 @@ namespace mdfinder.Localization { } /// - /// Looks up a localized string similar to Scan Location. + /// Looks up a localized string similar to Scanning Actions. /// public static string ScanningLabel { get { diff --git a/mdfinder/Localization/Localization.resx b/mdfinder/Localization/Localization.resx index 6627836..1b73d6f 100644 --- a/mdfinder/Localization/Localization.resx +++ b/mdfinder/Localization/Localization.resx @@ -244,7 +244,7 @@ Location to Scan - Scan Location + Scanning Actions Scan the selected path @@ -285,4 +285,19 @@ Not A Duplicate + + Keep the largest item from each duplicate file group + + + Keep the selected items from each duplicate file group + + + Keep the smallest item from each duplicate file group + + + Clear the file database completely + + + Mark this set of files as unique + \ No newline at end of file diff --git a/mdfinder/MainWindow.xaml b/mdfinder/MainWindow.xaml index efe7618..63dd5d7 100644 --- a/mdfinder/MainWindow.xaml +++ b/mdfinder/MainWindow.xaml @@ -1,13 +1,14 @@  + Title="{x:Static loc:Localization.Title}" Height="520.293" Width="1055.509" + Icon="./Icon/icon.ico"> @@ -15,6 +16,9 @@ + + + @@ -66,6 +70,8 @@ + + @@ -78,35 +84,37 @@ - - -