├── .vs └── DesktopFileOrganizer │ ├── FileContentIndex │ ├── 2370e771-cfcb-4421-8e91-05d3f87d68a5.vsidx │ ├── 99f16a62-f064-4a0e-b8ef-05101dfbd768.vsidx │ ├── c8b828f8-fb8d-4a0d-bda3-e7cbae34812d.vsidx │ ├── d8e42943-170d-4c0b-9751-930d3c6c83ef.vsidx │ └── read.lock │ └── v17 │ └── .suo ├── DesktopFileOrganizer.sln ├── DesktopFileOrganizer ├── App.config ├── App.xaml ├── App.xaml.cs ├── DesktopFileOrganizer.csproj ├── ImgButton.cs ├── Models │ ├── FileFactory.cs │ ├── FileInfoModel.cs │ ├── FileManager.cs │ └── InitData.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── 123123.png │ ├── 132132.png │ ├── Fonts │ │ └── iconfont.ttf │ ├── Icons │ │ ├── Excel-Color.png │ │ ├── File_Folder.png │ │ ├── Powerpoint-Color.png │ │ ├── Word-Color.png │ │ ├── moon.png │ │ └── sun.png │ └── MornResDictionary.xaml ├── Themes │ └── Generic.xaml ├── ViewModel │ ├── MainViewModel.cs │ └── ViewModelLocator.cs ├── Views │ ├── Behaviors │ │ ├── BackgroundChangedBehavior.cs │ │ ├── TopmostBtnBehavior.cs │ │ ├── UpdateTimeBehavior.cs │ │ └── VisibilityChangedBehavior.cs │ ├── CustomControl │ │ └── Class1.cs │ ├── MainWindow.xaml │ └── MainWindow.xaml.cs ├── bin │ ├── Debug │ │ ├── CommonServiceLocator.dll │ │ ├── DesktopFileOrganizer.exe │ │ ├── DesktopFileOrganizer.exe.config │ │ ├── DesktopFileOrganizer.pdb │ │ ├── GalaSoft.MvvmLight.Extras.dll │ │ ├── GalaSoft.MvvmLight.Extras.pdb │ │ ├── GalaSoft.MvvmLight.Extras.xml │ │ ├── GalaSoft.MvvmLight.Platform.dll │ │ ├── GalaSoft.MvvmLight.Platform.pdb │ │ ├── GalaSoft.MvvmLight.Platform.xml │ │ ├── GalaSoft.MvvmLight.dll │ │ ├── GalaSoft.MvvmLight.pdb │ │ ├── GalaSoft.MvvmLight.xml │ │ ├── Microsoft.Xaml.Behaviors.dll │ │ ├── Microsoft.Xaml.Behaviors.pdb │ │ ├── Microsoft.Xaml.Behaviors.xml │ │ └── System.Windows.Interactivity.dll │ └── Release │ │ ├── CommonServiceLocator.dll │ │ ├── DesktopFileOrganizer.exe │ │ ├── DesktopFileOrganizer.exe.config │ │ ├── DesktopFileOrganizer.pdb │ │ ├── GalaSoft.MvvmLight.Extras.dll │ │ ├── GalaSoft.MvvmLight.Extras.pdb │ │ ├── GalaSoft.MvvmLight.Extras.xml │ │ ├── GalaSoft.MvvmLight.Platform.dll │ │ ├── GalaSoft.MvvmLight.Platform.pdb │ │ ├── GalaSoft.MvvmLight.Platform.xml │ │ ├── GalaSoft.MvvmLight.dll │ │ ├── GalaSoft.MvvmLight.pdb │ │ ├── GalaSoft.MvvmLight.xml │ │ ├── Microsoft.Xaml.Behaviors.dll │ │ ├── Microsoft.Xaml.Behaviors.pdb │ │ ├── Microsoft.Xaml.Behaviors.xml │ │ └── System.Windows.Interactivity.dll ├── obj │ ├── Debug │ │ ├── .NETFramework,Version=v4.7.2.AssemblyAttributes.cs │ │ ├── App.baml │ │ ├── App.g.cs │ │ ├── App.g.i.cs │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── DesktopFileOrganizer.Properties.Resources.resources │ │ ├── DesktopFileOrganizer.csproj.AssemblyReference.cache │ │ ├── DesktopFileOrganizer.csproj.CopyComplete │ │ ├── DesktopFileOrganizer.csproj.CoreCompileInputs.cache │ │ ├── DesktopFileOrganizer.csproj.FileListAbsolute.txt │ │ ├── DesktopFileOrganizer.csproj.GenerateResource.cache │ │ ├── DesktopFileOrganizer.csproj.ResolveComReference.cache │ │ ├── DesktopFileOrganizer.csproj.SuggestedBindingRedirects.cache │ │ ├── DesktopFileOrganizer.exe │ │ ├── DesktopFileOrganizer.g.resources │ │ ├── DesktopFileOrganizer.pdb │ │ ├── DesktopFileOrganizer_MarkupCompile.cache │ │ ├── DesktopFileOrganizer_MarkupCompile.i.cache │ │ ├── DesktopFileOrganizer_MarkupCompile.i.lref │ │ ├── DesktopFileOrganizer_MarkupCompile.lref │ │ ├── GeneratedInternalTypeHelper.g.cs │ │ ├── GeneratedInternalTypeHelper.g.i.cs │ │ ├── Interop.IWshRuntimeLibrary.dll │ │ ├── MainWindow.g.i.cs │ │ ├── Resources │ │ │ └── MornResDictionary.baml │ │ ├── TempPE │ │ │ └── Properties.Resources.Designer.cs.dll │ │ ├── Themes │ │ │ └── Generic.baml │ │ └── Views │ │ │ ├── CustomControl │ │ │ └── ResultItem.g.i.cs │ │ │ ├── MainWindow.baml │ │ │ ├── MainWindow.g.cs │ │ │ └── MainWindow.g.i.cs │ └── Release │ │ ├── .NETFramework,Version=v4.7.2.AssemblyAttributes.cs │ │ ├── App.baml │ │ ├── App.g.cs │ │ ├── App.g.i.cs │ │ ├── DesktopFileOrganizer.Properties.Resources.resources │ │ ├── DesktopFileOrganizer.csproj.AssemblyReference.cache │ │ ├── DesktopFileOrganizer.csproj.CopyComplete │ │ ├── DesktopFileOrganizer.csproj.CoreCompileInputs.cache │ │ ├── DesktopFileOrganizer.csproj.FileListAbsolute.txt │ │ ├── DesktopFileOrganizer.csproj.GenerateResource.cache │ │ ├── DesktopFileOrganizer.csproj.ResolveComReference.cache │ │ ├── DesktopFileOrganizer.csproj.SuggestedBindingRedirects.cache │ │ ├── DesktopFileOrganizer.exe │ │ ├── DesktopFileOrganizer.g.resources │ │ ├── DesktopFileOrganizer.pdb │ │ ├── DesktopFileOrganizer_MarkupCompile.cache │ │ ├── DesktopFileOrganizer_MarkupCompile.lref │ │ ├── GeneratedInternalTypeHelper.g.cs │ │ ├── GeneratedInternalTypeHelper.g.i.cs │ │ ├── Interop.IWshRuntimeLibrary.dll │ │ ├── Resources │ │ └── MornResDictionary.baml │ │ ├── TempPE │ │ └── Properties.Resources.Designer.cs.dll │ │ ├── Themes │ │ └── Generic.baml │ │ └── Views │ │ ├── MainWindow.baml │ │ ├── MainWindow.g.cs │ │ └── MainWindow.g.i.cs └── packages.config ├── README.md └── packages ├── CommonServiceLocator.2.0.2 ├── .signature.p7s ├── CommonServiceLocator.2.0.2.nupkg └── lib │ ├── net40 │ └── CommonServiceLocator.dll │ ├── net45 │ └── CommonServiceLocator.dll │ ├── net47 │ └── CommonServiceLocator.dll │ ├── netcoreapp1.0 │ └── CommonServiceLocator.dll │ ├── netstandard1.0 │ └── CommonServiceLocator.dll │ └── netstandard2.0 │ └── CommonServiceLocator.dll ├── Microsoft.Xaml.Behaviors.Wpf.1.1.39 ├── .signature.p7s ├── Microsoft.Xaml.Behaviors.Wpf.1.1.39.nupkg ├── lib │ ├── net45 │ │ ├── Design │ │ │ └── Microsoft.Xaml.Behaviors.Design.dll │ │ ├── Microsoft.Xaml.Behaviors.dll │ │ ├── Microsoft.Xaml.Behaviors.pdb │ │ └── Microsoft.Xaml.Behaviors.xml │ ├── net5.0-windows7.0 │ │ ├── Design │ │ │ └── Microsoft.Xaml.Behaviors.DesignTools.dll │ │ ├── Microsoft.Xaml.Behaviors.dll │ │ ├── Microsoft.Xaml.Behaviors.pdb │ │ └── Microsoft.Xaml.Behaviors.xml │ └── netcoreapp3.1 │ │ ├── Design │ │ └── Microsoft.Xaml.Behaviors.DesignTools.dll │ │ ├── Microsoft.Xaml.Behaviors.dll │ │ ├── Microsoft.Xaml.Behaviors.pdb │ │ └── Microsoft.Xaml.Behaviors.xml └── tools │ └── Install.ps1 ├── MvvmLight.5.4.1.1 ├── .signature.p7s ├── Content │ └── ViewModel │ │ ├── MainViewModel.cs.pp │ │ └── ViewModelLocator.cs.pp ├── MvvmLight.5.4.1.1.nupkg └── tools │ └── install.ps1 └── MvvmLightLibs.5.4.1.1 ├── .signature.p7s ├── MvvmLightLibs.5.4.1.1.nupkg └── lib ├── SL5 ├── GalaSoft.MvvmLight.Extras.dll ├── GalaSoft.MvvmLight.Extras.pdb ├── GalaSoft.MvvmLight.Extras.xml ├── GalaSoft.MvvmLight.dll ├── GalaSoft.MvvmLight.pdb ├── GalaSoft.MvvmLight.xml └── System.Windows.Interactivity.dll ├── monoandroid1 ├── GalaSoft.MvvmLight.Extras.XML ├── GalaSoft.MvvmLight.Extras.dll ├── GalaSoft.MvvmLight.Extras.pdb ├── GalaSoft.MvvmLight.Platform.XML ├── GalaSoft.MvvmLight.Platform.dll ├── GalaSoft.MvvmLight.Platform.pdb ├── GalaSoft.MvvmLight.XML ├── GalaSoft.MvvmLight.dll └── GalaSoft.MvvmLight.pdb ├── net35 ├── GalaSoft.MvvmLight.Extras.dll ├── GalaSoft.MvvmLight.Extras.pdb ├── GalaSoft.MvvmLight.Extras.xml ├── GalaSoft.MvvmLight.dll ├── GalaSoft.MvvmLight.pdb ├── GalaSoft.MvvmLight.xml ├── System.Windows.Interactivity.dll └── System.Windows.Interactivity.xml ├── net40 ├── GalaSoft.MvvmLight.Extras.dll ├── GalaSoft.MvvmLight.Extras.pdb ├── GalaSoft.MvvmLight.Extras.xml ├── GalaSoft.MvvmLight.dll ├── GalaSoft.MvvmLight.pdb ├── GalaSoft.MvvmLight.xml ├── System.Windows.Interactivity.dll └── System.Windows.Interactivity.xml ├── net45 ├── GalaSoft.MvvmLight.Extras.dll ├── GalaSoft.MvvmLight.Extras.pdb ├── GalaSoft.MvvmLight.Extras.xml ├── GalaSoft.MvvmLight.Platform.dll ├── GalaSoft.MvvmLight.Platform.pdb ├── GalaSoft.MvvmLight.Platform.xml ├── GalaSoft.MvvmLight.dll ├── GalaSoft.MvvmLight.pdb ├── GalaSoft.MvvmLight.xml └── System.Windows.Interactivity.dll ├── portable-net45+wp8+wpa81+netcore45+monoandroid1+xamarin.ios10 ├── GalaSoft.MvvmLight.Extras.XML ├── GalaSoft.MvvmLight.Extras.dll ├── GalaSoft.MvvmLight.Extras.pdb ├── GalaSoft.MvvmLight.XML ├── GalaSoft.MvvmLight.dll └── GalaSoft.MvvmLight.pdb ├── uap10.0 ├── GalaSoft.MvvmLight.Extras.dll ├── GalaSoft.MvvmLight.Extras.pdb ├── GalaSoft.MvvmLight.Extras.xml ├── GalaSoft.MvvmLight.Platform.dll ├── GalaSoft.MvvmLight.Platform.pdb ├── GalaSoft.MvvmLight.Platform.pri ├── GalaSoft.MvvmLight.Platform.xml ├── GalaSoft.MvvmLight.dll ├── GalaSoft.MvvmLight.pdb └── GalaSoft.MvvmLight.xml ├── windows81 ├── GalaSoft.MvvmLight.Extras.dll ├── GalaSoft.MvvmLight.Extras.pdb ├── GalaSoft.MvvmLight.Extras.xml ├── GalaSoft.MvvmLight.Platform.dll ├── GalaSoft.MvvmLight.Platform.pdb ├── GalaSoft.MvvmLight.Platform.pri ├── GalaSoft.MvvmLight.Platform.xml ├── GalaSoft.MvvmLight.dll ├── GalaSoft.MvvmLight.pdb └── GalaSoft.MvvmLight.xml ├── wp8 ├── GalaSoft.MvvmLight.Extras.dll ├── GalaSoft.MvvmLight.Extras.pdb ├── GalaSoft.MvvmLight.Extras.xml ├── GalaSoft.MvvmLight.Platform.dll ├── GalaSoft.MvvmLight.Platform.pdb ├── GalaSoft.MvvmLight.Platform.xml ├── GalaSoft.MvvmLight.dll ├── GalaSoft.MvvmLight.pdb ├── GalaSoft.MvvmLight.xml └── System.Windows.Interactivity.dll ├── wp81 ├── GalaSoft.MvvmLight.Extras.dll ├── GalaSoft.MvvmLight.Extras.pdb ├── GalaSoft.MvvmLight.Extras.xml ├── GalaSoft.MvvmLight.Platform.dll ├── GalaSoft.MvvmLight.Platform.pdb ├── GalaSoft.MvvmLight.Platform.xml ├── GalaSoft.MvvmLight.dll ├── GalaSoft.MvvmLight.pdb ├── GalaSoft.MvvmLight.xml └── System.Windows.Interactivity.dll ├── wpa81 ├── GalaSoft.MvvmLight.Extras.XML ├── GalaSoft.MvvmLight.Extras.dll ├── GalaSoft.MvvmLight.Extras.pdb ├── GalaSoft.MvvmLight.Platform.XML ├── GalaSoft.MvvmLight.Platform.dll ├── GalaSoft.MvvmLight.Platform.pdb ├── GalaSoft.MvvmLight.Platform.pri ├── GalaSoft.MvvmLight.XML ├── GalaSoft.MvvmLight.dll └── GalaSoft.MvvmLight.pdb └── xamarin.ios10 ├── GalaSoft.MvvmLight.Extras.XML ├── GalaSoft.MvvmLight.Extras.dll ├── GalaSoft.MvvmLight.Extras.pdb ├── GalaSoft.MvvmLight.Platform.XML ├── GalaSoft.MvvmLight.Platform.dll ├── GalaSoft.MvvmLight.XML ├── GalaSoft.MvvmLight.dll └── GalaSoft.MvvmLight.pdb /.vs/DesktopFileOrganizer/FileContentIndex/2370e771-cfcb-4421-8e91-05d3f87d68a5.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/.vs/DesktopFileOrganizer/FileContentIndex/2370e771-cfcb-4421-8e91-05d3f87d68a5.vsidx -------------------------------------------------------------------------------- /.vs/DesktopFileOrganizer/FileContentIndex/99f16a62-f064-4a0e-b8ef-05101dfbd768.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/.vs/DesktopFileOrganizer/FileContentIndex/99f16a62-f064-4a0e-b8ef-05101dfbd768.vsidx -------------------------------------------------------------------------------- /.vs/DesktopFileOrganizer/FileContentIndex/c8b828f8-fb8d-4a0d-bda3-e7cbae34812d.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/.vs/DesktopFileOrganizer/FileContentIndex/c8b828f8-fb8d-4a0d-bda3-e7cbae34812d.vsidx -------------------------------------------------------------------------------- /.vs/DesktopFileOrganizer/FileContentIndex/d8e42943-170d-4c0b-9751-930d3c6c83ef.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/.vs/DesktopFileOrganizer/FileContentIndex/d8e42943-170d-4c0b-9751-930d3c6c83ef.vsidx -------------------------------------------------------------------------------- /.vs/DesktopFileOrganizer/FileContentIndex/read.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/.vs/DesktopFileOrganizer/FileContentIndex/read.lock -------------------------------------------------------------------------------- /.vs/DesktopFileOrganizer/v17/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/.vs/DesktopFileOrganizer/v17/.suo -------------------------------------------------------------------------------- /DesktopFileOrganizer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.4.33213.308 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DesktopFileOrganizer", "DesktopFileOrganizer\DesktopFileOrganizer.csproj", "{34C4BFE1-81FC-4943-A3CF-FE891745BA39}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {34C4BFE1-81FC-4943-A3CF-FE891745BA39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {34C4BFE1-81FC-4943-A3CF-FE891745BA39}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {34C4BFE1-81FC-4943-A3CF-FE891745BA39}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {34C4BFE1-81FC-4943-A3CF-FE891745BA39}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {4058D0ED-8F0D-4145-A363-64922AD79174} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/App.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace DesktopFileOrganizer 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/DesktopFileOrganizer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {34C4BFE1-81FC-4943-A3CF-FE891745BA39} 8 | WinExe 9 | DesktopFileOrganizer 10 | DesktopFileOrganizer 11 | v4.7.2 12 | 512 13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 4 15 | true 16 | true 17 | 18 | 19 | AnyCPU 20 | true 21 | full 22 | false 23 | bin\Debug\ 24 | DEBUG;TRACE 25 | prompt 26 | 4 27 | 28 | 29 | AnyCPU 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | 37 | 38 | 39 | ..\packages\CommonServiceLocator.2.0.2\lib\net47\CommonServiceLocator.dll 40 | 41 | 42 | ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll 43 | 44 | 45 | ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll 46 | 47 | 48 | ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll 49 | 50 | 51 | ..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.39\lib\net45\Microsoft.Xaml.Behaviors.dll 52 | 53 | 54 | 55 | 56 | 57 | ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 4.0 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | MSBuild:Compile 75 | Designer 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | MSBuild:Compile 86 | Designer 87 | 88 | 89 | MSBuild:Compile 90 | Designer 91 | 92 | 93 | App.xaml 94 | Code 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | MainWindow.xaml 103 | Code 104 | 105 | 106 | Designer 107 | MSBuild:Compile 108 | 109 | 110 | 111 | 112 | Code 113 | 114 | 115 | True 116 | True 117 | Resources.resx 118 | 119 | 120 | True 121 | Settings.settings 122 | True 123 | 124 | 125 | ResXFileCodeGenerator 126 | Resources.Designer.cs 127 | 128 | 129 | 130 | SettingsSingleFileGenerator 131 | Settings.Designer.cs 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | {F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} 141 | 1 142 | 0 143 | 0 144 | tlbimp 145 | False 146 | True 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/ImgButton.cs: -------------------------------------------------------------------------------- 1 | using DesktopFileOrganizer.Views.Behaviors; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Data; 10 | using System.Windows.Documents; 11 | using System.Windows.Input; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | using System.Windows.Navigation; 15 | using System.Windows.Shapes; 16 | 17 | namespace DesktopFileOrganizer 18 | { 19 | /// 20 | /// 按照步骤 1a 或 1b 操作,然后执行步骤 2 以在 XAML 文件中使用此自定义控件。 21 | /// 22 | /// 步骤 1a) 在当前项目中存在的 XAML 文件中使用该自定义控件。 23 | /// 将此 XmlNamespace 特性添加到要使用该特性的标记文件的根 24 | /// 元素中: 25 | /// 26 | /// xmlns:MyNamespace="clr-namespace:DesktopFileOrganizer" 27 | /// 28 | /// 29 | /// 步骤 1b) 在其他项目中存在的 XAML 文件中使用该自定义控件。 30 | /// 将此 XmlNamespace 特性添加到要使用该特性的标记文件的根 31 | /// 元素中: 32 | /// 33 | /// xmlns:MyNamespace="clr-namespace:DesktopFileOrganizer;assembly=DesktopFileOrganizer" 34 | /// 35 | /// 您还需要添加一个从 XAML 文件所在的项目到此项目的项目引用, 36 | /// 并重新生成以避免编译错误: 37 | /// 38 | /// 在解决方案资源管理器中右击目标项目,然后依次单击 39 | /// “添加引用”->“项目”->[浏览查找并选择此项目] 40 | /// 41 | /// 42 | /// 步骤 2) 43 | /// 继续操作并在 XAML 文件中使用控件。 44 | /// 45 | /// 46 | /// 47 | /// 48 | public class ImgButton : Control 49 | { 50 | public SolidColorBrush BackgroundColor 51 | { 52 | get { return (SolidColorBrush)GetValue(BackgroundColorProperty); } 53 | set { SetValue(BackgroundColorProperty, value); } 54 | } 55 | 56 | // Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc... 57 | public static readonly DependencyProperty BackgroundColorProperty = 58 | DependencyProperty.Register("BackgroundColor", typeof(SolidColorBrush), typeof(ImgButton), new PropertyMetadata(default)); 59 | 60 | 61 | 62 | public ImageSource Source 63 | { 64 | get { return (ImageSource)GetValue(SourceProperty); } 65 | set { SetValue(SourceProperty, value); } 66 | } 67 | 68 | // Using a DependencyProperty as the backing store for ImgSource. This enables animation, styling, binding, etc... 69 | public static readonly DependencyProperty SourceProperty = 70 | DependencyProperty.Register("Source", typeof(ImageSource), typeof(ImgButton), new PropertyMetadata(default)); 71 | 72 | 73 | 74 | public ICommand Command 75 | { 76 | get { return (ICommand)GetValue(CommandProperty); } 77 | set { SetValue(CommandProperty, value); } 78 | } 79 | 80 | // Using a DependencyProperty as the backing store for Command. This enables animation, styling, binding, etc... 81 | public static readonly DependencyProperty CommandProperty = 82 | DependencyProperty.Register("Command", typeof(ICommand), typeof(ImgButton), new PropertyMetadata(default)); 83 | 84 | 85 | static ImgButton() 86 | { 87 | DefaultStyleKeyProperty.OverrideMetadata(typeof(ImgButton), new FrameworkPropertyMetadata(typeof(ImgButton))); 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/Models/FileFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.Linq; 5 | using System.Runtime.ConstrainedExecution; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace DesktopFileOrganizer.Models 10 | { 11 | internal class FileFactory 12 | { 13 | public static FileManager CreatCar(string fileType) 14 | { 15 | FileManager manager; 16 | switch (fileType) 17 | { 18 | case "Word": 19 | manager = new Word(); 20 | break; 21 | case "Excel": 22 | manager = new Excel(); 23 | break; 24 | case "PPT": 25 | manager = new PPT(); 26 | break; 27 | case "LNK": 28 | manager = new Lnk(); 29 | break; 30 | default: 31 | manager = new All(); 32 | break; 33 | } 34 | return manager; 35 | } 36 | } 37 | 38 | class Word : FileManager 39 | { 40 | public override List Get() 41 | { 42 | 43 | return GetFiles(InitData.GetInstance().GetSuffixList("Word")) ; 44 | } 45 | } 46 | 47 | class PPT : FileManager 48 | { 49 | public override List Get() 50 | { 51 | return GetFiles(InitData.GetInstance().GetSuffixList("PPT")); 52 | } 53 | } 54 | 55 | class Excel : FileManager 56 | { 57 | public override List Get() 58 | { 59 | return GetFiles(InitData.GetInstance().GetSuffixList("Excel")); 60 | } 61 | } 62 | 63 | class Lnk : FileManager 64 | { 65 | public override List Get() 66 | { 67 | return GetFiles(new string[] {".lnk"}); 68 | } 69 | } 70 | 71 | class All : FileManager 72 | { 73 | public override List Get() 74 | { 75 | return GetFiles(InitData.GetInstance().GetSuffixList("All"),true); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/Models/FileInfoModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Media; 7 | 8 | namespace DesktopFileOrganizer.Models 9 | { 10 | public class FileInfoModel 11 | { 12 | private string fileName; 13 | /// 14 | /// 程序名称 15 | /// 16 | public string FileName 17 | { 18 | get { return fileName; } 19 | set { fileName = value; } 20 | } 21 | 22 | private ImageSource iconSource; 23 | 24 | public ImageSource IconSource 25 | { 26 | get { return iconSource; } 27 | set { iconSource = value; } 28 | } 29 | 30 | private string pathsInfo; 31 | /// 32 | /// 文件路径 33 | /// 34 | public string PathInfo 35 | { 36 | get { return pathsInfo; } 37 | set { pathsInfo = value; } 38 | } 39 | 40 | private int useCount; 41 | /// 42 | /// 使用次数 43 | /// 44 | public int UseCount 45 | { 46 | get { return useCount; } 47 | set { useCount = value; } 48 | } 49 | 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/Models/FileManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Media.Imaging; 8 | using System.Windows.Media; 9 | using System.Windows; 10 | using System.Drawing; 11 | using IWshRuntimeLibrary; 12 | using System.Collections.ObjectModel; 13 | 14 | namespace DesktopFileOrganizer.Models 15 | { 16 | internal abstract class FileManager 17 | { 18 | public abstract List Get(); 19 | //文件夹下所有文件 20 | List foldList = new List(); 21 | //按后缀名筛选过后的文件 22 | List resultList = new List(); 23 | public List GetFiles(string[] typeArray, bool isAll = false) 24 | { 25 | string filePath = @"E:\MyProgram\Applications"; 26 | foldList = SearchFile(filePath); 27 | if (!isAll) 28 | { 29 | resultList.Clear(); 30 | foreach (var type in typeArray) 31 | { 32 | foreach (var file in foldList.Where(t => t.PathInfo.Contains(type))) 33 | { 34 | resultList.Add(file); 35 | } 36 | } 37 | foldList = resultList; 38 | } 39 | return foldList; 40 | } 41 | /// 42 | /// 搜索指定文件夹中的所有文件 43 | /// 44 | /// 45 | /// 46 | private List SearchFile(string filePath) 47 | { 48 | List filesPathList = new List(); 49 | DirectoryInfo folder = new DirectoryInfo(filePath); 50 | foreach (var file in folder.GetFileSystemInfos()) 51 | { 52 | if (file.FullName.Contains(".")) 53 | filesPathList.Add(new FileInfoModel 54 | { 55 | FileName = file.Name, 56 | PathInfo = file.FullName, 57 | UseCount = 0, 58 | IconSource = file.FullName.EndsWith(".lnk") ? GetIcon(file.FullName) : default 59 | }) ; 60 | else 61 | foreach(var file2 in SearchFile(file.FullName)) 62 | filesPathList.Add(new FileInfoModel 63 | { 64 | FileName = file2.FileName, 65 | PathInfo = file2.PathInfo, 66 | UseCount = 0, 67 | IconSource = file2.IconSource 68 | }); 69 | } 70 | return filesPathList; 71 | } 72 | /// 73 | /// 获取快捷方式图标 74 | /// 75 | /// 76 | /// 77 | private ImageSource GetIcon(string filePath) 78 | { 79 | if (filePath.EndsWith(".lnk")) 80 | { 81 | WshShell shell = new WshShell(); 82 | IWshShortcut appShortcut = (IWshShortcut)shell.CreateShortcut(filePath); 83 | filePath = appShortcut.TargetPath; 84 | } 85 | if (System.IO.File.Exists(filePath)) 86 | { 87 | Icon icon = Icon.ExtractAssociatedIcon(filePath); 88 | return System.Windows.Interop.Imaging.CreateBitmapSourceFromHIcon(icon.Handle, new Int32Rect(0, 0, icon.Width, icon.Height), BitmapSizeOptions.FromEmptyOptions()); 89 | } 90 | else if (System.IO.File.Exists(filePath.Replace(" (x86)", ""))) 91 | { 92 | Icon icon = Icon.ExtractAssociatedIcon(filePath.Replace(" (x86)", "")); 93 | return System.Windows.Interop.Imaging.CreateBitmapSourceFromHIcon(icon.Handle, new Int32Rect(0, 0, icon.Width, icon.Height), BitmapSizeOptions.FromEmptyOptions()); 94 | } 95 | else 96 | { 97 | return null; 98 | } 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/Models/InitData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace DesktopFileOrganizer.Models 8 | { 9 | internal class InitData 10 | { 11 | private static InitData _InitData = new InitData(); 12 | public InitData() 13 | { 14 | 15 | InitSuffixList(); 16 | InitTodoData(); 17 | } 18 | public static InitData GetInstance() 19 | { 20 | return _InitData; 21 | } 22 | public string GetTodo() 23 | { 24 | string content = ""; 25 | var data = list.Where(t => t.time < DateTime.Now && t.isRemind == false).ToList(); 26 | if (data.Count>0) 27 | { 28 | content = data.First().job; 29 | int id = data.First().Id; 30 | list.Where(t => t.Id==id).ToList().ForEach(t => t.isRemind = true); 31 | } 32 | return content; 33 | } 34 | public string[] GetSuffixList(string key) => suffixList[key]; 35 | 36 | Dictionary suffixList; 37 | private void InitSuffixList() 38 | { 39 | suffixList = new Dictionary 40 | { 41 | {"Excel",new string[] { ".xlsx", ".xls" }}, 42 | {"PPT",new string[] { ".ppt", ".pptx" }}, 43 | {"Word",new string[] { ".doc", ".docx" } }, 44 | {"All",new string[] { "null" } } 45 | }; 46 | } 47 | 48 | struct ToDolnfo 49 | { 50 | public int Id; 51 | public string job; 52 | public DateTime time; 53 | public bool isRemind; 54 | } 55 | List list; 56 | private void InitTodoData() 57 | { 58 | list = new List(); 59 | list.Add(new ToDolnfo() { Id = 1, isRemind = false, time = DateTime.Now.Date.AddHours(8), job = "待办事项1" }); 60 | list.Add(new ToDolnfo() { Id = 2, isRemind = false, time = DateTime.Now.Date.AddHours(8), job = "待办事项2" }); 61 | list.Add(new ToDolnfo() { Id = 3, isRemind = false, time = DateTime.Now.Date.AddHours(9), job = "待办事项3" }); 62 | list.Add(new ToDolnfo() { Id = 4, isRemind = false, time = DateTime.Now.Date.AddHours(20), job = "待办事项4" }); 63 | list.Add(new ToDolnfo() { Id = 5, isRemind = false, time = DateTime.Now.Date.AddHours(21), job = "待办事项5" }); 64 | list.Add(new ToDolnfo() { Id = 6, isRemind = false, time = DateTime.Now.Date.AddHours(22), job = "待办事项6" }); 65 | list.Add(new ToDolnfo() { Id = 7, isRemind = false, time = DateTime.Now.Date.AddHours(23), job = "待办事项7" }); 66 | list.Add(new ToDolnfo() { Id = 8, isRemind = false, time = DateTime.Now.Date.AddHours(24), job = "待办事项8" }); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // 有关程序集的一般信息由以下 8 | // 控制。更改这些特性值可修改 9 | // 与程序集关联的信息。 10 | [assembly: AssemblyTitle("DesktopFileOrganizer")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("DesktopFileOrganizer")] 15 | [assembly: AssemblyCopyright("Copyright © 2023")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // 将 ComVisible 设置为 false 会使此程序集中的类型 20 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 21 | //请将此类型的 ComVisible 特性设置为 true。 22 | [assembly: ComVisible(false)] 23 | 24 | //若要开始生成可本地化的应用程序,请设置 25 | //.csproj 文件中的 CultureYouAreCodingWith 26 | //例如,如果您在源文件中使用的是美国英语, 27 | //使用的是美国英语,请将 设置为 en-US。 然后取消 28 | //对以下 NeutralResourceLanguage 特性的注释。 更新 29 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置 36 | //(未在页面中找到资源时使用, 37 | //或应用程序资源字典中找到时使用) 38 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 39 | //(未在页面中找到资源时使用, 40 | //、应用程序或任何主题专用资源字典中找到时使用) 41 | )] 42 | 43 | 44 | // 程序集的版本信息由下列四个值组成: 45 | // 46 | // 主版本 47 | // 次版本 48 | // 生成号 49 | // 修订号 50 | // 51 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 52 | //通过使用 "*",如下所示: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本: 4.0.30319.42000 5 | // 6 | // 对此文件的更改可能导致不正确的行为,如果 7 | // 重新生成代码,则所做更改将丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DesktopFileOrganizer.Properties 12 | { 13 | 14 | 15 | /// 16 | /// 强类型资源类,用于查找本地化字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// 返回此类使用的缓存 ResourceManager 实例。 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DesktopFileOrganizer.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// 重写当前线程的 CurrentUICulture 属性,对 56 | /// 使用此强类型资源类的所有资源查找执行重写。 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DesktopFileOrganizer.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/Resources/123123.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/DesktopFileOrganizer/Resources/123123.png -------------------------------------------------------------------------------- /DesktopFileOrganizer/Resources/132132.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/DesktopFileOrganizer/Resources/132132.png -------------------------------------------------------------------------------- /DesktopFileOrganizer/Resources/Fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/DesktopFileOrganizer/Resources/Fonts/iconfont.ttf -------------------------------------------------------------------------------- /DesktopFileOrganizer/Resources/Icons/Excel-Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/DesktopFileOrganizer/Resources/Icons/Excel-Color.png -------------------------------------------------------------------------------- /DesktopFileOrganizer/Resources/Icons/File_Folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/DesktopFileOrganizer/Resources/Icons/File_Folder.png -------------------------------------------------------------------------------- /DesktopFileOrganizer/Resources/Icons/Powerpoint-Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/DesktopFileOrganizer/Resources/Icons/Powerpoint-Color.png -------------------------------------------------------------------------------- /DesktopFileOrganizer/Resources/Icons/Word-Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/DesktopFileOrganizer/Resources/Icons/Word-Color.png -------------------------------------------------------------------------------- /DesktopFileOrganizer/Resources/Icons/moon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/DesktopFileOrganizer/Resources/Icons/moon.png -------------------------------------------------------------------------------- /DesktopFileOrganizer/Resources/Icons/sun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/DesktopFileOrganizer/Resources/Icons/sun.png -------------------------------------------------------------------------------- /DesktopFileOrganizer/Resources/MornResDictionary.xaml: -------------------------------------------------------------------------------- 1 |  3 | 7 | 8 | 9 | 18 | 19 | 34 | 35 | 62 | 63 | 78 | 93 | 110 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 144 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/Themes/Generic.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 20 | 21 | -------------------------------------------------------------------------------- /DesktopFileOrganizer/ViewModel/MainViewModel.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu030/DesktopFileOrganizer-WPF/ce83a47e0a4e4dc734621dc2bc2bd177481437b3/DesktopFileOrganizer/ViewModel/MainViewModel.cs -------------------------------------------------------------------------------- /DesktopFileOrganizer/ViewModel/ViewModelLocator.cs: -------------------------------------------------------------------------------- 1 | /* 2 | In App.xaml: 3 | 4 | 6 | 7 | 8 | In the View: 9 | DataContext="{Binding Source={StaticResource Locator}, Path=ViewModelName}" 10 | 11 | You can also use Blend to do all this with the tool's support. 12 | See http://www.galasoft.ch/mvvm 13 | */ 14 | 15 | using GalaSoft.MvvmLight; 16 | using GalaSoft.MvvmLight.Ioc; 17 | using CommonServiceLocator; 18 | 19 | namespace DesktopFileOrganizer.ViewModel 20 | { 21 | /// 22 | /// This class contains static references to all the view models in the 23 | /// application and provides an entry point for the bindings. 24 | /// 25 | public class ViewModelLocator 26 | { 27 | /// 28 | /// Initializes a new instance of the ViewModelLocator class. 29 | /// 30 | public ViewModelLocator() 31 | { 32 | ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); 33 | 34 | ////if (ViewModelBase.IsInDesignModeStatic) 35 | ////{ 36 | //// // Create design time view services and models 37 | //// SimpleIoc.Default.Register(); 38 | ////} 39 | ////else 40 | ////{ 41 | //// // Create run time view services and models 42 | //// SimpleIoc.Default.Register(); 43 | ////} 44 | 45 | SimpleIoc.Default.Register(); 46 | } 47 | 48 | public MainViewModel Main 49 | { 50 | get 51 | { 52 | return ServiceLocator.Current.GetInstance(); 53 | } 54 | } 55 | 56 | public static void Cleanup() 57 | { 58 | // TODO Clear the ViewModels 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /DesktopFileOrganizer/Views/Behaviors/BackgroundChangedBehavior.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Xaml.Behaviors; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Reflection; 6 | using System.Text; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | using System.Windows; 10 | using System.Windows.Controls; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Threading; 14 | 15 | namespace DesktopFileOrganizer.Views.Behaviors 16 | { 17 | internal class BackgroundChangedBehavior:Behavior