├── LICENSE ├── MyFileManager ├── MyFileManager.sln └── MyFileManager │ ├── AboutForm.Designer.cs │ ├── AboutForm.cs │ ├── AboutForm.resx │ ├── AttributeForm.Designer.cs │ ├── AttributeForm.cs │ ├── AttributeForm.resx │ ├── FileAndFolderMonitorForm.Designer.cs │ ├── FileAndFolderMonitorForm.cs │ ├── FileAndFolderMonitorForm.resx │ ├── GetSystemIcon.cs │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── MyFileManager.csproj │ ├── NewFileForm.Designer.cs │ ├── NewFileForm.cs │ ├── NewFileForm.resx │ ├── PrivilegeForm.Designer.cs │ ├── PrivilegeForm.cs │ ├── PrivilegeForm.resx │ ├── ProcessForm.Designer.cs │ ├── ProcessForm.cs │ ├── ProcessForm.resx │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ ├── Settings.settings │ └── app.manifest │ ├── RecentFilesUtil.cs │ ├── ThreadForm.Designer.cs │ ├── ThreadForm.cs │ ├── ThreadForm.resx │ ├── bin │ ├── Debug │ │ ├── MyFileManager.exe │ │ └── MyFileManager.pdb │ └── Release │ │ ├── MyFileManager.exe │ │ └── MyFileManager.pdb │ └── obj │ ├── Debug │ ├── DesignTimeResolveAssemblyReferences.cache │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── MyFileManager.AboutForm.resources │ ├── MyFileManager.AttributeForm.resources │ ├── MyFileManager.FileAndFolderMonitorForm.resources │ ├── MyFileManager.MainForm.resources │ ├── MyFileManager.NewFileForm.resources │ ├── MyFileManager.PrivilegeForm.resources │ ├── MyFileManager.ProcessForm.resources │ ├── MyFileManager.Properties.Resources.resources │ ├── MyFileManager.ThreadForm.resources │ ├── MyFileManager.csproj.CoreCompileInputs.cache │ ├── MyFileManager.csproj.FileListAbsolute.txt │ ├── MyFileManager.csproj.GenerateResource.cache │ ├── MyFileManager.csprojAssemblyReference.cache │ ├── MyFileManager.exe │ └── MyFileManager.pdb │ └── Release │ ├── MyFileManager.AboutForm.resources │ ├── MyFileManager.AttributeForm.resources │ ├── MyFileManager.FileAndFolderMonitorForm.resources │ ├── MyFileManager.MainForm.resources │ ├── MyFileManager.NewFileForm.resources │ ├── MyFileManager.PrivilegeForm.resources │ ├── MyFileManager.ProcessForm.resources │ ├── MyFileManager.Properties.Resources.resources │ ├── MyFileManager.ThreadForm.resources │ ├── MyFileManager.csproj.CoreCompileInputs.cache │ ├── MyFileManager.csproj.FileListAbsolute.txt │ ├── MyFileManager.csproj.GenerateResource.cache │ ├── MyFileManager.csprojAssemblyReference.cache │ ├── MyFileManager.exe │ └── MyFileManager.pdb ├── README.md ├── Screenshots ├── 1.gif ├── 2.gif ├── 3.gif ├── 4-1.gif ├── 4-2.gif ├── 5.gif ├── 6.gif ├── 7.gif └── 8.gif ├── 可执行程序(V1.4.1) [直接下载体验] └── Windows资源管理器.exe └── 用到的图标 ├── CD_ROM.png ├── about.ico ├── clear.png ├── disk.png ├── file_manager.ico ├── folder.png ├── group_or_user.png ├── left_arrow.png ├── monitor.ico ├── new_folder.ico ├── privilege.png ├── privilege_manager.ico ├── process.png ├── process_manager.ico ├── property.ico ├── recent.png ├── right_arrow.png ├── save.png ├── start_monitor.png ├── stop_monitor.png ├── thread.png ├── thread_manager.ico ├── u_pan.png └── up_arrow.png /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 WuchangI 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27703.2000 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyFileManager", "MyFileManager\MyFileManager.csproj", "{F8211453-EBA8-4E0E-9FEF-687981F516EA}" 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 | {F8211453-EBA8-4E0E-9FEF-687981F516EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {F8211453-EBA8-4E0E-9FEF-687981F516EA}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {F8211453-EBA8-4E0E-9FEF-687981F516EA}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {F8211453-EBA8-4E0E-9FEF-687981F516EA}.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 = {A4A1E4C5-1C77-4429-A1B4-AEB8C975F3B4} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/AboutForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MyFileManager 2 | { 3 | partial class AboutForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm)); 32 | this.btnConfirm = new System.Windows.Forms.Button(); 33 | this.lblShow = new System.Windows.Forms.Label(); 34 | this.SuspendLayout(); 35 | // 36 | // btnConfirm 37 | // 38 | this.btnConfirm.Location = new System.Drawing.Point(202, 158); 39 | this.btnConfirm.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 40 | this.btnConfirm.Name = "btnConfirm"; 41 | this.btnConfirm.Size = new System.Drawing.Size(87, 26); 42 | this.btnConfirm.TabIndex = 0; 43 | this.btnConfirm.Text = "确定"; 44 | this.btnConfirm.UseVisualStyleBackColor = true; 45 | this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click); 46 | // 47 | // lblShow 48 | // 49 | this.lblShow.AutoSize = true; 50 | this.lblShow.Location = new System.Drawing.Point(161, 69); 51 | this.lblShow.Name = "lblShow"; 52 | this.lblShow.Size = new System.Drawing.Size(172, 17); 53 | this.lblShow.TabIndex = 3; 54 | this.lblShow.Text = "Windows文件资源管理器 v1.0"; 55 | // 56 | // AboutForm 57 | // 58 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); 59 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 60 | this.BackColor = System.Drawing.SystemColors.ButtonHighlight; 61 | this.ClientSize = new System.Drawing.Size(492, 198); 62 | this.Controls.Add(this.lblShow); 63 | this.Controls.Add(this.btnConfirm); 64 | this.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 65 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 66 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 67 | this.MaximizeBox = false; 68 | this.MinimizeBox = false; 69 | this.Name = "AboutForm"; 70 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 71 | this.Text = "关于"; 72 | this.ResumeLayout(false); 73 | this.PerformLayout(); 74 | 75 | } 76 | 77 | #endregion 78 | 79 | private System.Windows.Forms.Button btnConfirm; 80 | private System.Windows.Forms.Label lblShow; 81 | } 82 | } -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/AboutForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace MyFileManager 11 | { 12 | public partial class AboutForm : Form 13 | { 14 | public AboutForm() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | 20 | private void btnConfirm_Click(object sender, EventArgs e) 21 | { 22 | this.Close(); 23 | } 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/AboutForm.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 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | 123 | AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA 124 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD+gAAA7psqFO2bKmDumyqh7psq0+2b 125 | Ku/tmyv/7psq/+2bKu3umyrN7psqm+2bKlbtmyoOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 126 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7ZsqLu2bKqftmyr37pwr/+6c 127 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+2bKvPtmyqb7ZsqJAAAAAAAAAAAAAAAAAAA 128 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7psqDu2bKpntmyr77pwr/+6c 129 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//tnCr37psqie6b 130 | KggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO6bKiztmyrZ7pwr/+6c 131 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 132 | K//unCv/7psqze6bKiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADumyo47psq7+6c 133 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 134 | K//unCv/7pwr/+6cK//unCv/7pwq5+2cKiwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7psqLO2b 135 | Ku/unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 136 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7psq5+2bKh4AAAAAAAAAAAAAAAAAAAAAAAAAAO6b 137 | Kg7umyrZ7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 138 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7Zsqye2bKgYAAAAAAAAAAAAA 139 | AAAAAAAA7Zsqk+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+2bKv3tmypy7ZsqKu2b 140 | Kkjtmyqj7Zwq/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//umyv/7ZsqfgAA 141 | AAAAAAAAAAAAAO6bKiztmyr77pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7psq2wAA 142 | AAAAAAAAAAAAAPSbKwDtmyq37pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 143 | K//tnCr17ZsqHgAAAAAAAAAA7psqo+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 144 | K//tmyrr7ZwqBAAAAAAAAAAA750rAO6bKsXunCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 145 | K//unCv/7pwr/+6cK//umyqRAAAAAO6cKhTtnCr17pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 146 | K//unCv/7pwr/+2bK//tmyouAAAAAAAAAADtmyoe7Zwq++6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 147 | K//unCv/7pwr/+6cK//unCv/7pwr/+2bKu3umyoK7ZsqXu6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 148 | K//unCv/7pwr/+6cK//unCv/7pwr/+2bKm4AAAAAAAAAAO6bKijunCv/7pwr/+6cK//unCv/7pwr/+6c 149 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6bKk7tmyqf7pwr/+6cK//unCv/7pwr/+6c 150 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7psqtwAAAAAAAAAA7pwpBO6cKuvunCv/7pwr/+6c 151 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7Zsqke2bKs/unCv/7pwr/+6c 152 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//tmyrz7psqCgAAAAAAAAAA7psqq+6c 153 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//tmyrB7psq7e6c 154 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//tmyoyAAAAAAAA 155 | AADumypm7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6b 156 | Kt/tmyr97pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7Zsq9e2c 157 | KhgAAAAAAAAAAO2bKiTtmyr97pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 158 | K//unCv/7Zsq7+2bKv3unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 159 | K//tmyqfAAAAAAAAAAAAAAAA7pwpAu2bKuXunCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 160 | K//unCv/7pwr/+6cK//tmyrp7Zsq9e6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 161 | K//unCv/7pwr/+6bKrnumykEAAAAAAAAAADtmygC7Zsq3+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 162 | K//unCv/7pwr/+6cK//unCv/7pwr/+6bKtXumyrV7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 163 | K//unCv/7pwr/+6cK//unCv/7psq/+2bKsvtnCps7ZsqRO2bKoPtmyr/7pwr/+6cK//unCv/7pwr/+6c 164 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7Zsqte6bKqPunCv/7pwr/+6cK//unCv/7pwr/+6c 165 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 166 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//umyqF7psqYO6cK//unCv/7pwr/+6c 167 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6bK//tmyr97pwr/+6c 168 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+2cKkLumyoU7psq9+6c 169 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//tmyrn7psqOu2b 170 | KhjtmyqV7Zwq/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//tmyrn7pwqBgAA 171 | AADumyqj7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6b 172 | KngAAAAAAAAAAO2bKgbumyrp7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6b 173 | KocAAAAAAAAAAO6bKirunCr57pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 174 | K//unCv/7psqhQAAAAAAAAAA7pwqDO2cKvHunCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 175 | K//umyrx7psqGAAAAAAAAAAAAAAAAO6bKo/unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 176 | K//unCv/7pwr/+6cK//tmyv17psqaO6cKkDtmyq77pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 177 | K//unCv/7Zsq/+6bKnYAAAAAAAAAAAAAAAAAAAAA7ZsqDO6bKtXunCv/7pwr/+6cK//unCv/7pwr/+6c 178 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 179 | K//unCv/7pwr/+6cK//tmyrD7pspBAAAAAAAAAAAAAAAAAAAAAAAAAAA7psqJu6bKununCv/7pwr/+6c 180 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 181 | K//unCv/7pwr/+6cK//unCv/7Zsq3+6bKhoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7psqMO2c 182 | KununCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 183 | K//unCv/7pwr/+6cK//unCv/7pwr/+2bKt/umyokAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 184 | AAAAAAAA7psqJO6bKtHunCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 185 | K//unCv/7pwr/+6cK//unCv/7pwr/+2cK//tmyrH7psqGgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 186 | AAAAAAAAAAAAAAAAAAAAAAAA7pspCu2bKoftmyr37pwr/+6cK//unCv/7pwr/+6cK//unCv/7pwr/+6c 187 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//tmyrz7Zsqeu2cKQYAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 188 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO6bKiTtmyqb7psq8+6cK//unCv/7pwr/+6c 189 | K//unCv/7pwr/+6cK//unCv/7pwr/+6cK//umyrv7psqk+2bKh4AAAAAAAAAAAAAAAAAAAAAAAAAAAAA 190 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADumyoO7ZsqUO2b 191 | KpPtmyrB7Zwq4e2bKu/tmyrv7psq3+6bKr/tmyqP7ZsqSu6bKgoAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 192 | AAAAAAAAAAAAAAAAAAAAAAAA//AP//+AAf/+AAB//AAAP/gAAB/wAAAP4AAAB8AHAAfAB4ADgAeAAYAH 193 | gAGAB4ABAAOAAAADgAAAA8AAAAPAAAADwAAAA8AAAAGAAAAAAACAAAABgADAAYAB4AHAAOADwADAB+AA 194 | AAfwAAAP+AAAH/wAAD/+AAD//4AB///wD/8= 195 | 196 | 197 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/AttributeForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MyFileManager 2 | { 3 | partial class AttributeForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AttributeForm)); 32 | this.btnConfirm = new System.Windows.Forms.Button(); 33 | this.lblFileName = new System.Windows.Forms.Label(); 34 | this.lblFileType = new System.Windows.Forms.Label(); 35 | this.lblFileLocation = new System.Windows.Forms.Label(); 36 | this.lblFileSize = new System.Windows.Forms.Label(); 37 | this.lblFileCreateTime = new System.Windows.Forms.Label(); 38 | this.lblFileModifyTime = new System.Windows.Forms.Label(); 39 | this.lblFileAccessTime = new System.Windows.Forms.Label(); 40 | this.pnlLine1 = new System.Windows.Forms.Panel(); 41 | this.pnlLine2 = new System.Windows.Forms.Panel(); 42 | this.txtFileName = new System.Windows.Forms.TextBox(); 43 | this.txtFileCreateTime = new System.Windows.Forms.TextBox(); 44 | this.txtFileModifyTime = new System.Windows.Forms.TextBox(); 45 | this.txtFileAccessTime = new System.Windows.Forms.TextBox(); 46 | this.txtFileSize = new System.Windows.Forms.TextBox(); 47 | this.txtFileLocation = new System.Windows.Forms.TextBox(); 48 | this.txtFileType = new System.Windows.Forms.TextBox(); 49 | this.SuspendLayout(); 50 | // 51 | // btnConfirm 52 | // 53 | resources.ApplyResources(this.btnConfirm, "btnConfirm"); 54 | this.btnConfirm.Name = "btnConfirm"; 55 | this.btnConfirm.UseVisualStyleBackColor = true; 56 | this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click); 57 | // 58 | // lblFileName 59 | // 60 | resources.ApplyResources(this.lblFileName, "lblFileName"); 61 | this.lblFileName.Name = "lblFileName"; 62 | // 63 | // lblFileType 64 | // 65 | resources.ApplyResources(this.lblFileType, "lblFileType"); 66 | this.lblFileType.Name = "lblFileType"; 67 | // 68 | // lblFileLocation 69 | // 70 | resources.ApplyResources(this.lblFileLocation, "lblFileLocation"); 71 | this.lblFileLocation.Name = "lblFileLocation"; 72 | // 73 | // lblFileSize 74 | // 75 | resources.ApplyResources(this.lblFileSize, "lblFileSize"); 76 | this.lblFileSize.Name = "lblFileSize"; 77 | // 78 | // lblFileCreateTime 79 | // 80 | resources.ApplyResources(this.lblFileCreateTime, "lblFileCreateTime"); 81 | this.lblFileCreateTime.Name = "lblFileCreateTime"; 82 | // 83 | // lblFileModifyTime 84 | // 85 | resources.ApplyResources(this.lblFileModifyTime, "lblFileModifyTime"); 86 | this.lblFileModifyTime.Name = "lblFileModifyTime"; 87 | // 88 | // lblFileAccessTime 89 | // 90 | resources.ApplyResources(this.lblFileAccessTime, "lblFileAccessTime"); 91 | this.lblFileAccessTime.Name = "lblFileAccessTime"; 92 | // 93 | // pnlLine1 94 | // 95 | this.pnlLine1.BackColor = System.Drawing.SystemColors.MenuText; 96 | resources.ApplyResources(this.pnlLine1, "pnlLine1"); 97 | this.pnlLine1.Name = "pnlLine1"; 98 | // 99 | // pnlLine2 100 | // 101 | this.pnlLine2.BackColor = System.Drawing.SystemColors.MenuText; 102 | resources.ApplyResources(this.pnlLine2, "pnlLine2"); 103 | this.pnlLine2.Name = "pnlLine2"; 104 | // 105 | // txtFileName 106 | // 107 | resources.ApplyResources(this.txtFileName, "txtFileName"); 108 | this.txtFileName.Name = "txtFileName"; 109 | // 110 | // txtFileCreateTime 111 | // 112 | resources.ApplyResources(this.txtFileCreateTime, "txtFileCreateTime"); 113 | this.txtFileCreateTime.Name = "txtFileCreateTime"; 114 | // 115 | // txtFileModifyTime 116 | // 117 | resources.ApplyResources(this.txtFileModifyTime, "txtFileModifyTime"); 118 | this.txtFileModifyTime.Name = "txtFileModifyTime"; 119 | // 120 | // txtFileAccessTime 121 | // 122 | resources.ApplyResources(this.txtFileAccessTime, "txtFileAccessTime"); 123 | this.txtFileAccessTime.Name = "txtFileAccessTime"; 124 | // 125 | // txtFileSize 126 | // 127 | resources.ApplyResources(this.txtFileSize, "txtFileSize"); 128 | this.txtFileSize.Name = "txtFileSize"; 129 | // 130 | // txtFileLocation 131 | // 132 | resources.ApplyResources(this.txtFileLocation, "txtFileLocation"); 133 | this.txtFileLocation.Name = "txtFileLocation"; 134 | // 135 | // txtFileType 136 | // 137 | resources.ApplyResources(this.txtFileType, "txtFileType"); 138 | this.txtFileType.Name = "txtFileType"; 139 | // 140 | // AttributeForm 141 | // 142 | resources.ApplyResources(this, "$this"); 143 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 144 | this.Controls.Add(this.txtFileType); 145 | this.Controls.Add(this.txtFileLocation); 146 | this.Controls.Add(this.txtFileSize); 147 | this.Controls.Add(this.txtFileAccessTime); 148 | this.Controls.Add(this.txtFileModifyTime); 149 | this.Controls.Add(this.txtFileCreateTime); 150 | this.Controls.Add(this.txtFileName); 151 | this.Controls.Add(this.pnlLine2); 152 | this.Controls.Add(this.pnlLine1); 153 | this.Controls.Add(this.lblFileAccessTime); 154 | this.Controls.Add(this.lblFileModifyTime); 155 | this.Controls.Add(this.lblFileCreateTime); 156 | this.Controls.Add(this.lblFileSize); 157 | this.Controls.Add(this.lblFileLocation); 158 | this.Controls.Add(this.lblFileType); 159 | this.Controls.Add(this.lblFileName); 160 | this.Controls.Add(this.btnConfirm); 161 | this.MaximizeBox = false; 162 | this.MinimizeBox = false; 163 | this.Name = "AttributeForm"; 164 | this.ResumeLayout(false); 165 | this.PerformLayout(); 166 | 167 | } 168 | 169 | #endregion 170 | 171 | private System.Windows.Forms.Button btnConfirm; 172 | private System.Windows.Forms.Label lblFileName; 173 | private System.Windows.Forms.Label lblFileType; 174 | private System.Windows.Forms.Label lblFileLocation; 175 | private System.Windows.Forms.Label lblFileSize; 176 | private System.Windows.Forms.Label lblFileCreateTime; 177 | private System.Windows.Forms.Label lblFileModifyTime; 178 | private System.Windows.Forms.Label lblFileAccessTime; 179 | private System.Windows.Forms.Panel pnlLine1; 180 | private System.Windows.Forms.Panel pnlLine2; 181 | private System.Windows.Forms.TextBox txtFileName; 182 | private System.Windows.Forms.TextBox txtFileCreateTime; 183 | private System.Windows.Forms.TextBox txtFileModifyTime; 184 | private System.Windows.Forms.TextBox txtFileAccessTime; 185 | private System.Windows.Forms.TextBox txtFileSize; 186 | private System.Windows.Forms.TextBox txtFileLocation; 187 | private System.Windows.Forms.TextBox txtFileType; 188 | } 189 | } -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/AttributeForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using System.IO; 10 | 11 | namespace MyFileManager 12 | { 13 | public partial class AttributeForm : Form 14 | { 15 | public AttributeForm(string filePath) 16 | { 17 | InitializeComponent(); 18 | 19 | //初始化界面 20 | InitDisplay(filePath); 21 | } 22 | 23 | 24 | //关闭对话框 25 | private void btnConfirm_Click(object sender, EventArgs e) 26 | { 27 | this.Close(); 28 | } 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | //初始化界面 38 | private void InitDisplay(string filePath) 39 | { 40 | //如果filePath是文件的路径 41 | if (File.Exists(filePath)) 42 | { 43 | FileInfo fileInfo = new FileInfo(filePath); 44 | 45 | txtFileName.Text = fileInfo.Name; 46 | txtFileType.Text = fileInfo.Extension; 47 | txtFileLocation.Text = (fileInfo.DirectoryName != null) ? fileInfo.DirectoryName : null; 48 | txtFileSize.Text = ShowFileSize(fileInfo.Length); 49 | txtFileCreateTime.Text = fileInfo.CreationTime.ToString(); 50 | txtFileModifyTime.Text = fileInfo.LastWriteTime.ToString(); 51 | txtFileAccessTime.Text = fileInfo.LastAccessTime.ToString(); 52 | } 53 | //如果filePath是文件夹的路径 54 | else if (Directory.Exists(filePath)) 55 | { 56 | DirectoryInfo directoryInfo = new DirectoryInfo(filePath); 57 | 58 | txtFileName.Text = directoryInfo.Name; 59 | txtFileType.Text = "文件夹"; 60 | txtFileLocation.Text = (directoryInfo.Parent != null) ? directoryInfo.Parent.FullName : null; 61 | txtFileSize.Text = ShowFileSize(GetDirectoryLength(filePath)); 62 | txtFileCreateTime.Text = directoryInfo.CreationTime.ToString(); 63 | txtFileModifyTime.Text = directoryInfo.LastWriteTime.ToString(); 64 | txtFileAccessTime.Text = directoryInfo.LastAccessTime.ToString(); 65 | } 66 | } 67 | 68 | 69 | //获取目录的大小 70 | private long GetDirectoryLength(string dirPath) 71 | { 72 | long length = 0; 73 | DirectoryInfo directoryInfo = new DirectoryInfo(dirPath); 74 | 75 | 76 | //获取目录下所有文件的大小 77 | FileInfo[] fileInfos = directoryInfo.GetFiles(); 78 | if (fileInfos.Length > 0) 79 | { 80 | foreach (FileInfo fileInfo in fileInfos) 81 | { 82 | length += fileInfo.Length; 83 | } 84 | } 85 | 86 | 87 | //递归获取目录下所有文件夹的大小 88 | DirectoryInfo[] directoryInfos = directoryInfo.GetDirectories(); 89 | if(directoryInfos.Length > 0) 90 | { 91 | foreach(DirectoryInfo dirInfo in directoryInfos) 92 | { 93 | length += GetDirectoryLength(dirInfo.FullName); 94 | } 95 | } 96 | 97 | return length; 98 | } 99 | 100 | 101 | //以一定格式显示文件的大小 102 | //Math.Round(num,2,MidpointRounding.AwayFromZero),中国式的四舍五入,num保留2位小数 103 | public static string ShowFileSize(long fileSize) 104 | { 105 | string fileSizeStr = ""; 106 | 107 | if (fileSize < 1024) 108 | { 109 | fileSizeStr = fileSize + " 字节"; 110 | } 111 | else if (fileSize >= 1024 && fileSize < 1024 * 1024) 112 | { 113 | fileSizeStr = Math.Round(fileSize * 1.0 / 1024, 2, MidpointRounding.AwayFromZero) + " KB(" + fileSize + "字节)"; 114 | } 115 | else if (fileSize >= 1024 * 1024 && fileSize < 1024 * 1024 * 1024) 116 | { 117 | fileSizeStr = Math.Round(fileSize * 1.0 / (1024 * 1024), 2, MidpointRounding.AwayFromZero) + " MB(" + fileSize + "字节)"; 118 | } 119 | else if (fileSize >= 1024 * 1024 * 1024) 120 | { 121 | fileSizeStr = Math.Round(fileSize * 1.0 / (1024 * 1024 * 1024), 2, MidpointRounding.AwayFromZero) + " GB(" + fileSize + "字节)"; 122 | } 123 | 124 | return fileSizeStr; 125 | } 126 | 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/FileAndFolderMonitorForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using System.IO; 10 | 11 | namespace MyFileManager 12 | { 13 | public partial class FileAndFolderMonitorForm : Form 14 | { 15 | //一系列监控器 16 | private FileSystemWatcher[] fileSystemWatchers; 17 | 18 | //定义传递FileSystemEventArgs对象的委托,用于文件发生Created、Deleted、Changed事件时更新UI界面(lvwChanges) 19 | private delegate void SetNormalLogTextEventHandler(FileSystemEventArgs e); 20 | 21 | //定义传递RenamedEventArgs对象的委托,用于文件发生Renamed事件时更新UI界面(lvwChanges) 22 | private delegate void SetRenameLogTextEventHandler(RenamedEventArgs e); 23 | 24 | 25 | 26 | public FileAndFolderMonitorForm() 27 | { 28 | InitializeComponent(); 29 | } 30 | 31 | private void FileAndFolderMonitorForm_Load(object sender, EventArgs e) 32 | { 33 | //初始化界面 34 | InitDisplay(); 35 | } 36 | 37 | private void tsbtnStart_Click(object sender, EventArgs e) 38 | { 39 | //开始监控 40 | StartMonitor(); 41 | } 42 | 43 | private void tsbtnStop_Click(object sender, EventArgs e) 44 | { 45 | //停止监控 46 | StopMonitor(); 47 | } 48 | 49 | private void tsbtnClear_Click(object sender, EventArgs e) 50 | { 51 | //清空监控信息 52 | Clear(); 53 | } 54 | 55 | private void tsbtnSave_Click(object sender, EventArgs e) 56 | { 57 | //保存监控信息 58 | Save(); 59 | } 60 | 61 | 62 | private void btnSelectPath_Click(object sender, EventArgs e) 63 | { 64 | FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog(); 65 | folderBrowserDialog.ShowNewFolderButton = false; 66 | folderBrowserDialog.RootFolder = Environment.SpecialFolder.Desktop; 67 | folderBrowserDialog.Description = "请选择需要监控的目录:"; 68 | 69 | if (folderBrowserDialog.ShowDialog() == DialogResult.OK) 70 | { 71 | txtPath.Text = folderBrowserDialog.SelectedPath; 72 | } 73 | } 74 | 75 | private void chkAllDisks_CheckedChanged(object sender, EventArgs e) 76 | { 77 | if (chkAllDisks.Checked) 78 | { 79 | foreach (ListViewItem item in lvwDisks.Items) 80 | { 81 | item.Checked = true; 82 | } 83 | } 84 | else 85 | { 86 | foreach (ListViewItem item in lvwDisks.Items) 87 | { 88 | item.Checked = false; 89 | } 90 | } 91 | } 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | //初始化界面 101 | private void InitDisplay() 102 | { 103 | DriveInfo[] driveInfos = DriveInfo.GetDrives(); 104 | 105 | foreach (DriveInfo info in driveInfos) 106 | { 107 | ListViewItem item = null; 108 | 109 | switch (info.DriveType) 110 | { 111 | 112 | //固定磁盘 113 | case DriveType.Fixed: 114 | 115 | item = lvwDisks.Items.Add("本地磁盘(" + info.Name.Split('\\')[0] + ")"); 116 | item.ImageIndex = IconsIndexes.FixedDrive; 117 | break; 118 | 119 | //光驱 120 | case DriveType.CDRom: 121 | 122 | item = lvwDisks.Items.Add("光驱(" + info.Name.Split('\\')[0] + ")"); 123 | item.ImageIndex = IconsIndexes.CDRom; 124 | break; 125 | 126 | //可移动磁盘 127 | case DriveType.Removable: 128 | 129 | item = lvwDisks.Items.Add("可移动磁盘(" + info.Name.Split('\\')[0] + ")"); 130 | item.ImageIndex = IconsIndexes.RemovableDisk; 131 | break; 132 | } 133 | } 134 | } 135 | 136 | 137 | 138 | //开始监控 139 | private void StartMonitor() 140 | { 141 | if (rbtnPath.Checked) 142 | { 143 | if (!string.IsNullOrEmpty(txtPath.Text)) 144 | { 145 | fileSystemWatchers = new FileSystemWatcher[1]; 146 | fileSystemWatchers[0] = new FileSystemWatcher(); 147 | 148 | //设置要监视的目录的路径 149 | fileSystemWatchers[0].Path = txtPath.Text; 150 | 151 | //是否监控指定路径下的子目录 152 | fileSystemWatchers[0].IncludeSubdirectories = chkSubDirectories.Checked; 153 | 154 | fileSystemWatchers[0].NotifyFilter = NotifyFilters.FileName | NotifyFilters.DirectoryName 155 | | NotifyFilters.Size; 156 | 157 | //启用监控 158 | fileSystemWatchers[0].EnableRaisingEvents = true; 159 | 160 | //绑定相应事件触发后处理数据的方法 161 | fileSystemWatchers[0].Created += new FileSystemEventHandler(SetNormalLogTextEvent); 162 | fileSystemWatchers[0].Deleted += new FileSystemEventHandler(SetNormalLogTextEvent); 163 | fileSystemWatchers[0].Changed += new FileSystemEventHandler(SetNormalLogTextEvent); 164 | fileSystemWatchers[0].Renamed += new RenamedEventHandler(SetRenameLogTextEvent); 165 | } 166 | else 167 | { 168 | MessageBox.Show("请选择需要监控的路径!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); 169 | return; 170 | } 171 | } 172 | else if(rbtnDisk.Checked) 173 | { 174 | int checkedCount = lvwDisks.CheckedItems.Count; 175 | 176 | if (checkedCount > 0) 177 | { 178 | fileSystemWatchers = new FileSystemWatcher[checkedCount]; 179 | 180 | for(int i = 0; i < checkedCount; i++) 181 | { 182 | fileSystemWatchers[i] = new FileSystemWatcher(); 183 | 184 | //设置要监视的目录的路径 185 | fileSystemWatchers[i].Path = lvwDisks.CheckedItems[i].Text.Split('(')[1].Split(')')[0] + "\\"; 186 | 187 | //是否监控指定路径下的子目录 188 | fileSystemWatchers[i].IncludeSubdirectories = chkSubDirectories.Checked; 189 | 190 | fileSystemWatchers[i].NotifyFilter = NotifyFilters.FileName | NotifyFilters.DirectoryName 191 | | NotifyFilters.Size; 192 | 193 | //启用监控 194 | fileSystemWatchers[i].EnableRaisingEvents = true; 195 | 196 | //绑定相应事件触发后处理数据的方法 197 | fileSystemWatchers[i].Created += new FileSystemEventHandler(SetNormalLogTextEvent); 198 | fileSystemWatchers[i].Deleted += new FileSystemEventHandler(SetNormalLogTextEvent); 199 | fileSystemWatchers[i].Changed += new FileSystemEventHandler(SetNormalLogTextEvent); 200 | fileSystemWatchers[i].Renamed += new RenamedEventHandler(SetRenameLogTextEvent); 201 | } 202 | } 203 | else 204 | { 205 | MessageBox.Show("请选择需要监控的磁盘!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); 206 | return; 207 | } 208 | } 209 | else 210 | { 211 | MessageBox.Show("请选择需要监控的路径/磁盘!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); 212 | return; 213 | } 214 | 215 | tsbtnStart.Enabled = false; 216 | tsbtnStop.Enabled = true; 217 | } 218 | 219 | 220 | 221 | //停止监控 222 | private void StopMonitor() 223 | { 224 | foreach(FileSystemWatcher fsw in fileSystemWatchers) 225 | { 226 | //不启用监控 227 | fsw.EnableRaisingEvents = false; 228 | } 229 | 230 | tsbtnStart.Enabled = true; 231 | tsbtnStop.Enabled = false; 232 | } 233 | 234 | 235 | //清空监控信息 236 | private void Clear() 237 | { 238 | lvwChanges.Items.Clear(); 239 | } 240 | 241 | 242 | //保存监控信息 243 | private void Save() 244 | { 245 | SaveFileDialog saveFileDialog = new SaveFileDialog(); 246 | saveFileDialog.Title = "将监控日志保存为"; 247 | saveFileDialog.InitialDirectory = Application.StartupPath + "\\Logs"; 248 | saveFileDialog.RestoreDirectory = true; 249 | saveFileDialog.FileName = DateTime.Now.ToString("yyyyMMdd hh-mm-ss") + ".log"; 250 | 251 | if (saveFileDialog.ShowDialog() == DialogResult.OK) 252 | { 253 | StreamWriter streamWriter = new StreamWriter(saveFileDialog.FileName); 254 | 255 | for (int i = 0; i < lvwChanges.Items.Count; i++) 256 | { 257 | string log = "[时间:" + lvwChanges.Items[i].Text + " ] " + 258 | " [硬盘:" + lvwChanges.Items[i].SubItems[1].Text + " ] " + 259 | " [事件:" + lvwChanges.Items[i].SubItems[2].Text + " ] " + 260 | " [文件名:" + lvwChanges.Items[i].SubItems[3].Text + " ] " + 261 | " [路径:" + lvwChanges.Items[i].SubItems[4].Text + " ] " + 262 | " [详细说明:" + lvwChanges.Items[i].SubItems[5].Text + " ] "; 263 | 264 | streamWriter.WriteLine(log); 265 | streamWriter.WriteLine(); 266 | } 267 | 268 | streamWriter.Close(); 269 | } 270 | } 271 | 272 | 273 | 274 | //用于文件发生Created、Deleted、Changed事件时更新UI界面(lvwChanges) 275 | private void SetNormalLogText(FileSystemEventArgs e) 276 | { 277 | string[] pathStrArray = e.FullPath.Split('\\'); 278 | 279 | //不监控回收站下的文件 280 | if(pathStrArray[1] != "$Recycle.Bin") 281 | { 282 | //开始数据更新 283 | lvwChanges.BeginUpdate(); 284 | 285 | //时间 286 | ListViewItem item = new ListViewItem(DateTime.Now.ToString()); 287 | 288 | //硬盘 289 | item.SubItems.Add(pathStrArray[0]); 290 | 291 | //事件 292 | item.SubItems.Add(e.ChangeType.ToString()); 293 | 294 | //文件名 295 | item.SubItems.Add(pathStrArray[pathStrArray.Length - 1]); 296 | 297 | //路径 298 | item.SubItems.Add(e.FullPath); 299 | 300 | //详细说明 301 | switch (e.ChangeType) 302 | { 303 | case WatcherChangeTypes.Created: 304 | 305 | item.ForeColor = Color.Blue; 306 | item.SubItems.Add("在" + pathStrArray[0].Split(':')[0] + "盘中创建了 " 307 | + pathStrArray[pathStrArray.Length - 1] + " 文件"); 308 | break; 309 | 310 | case WatcherChangeTypes.Deleted: 311 | 312 | item.ForeColor = Color.Red; 313 | item.SubItems.Add("在" + pathStrArray[0].Split(':')[0] + "盘中删除了 " 314 | + pathStrArray[pathStrArray.Length - 1] + " 文件"); 315 | break; 316 | 317 | case WatcherChangeTypes.Changed: 318 | 319 | item.ForeColor = Color.Green; 320 | item.SubItems.Add("在" + pathStrArray[0].Split(':')[0] + "盘中修改了 " 321 | + pathStrArray[pathStrArray.Length - 1] + " 文件"); 322 | break; 323 | } 324 | 325 | lvwChanges.Items.Add(item); 326 | 327 | //结束数据更新 328 | lvwChanges.EndUpdate(); 329 | } 330 | } 331 | 332 | 333 | 334 | //用于文件发生Renamed事件时更新UI界面(lvwChanges) 335 | private void SetRenameLogText(RenamedEventArgs e) 336 | { 337 | string[] oldPathStrArray = e.OldFullPath.Split('\\'); 338 | string[] newPathStrArray = e.Name.Split('\\'); 339 | 340 | //开始数据更新 341 | lvwChanges.BeginUpdate(); 342 | 343 | //时间 344 | ListViewItem item = new ListViewItem(DateTime.Now.ToString()); 345 | 346 | //硬盘 347 | item.SubItems.Add(oldPathStrArray[0]); 348 | 349 | //事件 350 | item.SubItems.Add(e.ChangeType.ToString()); 351 | 352 | //文件名的改变 353 | item.SubItems.Add(oldPathStrArray[oldPathStrArray.Length - 1] + " -> " 354 | + newPathStrArray[newPathStrArray.Length - 1]); 355 | 356 | //路径 357 | item.SubItems.Add(e.FullPath); 358 | 359 | //详细说明 360 | item.SubItems.Add("在" + oldPathStrArray[0].Split(':')[0] + "盘中将 " 361 | + oldPathStrArray[oldPathStrArray.Length - 1] + " 文件重命名为 " + 362 | newPathStrArray[newPathStrArray.Length - 1] + " 文件"); 363 | 364 | item.ForeColor = Color.Yellow; 365 | 366 | lvwChanges.Items.Add(item); 367 | 368 | //结束数据更新 369 | lvwChanges.EndUpdate(); 370 | } 371 | 372 | 373 | //文件增删改时被调用的处理方法 374 | private void SetNormalLogTextEvent(object sender, FileSystemEventArgs e) 375 | { 376 | //当前线程不是创建lvwChanges的线程时InvokeRequired为true 377 | if (lvwChanges.InvokeRequired) 378 | { 379 | //使用委托将更新界面的方法发送到UI主线程(创建lvwChanges的线程)中执行 380 | lvwChanges.Invoke(new SetNormalLogTextEventHandler(SetNormalLogText), new object[] { e }); 381 | } 382 | } 383 | 384 | //文件重命名时被调用的处理方法 385 | private void SetRenameLogTextEvent(object sender, RenamedEventArgs e) 386 | { 387 | //当前线程不是创建lvwChanges的线程时InvokeRequired为true 388 | if (lvwChanges.InvokeRequired) 389 | { 390 | //使用委托将更新界面的方法发送到UI主线程(创建lvwChanges的线程)中执行 391 | lvwChanges.Invoke(new SetRenameLogTextEventHandler(SetRenameLogText), new object[] { e }); 392 | } 393 | } 394 | 395 | 396 | 397 | //图标索引 398 | class IconsIndexes 399 | { 400 | public const int FixedDrive = 0; //固定磁盘 401 | public const int CDRom = 1; //光驱 402 | public const int RemovableDisk = 2; //可移动磁盘 403 | } 404 | 405 | } 406 | } 407 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/GetSystemIcon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.IO; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using Microsoft.Win32; 8 | using System.Runtime.InteropServices; 9 | 10 | namespace MyFileManager 11 | { 12 | //获取指定文件在系统中的对应图标的工具类 13 | class GetSystemIcon 14 | { 15 | //依据文件名读取图标,若指定文件不存在,则返回空值。 16 | public static Icon GetIconByFileName(string fileName) 17 | { 18 | if (fileName == null || fileName.Equals(string.Empty)) return null; 19 | if (!File.Exists(fileName)) return null; 20 | 21 | SHFILEINFO shinfo = new SHFILEINFO(); 22 | //Use this to get the small Icon 23 | Win32.SHGetFileInfo(fileName, 0, ref shinfo, (uint)Marshal.SizeOf(shinfo), Win32.SHGFI_ICON | Win32.SHGFI_LARGEICON); 24 | //The icon is returned in the hIcon member of the shinfo struct 25 | System.Drawing.Icon myIcon = System.Drawing.Icon.FromHandle(shinfo.hIcon); 26 | return myIcon; 27 | } 28 | 29 | 30 | //给出文件扩展名(.*),返回相应图标。若不以"."开头则返回文件夹的图标。 31 | public static Icon GetIconByFileType(string fileType, bool isLarge) 32 | { 33 | if (fileType == null || fileType.Equals(string.Empty)) return null; 34 | 35 | RegistryKey regVersion = null; 36 | string regFileType = null; 37 | string regIconString = null; 38 | string systemDirectory = Environment.SystemDirectory + "\\"; 39 | 40 | if (fileType[0] == '.') 41 | { 42 | //读系统注册表中文件类型信息 43 | regVersion = Registry.ClassesRoot.OpenSubKey(fileType, true); 44 | if (regVersion != null) 45 | { 46 | regFileType = regVersion.GetValue("") as string; 47 | regVersion.Close(); 48 | regVersion = Registry.ClassesRoot.OpenSubKey(regFileType + @"\DefaultIcon", true); 49 | if (regVersion != null) 50 | { 51 | regIconString = regVersion.GetValue("") as string; 52 | regVersion.Close(); 53 | } 54 | } 55 | if (regIconString == null) 56 | { 57 | //没有读取到文件类型注册信息,指定为未知文件类型的图标 58 | regIconString = systemDirectory + "shell32.dll,0"; 59 | } 60 | } 61 | else 62 | { 63 | //直接指定为文件夹图标 64 | regIconString = systemDirectory + "shell32.dll,3"; 65 | } 66 | string[] fileIcon = regIconString.Split(new char[] { ',' }); 67 | if (fileIcon.Length != 2) 68 | { 69 | //系统注册表中注册的标图不能直接提取,则返回可执行文件的通用图标 70 | fileIcon = new string[] { systemDirectory + "shell32.dll", "2" }; 71 | } 72 | Icon resultIcon = null; 73 | try 74 | { 75 | //调用API方法读取图标 76 | int[] phiconLarge = new int[1]; 77 | int[] phiconSmall = new int[1]; 78 | uint count = Win32.ExtractIconEx(fileIcon[0], Int32.Parse(fileIcon[1]), phiconLarge, phiconSmall, 1); 79 | IntPtr IconHnd = new IntPtr(isLarge ? phiconLarge[0] : phiconSmall[0]); 80 | resultIcon = Icon.FromHandle(IconHnd); 81 | } 82 | catch { } 83 | return resultIcon; 84 | } 85 | } 86 | 87 | [StructLayout(LayoutKind.Sequential)] 88 | public struct SHFILEINFO 89 | { 90 | public IntPtr hIcon; 91 | public IntPtr iIcon; 92 | public uint dwAttributes; 93 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] 94 | public string szDisplayName; 95 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)] 96 | public string szTypeName; 97 | }; 98 | 99 | 100 | //定义调用的API方法 101 | class Win32 102 | { 103 | public const uint SHGFI_ICON = 0x100; 104 | public const uint SHGFI_LARGEICON = 0x0; // Large icon 105 | public const uint SHGFI_SMALLICON = 0x1; // Small icon 106 | 107 | [DllImport("shell32.dll")] 108 | public static extern IntPtr SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags); 109 | [DllImport("shell32.dll")] 110 | public static extern uint ExtractIconEx(string lpszFile, int nIconIndex, int[] phiconLarge, int[] phiconSmall, uint nIcons); 111 | 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/MyFileManager.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F8211453-EBA8-4E0E-9FEF-687981F516EA} 8 | WinExe 9 | MyFileManager 10 | MyFileManager 11 | v4.0 12 | 512 13 | 14 | 15 | AnyCPU 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | AnyCPU 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | LocalIntranet 35 | 36 | 37 | false 38 | 39 | 40 | Properties\app.manifest 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | Form 58 | 59 | 60 | AboutForm.cs 61 | 62 | 63 | Form 64 | 65 | 66 | AttributeForm.cs 67 | 68 | 69 | Form 70 | 71 | 72 | FileAndFolderMonitorForm.cs 73 | 74 | 75 | 76 | Form 77 | 78 | 79 | MainForm.cs 80 | 81 | 82 | Form 83 | 84 | 85 | NewFileForm.cs 86 | 87 | 88 | Form 89 | 90 | 91 | PrivilegeForm.cs 92 | 93 | 94 | Form 95 | 96 | 97 | ProcessForm.cs 98 | 99 | 100 | 101 | 102 | 103 | Form 104 | 105 | 106 | ThreadForm.cs 107 | 108 | 109 | AboutForm.cs 110 | 111 | 112 | AttributeForm.cs 113 | 114 | 115 | FileAndFolderMonitorForm.cs 116 | 117 | 118 | MainForm.cs 119 | 120 | 121 | NewFileForm.cs 122 | 123 | 124 | PrivilegeForm.cs 125 | 126 | 127 | ProcessForm.cs 128 | 129 | 130 | ResXFileCodeGenerator 131 | Resources.Designer.cs 132 | Designer 133 | 134 | 135 | True 136 | Resources.resx 137 | 138 | 139 | ThreadForm.cs 140 | 141 | 142 | 143 | SettingsSingleFileGenerator 144 | Settings.Designer.cs 145 | 146 | 147 | True 148 | Settings.settings 149 | True 150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/NewFileForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MyFileManager 2 | { 3 | partial class NewFileForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewFileForm)); 32 | this.lblNewFile = new System.Windows.Forms.Label(); 33 | this.txtNewFileName = new System.Windows.Forms.TextBox(); 34 | this.btnConfirm = new System.Windows.Forms.Button(); 35 | this.btnCancel = new System.Windows.Forms.Button(); 36 | this.SuspendLayout(); 37 | // 38 | // lblNewFile 39 | // 40 | this.lblNewFile.AutoSize = true; 41 | this.lblNewFile.Location = new System.Drawing.Point(70, 55); 42 | this.lblNewFile.Name = "lblNewFile"; 43 | this.lblNewFile.Size = new System.Drawing.Size(56, 17); 44 | this.lblNewFile.TabIndex = 0; 45 | this.lblNewFile.Text = "文件名:"; 46 | // 47 | // txtNewFileName 48 | // 49 | this.txtNewFileName.Location = new System.Drawing.Point(123, 52); 50 | this.txtNewFileName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 51 | this.txtNewFileName.Name = "txtNewFileName"; 52 | this.txtNewFileName.Size = new System.Drawing.Size(324, 23); 53 | this.txtNewFileName.TabIndex = 1; 54 | // 55 | // btnConfirm 56 | // 57 | this.btnConfirm.Location = new System.Drawing.Point(413, 133); 58 | this.btnConfirm.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 59 | this.btnConfirm.Name = "btnConfirm"; 60 | this.btnConfirm.Size = new System.Drawing.Size(69, 22); 61 | this.btnConfirm.TabIndex = 2; 62 | this.btnConfirm.Text = "确定"; 63 | this.btnConfirm.UseVisualStyleBackColor = true; 64 | this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click); 65 | // 66 | // btnCancel 67 | // 68 | this.btnCancel.Location = new System.Drawing.Point(312, 133); 69 | this.btnCancel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 70 | this.btnCancel.Name = "btnCancel"; 71 | this.btnCancel.Size = new System.Drawing.Size(73, 22); 72 | this.btnCancel.TabIndex = 3; 73 | this.btnCancel.Text = "取消"; 74 | this.btnCancel.UseVisualStyleBackColor = true; 75 | this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); 76 | // 77 | // NewFileForm 78 | // 79 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); 80 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 81 | this.ClientSize = new System.Drawing.Size(512, 170); 82 | this.Controls.Add(this.btnCancel); 83 | this.Controls.Add(this.btnConfirm); 84 | this.Controls.Add(this.txtNewFileName); 85 | this.Controls.Add(this.lblNewFile); 86 | this.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 87 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 88 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 89 | this.MaximizeBox = false; 90 | this.Name = "NewFileForm"; 91 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 92 | this.Text = "新建文件"; 93 | this.ResumeLayout(false); 94 | this.PerformLayout(); 95 | 96 | } 97 | 98 | #endregion 99 | 100 | private System.Windows.Forms.Label lblNewFile; 101 | private System.Windows.Forms.TextBox txtNewFileName; 102 | private System.Windows.Forms.Button btnConfirm; 103 | private System.Windows.Forms.Button btnCancel; 104 | } 105 | } -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/NewFileForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using System.IO; 10 | 11 | namespace MyFileManager 12 | { 13 | public partial class NewFileForm : Form 14 | { 15 | //当前路径 16 | private string curPath; 17 | 18 | //管理器的主窗体的一个引用 19 | private MainForm mainForm; 20 | 21 | 22 | public NewFileForm(string curPath, MainForm mainForm) 23 | { 24 | InitializeComponent(); 25 | this.curPath = curPath; 26 | this.mainForm = mainForm; 27 | } 28 | 29 | private void btnConfirm_Click(object sender, EventArgs e) 30 | { 31 | string newFileName = txtNewFileName.Text; 32 | 33 | string newFilePath = Path.Combine(curPath, newFileName); 34 | 35 | //文件名不合法 36 | if (!IsValidFileName(newFileName)) 37 | { 38 | MessageBox.Show("文件名不能包含下列任何字符:\r\n" + "\t\\/:*?\"<>|", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); 39 | } 40 | else if (File.Exists(newFilePath)) 41 | { 42 | MessageBox.Show("在当前路径下存在同名的文件!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); 43 | } 44 | else 45 | { 46 | File.Create(newFilePath); 47 | 48 | //更新文件列表 49 | mainForm.ShowFilesList(curPath, false); 50 | 51 | this.Close(); 52 | } 53 | } 54 | 55 | private void btnCancel_Click(object sender, EventArgs e) 56 | { 57 | this.Close(); 58 | } 59 | 60 | 61 | 62 | 63 | 64 | //检查文件名是否合法,文件名中不能包含字符\/:*?"<>| 65 | private bool IsValidFileName(string fileName) 66 | { 67 | bool isValid = true; 68 | 69 | //非法字符 70 | string errChar = "\\/:*?\"<>|"; 71 | 72 | for (int i = 0; i < errChar.Length; i++) 73 | { 74 | if (fileName.Contains(errChar[i].ToString())) 75 | { 76 | isValid = false; 77 | break; 78 | } 79 | } 80 | 81 | return isValid; 82 | } 83 | 84 | } 85 | 86 | } -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/NewFileForm.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 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | 123 | AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA 124 | AAB3uS8Ud7kwWni6MIF4ujCBeLowgXi6MIF4ujCBeLowgXi6MIF4ujCBeLowgXi6MIF4ujCBeLowgXi6 125 | MIF4ujCBeLowgXi6MIF4ujCBeLowgXi6MIF4ujCBeLowgXi6MIF4ujCBeLowgXi6MIF4ujCBeLowgXi6 126 | MIF4uTBYeLgwEne5MIV3uTD3eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 127 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 128 | MP94ujD/eLow/3i5MPV4uTCFeLow8Xi6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 129 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 130 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MPF4ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 131 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 132 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 133 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow9Xi6MMl4ujDJeLow9Xi6MP94ujD/eLow/3i6 134 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 135 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94uTDZeLkwPHi5MDx4uTDZeLow/3i6 136 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 137 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i5MNV4uTAqeLkwKni5 138 | MNV4ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 139 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLkw1Xi5 140 | MCp4uTAqeLkw1Xi6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 141 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 142 | MP94uTDVeLkwKni5MCp4uTDVeLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 143 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 144 | MP94ujD/eLow/3i5MNV4uTAqeLkwKni5MNV4ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 145 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow9Xi6 146 | MNd4ujDVeLow1Xi6MNV4ujDVd7owsXi5MCR4uTAkd7owsXi6MNV4ujDVeLow1Xi6MNV4ujDXeLow9Xi6 147 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 148 | MP93ujDLeLowPHi7MCp4uzAqeLswKni7MCp3ui8keLswCHi7MAh3ui8keLswKni7MCp4uzAqeLswKni6 149 | MDx3ujDLeLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 150 | MP94ujD/eLow/3i5MMt4uTA8eLkwKni5MCp4uTAqeLkwKni5MCR4uzAIeLswCHi5MCR4uTAqeLkwKni5 151 | MCp4uTAqeLkwPHi5MMt4ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 152 | MP94ujD/eLow/3i6MP94ujD/eLkw9Xi5MNl4uTDVeLkw1Xi5MNV4uTDVeLkwsXi5MCR4uTAkeLkwsXi5 153 | MNV4uTDVeLkw1Xi5MNV4uTDZeLkw9Xi6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 154 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94uTDVeLkwKni5 155 | MCp4uTDVeLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 156 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i5 157 | MNV4uTAqeLkwKni5MNV4ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 158 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 159 | MP94ujD/eLkw1Xi5MCp4uTAqeLkw1Xi6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 160 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 161 | MP94ujD/eLow/3i6MP94uTDVeLkwKni5MCp4uTDVeLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 162 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 163 | MP94ujD/eLow/3i6MP94ujD/eLow/3i5MNl4uTA8eLkwPHi5MNl4ujD/eLow/3i6MP94ujD/eLow/3i6 164 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 165 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLkw9Xi5MMt4uTDLeLkw9Xi6MP94ujD/eLow/3i6 166 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 167 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 168 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 169 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 170 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 171 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 172 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 173 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 174 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 175 | MP94ujD/eLow/3i6MON4ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 176 | MP94ujD/eLow/3i6MP94ujD/eLow6Xi6MOl4ujDpeLow6Xi6MOl4ujDpeLow6Xi6MOl4ujDpeLow6Xi6 177 | MOl4ujDpeLow6Xi6MOl3uTDJdrkwTni6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6 178 | MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujBAeLowQHi6MEB4ujBAeLowQHi6MEB4ujBAeLowQHi6 179 | MEB4ujBAeLowQHi6MEB4ujBAeLowQHe4LyR4tzAEeLow/3i6MP94ujDjeLow1Xi6MNV4ujDVeLow1Xi6 180 | MNV4ujDVeLow1Xi6MNV4ujDVeLow1Xi6MON4ujD/eLow/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 181 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4ujD/eLow/3i5L3J4uzAqeLswKni7 182 | MCp4uzAqeLswKni7MCp4uzAqeLswKni7MCp4uzAqeLkvcni6MP94ujD/AAAAAAAAAAAAAAAAAAAAAAAA 183 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHi6MP94ujD/d7kwZHi7 184 | MBZ4uzAWeLswFni7MBZ4uzAWeLswFni7MBZ4uzAWeLswFni7MBZ3uTBkeLow/3i6MP8AAAAAAAAAAAAA 185 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeLkw8Xi6 186 | MP94uTDVeLowv3i6ML94ujC/eLowv3i6ML94ujC/eLowv3i6ML94ujC/eLowv3i5MNV4ujD/eLkw8QAA 187 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 188 | AAB3uTCDd7kw83i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3i6MP94ujD/eLow/3e5 189 | MPN3uTCDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 190 | AAAAAAAAAAAAAHe4MBB3ujBQeLowfni6MH54ujB+eLowfni6MH54ujB+eLowfni6MH54ujB+eLowfni6 191 | MH54ujB+d7owUHe4MBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 192 | AAAAAAAAAAAAAAAAAAAAAAAAwAAAAwAAAAAAAAAAAAAAAAAAAAAAAYAAAAGAAAABgAAAAYAAAAGAAAAB 193 | gAAAf/4AAH/+AAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA 194 | //8AAP//P/z//z/8//8AAP//AAD///////8= 195 | 196 | 197 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/PrivilegeForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MyFileManager 2 | { 3 | partial class PrivilegeForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PrivilegeForm)); 33 | this.lvwGroupOrUserName = new System.Windows.Forms.ListView(); 34 | this.ilstIcons = new System.Windows.Forms.ImageList(this.components); 35 | this.lvwPrivilege = new System.Windows.Forms.ListView(); 36 | this.lblGroupOrUserName = new System.Windows.Forms.Label(); 37 | this.lblPrivilege = new System.Windows.Forms.Label(); 38 | this.btnConfirm = new System.Windows.Forms.Button(); 39 | this.label1 = new System.Windows.Forms.Label(); 40 | this.lblObjectName = new System.Windows.Forms.Label(); 41 | this.SuspendLayout(); 42 | // 43 | // lvwGroupOrUserName 44 | // 45 | this.lvwGroupOrUserName.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 46 | | System.Windows.Forms.AnchorStyles.Left) 47 | | System.Windows.Forms.AnchorStyles.Right))); 48 | this.lvwGroupOrUserName.FullRowSelect = true; 49 | this.lvwGroupOrUserName.LargeImageList = this.ilstIcons; 50 | this.lvwGroupOrUserName.Location = new System.Drawing.Point(13, 66); 51 | this.lvwGroupOrUserName.Name = "lvwGroupOrUserName"; 52 | this.lvwGroupOrUserName.Size = new System.Drawing.Size(286, 240); 53 | this.lvwGroupOrUserName.SmallImageList = this.ilstIcons; 54 | this.lvwGroupOrUserName.TabIndex = 0; 55 | this.lvwGroupOrUserName.UseCompatibleStateImageBehavior = false; 56 | this.lvwGroupOrUserName.View = System.Windows.Forms.View.List; 57 | this.lvwGroupOrUserName.SelectedIndexChanged += new System.EventHandler(this.lvwGroupOrUserName_SelectedIndexChanged); 58 | // 59 | // ilstIcons 60 | // 61 | this.ilstIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilstIcons.ImageStream"))); 62 | this.ilstIcons.TransparentColor = System.Drawing.Color.Transparent; 63 | this.ilstIcons.Images.SetKeyName(0, "group_or_user.png"); 64 | this.ilstIcons.Images.SetKeyName(1, "privilege.png"); 65 | // 66 | // lvwPrivilege 67 | // 68 | this.lvwPrivilege.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 69 | | System.Windows.Forms.AnchorStyles.Left) 70 | | System.Windows.Forms.AnchorStyles.Right))); 71 | this.lvwPrivilege.CheckBoxes = true; 72 | this.lvwPrivilege.FullRowSelect = true; 73 | this.lvwPrivilege.LargeImageList = this.ilstIcons; 74 | this.lvwPrivilege.Location = new System.Drawing.Point(308, 105); 75 | this.lvwPrivilege.Name = "lvwPrivilege"; 76 | this.lvwPrivilege.Size = new System.Drawing.Size(288, 158); 77 | this.lvwPrivilege.SmallImageList = this.ilstIcons; 78 | this.lvwPrivilege.TabIndex = 1; 79 | this.lvwPrivilege.UseCompatibleStateImageBehavior = false; 80 | this.lvwPrivilege.View = System.Windows.Forms.View.List; 81 | this.lvwPrivilege.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvwPrivilege_ItemChecked); 82 | // 83 | // lblGroupOrUserName 84 | // 85 | this.lblGroupOrUserName.AutoSize = true; 86 | this.lblGroupOrUserName.Location = new System.Drawing.Point(9, 45); 87 | this.lblGroupOrUserName.Name = "lblGroupOrUserName"; 88 | this.lblGroupOrUserName.Size = new System.Drawing.Size(80, 17); 89 | this.lblGroupOrUserName.TabIndex = 2; 90 | this.lblGroupOrUserName.Text = "组或用户名:"; 91 | // 92 | // lblPrivilege 93 | // 94 | this.lblPrivilege.AutoSize = true; 95 | this.lblPrivilege.Location = new System.Drawing.Point(305, 85); 96 | this.lblPrivilege.Name = "lblPrivilege"; 97 | this.lblPrivilege.Size = new System.Drawing.Size(43, 17); 98 | this.lblPrivilege.TabIndex = 3; 99 | this.lblPrivilege.Text = "label2"; 100 | // 101 | // btnConfirm 102 | // 103 | this.btnConfirm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 104 | this.btnConfirm.Location = new System.Drawing.Point(513, 319); 105 | this.btnConfirm.Name = "btnConfirm"; 106 | this.btnConfirm.Size = new System.Drawing.Size(75, 23); 107 | this.btnConfirm.TabIndex = 4; 108 | this.btnConfirm.Text = "确定"; 109 | this.btnConfirm.UseVisualStyleBackColor = true; 110 | this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click); 111 | // 112 | // label1 113 | // 114 | this.label1.AutoSize = true; 115 | this.label1.Location = new System.Drawing.Point(12, 9); 116 | this.label1.Name = "label1"; 117 | this.label1.Size = new System.Drawing.Size(68, 17); 118 | this.label1.TabIndex = 6; 119 | this.label1.Text = "对象名称:"; 120 | // 121 | // lblObjectName 122 | // 123 | this.lblObjectName.AutoSize = true; 124 | this.lblObjectName.Location = new System.Drawing.Point(75, 9); 125 | this.lblObjectName.Name = "lblObjectName"; 126 | this.lblObjectName.Size = new System.Drawing.Size(43, 17); 127 | this.lblObjectName.TabIndex = 7; 128 | this.lblObjectName.Text = "label1"; 129 | // 130 | // PrivilegeForm 131 | // 132 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); 133 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 134 | this.ClientSize = new System.Drawing.Size(608, 354); 135 | this.Controls.Add(this.lblObjectName); 136 | this.Controls.Add(this.label1); 137 | this.Controls.Add(this.btnConfirm); 138 | this.Controls.Add(this.lblPrivilege); 139 | this.Controls.Add(this.lblGroupOrUserName); 140 | this.Controls.Add(this.lvwPrivilege); 141 | this.Controls.Add(this.lvwGroupOrUserName); 142 | this.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 143 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 144 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 145 | this.MaximizeBox = false; 146 | this.Name = "PrivilegeForm"; 147 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 148 | this.Text = "权限管理"; 149 | this.ResumeLayout(false); 150 | this.PerformLayout(); 151 | 152 | } 153 | 154 | #endregion 155 | 156 | private System.Windows.Forms.ListView lvwGroupOrUserName; 157 | private System.Windows.Forms.Label lblGroupOrUserName; 158 | private System.Windows.Forms.Label lblPrivilege; 159 | private System.Windows.Forms.Button btnConfirm; 160 | private System.Windows.Forms.ImageList ilstIcons; 161 | private System.Windows.Forms.ListView lvwPrivilege; 162 | private System.Windows.Forms.Label label1; 163 | private System.Windows.Forms.Label lblObjectName; 164 | } 165 | } -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/PrivilegeForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using System.IO; 10 | using System.Security.AccessControl; 11 | using System.Security.Principal; 12 | 13 | namespace MyFileManager 14 | { 15 | public partial class PrivilegeForm : Form 16 | { 17 | //访问规则集合 18 | private AuthorizationRule[] accessRulesArray = null; 19 | 20 | //当前文件的全路径名 21 | private string fileName; 22 | 23 | private List privilegeList = new List { "完全控制", "修改", "读取和执行", "列出文件夹内容", "读取", "写入" }; 24 | 25 | private List privilegeFlagsList = new List { "FullControl", "Modify", "ReadAndExecute", "ListDirectory", "Read", "Write" }; 26 | 27 | private List fileSystemRightsList = new List { FileSystemRights.FullControl, FileSystemRights.Modify, 28 | FileSystemRights.ReadAndExecute, FileSystemRights.ListDirectory, FileSystemRights.Read, FileSystemRights.Write }; 29 | 30 | //(程序本身,不是用户手动)是否正在更新右边权限列表(的CheckBoxes) 31 | private bool isUpdateCheckBoxes = false; 32 | 33 | //当前选中的组或用户名的索引 34 | private int curSelected = 0; 35 | 36 | public PrivilegeForm(string fileName) 37 | { 38 | InitializeComponent(); 39 | this.fileName = fileName; 40 | 41 | //初始化界面 42 | InitDisplay(fileName); 43 | } 44 | 45 | 46 | private void btnConfirm_Click(object sender, EventArgs e) 47 | { 48 | //关闭对话框 49 | this.Close(); 50 | } 51 | 52 | 53 | private void lvwGroupOrUserName_SelectedIndexChanged(object sender, EventArgs e) 54 | { 55 | if (lvwGroupOrUserName.SelectedItems.Count > 0) 56 | { 57 | curSelected = (int)lvwGroupOrUserName.SelectedItems[0].Tag; 58 | ShowPrivilegeList(); 59 | } 60 | } 61 | 62 | 63 | private void lvwPrivilege_ItemChecked(object sender, ItemCheckedEventArgs e) 64 | { 65 | //当前的选中/取消选中操作不是更新操作造成的,是用户手动点击造成的 66 | if (!isUpdateCheckBoxes) 67 | { 68 | if (e.Item.Checked) 69 | { 70 | //如果是文件,则即使选中"列出文件夹内容",之后也不保存 71 | if (File.Exists(fileName) && e.Item.Text == "列出文件夹内容") 72 | { 73 | MessageBox.Show("文件类型不支持此操作!此操作之后将不予以保存!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); 74 | } 75 | else 76 | { 77 | isUpdateCheckBoxes = true; 78 | 79 | //设置权限列表中当前选中项和其“包含”的选项的选中状态 80 | SetPrivilegeListChecked(privilegeFlagsList[(int)e.Item.Tag]); 81 | 82 | isUpdateCheckBoxes = false; 83 | 84 | if (File.Exists(fileName)) 85 | { 86 | AddFileSecurity(fileName, accessRulesArray[curSelected].IdentityReference.Translate(typeof(NTAccount)).ToString(), 87 | fileSystemRightsList[(int)e.Item.Tag], AccessControlType.Allow); 88 | } 89 | else if (Directory.Exists(fileName)) 90 | { 91 | AddDirectorySecurity(fileName, accessRulesArray[curSelected].IdentityReference.Translate(typeof(NTAccount)).ToString(), 92 | fileSystemRightsList[(int)e.Item.Tag], AccessControlType.Allow); 93 | } 94 | } 95 | } 96 | else 97 | { 98 | isUpdateCheckBoxes = true; 99 | 100 | //设置权限列表中当前选中项和其“包含”的选项的未选中状态 101 | SetPrivilegeListUnChecked(privilegeFlagsList[(int)e.Item.Tag]); 102 | 103 | isUpdateCheckBoxes = false; 104 | 105 | if (File.Exists(fileName)) 106 | { 107 | RemoveFileSecurity(fileName, accessRulesArray[curSelected].IdentityReference.Translate(typeof(NTAccount)).ToString(), 108 | fileSystemRightsList[(int)e.Item.Tag], AccessControlType.Allow); 109 | } 110 | else if (Directory.Exists(fileName)) 111 | { 112 | RemoveDirectorySecurity(fileName, accessRulesArray[curSelected].IdentityReference.Translate(typeof(NTAccount)).ToString(), 113 | fileSystemRightsList[(int)e.Item.Tag], AccessControlType.Allow); 114 | } 115 | } 116 | } 117 | } 118 | 119 | 120 | 121 | 122 | 123 | //初始化界面 124 | private void InitDisplay(string fileName) 125 | { 126 | lblObjectName.Text = fileName; 127 | 128 | AuthorizationRuleCollection tempAccessRulesCollection = null; 129 | 130 | //如果是文件 131 | if (File.Exists(fileName)) 132 | { 133 | FileInfo fileInfo = new FileInfo(fileName); 134 | tempAccessRulesCollection = fileInfo.GetAccessControl().GetAccessRules(true, true, 135 | typeof(System.Security.Principal.SecurityIdentifier)); 136 | } 137 | //如果是文件夹 138 | else if (Directory.Exists(fileName)) 139 | { 140 | DirectoryInfo dirInfo = new DirectoryInfo(fileName); 141 | tempAccessRulesCollection = dirInfo.GetAccessControl().GetAccessRules(true, true, 142 | typeof(System.Security.Principal.SecurityIdentifier)); 143 | } 144 | 145 | 146 | AuthorizationRule[] tempAccessRulesArray = new AuthorizationRule[tempAccessRulesCollection.Count]; 147 | tempAccessRulesCollection.CopyTo(tempAccessRulesArray, 0); 148 | 149 | //去重 150 | accessRulesArray = UniqAccessRules(tempAccessRulesArray); 151 | 152 | 153 | lvwGroupOrUserName.Items.Clear(); 154 | 155 | //显示组或用户名列表 156 | for (int i = 0; i < accessRulesArray.Length; i++) 157 | { 158 | ListViewItem item = lvwGroupOrUserName.Items.Add(accessRulesArray[i].IdentityReference.Translate(typeof(NTAccount)).ToString()); 159 | item.Tag = i; 160 | item.ImageIndex = IconsIndexes.GroupOrUser; 161 | } 162 | 163 | //初始时默认当前选中的组或用户名为第一项 164 | lvwGroupOrUserName.HideSelection = false; 165 | lvwGroupOrUserName.Items[0].Selected = true; 166 | 167 | //显示当前选中的组或用户名对该文件/文件夹具有的权限列表 168 | ShowPrivilegeList(); 169 | } 170 | 171 | 172 | //去重 173 | private AuthorizationRule[] UniqAccessRules(AuthorizationRule[] accessRules) 174 | { 175 | string preAccount = ""; 176 | string nextAccout; 177 | List authorizationRulesList = new List(); 178 | 179 | for (int i = 0; i < accessRules.Length; i++) 180 | { 181 | nextAccout = accessRules[i].IdentityReference.Translate(typeof(NTAccount)).ToString(); 182 | 183 | //没有发生重复 184 | if (nextAccout != preAccount) 185 | { 186 | authorizationRulesList.Add(accessRules[i]); 187 | } 188 | 189 | preAccount = nextAccout; 190 | } 191 | 192 | return authorizationRulesList.ToArray(); 193 | } 194 | 195 | 196 | 197 | //根据传入的权限设置权限列表的选中状态 198 | private void SetPrivilegeListChecked(string privilege) 199 | { 200 | switch (privilege) 201 | { 202 | case "FullControl": 203 | 204 | foreach (ListViewItem item in lvwPrivilege.Items) 205 | { 206 | item.Checked = true; 207 | } 208 | 209 | //如果是文件,则"列出文件夹内容"不选中 210 | if (File.Exists(fileName)) 211 | { 212 | lvwPrivilege.Items[3].Checked = false; 213 | } 214 | 215 | break; 216 | 217 | case "Modify": 218 | 219 | foreach (ListViewItem item in lvwPrivilege.Items) 220 | { 221 | if (item.Text == "修改" || item.Text == "读取和执行" || item.Text == "读取" || item.Text == "写入") 222 | { 223 | item.Checked = true; 224 | } 225 | } 226 | 227 | //如果是文件夹, 则再选中"列出文件夹内容" 228 | if (Directory.Exists(fileName)) 229 | { 230 | lvwPrivilege.Items[3].Checked = true; 231 | } 232 | break; 233 | 234 | case "ReadAndExecute": 235 | 236 | foreach (ListViewItem item in lvwPrivilege.Items) 237 | { 238 | if (item.Text == "读取和执行" || item.Text == "读取") 239 | { 240 | item.Checked = true; 241 | } 242 | } 243 | 244 | //如果是文件夹, 则再选中"列出文件夹内容" 245 | if (Directory.Exists(fileName)) 246 | { 247 | lvwPrivilege.Items[3].Checked = true; 248 | } 249 | break; 250 | 251 | case "ListDirectory": 252 | 253 | foreach (ListViewItem item in lvwPrivilege.Items) 254 | { 255 | if (item.Text == "列出文件夹内容") 256 | { 257 | item.Checked = true; 258 | } 259 | } 260 | break; 261 | 262 | case "Read": 263 | 264 | foreach (ListViewItem item in lvwPrivilege.Items) 265 | { 266 | if (item.Text == "读取") 267 | { 268 | item.Checked = true; 269 | } 270 | } 271 | 272 | //如果是文件夹, 则再选中"列出文件夹内容" 273 | if (Directory.Exists(fileName)) 274 | { 275 | lvwPrivilege.Items[3].Checked = true; 276 | } 277 | 278 | break; 279 | 280 | case "Write": 281 | 282 | foreach (ListViewItem item in lvwPrivilege.Items) 283 | { 284 | if (item.Text == "写入") 285 | { 286 | item.Checked = true; 287 | } 288 | } 289 | break; 290 | } 291 | } 292 | 293 | 294 | //根据传入的权限设置权限列表的未选中状态 295 | private void SetPrivilegeListUnChecked(string privilege) 296 | { 297 | switch (privilege) 298 | { 299 | case "FullControl": 300 | 301 | foreach (ListViewItem item in lvwPrivilege.Items) 302 | { 303 | item.Checked = false; 304 | } 305 | break; 306 | 307 | case "Modify": 308 | 309 | foreach (ListViewItem item in lvwPrivilege.Items) 310 | { 311 | if (item.Text == "修改" || item.Text == "读取和执行" || item.Text == "读取" || item.Text == "写入") 312 | { 313 | item.Checked = false; 314 | } 315 | } 316 | break; 317 | 318 | case "ReadAndExecute": 319 | 320 | foreach (ListViewItem item in lvwPrivilege.Items) 321 | { 322 | if (item.Text == "读取和执行" || item.Text == "读取") 323 | { 324 | item.Checked = false; 325 | } 326 | } 327 | break; 328 | 329 | case "ListDirectory": 330 | 331 | foreach (ListViewItem item in lvwPrivilege.Items) 332 | { 333 | if (item.Text == "列出文件夹内容") 334 | { 335 | item.Checked = false; 336 | } 337 | } 338 | break; 339 | 340 | case "Read": 341 | 342 | foreach (ListViewItem item in lvwPrivilege.Items) 343 | { 344 | if (item.Text == "读取") 345 | { 346 | item.Checked = false; 347 | } 348 | } 349 | break; 350 | 351 | case "Write": 352 | 353 | foreach (ListViewItem item in lvwPrivilege.Items) 354 | { 355 | if (item.Text == "写入") 356 | { 357 | item.Checked = false; 358 | } 359 | } 360 | break; 361 | } 362 | } 363 | 364 | 365 | //显示当前选中的组或用户名对该文件/文件夹具有的权限列表 366 | private void ShowPrivilegeList() 367 | { 368 | isUpdateCheckBoxes = true; 369 | 370 | lblPrivilege.Text = lvwGroupOrUserName.Items[curSelected].Text + " 的权限:"; 371 | 372 | lvwPrivilege.Items.Clear(); 373 | 374 | //当前选中的组或用户名对该文件/文件夹具有的权限 375 | List privileges = new List((((FileSystemAccessRule)accessRulesArray[curSelected]).FileSystemRights + "").Split(',')); 376 | 377 | //显示权限列表 378 | for (int i = 0; i < privilegeList.Count; i++) 379 | { 380 | ListViewItem item = lvwPrivilege.Items.Add(privilegeList[i], IconsIndexes.Privilege); 381 | item.Tag = i; 382 | } 383 | 384 | 385 | for (int i = 0; i < privilegeList.Count; i++) 386 | { 387 | if (privileges.Contains(privilegeFlagsList[i])) 388 | { 389 | SetPrivilegeListChecked(privilegeFlagsList[i]); 390 | } 391 | } 392 | 393 | isUpdateCheckBoxes = false; 394 | } 395 | 396 | 397 | //为指定的账户给指定的文件添加ACL项 398 | private void AddFileSecurity(string fileName, string account, FileSystemRights rights, AccessControlType controlType) 399 | { 400 | FileInfo fileInfo = new FileInfo(fileName); 401 | FileSecurity fileSecurity = fileInfo.GetAccessControl(); 402 | fileSecurity.AddAccessRule(new FileSystemAccessRule(account, rights, controlType)); 403 | fileInfo.SetAccessControl(fileSecurity); 404 | } 405 | 406 | //为指定的账户给指定的文件移除ACL项 407 | private void RemoveFileSecurity(string fileName, string account, FileSystemRights rights, AccessControlType controlType) 408 | { 409 | FileInfo fileInfo = new FileInfo(fileName); 410 | FileSecurity fileSecurity = fileInfo.GetAccessControl(); 411 | fileSecurity.RemoveAccessRule(new FileSystemAccessRule(account, rights, controlType)); 412 | fileInfo.SetAccessControl(fileSecurity); 413 | } 414 | 415 | 416 | //为指定的账户给指定的目录添加ACL项 417 | private void AddDirectorySecurity(string dirName, string account, FileSystemRights rights, AccessControlType controlType) 418 | { 419 | DirectoryInfo dirInfo = new DirectoryInfo(dirName); 420 | DirectorySecurity dirSecurity = dirInfo.GetAccessControl(AccessControlSections.All); 421 | dirSecurity.AddAccessRule(new FileSystemAccessRule(account, rights, controlType)); 422 | dirInfo.SetAccessControl(dirSecurity); 423 | } 424 | 425 | 426 | //为指定的账户给指定的目录移除ACL项 427 | private void RemoveDirectorySecurity(string dirName, string account, FileSystemRights rights, AccessControlType controlType) 428 | { 429 | DirectoryInfo dirInfo = new DirectoryInfo(dirName); 430 | DirectorySecurity dirSecurity = dirInfo.GetAccessControl(); 431 | dirSecurity.RemoveAccessRule(new FileSystemAccessRule(account, rights, controlType)); 432 | dirInfo.SetAccessControl(dirSecurity); 433 | } 434 | 435 | 436 | 437 | 438 | //图标索引 439 | class IconsIndexes 440 | { 441 | public const int GroupOrUser = 0; //组或用户 442 | public const int Privilege = 1; //权限 443 | } 444 | 445 | } 446 | } 447 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/ProcessForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MyFileManager 2 | { 3 | partial class ProcessForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProcessForm)); 33 | this.lvwProcess = new System.Windows.Forms.ListView(); 34 | this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 35 | this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 36 | this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 37 | this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 38 | this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 39 | this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 40 | this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 41 | this.cmsProcess = new System.Windows.Forms.ContextMenuStrip(this.components); 42 | this.tsmiThread = new System.Windows.Forms.ToolStripMenuItem(); 43 | this.tsmiFinish = new System.Windows.Forms.ToolStripMenuItem(); 44 | this.ilstIcons = new System.Windows.Forms.ImageList(this.components); 45 | this.btnFinish = new System.Windows.Forms.Button(); 46 | this.btnRefresh = new System.Windows.Forms.Button(); 47 | this.lblCurProcessNum = new System.Windows.Forms.Label(); 48 | this.txtCurProcessNum = new System.Windows.Forms.TextBox(); 49 | this.timer = new System.Windows.Forms.Timer(this.components); 50 | this.cmsProcess.SuspendLayout(); 51 | this.SuspendLayout(); 52 | // 53 | // lvwProcess 54 | // 55 | this.lvwProcess.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 56 | | System.Windows.Forms.AnchorStyles.Left) 57 | | System.Windows.Forms.AnchorStyles.Right))); 58 | this.lvwProcess.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 59 | this.columnHeader1, 60 | this.columnHeader2, 61 | this.columnHeader3, 62 | this.columnHeader4, 63 | this.columnHeader5, 64 | this.columnHeader6, 65 | this.columnHeader7}); 66 | this.lvwProcess.ContextMenuStrip = this.cmsProcess; 67 | this.lvwProcess.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 68 | this.lvwProcess.FullRowSelect = true; 69 | this.lvwProcess.LargeImageList = this.ilstIcons; 70 | this.lvwProcess.Location = new System.Drawing.Point(3, 0); 71 | this.lvwProcess.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 72 | this.lvwProcess.Name = "lvwProcess"; 73 | this.lvwProcess.Size = new System.Drawing.Size(924, 579); 74 | this.lvwProcess.SmallImageList = this.ilstIcons; 75 | this.lvwProcess.TabIndex = 0; 76 | this.lvwProcess.UseCompatibleStateImageBehavior = false; 77 | this.lvwProcess.View = System.Windows.Forms.View.Details; 78 | // 79 | // columnHeader1 80 | // 81 | this.columnHeader1.Text = "进程名称"; 82 | this.columnHeader1.Width = 130; 83 | // 84 | // columnHeader2 85 | // 86 | this.columnHeader2.Text = "进程ID"; 87 | // 88 | // columnHeader3 89 | // 90 | this.columnHeader3.Text = "专用内存大小"; 91 | this.columnHeader3.Width = 110; 92 | // 93 | // columnHeader4 94 | // 95 | this.columnHeader4.Text = "虚拟内存大小"; 96 | this.columnHeader4.Width = 110; 97 | // 98 | // columnHeader5 99 | // 100 | this.columnHeader5.Text = "启动时间"; 101 | this.columnHeader5.Width = 200; 102 | // 103 | // columnHeader6 104 | // 105 | this.columnHeader6.Text = "基本优先级"; 106 | this.columnHeader6.Width = 120; 107 | // 108 | // columnHeader7 109 | // 110 | this.columnHeader7.Text = "路径"; 111 | this.columnHeader7.Width = 250; 112 | // 113 | // cmsProcess 114 | // 115 | this.cmsProcess.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 116 | this.tsmiThread, 117 | this.tsmiFinish}); 118 | this.cmsProcess.Name = "cmsProcess"; 119 | this.cmsProcess.Size = new System.Drawing.Size(197, 48); 120 | // 121 | // tsmiThread 122 | // 123 | this.tsmiThread.Name = "tsmiThread"; 124 | this.tsmiThread.Size = new System.Drawing.Size(196, 22); 125 | this.tsmiThread.Text = "管理此进程包含的线程"; 126 | this.tsmiThread.Click += new System.EventHandler(this.tsmiThread_Click); 127 | // 128 | // tsmiFinish 129 | // 130 | this.tsmiFinish.Name = "tsmiFinish"; 131 | this.tsmiFinish.Size = new System.Drawing.Size(196, 22); 132 | this.tsmiFinish.Text = "结束此进程"; 133 | this.tsmiFinish.Click += new System.EventHandler(this.btnFinish_Click); 134 | // 135 | // ilstIcons 136 | // 137 | this.ilstIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilstIcons.ImageStream"))); 138 | this.ilstIcons.TransparentColor = System.Drawing.Color.Transparent; 139 | this.ilstIcons.Images.SetKeyName(0, "process.png"); 140 | // 141 | // btnFinish 142 | // 143 | this.btnFinish.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 144 | this.btnFinish.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 145 | this.btnFinish.Location = new System.Drawing.Point(832, 589); 146 | this.btnFinish.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 147 | this.btnFinish.Name = "btnFinish"; 148 | this.btnFinish.Size = new System.Drawing.Size(87, 33); 149 | this.btnFinish.TabIndex = 1; 150 | this.btnFinish.Text = "结束进程"; 151 | this.btnFinish.UseVisualStyleBackColor = true; 152 | this.btnFinish.Click += new System.EventHandler(this.btnFinish_Click); 153 | // 154 | // btnRefresh 155 | // 156 | this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 157 | this.btnRefresh.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 158 | this.btnRefresh.Location = new System.Drawing.Point(715, 589); 159 | this.btnRefresh.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 160 | this.btnRefresh.Name = "btnRefresh"; 161 | this.btnRefresh.Size = new System.Drawing.Size(87, 33); 162 | this.btnRefresh.TabIndex = 2; 163 | this.btnRefresh.Text = "刷新"; 164 | this.btnRefresh.UseVisualStyleBackColor = true; 165 | this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); 166 | // 167 | // lblCurProcessNum 168 | // 169 | this.lblCurProcessNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 170 | this.lblCurProcessNum.AutoSize = true; 171 | this.lblCurProcessNum.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 172 | this.lblCurProcessNum.Location = new System.Drawing.Point(15, 605); 173 | this.lblCurProcessNum.Name = "lblCurProcessNum"; 174 | this.lblCurProcessNum.Size = new System.Drawing.Size(172, 17); 175 | this.lblCurProcessNum.TabIndex = 3; 176 | this.lblCurProcessNum.Text = "当前进程数(包含隐藏的进程):"; 177 | // 178 | // txtCurProcessNum 179 | // 180 | this.txtCurProcessNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 181 | this.txtCurProcessNum.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 182 | this.txtCurProcessNum.Location = new System.Drawing.Point(181, 604); 183 | this.txtCurProcessNum.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 184 | this.txtCurProcessNum.Name = "txtCurProcessNum"; 185 | this.txtCurProcessNum.Size = new System.Drawing.Size(53, 22); 186 | this.txtCurProcessNum.TabIndex = 4; 187 | // 188 | // timer 189 | // 190 | this.timer.Enabled = true; 191 | this.timer.Interval = 6000; 192 | this.timer.Tick += new System.EventHandler(this.btnRefresh_Click); 193 | // 194 | // ProcessForm 195 | // 196 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); 197 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 198 | this.ClientSize = new System.Drawing.Size(933, 637); 199 | this.Controls.Add(this.txtCurProcessNum); 200 | this.Controls.Add(this.lblCurProcessNum); 201 | this.Controls.Add(this.btnRefresh); 202 | this.Controls.Add(this.btnFinish); 203 | this.Controls.Add(this.lvwProcess); 204 | this.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 205 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 206 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 207 | this.Name = "ProcessForm"; 208 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 209 | this.Text = "进程管理"; 210 | this.Load += new System.EventHandler(this.ProcessForm_Load); 211 | this.cmsProcess.ResumeLayout(false); 212 | this.ResumeLayout(false); 213 | this.PerformLayout(); 214 | 215 | } 216 | 217 | #endregion 218 | 219 | private System.Windows.Forms.ListView lvwProcess; 220 | private System.Windows.Forms.Button btnFinish; 221 | private System.Windows.Forms.ColumnHeader columnHeader1; 222 | private System.Windows.Forms.ColumnHeader columnHeader2; 223 | private System.Windows.Forms.ColumnHeader columnHeader3; 224 | private System.Windows.Forms.ColumnHeader columnHeader4; 225 | private System.Windows.Forms.ColumnHeader columnHeader5; 226 | private System.Windows.Forms.ColumnHeader columnHeader6; 227 | private System.Windows.Forms.ColumnHeader columnHeader7; 228 | private System.Windows.Forms.Button btnRefresh; 229 | private System.Windows.Forms.Label lblCurProcessNum; 230 | private System.Windows.Forms.TextBox txtCurProcessNum; 231 | private System.Windows.Forms.ImageList ilstIcons; 232 | private System.Windows.Forms.ContextMenuStrip cmsProcess; 233 | private System.Windows.Forms.ToolStripMenuItem tsmiThread; 234 | private System.Windows.Forms.ToolStripMenuItem tsmiFinish; 235 | private System.Windows.Forms.Timer timer; 236 | } 237 | } -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/ProcessForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Diagnostics; 6 | using System.Drawing; 7 | using System.Linq; 8 | using System.Security.Authentication; 9 | using System.Text; 10 | using System.Windows.Forms; 11 | 12 | namespace MyFileManager 13 | { 14 | 15 | public partial class ProcessForm : Form 16 | { 17 | public ProcessForm() 18 | { 19 | InitializeComponent(); 20 | } 21 | 22 | private void ProcessForm_Load(object sender, EventArgs e) 23 | { 24 | //显示进程列表 25 | ShowProcesses(); 26 | } 27 | 28 | 29 | private void btnRefresh_Click(object sender, EventArgs e) 30 | { 31 | //刷新界面 32 | RefreshDisplay(); 33 | } 34 | 35 | private void btnFinish_Click(object sender, EventArgs e) 36 | { 37 | //结束指定进程 38 | StopProcess(); 39 | } 40 | 41 | 42 | private void tsmiThread_Click(object sender, EventArgs e) 43 | { 44 | if (lvwProcess.SelectedItems.Count > 0) 45 | { 46 | string processName = lvwProcess.SelectedItems[0].Text; 47 | 48 | //显示对应的线程管理窗口 49 | ThreadForm threadForm = new ThreadForm(processName); 50 | threadForm.Show(); 51 | } 52 | } 53 | 54 | 55 | 56 | 57 | 58 | //显示进程列表 59 | private void ShowProcesses() 60 | { 61 | lvwProcess.Items.Clear(); 62 | 63 | //获取本机的当前所有正在运行的进程 64 | Process[] processesList = Process.GetProcesses(); 65 | 66 | //当前进程数 67 | txtCurProcessNum.Text = processesList.Length.ToString(); 68 | 69 | //有些进程无法获取启动时间和文件名信息,所以要用try/catch 70 | try 71 | { 72 | foreach (Process process in processesList) 73 | { 74 | //进程名称 75 | ListViewItem item = lvwProcess.Items.Add(process.ProcessName, IconsIndexes.Process); 76 | 77 | //进程Id 78 | item.SubItems.Add(process.Id.ToString()); 79 | 80 | //专用内存大小 81 | item.SubItems.Add(AttributeForm.ShowFileSize(process.PrivateMemorySize64).Split('(')[0]); 82 | 83 | //虚拟内存大小 84 | item.SubItems.Add(AttributeForm.ShowFileSize(process.VirtualMemorySize64).Split('(')[0]); 85 | 86 | //启动时间 87 | item.SubItems.Add(process.StartTime.ToLongDateString() + process.StartTime.ToLongTimeString()); 88 | 89 | //基本优先级 90 | item.SubItems.Add(process.BasePriority.ToString()); 91 | 92 | //路径 93 | item.SubItems.Add(process.MainModule.FileName); 94 | 95 | } 96 | 97 | } 98 | catch(Exception e) 99 | { 100 | 101 | } 102 | 103 | } 104 | 105 | 106 | //结束指定进程 107 | private void StopProcess() 108 | { 109 | if(lvwProcess.SelectedItems.Count > 0) 110 | { 111 | try 112 | { 113 | string processName = lvwProcess.SelectedItems[0].Text; 114 | Process process = Process.GetProcessesByName(processName)[0]; 115 | 116 | process.Kill(); 117 | 118 | RefreshDisplay(); 119 | } 120 | catch(Exception e) 121 | { 122 | MessageBox.Show("无法关闭此进程!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); 123 | } 124 | } 125 | else 126 | { 127 | MessageBox.Show("请选中一个进程!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); 128 | } 129 | } 130 | 131 | 132 | //刷新界面 133 | private void RefreshDisplay() 134 | { 135 | //显示进程列表 136 | ShowProcesses(); 137 | } 138 | 139 | 140 | 141 | //图标索引 142 | class IconsIndexes 143 | { 144 | public const int Process = 0; //进程图标 145 | } 146 | } 147 | 148 | 149 | } 150 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/ProcessForm.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 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 116, 17 122 | 123 | 124 | 17, 17 125 | 126 | 127 | 128 | AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w 129 | LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 130 | ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD6 131 | AwAAAk1TRnQBSQFMAwEBAAFYAQABWAEAARQBAAEUAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABUAMA 132 | ARQDAAEBAQABIAYAARlOAAPjAf8D6gH//wA8AAH/AwAB//8ALQAD6gH/AwAB/wMAAf8DAAH/AwAB/wMA 133 | Af8DAAX//wAhAAPqAf8DAAH/AwAB/wsAAf8DAAH//wANAAT/A+MB/wPjAf8D4wH/DwAB/wNbAf8LAAH/ 134 | A4YB//8ADQADWwH/AwAB/wMAAf8DAAH/CAADWwH/AwAB/wMAAf8DNwH/AwAB/wMAAf8DAAH/A/EB//wA 135 | BP8LAAH/AwAB/wMAAf8DAAX/CAABpAKgAf8DsgH/AwAB/wMAAf8D1wH/AaQCoAH//AADsgH/AwAB/wMo 136 | Af8DHgH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DhgH/AwAB/wMAAf8HAAH/AxEB//8AAQAE/wMAAf8DAAH/ 137 | AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMoAf//AAkAA2wB/wMAAf8DAAH/ 138 | AwAB/wMAAf8DAAH/A+oB/wQAA5YB/wMAAf8DAAH/AwAB/wMAAf8DAAH/A+oB//8ABQAE/wNsAf8DAAH/ 139 | AwAB/wMABf8MAAGkAqAB/wMAAf8DAAH/AwAB/wPdAf//ABQAAf8DAAH/AygB/xcAAf8DAAH/A1sB//8A 140 | EQAD6gH/AwAB/wMAAf8DCwH/EAAD8QH/AwAB/wMAAf8DLgH//wANAAPAAf8DAAH/AwAB/wMAAf8DAAH/ 141 | A4YB/wgABP8DAAH/AwAB/wMAAf8DAAH/AwAF//8ABQAD3QH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/ 142 | AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAF//8ADAAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMA 143 | Af8DAAH/AwAB/wMAAf8DAAH/A/EB//8ADQAE/wPAAf8EAAPxAf8DAAH/AwAB/wMAAf8DAAH/A7IB/wQA 144 | A/EB/wOyAf//ACEAA0oB/wMAAf8DAAH/AwAB//8AMQAD4wH/A1sB/wNbAf8DWwH//wD/AFoAAUIBTQE+ 145 | BwABPgMAASgDAAFQAwABFAMAAQEBAAEBBQAB8BcAA/8BAAH/Af4BcAkAAf8B/gFwCQAB/wHwCgAB/wHx 146 | AZAJAAH8ATkBkAkAAfwBMAoAAewBGAEQCQABwAECAXAJAAGAAQEB8AkAAoAB8AkAAYEBwQHwCQAC4wHw 147 | CQACwwHwCQABgQGAAfAJAAGAAQAB8AkAAcABAQHwCQAByAETAfAJAAH8AT8B8AkAAfwBPwHwCQAC/wHw 148 | CQAL 149 | 150 | 151 | 152 | 401, 17 153 | 154 | 155 | 156 | 157 | AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA 158 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 159 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 160 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 161 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADvnwAI758ADu+fAA7unwAI758AAAAAAAAAAAAAAAAAAAAA 162 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 163 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADvnwAC7p8AOO+fAKfvnwDX758A1++fAKvvnwAyAAAAAAAA 164 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 165 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO+fADLvnwDh758A+/CgAOnwoADp8KAA+++f 166 | AM/vnwA2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA758ACu+fACDvnwAi758AIu+f 167 | ACLvnwAi758AIu+fACLvnwAi758AIu+fACLvnwAi758AIu+fACLunwAk758Ar/CgAP/vnwCz8aAAOPGg 168 | ADrvnwCt758A/e+fAKfvnwAi758AIu+fACLvnwAg758ACgAAAAAAAAAAAAAAAO6eAAzvnwC1758A5++f 169 | AOnvnwDp758A6e+fAOnvnwDp758A6e+fAOnvnwDp758A6e+fAOnvnwDp758A6e+fANfvnwDr758A7++f 170 | ADQAAAAAAAAAAO6fACjvnwD3758A+e+fAOnvnwDp758A6e+fAOfvnwCz7p8ADAAAAAAAAAAA758ADO+f 171 | ALvvoAD98KAA//CgAP/woAD/8KAA//CgAP/woAD/8KAA//CgAP/woAD/8KAA//CgAP/woAD/758A7e+f 172 | APHvnwDx758AMgAAAAAAAAAA758AIO+fAPfwoAD58KAA//CgAP/woAD/76AA/e+fALfvnwAKAAAAAAAA 173 | AADvnwAA758ABu+gAArwoAAK8KAACvCgAArwoAAK8KAACvCgAArwoAAK8KAACvCgAArwoAAK8KAACvCg 174 | AArvnwAO758Ap++fAP/vnwC17p8AOu+fAD7vnwCx758A/e+fAKXwoAAK8KAACvCgAArvoAAK758ABu+f 175 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 176 | AAAAAAAAAAAAAAAAAADvnwA28J8A5++fAP3vnwDp758A5++fAP3vnwDX758AOAAAAAAAAAAAAAAAAAAA 177 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 178 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAO6fAADwnwAw8J8AofCgAMnwoADJ8KAAp++fACoAAAAAAAAAAAAA 179 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 180 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADvnwAM8aEAHPGhABzxoAAM758AAAAA 181 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 182 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO+fAALvnwAY758AGAAA 183 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 184 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO+fAALvnwA0758Ape+f 185 | AN/vnwDb758Ar++fAC7unwAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 186 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA758ALO+f 187 | AN3woAD/8KAA//CgAP/woAD/758A2e6eADQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO+f 188 | AADvnwAU7p8AJO6fACTunwAk7p8AJO6fACTunwAk7p8AJO6fACTunwAk7p8AJO6fACTunwAk7p8AJO+e 189 | ACTvnwCt8KAA/++fAKXvnwAk758AJu+fAKnvnwD9758Ase6fACTunwAk7p8AJO6fACTvnwAU758AAAAA 190 | AAAAAAAA7p8ACu+fAKPvnwDR758A0e+fANHvnwDR758A0e+fANHvnwDR758A0e+fANHvnwDR758A0e+f 191 | ANHvnwDR758Aw++fAOfvnwDt758ANgAAAAAAAAAA758ALu+fAPfvnwD3758A0e+fANHvnwDR758A0e+f 192 | AKPunwAKAAAAAAAAAADunwAK758Ao/CgANHwoADR8KAA0fCgANHwoADR8KAA0fCgANHwoADR8KAA0fCg 193 | ANHwoADR8KAA0fCgANHvnwDF758A6e+fAO3vnwA2AAAAAAAAAADvnwAu758A9/CgAPXwoADR8KAA0fCg 194 | ANHwoADR758Ao+6fAAoAAAAAAAAAAO+fAADwoAAU8KEAJPChACTwoQAk8KEAJPChACTwoQAk8KEAJPCh 195 | ACTwoQAk8KEAJPChACTwoQAk8KEAJPCfACTvnwCt8KAA/++fAKfvnwAk758AJu+fAKnvnwD9758Ar/Ch 196 | ACTwoQAk8KEAJPChACTwoAAU758AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 197 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO+fACzvnwDd8KAA//CgAP/woAD/8KAA/++f 198 | ANfvnwA0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 199 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA758AAu+fADTvnwCl8KAA3fCg 200 | ANvwoACt758ALu6fAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 201 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO+f 202 | AALxoQAW86IAFgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 203 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7p8ADO+fAB7unwAe7p8ADO+fAAAAAAAAAAAAAAAA 204 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 205 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7p8AAO+fADDvnwCh758Aze+fAMvvnwCp7p8AKgAA 206 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 207 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADvnwAw758A5++fAP3woADl8KAA5++f 208 | AP3vnwDb758AOgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 209 | AAAAAAAAAAAAAAAAAAAAAAAA758AAO+fAAbvnwAK8KAACvCgAArwoAAK758AEO+fAKPwoAD/8KAAs/Cg 210 | ADjwnwA+758Ase+fAP3vnwCr8KAACvCgAArwoAAK8KAACvCgAArwoAAK8KAACvCgAArwoAAK8KAACvCg 211 | AArwoAAK758ACu+fAAbvnwAAAAAAAAAAAADvnwAM758Au++fAP3woAD/8KAA//CgAP/vnwDr758A6++f 212 | AOvvnwAwAAAAAAAAAADvnwAu758A8e+fAPXwoAD/8KAA//CgAP/woAD/8KAA//CgAP/woAD/8KAA//Cg 213 | AP/woAD/8KAA//CgAP/vnwD9758Aue+fAAoAAAAAAAAAAO6eAAzvnwC18KAA5/CgAOfwoADn8KAA5++f 214 | ANfvnwDn758A6++fADgAAAAAAAAAAO+fADTvnwDz758A8/CgAOfwoADn8KAA5/CgAOfwoADn8KAA5/Cg 215 | AOfwoADn8KAA5/CgAOfwoADn8KAA5/CgAOfvnwCz7p8ADAAAAAAAAAAAAAAAAO+fAAryoQAe8qIAIPKi 216 | ACDyogAg8aAAJPCfAKnwoAD/758Ar+6fADbvnwA8758Are+fAP3vnwCt8qIAIPKiACDyogAg8qIAIPKi 217 | ACDyogAg8qIAIPKiACDyogAg8qIAIPKiACDyogAg8qEAHu+fAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 218 | AAAAAAAAAAAAAAAAAAAAAAAA758AMO+fAN3vnwD7758A6e+fAOvvnwD78KAA0fCfADoAAAAAAAAAAAAA 219 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 220 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADvnwAA758AOPCgAKPwoADb8KAA1/CfAKvwnwA0AAAAAAAA 221 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 222 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADunwAA8KAACPCgABDwoAAO8J8ACO+f 223 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 224 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 225 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 226 | AAAAAAAAAAAAAAAAAAAAAAAA/////////////+H////A////jH/AAB4DwAAeA///jH///8D////h//// 227 | ///////////h////wP///4x/wAAeA8AAHgP//4x////A////4f/////////////D////gf///xj//8A8 228 | AAPAPAAD/xj///+B////w/////////////8= 229 | 230 | 231 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace MyFileManager 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new MainForm()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MyFileManager")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MyFileManager")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f8211453-eba8-4e0e-9fef-687981f516ea")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/Properties/Resources.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 MyFileManager.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 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 | /// Returns the cached ResourceManager instance used by this class. 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("MyFileManager.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 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 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/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 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/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 MyFileManager.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 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/Properties/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 48 | 55 | 56 | 70 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/RecentFilesUtil.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.IO; //Directory 目录 6 | using System.Reflection; //BindingFlags 枚举 7 | 8 | namespace MyFileManager 9 | { 10 | //关于电脑中"最近"文件夹的工具类,Win+R,输入Recent可以调出 11 | class RecentFilesUtil 12 | { 13 | //根据快捷方式名称(全路径)获取快捷方式的目标路径(真实路径) 14 | public static string GetShortcutTargetFilePath(string shortcutFilename) 15 | { 16 | //获取WScript.Shell类型 17 | var type = Type.GetTypeFromProgID("WScript.Shell"); 18 | 19 | //创建该类型实例 20 | object instance = Activator.CreateInstance(type); 21 | 22 | var result = type.InvokeMember("CreateShortCut", BindingFlags.InvokeMethod, null, instance, new object[] { shortcutFilename }); 23 | 24 | //获取到目标路径(真实路径) 25 | var targetFilePath = result.GetType().InvokeMember("TargetPath", BindingFlags.GetProperty, null, result, null) as string; 26 | 27 | return targetFilePath; 28 | } 29 | 30 | //获取最近使用的文件的路径的枚举集合 31 | public static IEnumerable GetRecentFiles() 32 | { 33 | //获取Recent路径 34 | var recentFolder = Environment.GetFolderPath(Environment.SpecialFolder.Recent); 35 | 36 | //获取电脑"Recent"文件夹下的文件名(全路径) 37 | return from file in Directory.EnumerateFiles(recentFolder) 38 | 39 | //只取快捷方式类型文件 40 | where Path.GetExtension(file) == ".lnk" 41 | 42 | //取出对应的真实路径 43 | select GetShortcutTargetFilePath(file); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/ThreadForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MyFileManager 2 | { 3 | partial class ThreadForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ThreadForm)); 33 | this.lvwThread = new System.Windows.Forms.ListView(); 34 | this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 35 | this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 36 | this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 37 | this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 38 | this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 39 | this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 40 | this.ilstIcons = new System.Windows.Forms.ImageList(this.components); 41 | this.btnFinish = new System.Windows.Forms.Button(); 42 | this.lblCurThreadNum = new System.Windows.Forms.Label(); 43 | this.txtCurThreadNum = new System.Windows.Forms.TextBox(); 44 | this.btnRefresh = new System.Windows.Forms.Button(); 45 | this.lblThreadsDescribe = new System.Windows.Forms.Label(); 46 | this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); 47 | this.timer = new System.Windows.Forms.Timer(this.components); 48 | this.SuspendLayout(); 49 | // 50 | // lvwThread 51 | // 52 | this.lvwThread.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 53 | | System.Windows.Forms.AnchorStyles.Left) 54 | | System.Windows.Forms.AnchorStyles.Right))); 55 | this.lvwThread.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 56 | this.columnHeader1, 57 | this.columnHeader2, 58 | this.columnHeader3, 59 | this.columnHeader4, 60 | this.columnHeader5, 61 | this.columnHeader6}); 62 | this.lvwThread.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 63 | this.lvwThread.FullRowSelect = true; 64 | this.lvwThread.ImeMode = System.Windows.Forms.ImeMode.NoControl; 65 | this.lvwThread.LargeImageList = this.ilstIcons; 66 | this.lvwThread.Location = new System.Drawing.Point(2, 34); 67 | this.lvwThread.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 68 | this.lvwThread.Name = "lvwThread"; 69 | this.lvwThread.Size = new System.Drawing.Size(926, 544); 70 | this.lvwThread.SmallImageList = this.ilstIcons; 71 | this.lvwThread.TabIndex = 0; 72 | this.lvwThread.UseCompatibleStateImageBehavior = false; 73 | this.lvwThread.View = System.Windows.Forms.View.Details; 74 | // 75 | // columnHeader1 76 | // 77 | this.columnHeader1.Text = "线程ID"; 78 | this.columnHeader1.Width = 90; 79 | // 80 | // columnHeader2 81 | // 82 | this.columnHeader2.Text = "基本优先级"; 83 | this.columnHeader2.Width = 90; 84 | // 85 | // columnHeader3 86 | // 87 | this.columnHeader3.Text = "当前优先级"; 88 | this.columnHeader3.Width = 90; 89 | // 90 | // columnHeader4 91 | // 92 | this.columnHeader4.Text = "当前状态"; 93 | this.columnHeader4.Width = 270; 94 | // 95 | // columnHeader5 96 | // 97 | this.columnHeader5.Text = "启动时间"; 98 | this.columnHeader5.Width = 130; 99 | // 100 | // columnHeader6 101 | // 102 | this.columnHeader6.Text = "内存地址"; 103 | this.columnHeader6.Width = 130; 104 | // 105 | // ilstIcons 106 | // 107 | this.ilstIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilstIcons.ImageStream"))); 108 | this.ilstIcons.TransparentColor = System.Drawing.Color.Transparent; 109 | this.ilstIcons.Images.SetKeyName(0, "thread.png"); 110 | // 111 | // btnFinish 112 | // 113 | this.btnFinish.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 114 | this.btnFinish.Location = new System.Drawing.Point(832, 588); 115 | this.btnFinish.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 116 | this.btnFinish.Name = "btnFinish"; 117 | this.btnFinish.Size = new System.Drawing.Size(87, 33); 118 | this.btnFinish.TabIndex = 1; 119 | this.btnFinish.Text = "结束线程"; 120 | this.btnFinish.UseVisualStyleBackColor = true; 121 | this.btnFinish.Click += new System.EventHandler(this.btnFinish_Click); 122 | // 123 | // lblCurThreadNum 124 | // 125 | this.lblCurThreadNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 126 | this.lblCurThreadNum.AutoSize = true; 127 | this.lblCurThreadNum.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 128 | this.lblCurThreadNum.Location = new System.Drawing.Point(20, 595); 129 | this.lblCurThreadNum.Name = "lblCurThreadNum"; 130 | this.lblCurThreadNum.Size = new System.Drawing.Size(56, 17); 131 | this.lblCurThreadNum.TabIndex = 2; 132 | this.lblCurThreadNum.Text = "线程数:"; 133 | // 134 | // txtCurThreadNum 135 | // 136 | this.txtCurThreadNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 137 | this.txtCurThreadNum.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 138 | this.txtCurThreadNum.Location = new System.Drawing.Point(67, 592); 139 | this.txtCurThreadNum.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 140 | this.txtCurThreadNum.Name = "txtCurThreadNum"; 141 | this.txtCurThreadNum.Size = new System.Drawing.Size(34, 23); 142 | this.txtCurThreadNum.TabIndex = 3; 143 | // 144 | // btnRefresh 145 | // 146 | this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 147 | this.btnRefresh.Location = new System.Drawing.Point(720, 589); 148 | this.btnRefresh.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 149 | this.btnRefresh.Name = "btnRefresh"; 150 | this.btnRefresh.Size = new System.Drawing.Size(87, 33); 151 | this.btnRefresh.TabIndex = 4; 152 | this.btnRefresh.Text = "刷新"; 153 | this.btnRefresh.UseVisualStyleBackColor = true; 154 | this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); 155 | // 156 | // lblThreadsDescribe 157 | // 158 | this.lblThreadsDescribe.AutoSize = true; 159 | this.lblThreadsDescribe.Location = new System.Drawing.Point(21, 13); 160 | this.lblThreadsDescribe.Name = "lblThreadsDescribe"; 161 | this.lblThreadsDescribe.Size = new System.Drawing.Size(0, 17); 162 | this.lblThreadsDescribe.TabIndex = 5; 163 | // 164 | // contextMenuStrip1 165 | // 166 | this.contextMenuStrip1.Name = "contextMenuStrip1"; 167 | this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4); 168 | // 169 | // timer 170 | // 171 | this.timer.Enabled = true; 172 | this.timer.Interval = 6000; 173 | this.timer.Tick += new System.EventHandler(this.btnRefresh_Click); 174 | // 175 | // ThreadForm 176 | // 177 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); 178 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 179 | this.ClientSize = new System.Drawing.Size(933, 637); 180 | this.Controls.Add(this.lblThreadsDescribe); 181 | this.Controls.Add(this.btnRefresh); 182 | this.Controls.Add(this.txtCurThreadNum); 183 | this.Controls.Add(this.lblCurThreadNum); 184 | this.Controls.Add(this.btnFinish); 185 | this.Controls.Add(this.lvwThread); 186 | this.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 187 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 188 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 189 | this.Name = "ThreadForm"; 190 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 191 | this.Text = "线程管理"; 192 | this.Load += new System.EventHandler(this.ThreadForm_Load); 193 | this.ResumeLayout(false); 194 | this.PerformLayout(); 195 | 196 | } 197 | 198 | #endregion 199 | 200 | private System.Windows.Forms.ListView lvwThread; 201 | private System.Windows.Forms.Button btnFinish; 202 | private System.Windows.Forms.Label lblCurThreadNum; 203 | private System.Windows.Forms.TextBox txtCurThreadNum; 204 | private System.Windows.Forms.Button btnRefresh; 205 | private System.Windows.Forms.ImageList ilstIcons; 206 | private System.Windows.Forms.Label lblThreadsDescribe; 207 | private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; 208 | private System.Windows.Forms.ColumnHeader columnHeader1; 209 | private System.Windows.Forms.ColumnHeader columnHeader2; 210 | private System.Windows.Forms.ColumnHeader columnHeader3; 211 | private System.Windows.Forms.ColumnHeader columnHeader4; 212 | private System.Windows.Forms.ColumnHeader columnHeader5; 213 | 214 | private System.Windows.Forms.Timer timer; 215 | private System.Windows.Forms.ColumnHeader columnHeader6; 216 | } 217 | } -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/ThreadForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Diagnostics; 6 | using System.Drawing; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Windows.Forms; 10 | 11 | namespace MyFileManager 12 | { 13 | public partial class ThreadForm : Form 14 | { 15 | //当前选中的进程 16 | private Process process; 17 | 18 | //当前进程中的所有线程 19 | private Dictionary curThreads = new Dictionary(); 20 | 21 | public ThreadForm(string processName) 22 | { 23 | process = Process.GetProcessesByName(processName)[0]; 24 | InitializeComponent(); 25 | } 26 | 27 | 28 | private void ThreadForm_Load(object sender, EventArgs e) 29 | { 30 | lblThreadsDescribe.Text = "进程" + process.ProcessName + "中的线程的详细信息如下:"; 31 | 32 | //显示所有线程 33 | ShowThreads(); 34 | } 35 | 36 | private void btnRefresh_Click(object sender, EventArgs e) 37 | { 38 | //刷新界面 39 | RefreshDisplay(); 40 | } 41 | 42 | private void btnFinish_Click(object sender, EventArgs e) 43 | { 44 | //结束指定线程 45 | StopThread(); 46 | } 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | //显示所有线程 55 | private void ShowThreads() 56 | { 57 | lvwThread.Items.Clear(); 58 | curThreads = new Dictionary(); 59 | 60 | //当前选中进程的所有线程 61 | ProcessThreadCollection threads = process.Threads; 62 | 63 | //当前线程数 64 | txtCurThreadNum.Text = threads.Count.ToString(); 65 | 66 | //开始数据更新 67 | lvwThread.BeginUpdate(); 68 | 69 | foreach (ProcessThread thread in threads) 70 | { 71 | curThreads.Add(thread.Id, thread); 72 | 73 | //线程Id 74 | ListViewItem item = lvwThread.Items.Add(thread.Id.ToString(), IconsIndexes.Thread); 75 | 76 | //基本优先级 77 | item.SubItems.Add(thread.BasePriority.ToString()); 78 | 79 | //当前优先级 80 | item.SubItems.Add(thread.CurrentPriority.ToString()); 81 | 82 | //当前状态 83 | item.SubItems.Add(GetThreadState(thread)); 84 | 85 | //启动时间 86 | item.SubItems.Add(thread.StartTime.ToLongTimeString()); 87 | 88 | //内存地址 89 | item.SubItems.Add(thread.StartAddress.ToString()); 90 | 91 | } 92 | 93 | //结束数据更新 94 | lvwThread.EndUpdate(); 95 | } 96 | 97 | 98 | //结束指定线程 99 | private void StopThread() 100 | { 101 | if (lvwThread.SelectedItems.Count > 0) 102 | { 103 | try 104 | { 105 | int id = Convert.ToInt32(lvwThread.SelectedItems[0].Text); 106 | ProcessThread thread = curThreads[id]; 107 | thread.Dispose(); 108 | 109 | RefreshDisplay(); 110 | } 111 | catch (Exception e) 112 | { 113 | MessageBox.Show("无法关闭此线程!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); 114 | } 115 | } 116 | else 117 | { 118 | MessageBox.Show("请选中一个线程!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); 119 | } 120 | } 121 | 122 | 123 | 124 | //刷新界面 125 | private void RefreshDisplay() 126 | { 127 | ShowThreads(); 128 | } 129 | 130 | 131 | //获取指定线程的状态 132 | private string GetThreadState(ProcessThread thread) 133 | { 134 | string state = ""; 135 | 136 | switch (thread.ThreadState) 137 | { 138 | case ThreadState.Initialized: 139 | state = "线程已经初始化但尚未启动"; 140 | break; 141 | 142 | case ThreadState.Ready: 143 | state = "线程准备在下一个可用的处理器上运行"; 144 | break; 145 | 146 | case ThreadState.Running: 147 | state = "当前正在使用处理器"; 148 | break; 149 | 150 | case ThreadState.Standby: 151 | state = "线程将要使用处理器"; 152 | break; 153 | 154 | case ThreadState.Terminated: 155 | state = "线程已完成执行并退出"; 156 | break; 157 | 158 | case ThreadState.Transition: 159 | state = "线程在可以执行前等待处理器之外的资源"; 160 | break; 161 | 162 | case ThreadState.Unknown: 163 | state = "状态未知"; 164 | break; 165 | 166 | case ThreadState.Wait: 167 | state = "正在等待外围操作完成或者资源释放"; 168 | break; 169 | 170 | default: 171 | break; 172 | } 173 | 174 | return state; 175 | } 176 | 177 | 178 | //图标索引 179 | class IconsIndexes 180 | { 181 | public const int Thread = 0; //线程图标 182 | } 183 | 184 | 185 | } 186 | } 187 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/ThreadForm.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 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 182, 17 122 | 123 | 124 | 125 | AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w 126 | LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 127 | ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACo 128 | BAAAAk1TRnQBSQFMAwEBAAFIAQABSAEAARQBAAEUAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABUAMA 129 | ARQDAAEBAQABIAYAARn/AP8A/wDhAAHJAZYBdwH6Af8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6 130 | Av8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6Af8B3wGjAWcB/f8A 131 | BQABjwF+AXIB7wH/AdQBugL/AdQBugL/AdQBugL/AdQBugL/AdQBugL/AdQBugL/AdQBugL/AdQBugL/ 132 | AdQBugL/AdQBugL/AdQBugL/AdQBugL/AdQBugH/AY8BfgFyAe//AAUAAY8BfgFyAe8B/wHUAboC/wHU 133 | AboC/wHUAboC/wHUAboC/wHUAboC/wHUAboC/wHUAboC/wHUAboC/wHUAboC/wHUAboC/wHUAboC/wHU 134 | AboC/wHUAboB/wGPAX4BcgHv/wAFAANRAaIDWQG/A1kBvwNZAb8DWQG/A1kBvwNZAb8DWQG/A1kBvwNZ 135 | Ab8DWQG/A1kBvwNZAb8DWQG/A1ABnf8A/wBGAAMUARwDUQGgA1EBoANRAaADUQGgA1EBoANRAaADUQGg 136 | A1EBoANRAaADUQGgA1EBoANRAaADUQGgAxoBJP8A/wBGAAMDAQQDFwEgAxcBIAMXASADFwEgAxcBIAMX 137 | ASADFwEgAxcBIAMXASADFwEgAxcBIAMXASADFwEgAwYBCP8A/wBGAAMPARQDFwEgAxcBIAMXASADFwEg 138 | AxcBIAMXASADFwEgAxcBIAMXASADFwEgAxcBIAMXASADFwEgAwwBEP8ABQABqgGJAXsB9QH/AdQBugL/ 139 | AdQBugL/AdQBugL/AdQBugL/AdQBugL/AdQBugL/AdQBugL/AdQBugL/AdQBugL/AdQBugL/AdQBugL/ 140 | AdQBugL/AdQBugH/Ac4BlgGAAfv/AAUAAY8BfgFyAe8B/wHUAboC/wHUAboC/wHUAboC/wHUAboC/wHU 141 | AboC/wHUAboC/wHUAboC/wHUAboC/wHUAboC/wHUAboC/wHUAboC/wHUAboC/wHUAboB/wGPAX4BcgHv 142 | /wAFAAGPAX4BcgHvAf8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6 143 | Av8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6Av8B1AG6Af8BjwF+AXIB7/8ABQADSQGIA0wBjwNMAY8DTAGP 144 | A0wBjwNMAY8DTAGPA0wBjwNMAY8DTAGPA0wBjwNMAY8DTAGPA0wBjwNIAYT/AP8A/wD/ALwAAUIBTQE+ 145 | BwABPgMAASgDAAFQAwABFAMAAQEBAAEBBQAB8BcAA/8BAAL/AfAJAAL/AfAJAAL/AfAJAAHgAQABMAkA 146 | AeABAAEwCQAB4AEAATAJAAHgAQABMAkAAv8B8AkAAeABAAEwCQAC/wHwCQAB4AEAATAJAAL/AfAJAAHg 147 | AQABMAkAAeABAAEwCQAB4AEAATAJAAHgAQABMAkAAeABAAEwCQAC/wHwCQAC/wHwCQAC/wHwCQAL 148 | 149 | 150 | 151 | 17, 17 152 | 153 | 154 | 281, 17 155 | 156 | 157 | 48 158 | 159 | 160 | 161 | 162 | AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA 163 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 164 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 165 | AAAAAAAAAAAAAAAAAADW088C1tPPEtfT0BTX09AU19PQFNfT0BTX09AU19PQFNfT0BTX09AU19PQFNfT 166 | 0BTX09AU19PQFNfT0BTX09AU19PQFNfT0BTX09AU19PQFNfT0BTX09AU19PQFNfT0BTX09AU19PQFNfT 167 | 0BTX09AU1tPPEtbTzwIAAAAAAAAAANXSzhLW08/v19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT 168 | 0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT 169 | 0P/X09D/19PQ/9fT0P/W08/v1dLOEgAAAAAAAAAA1dLOEtbTz+/X09D/19PQ/9fT0P/X09D/19PQ/9fT 170 | 0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT 171 | 0P/X09D/19PQ/9fT0P/X09D/19PQ/9bTz+/V0s4SAAAAAAAAAADV0s4S1tPP79fT0P/X09D/19PQ/9fT 172 | 0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT 173 | 0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/1tPP79XSzhIAAAAAAAAAANbSzw7W0s/D19PP0dfT 174 | z9HX08/R19PP0dfTz9HX08/R19PP0dfTz9HX08/R19PP0dfTz9HX08/R19PP0dfTz9HX08/R19PP0dfT 175 | z9HX08/R19PP0dfTz9HX08/R19PP0dfTz9HX08/R19PP0dfTz9HW0s/D1tLPDgAAAAAAAAAA1tHRAtbR 176 | 0BjX084a19POGtfTzhrX084a19POGtfTzhrX084a19POGtfTzhrX084a19POGtfTzhrX084a19POGtfT 177 | zhrX084a19POGtfTzhrX084a19POGtfTzhrX084a19POGtfTzhrX084a19POGtbR0BjW0dECAAAAAAAA 178 | AAAAAAAAAAAAAGCPvQRgkL0kYJG9KGCRvShgkb0oYJG9KGCRvShgkb0oYJG9KGCRvShgkb0oYJG9KGCR 179 | vShgkb0oYJG9KGCRvShgkb0oYJG9KGCRvShgkb0oYJG9KGCRvShgkb0oYJG9KGCQvSRgj70EAAAAAAAA 180 | AAAAAAAAAAAAAAAAAAAAAAAAYJC9GmCQvb1gkb3XYJG912CRvddgkb3XYJG912CRvddgkb3XYJG912CR 181 | vddgkb3XYJG912CRvddgkb3XYJG912CRvddgkb3XYJG912CRvddgkb3XYJG912CRvddgkb3XYJC9vWCQ 182 | vRoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABhkb4eYJG+4WGRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GR 183 | vv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GR 184 | vv9gkb7hYZG+HgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGGRvh5gkb7hYZG+/2GRvv9hkb7/YZG+/2GR 185 | vv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GR 186 | vv9hkb7/YZG+/2CRvuFhkb4eAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYJG9HGCQvcdgkL7hYJC+4WCQ 187 | vuFgkL7hYJC+4WCQvuFgkL7hYJC+4WCQvuFgkL7hYJC+4WCQvuFgkL7hYJC+4WCQvuFgkL7hYJC+4WCQ 188 | vuFgkL7hYJC+4WCQvuFgkL7hYJC9x2CRvRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgkb0EYJC9GmCQ 189 | vh5gkL4eYJC+HmCQvh5gkL4eYJC+HmCQvh5gkL4eYJC+HmCQvh5gkL4eYJC+HmCQvh5gkL4eYJC+HmCQ 190 | vh5gkL4eYJC+HmCQvh5gkL4eYJC+HmCQvh5gkL0aYJG9BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGCP 191 | vwRfj74gX46+JF+OviRfjr4kX46+JF+OviRfjr4kX46+JF+OviRfjr4kX46+JF+OviRfjr4kX46+JF+O 192 | viRfjr4kX46+JF+OviRfjr4kX46+JF+OviRfjr4kX46+JF+PviBgj78EAAAAAAAAAAAAAAAAAAAAAAAA 193 | AAAAAAAAYJC+HGCQvtNgkL7vYJC+72CQvu9gkL7vYJC+72CQvu9gkL7vYJC+72CQvu9gkL7vYJC+72CQ 194 | vu9gkL7vYJC+72CQvu9gkL7vYJC+72CQvu9gkL7vYJC+72CQvu9gkL7vYJC+02CQvhwAAAAAAAAAAAAA 195 | AAAAAAAAAAAAAAAAAABhkb4eYJG+4WGRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GR 196 | vv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9gkb7hYZG+HgAA 197 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAGGRvh5gkb7hYZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GR 198 | vv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2CR 199 | vuFhkb4eAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYZG+HGCRvs9hkb3rYZG962GRvethkb3rYZG962GR 200 | vethkb3rYZG962GRvethkb3rYZG962GRvethkb3rYZG962GRvethkb3rYZG962GRvethkb3rYZG962GR 201 | vethkb3rYJG+z2GRvhwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 202 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 203 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGCRvQRgkb0cYZG+HmGR 204 | vh5hkb4eYZG+HmGRvh5hkb4eYZG+HmGRvh5hkb4eYZG+HmGRvh5hkb4eYZG+HmGRvh5hkb4eYZG+HmGR 205 | vh5hkb4eYZG+HmGRvh5hkb4eYZG+HmCRvRxgkb0EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYJG9HGCR 206 | vcdgkb7hYJG+4WCRvuFgkb7hYJG+4WCRvuFgkb7hYJG+4WCRvuFgkb7hYJG+4WCRvuFgkb7hYJG+4WCR 207 | vuFgkb7hYJG+4WCRvuFgkb7hYJG+4WCRvuFgkb7hYJG9x2CRvRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 208 | AABhkb4eYJG+4WGRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GR 209 | vv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9gkb7hYZG+HgAAAAAAAAAAAAAAAAAA 210 | AAAAAAAAAAAAAGGRvh5gkb7hYZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GR 211 | vv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2GRvv9hkb7/YZG+/2CRvuFhkb4eAAAAAAAA 212 | AAAAAAAAAAAAAAAAAAAAAAAAYJC9GmCQvr1gkb7XYJG+12CRvtdgkb7XYJG+12CRvtdgkb7XYJG+12CR 213 | vtdgkb7XYJG+12CRvtdgkb7XYJG+12CRvtdgkb7XYJG+12CRvtdgkb7XYJG+12CRvtdgkb7XYJC+vWCQ 214 | vRoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgj70EX5C+JGCRvyhgkb8oYJG/KGCRvyhgkb8oYJG/KGCR 215 | vyhgkb8oYJG/KGCRvyhgkb8oYJG/KGCRvyhgkb8oYJG/KGCRvyhgkb8oYJG/KGCRvyhgkb8oYJG/KGCR 216 | vyhfkL4kYI+9BAAAAAAAAAAAAAAAAAAAAADW1M8E1tPPMNfTzjTX084019PONNfTzjTX084019PONNfT 217 | zjTX084019PONNfTzjTX084019PONNfTzjTX084019PONNfTzjTX084019PONNfTzjTX084019PONNfT 218 | zjTX084019PONNfTzjTX08401tPPMNbUzwQAAAAAAAAAANXTzxDW08/R19PP4dfTz+HX08/h19PP4dfT 219 | z+HX08/h19PP4dfTz+HX08/h19PP4dfTz+HX08/h19PP4dfTz+HX08/h19PP4dfTz+HX08/h19PP4dfT 220 | z+HX08/h19PP4dfTz+HX08/h19PP4dfTz+HW08/R1dPPEAAAAAAAAAAA1dLOEtbTz+/X09D/19PQ/9fT 221 | 0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT 222 | 0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9bTz+/V0s4SAAAAAAAAAADV0s4S1tPP79fT 223 | 0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT 224 | 0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/19PQ/9fT0P/X09D/1tPP79XSzhIAAAAAAAAAANbT 225 | zxDW0s/N1tPP3dbTz93W08/d1tPP3dbTz93W08/d1tPP3dbTz93W08/d1tPP3dbTz93W08/d1tPP3dbT 226 | z93W08/d1tPP3dbTz93W08/d1tPP3dbTz93W08/d1tPP3dbTz93W08/d1tPP3dbTz93W0s/N1tPPEAAA 227 | AAAAAAAA1tPQAtbSzw7X088Q19PPENfTzxDX088Q19PPENfTzxDX088Q19PPENfTzxDX088Q19PPENfT 228 | zxDX088Q19PPENfTzxDX088Q19PPENfTzxDX088Q19PPENfTzxDX088Q19PPENfTzxDX088Q19PPENbS 229 | zw7W09ACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 230 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 231 | AAAAAAAAAAAAAAAAAAAAAAAA///////////AAAADwAAAA8AAAAPAAAAD///////////wAAAP8AAAD/AA 232 | AA/wAAAP///////////wAAAP8AAAD/AAAA/wAAAP///////////wAAAP8AAAD/AAAA/wAAAP//////// 233 | ///AAAADwAAAA8AAAAPAAAAD//////////8= 234 | 235 | 236 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/bin/Debug/MyFileManager.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/bin/Debug/MyFileManager.exe -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/bin/Debug/MyFileManager.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/bin/Debug/MyFileManager.pdb -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/bin/Release/MyFileManager.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/bin/Release/MyFileManager.exe -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/bin/Release/MyFileManager.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/bin/Release/MyFileManager.pdb -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.AboutForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.AboutForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.AttributeForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.AttributeForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.FileAndFolderMonitorForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.FileAndFolderMonitorForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.MainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.MainForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.NewFileForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.NewFileForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.PrivilegeForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.PrivilegeForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.ProcessForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.ProcessForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.Properties.Resources.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.ThreadForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.ThreadForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 56ba7efe36052c98f333047bebc712c0d0d7eb7f 2 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | E:\Codes\GitHub\MyFileManager\MyFileManager\bin\Debug\MyFileManager.exe 2 | E:\Codes\GitHub\MyFileManager\MyFileManager\bin\Debug\MyFileManager.pdb 3 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.csprojAssemblyReference.cache 4 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.AboutForm.resources 5 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.AttributeForm.resources 6 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.FileAndFolderMonitorForm.resources 7 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.MainForm.resources 8 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.NewFileForm.resources 9 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.PrivilegeForm.resources 10 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.ProcessForm.resources 11 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.Properties.Resources.resources 12 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.ThreadForm.resources 13 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.csproj.GenerateResource.cache 14 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.csproj.CoreCompileInputs.cache 15 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.exe 16 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Debug\MyFileManager.pdb 17 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.exe -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Debug/MyFileManager.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Debug/MyFileManager.pdb -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.AboutForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.AboutForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.AttributeForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.AttributeForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.FileAndFolderMonitorForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.FileAndFolderMonitorForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.MainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.MainForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.NewFileForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.NewFileForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.PrivilegeForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.PrivilegeForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.ProcessForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.ProcessForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.Properties.Resources.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.ThreadForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.ThreadForm.resources -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 56ba7efe36052c98f333047bebc712c0d0d7eb7f 2 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | E:\Codes\GitHub\MyFileManager\MyFileManager\bin\Release\MyFileManager.exe 2 | E:\Codes\GitHub\MyFileManager\MyFileManager\bin\Release\MyFileManager.pdb 3 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.csprojAssemblyReference.cache 4 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.AboutForm.resources 5 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.AttributeForm.resources 6 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.FileAndFolderMonitorForm.resources 7 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.MainForm.resources 8 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.NewFileForm.resources 9 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.PrivilegeForm.resources 10 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.ProcessForm.resources 11 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.Properties.Resources.resources 12 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.ThreadForm.resources 13 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.csproj.GenerateResource.cache 14 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.csproj.CoreCompileInputs.cache 15 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.exe 16 | E:\Codes\GitHub\MyFileManager\MyFileManager\obj\Release\MyFileManager.pdb 17 | -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.exe -------------------------------------------------------------------------------- /MyFileManager/MyFileManager/obj/Release/MyFileManager.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/MyFileManager/MyFileManager/obj/Release/MyFileManager.pdb -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## MyFileManager 2 | [![MyFileManager](https://img.shields.io/badge/MyFileManager-v1.4.1-brightgreen.svg)]( 3 | https://github.com/Yuziquan/MyFileManager) 4 | [![license](https://img.shields.io/packagist/l/doctrine/orm.svg)](https://github.com/Yuziquan/MyFileManager/blob/master/LICENSE) 5 | 6 | ### 一、功能预览 7 | 8 | #### 1. 主窗体 9 | 10 | ![1](https://github.com/Yuziquan/MyFileManager/blob/master/Screenshots/1.gif) 11 | 12 |
13 | 14 | #### 2. 新建文件窗口 15 | 16 | 17 | 18 | ![2](https://github.com/Yuziquan/MyFileManager/blob/master/Screenshots/2.gif) 19 | 20 |
21 | 22 | #### 3. “最近访问”功能区 23 | 24 | ![3](https://github.com/Yuziquan/MyFileManager/blob/master/Screenshots/3.gif) 25 | 26 |
27 | 28 | #### 4. 进程/线程管理窗口 29 | 30 | ![4-1](https://github.com/Yuziquan/MyFileManager/blob/master/Screenshots/4-1.gif) 31 | 32 |
33 | 34 |
35 | 36 | ![4-2](https://github.com/Yuziquan/MyFileManager/blob/master/Screenshots/4-2.gif) 37 | 38 |
39 | 40 | #### 5. 文件/文件夹监控窗口 41 | 42 | ![5](https://github.com/Yuziquan/MyFileManager/blob/master/Screenshots/5.gif) 43 | 44 |
45 | 46 | #### 6. 文件属性窗口 47 | 48 | ![6](https://github.com/Yuziquan/MyFileManager/blob/master/Screenshots/6.gif) 49 | 50 |
51 | 52 | #### 7. 权限管理窗口 53 | 54 | ![7](https://github.com/Yuziquan/MyFileManager/blob/master/Screenshots/7.gif) 55 | 56 |
57 | 58 | #### 8. 快速搜索窗口 59 | 60 | 61 | ![8](https://github.com/Yuziquan/MyFileManager/blob/master/Screenshots/8.gif) 62 | 63 |
64 | 65 | *** 66 | 67 | ### 二、版本更新 68 | 69 | #### 1、V1.0.0 70 | 71 | 1. 实现了对文件、文件夹的复制、粘贴、剪切、删除功能; 72 | 2. 实现了对文件夹的双击打开、对多种类型的文件的双击打开查看功能; 73 | 3. 实现了主窗体左边驱动器树形视图(显示各驱动器及内部各文件夹列表)、右边文件列表视图(显示当前文件夹下所包含的文件和下一级文件夹)的显示,以及两者的联动显示。左右窗体间设有分隔条,拖动可改变左右窗体大小。文件列表视图中包含了名称、修改日期、类型、大小四个字段; 74 | 4. 实现了主窗体上方地址栏显示的文件路径在用户操作过程中的实时更新; 75 | 5. 实现了主窗体下方状态栏实时显示当前文件列表的项目总数; 76 | 6. 实现了在主窗体右边文件列表视图进行右键时弹出的上下文菜单,该菜单会根据当前是否选中某一文件项而将菜单项加以调整。例如,右键时,若当前没有选中文件项,则可以显示出“查看”、“新建文件”、“新建文件夹”等菜单项;但是若当前选中了某一文件项,则可以显示出“复制”、“剪切”、“重命名”等菜单项; 77 | 7. 实现了主窗体地址栏、状态栏的显示和隐藏可以由用户控制; 78 | 8. 实现了主窗体右边文件列表的四种视图:大图标、小图标、列表、详细信息; 79 | 9. 实现了主窗体右边文件列表的刷新操作; 80 | 10. 为每个窗体配置相应的icon图标。 81 | 82 | 83 |
84 | 85 | *** 86 | 87 | #### 2、V1.1.2 88 | 89 | 1. 实现了文件、文件夹的重命名功能。具体操作是在主窗体右边文件列表中右键某一文件项,在弹出的上下文菜单中选中“重命名”菜单项,此时弹出一个重命名窗口,在该窗口中完成文件、文件夹重命名操作。 90 | 2. 实现了新建文件夹功能; 91 | 3. 实现了文件、文件夹属性的查看; 92 | 4. 实现了对当前计算机的进程、线程管理功能; 93 | 5. 实现了在当前路径下“返回上一级目录”的功能; 94 | 6. 实现了在主窗体上方地址栏直接输入文件路径,然后直接回车查看该路径下的文件列表的功能; 95 | 7. 修复了在主窗体右边文件列表中进行新建文件/文件夹、删除、重命名、粘贴操作时,左边驱动器树形视图的节点不能实时更新并显示的bug; 96 | 8. 修复了主窗体上方地址栏显示的文件路径在用户操作过程中有时更新不正确的bug。 97 | 98 |
99 | 100 | *** 101 | 102 | #### 3、V1.3.0 103 | 104 | 1. 实现了对当前计算机文件、文件夹的监控功能。可定制化程度较高,既可以实现对特定路径的监控,也可以实现对具体磁盘驱动器的监控,甚至是全盘监控。监控过程中的日志均高亮显示在监控窗口中,也支持将日志保存到特定路径; 105 | 2. 实现了用户在主窗体右边文件列表中的历史访问路径的前进、后退功能; 106 | 3. 实现了新建文件功能,用户可以根据自己的需要在弹出的窗口中输入文件的全名(包括“文件名+拓展名”),从而新建各种类型的文件; 107 | 4. 实现了”最近访问“的功能,用户可以在该功能区找到最近使用的文件,并双击打开查看; 108 | 5. 实现了对文件/文件夹的快速搜索功能(基于多线程)。使用时先在地址栏输入特定文件路径(或者直接进入特定文件路径),然后直接在主窗体上方搜索框中输入你所要搜索的文件名或关键字,最后回车即可在当前文件列表区中显示出搜索到的结果,搜索到的文件/文件夹支持直接双击查看或编辑。实测时,比windows自带的文件/文件夹搜索功能快一点。但目前不支持对于整个磁盘驱动器进行搜索,只支持在文件夹下进行搜索; 109 | 6. 将重命名功能加以改进,实现了类似windows的”选定->再单击->出现重命名状态->进行重命名“功能; 110 | 7. 实现了对当前计算机的文件/文件夹的权限管理功能。权限管理包括:完全控制、修改、读取和执行、列出文件夹内容、读取、写入共6个模块。 111 | 112 |
113 | 114 | *** 115 | 116 | #### 4、V1.4.1 117 | 118 | 1. 对文件/文件夹的快速搜索功能进一步改进,使用另一种多线程搜索策略,实测比windows自带的文件/文件夹搜索功能快几倍; 119 | 2. 增加了在文件/文件夹的快速搜索过程中,对于搜索结果总数在主窗体下方状态栏的实时显示; 120 | 3. 修复了此前多线程搜索时”只支持在文件夹下进行搜索“的bug,目前支持对除系统盘以外的其他磁盘驱动器进行搜索,系统盘因为权限保护原因而无法访问。 121 | 122 |
123 | 124 | *** 125 | ### 三、遵循的WinForm 控件命名规范 126 | 127 | > https://www.cnblogs.com/codefly/p/3216484.html 128 | 129 | 130 |
131 | 132 | *** 133 | ### 四、约定事项 134 | > 1. TreeNode的Tag字段放置真实路径,Text字段放置显示的文件夹名或驱动器名; 135 | > 2. ListViewItem的Tag字段放置真实路径,Text字段放置显示的文件夹名或文件名。 136 | 137 |
138 | 139 | *** 140 | ### 五、未修复的bug以及未完成的功能 141 | 1. 在主窗体右边文件列表的大图标视图中,大图标不能正常显示; 142 | 2. 不能实现.png、.jpg图片的预览; 143 | 3. 在权限管理部分有些未修复的bug,主要是因为微软官方的资料缺乏或未公开; 144 | 4. 在粘贴较多文件时界面停止响应;(因为未使用多线程,可以在显示界面的同时,另外开启一个线程来进行粘贴操作); 145 | 5. 快速搜索中,因为对于系统盘没有权限访问,导致无法对系统盘进行搜索; 146 | 6. 新建一个文件之后,如果马上双击打开查看,则会提示”另一个程序正在使用此文件,进程无法访问“。如果再刷新几次,又能正常打开查看; 147 | 7. 还未实现主窗体右边文件列表的”排序方式“功能; 148 | 8. 还未引入快捷键功能; 149 | 9. 选中多个文件/文件夹时只支持间隔选择,也就是按住Ctrl键不放逐一单击。还未支持选定全部,也就是Ctrl+A; 150 | 10. 快速搜索的结果没有像windows那样过滤掉一些系统文件和隐藏文件; 151 | 11. 快速搜索过程中不支持实时停止。 152 | 153 | 154 | 155 |
156 | 157 | *** 158 | 159 | ### 六、参考资料 160 | 1. 李鑫,祝惠娟. C#编程入门与应用[M]. 北京:清华大学出版社, 2017. 1-512 161 | 2. 潘爱民. Windows内核原理与实现[M]. 北京:电子工业出版社, 2013. 1-680 162 | 3. https://docs.microsoft.com/zh-cn/dotnet/csharp/ (C# 指南) 163 | 4. https://docs.microsoft.com/zh-cn/dotnet/framework/winforms/index (Windows 窗体) 164 | 5. https://docs.microsoft.com/zh-cn/dotnet/framework/winforms/controls/treeview-control-windows-forms (TreeView 控件(Windows 窗体)) 165 | 6. https://blog.csdn.net/Lyncai/article/details/26681645 (Path.Combine (合并两个路径字符串)方法的一些使用细节) 166 | 7. https://blog.csdn.net/luchuanbo/article/details/1630095 (C#中TreeView组件使用方法初步) 167 | 8. https://blog.csdn.net/eastmount/article/details/18474655 (C# 系统应用之获取Windows最近使用记录) 168 | 9. https://www.cnblogs.com/shenbing/p/5629716.html (C#编程,TreeView控件的学习) 169 | 10. https://blog.csdn.net/qth515/article/details/77890558 (C# SplitContainer 控件详细用法) 170 | 11. https://blog.csdn.net/u010450592/article/details/46817233 (winfrom窗体的Anchor属性、Dock属性) 171 | 12. https://www.cnblogs.com/menghuijinxi/p/5734274.html (关于.Net中Process的使用方法和各种用途汇总(一):Process用法简介) 172 | 13. https://blog.csdn.net/qq_29176825/article/details/77183599 (c# 设置窗体位置) 173 | 14. https://bbs.csdn.net/topics/390753352 (C# ListView如何通代码触发BeforeLabelEdit事件) 174 | 15. https://blog.csdn.net/jiliqiang1986/article/details/52034964 (C#中怎样使控件随着窗体一起变化大小(常见困难以及修正)) 175 | 16. https://blog.csdn.net/qq_36526650/article/details/78442382 (c# 窗体放大窗体中的控件也随着窗体放大) 176 | 17. https://www.cnblogs.com/hao-1234-1234/p/8668258.html (C#中的Round()不是我们中国人理解的四舍五入,是老外的四舍五入) 177 | 18. https://www.cnblogs.com/TianFang/p/3427776.html (在C#中快速查询文件) 178 | 19. https://www.cnblogs.com/yinqixin/p/5056307.html (分分钟用上C#中的委托和事件) 179 | 20. https://www.cnblogs.com/ruanraun/p/6037075.html (委托学习总结(一)浅谈对C#委托理解) 180 | 21. https://www.cnblogs.com/liuhaorain/p/3911845.html (C#委托使用详解(Delegates)) 181 | 22. https://blog.csdn.net/honantic/article/details/46884537 ([深入学习C#]C#实现多线程的方法:线程(Thread类)和线程池(ThreadPool)) 182 | 23. http://www.cnblogs.com/kissdodog/archive/2013/03/28/2986026.html (线程池之ThreadPool类与辅助线程 - <第二篇>) 183 | 24. https://www.cnblogs.com/changrulin/p/4775053.html (C#学习笔记----.net操作进程) 184 | 25. https://www.cnblogs.com/tommyli/p/4054296.html (C# 获取进程或线程的相关信息) 185 | 26. https://blog.csdn.net/u011108093/article/details/79448060 (ListView的BeginUpdate()和EndUpdate()作用) 186 | 27. https://www.cnblogs.com/songxingzhu/p/3677307.html (InvokeRequired和Invoke) 187 | 28. https://blog.csdn.net/chen_zw/article/details/7916262 (C# FileSystemWatcher用法详解) 188 | 29. http://www.cnblogs.com/babycool/p/3569183.html (C#如何以管理员身份运行程序) 189 | 30. https://www.cnblogs.com/cteng-common/p/fileaccess.html (C#文件夹权限操作整理) 190 | 31. https://dotblogs.com.tw/larrynung/archive/2012/09/27/75118.aspx ([C#]如何取出最近在Windows上所使用的文件檔案) 191 | 32. https://www.cnblogs.com/wolf-sun/p/4591734.html (C#修改文件或文件夹的权限,为指定用户、用户组添加完全控制权限) 192 | 33. https://blog.csdn.net/u011623102/article/details/45335889 (文件操作中出现system.notsupportedexception异常) 193 | 34. https://blog.csdn.net/linux7985/article/details/8646550 (C# Winform对文件夹的权限判断及处理) 194 | 35. https://blog.csdn.net/mon_ice/article/details/64121050?locationNum=8&fps=1 (c#获取文件权限) 195 | 36. https://support.microsoft.com/zh-cn/help/243330/well-known-security-identifiers-in-windows-operating-systems (在 Windows 操作系统中的公认的安全标识符) 196 | 37. https://blog.csdn.net/codeeer/article/details/6732040 (ListView的ItemCheck和ItemChecked事件) 197 | 38. https://baike.baidu.com/item/windows%E6%9D%83%E9%99%90/10292739?fr=aladdin (windows权限) 198 | 39. https://docs.microsoft.com/zh-cn/dotnet/framework/winforms/controls/creating-an-explorer-style-interface-with-the-listview-and-treeview (演练:使用设计器创建带有 ListView 和 TreeView 控件的资源管理器样式的界面) 199 | 40. https://blog.csdn.net/u014654707/article/details/80083091 (Visual Studio 2017 - Windows应用程序打包成exe文件(2)- Advanced Installer) 200 | 41. https://blog.csdn.net/baidu_27438681/article/details/72823844 ( 201 | Visual Stdio 2015打包安装项目的方法(使用Visual Studio Installer)) 202 | 42. https://baike.baidu.com/item/%E8%B5%84%E6%BA%90%E7%AE%A1%E7%90%86%E5%99%A8/1951545 (资源管理器的定义) 203 | 204 | -------------------------------------------------------------------------------- /Screenshots/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/Screenshots/1.gif -------------------------------------------------------------------------------- /Screenshots/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/Screenshots/2.gif -------------------------------------------------------------------------------- /Screenshots/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/Screenshots/3.gif -------------------------------------------------------------------------------- /Screenshots/4-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/Screenshots/4-1.gif -------------------------------------------------------------------------------- /Screenshots/4-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/Screenshots/4-2.gif -------------------------------------------------------------------------------- /Screenshots/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/Screenshots/5.gif -------------------------------------------------------------------------------- /Screenshots/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/Screenshots/6.gif -------------------------------------------------------------------------------- /Screenshots/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/Screenshots/7.gif -------------------------------------------------------------------------------- /Screenshots/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/Screenshots/8.gif -------------------------------------------------------------------------------- /可执行程序(V1.4.1) [直接下载体验]/Windows资源管理器.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/可执行程序(V1.4.1) [直接下载体验]/Windows资源管理器.exe -------------------------------------------------------------------------------- /用到的图标/CD_ROM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/CD_ROM.png -------------------------------------------------------------------------------- /用到的图标/about.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/about.ico -------------------------------------------------------------------------------- /用到的图标/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/clear.png -------------------------------------------------------------------------------- /用到的图标/disk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/disk.png -------------------------------------------------------------------------------- /用到的图标/file_manager.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/file_manager.ico -------------------------------------------------------------------------------- /用到的图标/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/folder.png -------------------------------------------------------------------------------- /用到的图标/group_or_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/group_or_user.png -------------------------------------------------------------------------------- /用到的图标/left_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/left_arrow.png -------------------------------------------------------------------------------- /用到的图标/monitor.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/monitor.ico -------------------------------------------------------------------------------- /用到的图标/new_folder.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/new_folder.ico -------------------------------------------------------------------------------- /用到的图标/privilege.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/privilege.png -------------------------------------------------------------------------------- /用到的图标/privilege_manager.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/privilege_manager.ico -------------------------------------------------------------------------------- /用到的图标/process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/process.png -------------------------------------------------------------------------------- /用到的图标/process_manager.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/process_manager.ico -------------------------------------------------------------------------------- /用到的图标/property.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/property.ico -------------------------------------------------------------------------------- /用到的图标/recent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/recent.png -------------------------------------------------------------------------------- /用到的图标/right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/right_arrow.png -------------------------------------------------------------------------------- /用到的图标/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/save.png -------------------------------------------------------------------------------- /用到的图标/start_monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/start_monitor.png -------------------------------------------------------------------------------- /用到的图标/stop_monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/stop_monitor.png -------------------------------------------------------------------------------- /用到的图标/thread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/thread.png -------------------------------------------------------------------------------- /用到的图标/thread_manager.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/thread_manager.ico -------------------------------------------------------------------------------- /用到的图标/u_pan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/u_pan.png -------------------------------------------------------------------------------- /用到的图标/up_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/MyFileManager/97936bcd9ff905a0183c8f8d15c570d6ce4656a3/用到的图标/up_arrow.png --------------------------------------------------------------------------------