diff --git a/FileViewer/FileViewer.sln b/FileViewer/FileViewer.sln index b4c6a12..13c9181 100644 --- a/FileViewer/FileViewer.sln +++ b/FileViewer/FileViewer.sln @@ -1,25 +1,25 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.572 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileViewer", "FileViewer\FileViewer.csproj", "{20CD6B9D-13A3-4A19-B381-8C50D535CF52}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {20CD6B9D-13A3-4A19-B381-8C50D535CF52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {20CD6B9D-13A3-4A19-B381-8C50D535CF52}.Debug|Any CPU.Build.0 = Debug|Any CPU - {20CD6B9D-13A3-4A19-B381-8C50D535CF52}.Release|Any CPU.ActiveCfg = Release|Any CPU - {20CD6B9D-13A3-4A19-B381-8C50D535CF52}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {69FBC6C3-5B7E-4D44-A145-251166C62132} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.572 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileViewer", "FileViewer\FileViewer.csproj", "{20CD6B9D-13A3-4A19-B381-8C50D535CF52}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {20CD6B9D-13A3-4A19-B381-8C50D535CF52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20CD6B9D-13A3-4A19-B381-8C50D535CF52}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20CD6B9D-13A3-4A19-B381-8C50D535CF52}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20CD6B9D-13A3-4A19-B381-8C50D535CF52}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {69FBC6C3-5B7E-4D44-A145-251166C62132} + EndGlobalSection +EndGlobal diff --git a/FileViewer/FileViewer/App.config b/FileViewer/FileViewer/App.config index 731f6de..00bfd11 100644 --- a/FileViewer/FileViewer/App.config +++ b/FileViewer/FileViewer/App.config @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/FileViewer/FileViewer/FileViewer.csproj b/FileViewer/FileViewer/FileViewer.csproj index 914317e..284b240 100644 --- a/FileViewer/FileViewer/FileViewer.csproj +++ b/FileViewer/FileViewer/FileViewer.csproj @@ -1,112 +1,112 @@ - - - - - Debug - AnyCPU - {20CD6B9D-13A3-4A19-B381-8C50D535CF52} - WinExe - FileViewer - FileViewer - v4.6.1 - 512 - true - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - false - - - 6615729D95AEA8BF40C8E9C113562860B3957EC0 - - - FileViewer_TemporaryKey.pfx - - - - - - - - - - - - - - - - - - Form - - - Form1.cs - - - - - Form - - - splash.cs - - - Form1.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - - - - - - - - - - - + + + + + Debug + AnyCPU + {20CD6B9D-13A3-4A19-B381-8C50D535CF52} + WinExe + FileViewer + FileViewer + v4.6.1 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + false + + + 6615729D95AEA8BF40C8E9C113562860B3957EC0 + + + FileViewer_TemporaryKey.pfx + + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form + + + splash.cs + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FileViewer/FileViewer/Form1.Designer.cs b/FileViewer/FileViewer/Form1.Designer.cs index f9a6398..284214c 100644 --- a/FileViewer/FileViewer/Form1.Designer.cs +++ b/FileViewer/FileViewer/Form1.Designer.cs @@ -1,239 +1,415 @@ -namespace FileViewer -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); - this.top_pnl = new System.Windows.Forms.FlowLayoutPanel(); - this.close_btn = new System.Windows.Forms.Button(); - this.max_btn = new System.Windows.Forms.Button(); - this.mini_btn = new System.Windows.Forms.Button(); - this.cmd_btn = new System.Windows.Forms.Button(); - this.powers_btn = new System.Windows.Forms.Button(); - this.side_pnl = new System.Windows.Forms.FlowLayoutPanel(); - this.path_tb = new System.Windows.Forms.TextBox(); - this.browser_lv = new System.Windows.Forms.ListView(); - this.imageList1 = new System.Windows.Forms.ImageList(this.components); - this.button1 = new System.Windows.Forms.Button(); - this.top_pnl.SuspendLayout(); - this.SuspendLayout(); - // - // top_pnl - // - this.top_pnl.Controls.Add(this.close_btn); - this.top_pnl.Controls.Add(this.max_btn); - this.top_pnl.Controls.Add(this.mini_btn); - this.top_pnl.Controls.Add(this.button1); - this.top_pnl.Controls.Add(this.cmd_btn); - this.top_pnl.Controls.Add(this.powers_btn); - this.top_pnl.Dock = System.Windows.Forms.DockStyle.Top; - this.top_pnl.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.top_pnl.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.top_pnl.Location = new System.Drawing.Point(0, 0); - this.top_pnl.Margin = new System.Windows.Forms.Padding(0); - this.top_pnl.Name = "top_pnl"; - this.top_pnl.Size = new System.Drawing.Size(1200, 32); - this.top_pnl.TabIndex = 3; - this.top_pnl.Paint += new System.Windows.Forms.PaintEventHandler(this.top_pnl_Paint); - this.top_pnl.MouseDown += new System.Windows.Forms.MouseEventHandler(this.top_pnl_MouseDown); - this.top_pnl.MouseMove += new System.Windows.Forms.MouseEventHandler(this.top_pnl_MouseMove); - // - // close_btn - // - this.close_btn.BackColor = System.Drawing.Color.Gray; - this.close_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.close_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.close_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.close_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.close_btn.ForeColor = System.Drawing.Color.White; - this.close_btn.Location = new System.Drawing.Point(1152, 0); - this.close_btn.Margin = new System.Windows.Forms.Padding(0); - this.close_btn.Name = "close_btn"; - this.close_btn.Size = new System.Drawing.Size(48, 32); - this.close_btn.TabIndex = 0; - this.close_btn.Text = "X"; - this.close_btn.UseVisualStyleBackColor = false; - this.close_btn.Click += new System.EventHandler(this.close_btn_Click); - // - // max_btn - // - this.max_btn.BackColor = System.Drawing.Color.Gray; - this.max_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.max_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); - this.max_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.max_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.max_btn.ForeColor = System.Drawing.Color.White; - this.max_btn.Location = new System.Drawing.Point(1104, 0); - this.max_btn.Margin = new System.Windows.Forms.Padding(0); - this.max_btn.Name = "max_btn"; - this.max_btn.Size = new System.Drawing.Size(48, 32); - this.max_btn.TabIndex = 0; - this.max_btn.Text = "<->"; - this.max_btn.UseVisualStyleBackColor = false; - this.max_btn.Click += new System.EventHandler(this.max_btn_Click); - // - // mini_btn - // - this.mini_btn.BackColor = System.Drawing.Color.Gray; - this.mini_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.mini_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); - this.mini_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.mini_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.mini_btn.ForeColor = System.Drawing.Color.White; - this.mini_btn.Location = new System.Drawing.Point(1056, 0); - this.mini_btn.Margin = new System.Windows.Forms.Padding(0); - this.mini_btn.Name = "mini_btn"; - this.mini_btn.Size = new System.Drawing.Size(48, 32); - this.mini_btn.TabIndex = 0; - this.mini_btn.Text = "_"; - this.mini_btn.UseVisualStyleBackColor = false; - this.mini_btn.Click += new System.EventHandler(this.mini_btn_Click); - // - // cmd_btn - // - this.cmd_btn.BackColor = System.Drawing.Color.Gray; - this.cmd_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.cmd_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); - this.cmd_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cmd_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cmd_btn.ForeColor = System.Drawing.Color.White; - this.cmd_btn.Location = new System.Drawing.Point(960, 0); - this.cmd_btn.Margin = new System.Windows.Forms.Padding(0); - this.cmd_btn.Name = "cmd_btn"; - this.cmd_btn.Size = new System.Drawing.Size(48, 32); - this.cmd_btn.TabIndex = 1; - this.cmd_btn.Text = "CMD"; - this.cmd_btn.UseVisualStyleBackColor = false; - this.cmd_btn.Click += new System.EventHandler(this.cmd_btn_Click); - // - // powers_btn - // - this.powers_btn.BackColor = System.Drawing.Color.Gray; - this.powers_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.powers_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); - this.powers_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.powers_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.powers_btn.ForeColor = System.Drawing.Color.White; - this.powers_btn.Location = new System.Drawing.Point(912, 0); - this.powers_btn.Margin = new System.Windows.Forms.Padding(0); - this.powers_btn.Name = "powers_btn"; - this.powers_btn.Size = new System.Drawing.Size(48, 32); - this.powers_btn.TabIndex = 1; - this.powers_btn.Text = "PS"; - this.powers_btn.UseVisualStyleBackColor = false; - this.powers_btn.Click += new System.EventHandler(this.powers_btn_Click); - // - // side_pnl - // - this.side_pnl.Dock = System.Windows.Forms.DockStyle.Left; - this.side_pnl.Location = new System.Drawing.Point(0, 32); - this.side_pnl.Name = "side_pnl"; - this.side_pnl.Size = new System.Drawing.Size(200, 468); - this.side_pnl.TabIndex = 4; - // - // path_tb - // - this.path_tb.Dock = System.Windows.Forms.DockStyle.Top; - this.path_tb.Location = new System.Drawing.Point(200, 32); - this.path_tb.Name = "path_tb"; - this.path_tb.Size = new System.Drawing.Size(1000, 20); - this.path_tb.TabIndex = 5; - this.path_tb.KeyDown += new System.Windows.Forms.KeyEventHandler(this.path_tb_KeyDown); - // - // browser_lv - // - this.browser_lv.Dock = System.Windows.Forms.DockStyle.Fill; - this.browser_lv.LargeImageList = this.imageList1; - this.browser_lv.Location = new System.Drawing.Point(200, 52); - this.browser_lv.Name = "browser_lv"; - this.browser_lv.Size = new System.Drawing.Size(1000, 448); - this.browser_lv.TabIndex = 6; - this.browser_lv.UseCompatibleStateImageBehavior = false; - this.browser_lv.DoubleClick += new System.EventHandler(this.browser_lv_DoubleClick); - // - // imageList1 - // - this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); - this.imageList1.TransparentColor = System.Drawing.Color.Transparent; - this.imageList1.Images.SetKeyName(0, "doc.png"); - this.imageList1.Images.SetKeyName(1, "folder.png"); - // - // button1 - // - this.button1.BackColor = System.Drawing.Color.Gray; - this.button1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); - this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button1.ForeColor = System.Drawing.Color.White; - this.button1.Location = new System.Drawing.Point(1008, 0); - this.button1.Margin = new System.Windows.Forms.Padding(0); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(48, 32); - this.button1.TabIndex = 2; - this.button1.Text = "↑"; - this.button1.UseVisualStyleBackColor = false; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1200, 500); - this.Controls.Add(this.browser_lv); - this.Controls.Add(this.path_tb); - this.Controls.Add(this.side_pnl); - this.Controls.Add(this.top_pnl); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "Form1"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Form1"; - this.Load += new System.EventHandler(this.Form1_Load); - this.Move += new System.EventHandler(this.Form1_Move); - this.top_pnl.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - private System.Windows.Forms.FlowLayoutPanel top_pnl; - private System.Windows.Forms.Button close_btn; - private System.Windows.Forms.Button max_btn; - private System.Windows.Forms.Button mini_btn; - private System.Windows.Forms.FlowLayoutPanel side_pnl; - private System.Windows.Forms.TextBox path_tb; - private System.Windows.Forms.ListView browser_lv; - private System.Windows.Forms.ImageList imageList1; - private System.Windows.Forms.Button cmd_btn; - private System.Windows.Forms.Button powers_btn; - private System.Windows.Forms.Button button1; - } -} - +namespace FileViewer +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + this.top_pnl = new System.Windows.Forms.FlowLayoutPanel(); + this.close_btn = new System.Windows.Forms.Button(); + this.max_btn = new System.Windows.Forms.Button(); + this.mini_btn = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.cmd_btn = new System.Windows.Forms.Button(); + this.powers_btn = new System.Windows.Forms.Button(); + this.side_pnl = new System.Windows.Forms.FlowLayoutPanel(); + this.path_tb = new System.Windows.Forms.TextBox(); + this.imageList1 = new System.Windows.Forms.ImageList(this.components); + this.status_pnl = new System.Windows.Forms.Panel(); + this.home_btn = new System.Windows.Forms.Button(); + this.doc_btn = new System.Windows.Forms.Button(); + this.pic_btn = new System.Windows.Forms.Button(); + this.size_lb = new System.Windows.Forms.Label(); + this.sider_pnl = new System.Windows.Forms.Panel(); + this.browser_lv = new System.Windows.Forms.ListView(); + this.fileinfo_lb = new System.Windows.Forms.Label(); + this.button2 = new System.Windows.Forms.Button(); + this.dirup_btn = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.top_pnl.SuspendLayout(); + this.side_pnl.SuspendLayout(); + this.status_pnl.SuspendLayout(); + this.sider_pnl.SuspendLayout(); + this.SuspendLayout(); + // + // top_pnl + // + this.top_pnl.Controls.Add(this.close_btn); + this.top_pnl.Controls.Add(this.max_btn); + this.top_pnl.Controls.Add(this.mini_btn); + this.top_pnl.Controls.Add(this.button1); + this.top_pnl.Controls.Add(this.cmd_btn); + this.top_pnl.Controls.Add(this.powers_btn); + this.top_pnl.Controls.Add(this.button2); + this.top_pnl.Controls.Add(this.dirup_btn); + this.top_pnl.Controls.Add(this.button3); + this.top_pnl.Dock = System.Windows.Forms.DockStyle.Top; + this.top_pnl.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.top_pnl.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.top_pnl.Location = new System.Drawing.Point(0, 0); + this.top_pnl.Margin = new System.Windows.Forms.Padding(0); + this.top_pnl.Name = "top_pnl"; + this.top_pnl.Size = new System.Drawing.Size(1200, 32); + this.top_pnl.TabIndex = 3; + this.top_pnl.Paint += new System.Windows.Forms.PaintEventHandler(this.top_pnl_Paint); + this.top_pnl.MouseDown += new System.Windows.Forms.MouseEventHandler(this.top_pnl_MouseDown); + this.top_pnl.MouseMove += new System.Windows.Forms.MouseEventHandler(this.top_pnl_MouseMove); + // + // close_btn + // + this.close_btn.BackColor = System.Drawing.Color.Gray; + this.close_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.close_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.close_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.close_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.close_btn.ForeColor = System.Drawing.Color.White; + this.close_btn.Location = new System.Drawing.Point(1152, 0); + this.close_btn.Margin = new System.Windows.Forms.Padding(0); + this.close_btn.Name = "close_btn"; + this.close_btn.Size = new System.Drawing.Size(48, 32); + this.close_btn.TabIndex = 0; + this.close_btn.Text = "X"; + this.close_btn.UseVisualStyleBackColor = false; + this.close_btn.Click += new System.EventHandler(this.close_btn_Click); + // + // max_btn + // + this.max_btn.BackColor = System.Drawing.Color.Gray; + this.max_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.max_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); + this.max_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.max_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.max_btn.ForeColor = System.Drawing.Color.White; + this.max_btn.Location = new System.Drawing.Point(1104, 0); + this.max_btn.Margin = new System.Windows.Forms.Padding(0); + this.max_btn.Name = "max_btn"; + this.max_btn.Size = new System.Drawing.Size(48, 32); + this.max_btn.TabIndex = 0; + this.max_btn.Text = "<->"; + this.max_btn.UseVisualStyleBackColor = false; + this.max_btn.Click += new System.EventHandler(this.max_btn_Click); + // + // mini_btn + // + this.mini_btn.BackColor = System.Drawing.Color.Gray; + this.mini_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.mini_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); + this.mini_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.mini_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.mini_btn.ForeColor = System.Drawing.Color.White; + this.mini_btn.Location = new System.Drawing.Point(1056, 0); + this.mini_btn.Margin = new System.Windows.Forms.Padding(0); + this.mini_btn.Name = "mini_btn"; + this.mini_btn.Size = new System.Drawing.Size(48, 32); + this.mini_btn.TabIndex = 0; + this.mini_btn.Text = "_"; + this.mini_btn.UseVisualStyleBackColor = false; + this.mini_btn.Click += new System.EventHandler(this.mini_btn_Click); + // + // button1 + // + this.button1.BackColor = System.Drawing.Color.Gray; + this.button1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button1.ForeColor = System.Drawing.Color.White; + this.button1.Location = new System.Drawing.Point(1008, 0); + this.button1.Margin = new System.Windows.Forms.Padding(0); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(48, 32); + this.button1.TabIndex = 2; + this.button1.Text = "▲"; + this.button1.UseVisualStyleBackColor = false; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // cmd_btn + // + this.cmd_btn.BackColor = System.Drawing.Color.Gray; + this.cmd_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.cmd_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); + this.cmd_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cmd_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cmd_btn.ForeColor = System.Drawing.Color.White; + this.cmd_btn.Location = new System.Drawing.Point(960, 0); + this.cmd_btn.Margin = new System.Windows.Forms.Padding(0); + this.cmd_btn.Name = "cmd_btn"; + this.cmd_btn.Size = new System.Drawing.Size(48, 32); + this.cmd_btn.TabIndex = 1; + this.cmd_btn.Text = "CMD"; + this.cmd_btn.UseVisualStyleBackColor = false; + this.cmd_btn.Click += new System.EventHandler(this.cmd_btn_Click); + // + // powers_btn + // + this.powers_btn.BackColor = System.Drawing.Color.Gray; + this.powers_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.powers_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); + this.powers_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.powers_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.powers_btn.ForeColor = System.Drawing.Color.White; + this.powers_btn.Location = new System.Drawing.Point(912, 0); + this.powers_btn.Margin = new System.Windows.Forms.Padding(0); + this.powers_btn.Name = "powers_btn"; + this.powers_btn.Size = new System.Drawing.Size(48, 32); + this.powers_btn.TabIndex = 1; + this.powers_btn.Text = "PS"; + this.powers_btn.UseVisualStyleBackColor = false; + this.powers_btn.Click += new System.EventHandler(this.powers_btn_Click); + // + // side_pnl + // + this.side_pnl.Controls.Add(this.home_btn); + this.side_pnl.Controls.Add(this.doc_btn); + this.side_pnl.Controls.Add(this.pic_btn); + this.side_pnl.Dock = System.Windows.Forms.DockStyle.Left; + this.side_pnl.Location = new System.Drawing.Point(0, 32); + this.side_pnl.Name = "side_pnl"; + this.side_pnl.Size = new System.Drawing.Size(200, 468); + this.side_pnl.TabIndex = 4; + // + // path_tb + // + this.path_tb.Dock = System.Windows.Forms.DockStyle.Top; + this.path_tb.Location = new System.Drawing.Point(200, 32); + this.path_tb.Name = "path_tb"; + this.path_tb.Size = new System.Drawing.Size(1000, 20); + this.path_tb.TabIndex = 5; + this.path_tb.KeyDown += new System.Windows.Forms.KeyEventHandler(this.path_tb_KeyDown); + // + // imageList1 + // + this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); + this.imageList1.TransparentColor = System.Drawing.Color.Transparent; + this.imageList1.Images.SetKeyName(0, "doc.png"); + this.imageList1.Images.SetKeyName(1, "folder.png"); + // + // status_pnl + // + this.status_pnl.Controls.Add(this.size_lb); + this.status_pnl.Dock = System.Windows.Forms.DockStyle.Bottom; + this.status_pnl.Location = new System.Drawing.Point(200, 474); + this.status_pnl.Name = "status_pnl"; + this.status_pnl.Size = new System.Drawing.Size(1000, 26); + this.status_pnl.TabIndex = 6; + // + // home_btn + // + this.home_btn.BackColor = System.Drawing.Color.Gray; + this.home_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.home_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); + this.home_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.home_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.home_btn.ForeColor = System.Drawing.Color.White; + this.home_btn.Location = new System.Drawing.Point(0, 0); + this.home_btn.Margin = new System.Windows.Forms.Padding(0); + this.home_btn.Name = "home_btn"; + this.home_btn.Size = new System.Drawing.Size(200, 32); + this.home_btn.TabIndex = 1; + this.home_btn.Text = "Home"; + this.home_btn.UseVisualStyleBackColor = false; + this.home_btn.Click += new System.EventHandler(this.home_btn_Click); + // + // doc_btn + // + this.doc_btn.BackColor = System.Drawing.Color.Gray; + this.doc_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.doc_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); + this.doc_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.doc_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.doc_btn.ForeColor = System.Drawing.Color.White; + this.doc_btn.Location = new System.Drawing.Point(0, 32); + this.doc_btn.Margin = new System.Windows.Forms.Padding(0); + this.doc_btn.Name = "doc_btn"; + this.doc_btn.Size = new System.Drawing.Size(200, 32); + this.doc_btn.TabIndex = 2; + this.doc_btn.Text = "Documents"; + this.doc_btn.UseVisualStyleBackColor = false; + this.doc_btn.Visible = false; + // + // pic_btn + // + this.pic_btn.BackColor = System.Drawing.Color.Gray; + this.pic_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.pic_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); + this.pic_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.pic_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.pic_btn.ForeColor = System.Drawing.Color.White; + this.pic_btn.Location = new System.Drawing.Point(0, 64); + this.pic_btn.Margin = new System.Windows.Forms.Padding(0); + this.pic_btn.Name = "pic_btn"; + this.pic_btn.Size = new System.Drawing.Size(200, 32); + this.pic_btn.TabIndex = 3; + this.pic_btn.Text = "Pictures"; + this.pic_btn.UseVisualStyleBackColor = false; + this.pic_btn.Visible = false; + // + // size_lb + // + this.size_lb.AutoSize = true; + this.size_lb.Location = new System.Drawing.Point(0, 0); + this.size_lb.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); + this.size_lb.Name = "size_lb"; + this.size_lb.Size = new System.Drawing.Size(34, 26); + this.size_lb.TabIndex = 0; + this.size_lb.Text = "Tests\r\nTest2"; + // + // sider_pnl + // + this.sider_pnl.Controls.Add(this.fileinfo_lb); + this.sider_pnl.Dock = System.Windows.Forms.DockStyle.Right; + this.sider_pnl.Location = new System.Drawing.Point(1000, 52); + this.sider_pnl.Name = "sider_pnl"; + this.sider_pnl.Size = new System.Drawing.Size(200, 422); + this.sider_pnl.TabIndex = 8; + // + // browser_lv + // + this.browser_lv.Dock = System.Windows.Forms.DockStyle.Fill; + this.browser_lv.LargeImageList = this.imageList1; + this.browser_lv.Location = new System.Drawing.Point(200, 52); + this.browser_lv.Name = "browser_lv"; + this.browser_lv.Size = new System.Drawing.Size(800, 422); + this.browser_lv.TabIndex = 9; + this.browser_lv.UseCompatibleStateImageBehavior = false; + this.browser_lv.SelectedIndexChanged += new System.EventHandler(this.browser_lv_SelectedIndexChanged); + this.browser_lv.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.browser_lv_DoubleClick); + // + // fileinfo_lb + // + this.fileinfo_lb.AutoSize = true; + this.fileinfo_lb.Location = new System.Drawing.Point(6, 3); + this.fileinfo_lb.Name = "fileinfo_lb"; + this.fileinfo_lb.Size = new System.Drawing.Size(35, 13); + this.fileinfo_lb.TabIndex = 0; + this.fileinfo_lb.Text = "label1"; + // + // button2 + // + this.button2.BackColor = System.Drawing.Color.Gray; + this.button2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.button2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button2.ForeColor = System.Drawing.Color.White; + this.button2.Location = new System.Drawing.Point(864, 0); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(48, 32); + this.button2.TabIndex = 3; + this.button2.Text = "<"; + this.button2.UseVisualStyleBackColor = false; + this.button2.Visible = false; + // + // dirup_btn + // + this.dirup_btn.BackColor = System.Drawing.Color.Gray; + this.dirup_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dirup_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); + this.dirup_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.dirup_btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.dirup_btn.ForeColor = System.Drawing.Color.White; + this.dirup_btn.Location = new System.Drawing.Point(816, 0); + this.dirup_btn.Margin = new System.Windows.Forms.Padding(0); + this.dirup_btn.Name = "dirup_btn"; + this.dirup_btn.Size = new System.Drawing.Size(48, 32); + this.dirup_btn.TabIndex = 4; + this.dirup_btn.Text = "↑"; + this.dirup_btn.UseVisualStyleBackColor = false; + this.dirup_btn.Click += new System.EventHandler(this.dirup_btn_Click); + // + // button3 + // + this.button3.BackColor = System.Drawing.Color.Gray; + this.button3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.button3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196))))); + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button3.ForeColor = System.Drawing.Color.White; + this.button3.Location = new System.Drawing.Point(768, 0); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(48, 32); + this.button3.TabIndex = 5; + this.button3.Text = ">"; + this.button3.UseVisualStyleBackColor = false; + this.button3.Visible = false; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1200, 500); + this.Controls.Add(this.browser_lv); + this.Controls.Add(this.sider_pnl); + this.Controls.Add(this.status_pnl); + this.Controls.Add(this.path_tb); + this.Controls.Add(this.side_pnl); + this.Controls.Add(this.top_pnl); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.Move += new System.EventHandler(this.Form1_Move); + this.top_pnl.ResumeLayout(false); + this.side_pnl.ResumeLayout(false); + this.status_pnl.ResumeLayout(false); + this.status_pnl.PerformLayout(); + this.sider_pnl.ResumeLayout(false); + this.sider_pnl.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.FlowLayoutPanel top_pnl; + private System.Windows.Forms.Button close_btn; + private System.Windows.Forms.Button max_btn; + private System.Windows.Forms.Button mini_btn; + private System.Windows.Forms.FlowLayoutPanel side_pnl; + private System.Windows.Forms.TextBox path_tb; + private System.Windows.Forms.ImageList imageList1; + private System.Windows.Forms.Button cmd_btn; + private System.Windows.Forms.Button powers_btn; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Panel status_pnl; + private System.Windows.Forms.Button home_btn; + private System.Windows.Forms.Button doc_btn; + private System.Windows.Forms.Button pic_btn; + private System.Windows.Forms.Label size_lb; + private System.Windows.Forms.Panel sider_pnl; + private System.Windows.Forms.ListView browser_lv; + private System.Windows.Forms.Label fileinfo_lb; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button dirup_btn; + private System.Windows.Forms.Button button3; + } +} + diff --git a/FileViewer/FileViewer/Form1.cs b/FileViewer/FileViewer/Form1.cs index 9906f96..58025ff 100644 --- a/FileViewer/FileViewer/Form1.cs +++ b/FileViewer/FileViewer/Form1.cs @@ -1,242 +1,277 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.IO; -using System.Diagnostics; - -namespace FileViewer -{ - public partial class Form1 : Form - { - public Point loc; - Graphics g; - Graphics g1; - Image img; - Point pos = new Point(0,0); - Image bmp; - string path = "C:\\"; - public Form1() - { - InitializeComponent(); - g = side_pnl.CreateGraphics(); - g1 = top_pnl.CreateGraphics(); - img = FileViewer.Properties.Resources._20180827_155533; - var tmph = img.Size.Height; - var tmpyw = img.Size.Width; - int h = (int)(((float)Screen.GetBounds(new Point(this.Left, this.Top)).Width / (float)tmpyw)*tmph); - int w = (int)Screen.GetBounds(new Point(this.Left, this.Top)).Width ; - - - bmp = new Bitmap(Other.Blur(new Bitmap(img, new Size(w/10,h/10) ),4), new Size(w,h)); - - } - public List<_Index> CDir = new List<_Index> { }; - private void Form1_Load(object sender, EventArgs e) - { - - path = System.IO.Directory.GetCurrentDirectory(); - path_tb.Text = path; - updateDir(); - - - } - public void updateDir() - { - path_tb.Text = path; - CDir = new List<_Index> { new _Index(0, "../", 1) }; - browser_lv.Clear(); - FileFunction.DirSearch(path); - var ts = FileFunction.Nfiles; - var ts2 = FileFunction.Nfolders; - foreach (_File s in ts) - { - - CDir.Add(new _Index(s.UIN, s.Name, 0)); - //MessageBox.Show(s.Tags.ToString()); - - } - foreach (_Folder s in ts2) - { - CDir.Add(new _Index(s.UIN, s.Name, 1)); - } - foreach (_Index s in CDir) - { - if ((path != "C:\\") || (s.UIN != 0)) - { - browser_lv.Items.Add(s.UIN.ToString(), s.Name, Convert.ToInt32(s.Type)); - } - } - } - - - private void Form1_Move(object sender, EventArgs e) - { - pos = new Point(-this.Left, -this.Top); - //label1.Text = pos.ToString()+Screen.GetBounds(new Point(this.Left,this.Top)).ToString(); - g.DrawImage(bmp, pos.X, pos.Y); - g1.DrawImage(bmp, pos.X, pos.Y); - g1.FillRectangle(new SolidBrush(Color.FromArgb(128, 0, 0, 0)), new Rectangle(0, 0, top_pnl.Width, top_pnl.Height)); - g1.DrawString("FileViewer", top_pnl.Font,Brushes.White, new Point(0, 0)); - } - - - private void test_1_Resize(object sender, EventArgs e) - { - g = side_pnl.CreateGraphics(); - } - - - private void side_pnl_Resize(object sender, EventArgs e) - { - g = side_pnl.CreateGraphics(); - g1 = top_pnl.CreateGraphics(); - } - - private void side_pnl_SizeChanged(object sender, EventArgs e) - { - g = side_pnl.CreateGraphics(); - g1 = top_pnl.CreateGraphics(); - } - - private void top_pnl_Paint(object sender, PaintEventArgs e) - { - g.DrawImage(bmp, pos.X, pos.Y); - g1.DrawImage(bmp, pos.X, pos.Y); - g1.FillRectangle(new SolidBrush(Color.FromArgb(128, 0, 0, 0)), new Rectangle(0, 0, top_pnl.Width, top_pnl.Height)); - g1.DrawString("FileViewer", top_pnl.Font, Brushes.White, new Point(0, 0)); - } - - private void top_pnl_MouseDown(object sender, MouseEventArgs e) - { - loc = e.Location; - } - - private void top_pnl_MouseMove(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - this.Location = new Point(this.Location.X + (e.Location.X - loc.X), this.Location.Y + (e.Location.Y - loc.Y)); - } - } - - private void mini_btn_Click(object sender, EventArgs e) - { - this.WindowState = FormWindowState.Minimized; - } - - private void max_btn_Click(object sender, EventArgs e) - { - if (this.WindowState== FormWindowState.Normal) - { - this.WindowState = FormWindowState.Maximized; - max_btn.Text = ">-<"; - }else - { - this.WindowState = FormWindowState.Normal; - max_btn.Text = "<->"; - } - g = side_pnl.CreateGraphics(); - g1 = top_pnl.CreateGraphics(); - } - - private void close_btn_Click(object sender, EventArgs e) - { - Environment.Exit(0); - } - - private void path_tb_KeyDown(object sender, KeyEventArgs e) - { - if(e.KeyValue == 13) - { - path = path_tb.Text; - updateDir(); - } - } - - private void cmd_btn_Click(object sender, EventArgs e) - { - Process.Start("cmd","/k "+path[0]+path[1]+" && cd "+path); - } - - private void powers_btn_Click(object sender, EventArgs e) - { - Process.Start("powershell", "-command cd " + path+"\npowershell"); - } - - private void browser_lv_SelectedIndexChanged(object sender, EventArgs e) - { - - - } - public ListViewItem CSelect = new ListViewItem(); - private void browser_lv_DoubleClick(object sender, EventArgs e) - { - CSelect = browser_lv.SelectedItems[0]; - open(CSelect); - } - public void open(ListViewItem i) - { - foreach (_Index x in CDir) - { - - if (x.UIN.ToString() == i.Name) - { - if (x.Type == 0) - { - foreach (_File s in FileFunction.Nfiles) - { - if (x.UIN == s.UIN) - { - //MessageBox.Show(@"" + s.FullLocation); - Process.Start(@"" + s.FullLocation); - } - } - } - if (x.Type == 1) - { - if (x.UIN != 0) - { - foreach (_Folder s in FileFunction.Nfolders) - { - if (x.UIN == s.UIN) - { - //MessageBox.Show(@"" + s.FullLocation); - path = s.FullLocation; - } - } - } - else - { - path = Path.GetDirectoryName(path); - - } - updateDir(); - } - - } - } - } - private void browser_lv_ItemChecked(object sender, ItemCheckedEventArgs e) - { - CSelect = browser_lv.SelectedItems[0]; - } - - private void button1_Click(object sender, EventArgs e) - { - if(this.Height > 32) - { - this.Height = 32; - } - else - { - this.Height = 500; - } - } - } -} +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.IO; +using System.Diagnostics; + +namespace FileViewer +{ + public partial class Form1 : Form + { + public Point loc; + Graphics g; + Graphics g1; + Image img; + Point pos = new Point(0, 0); + Image bmp; + string path = "C:\\"; + public Form1() + { + InitializeComponent(); + g = side_pnl.CreateGraphics(); + g1 = top_pnl.CreateGraphics(); + img = FileViewer.Properties.Resources._20180827_155533; + var tmph = img.Size.Height; + var tmpyw = img.Size.Width; + int h = (int)(((float)Screen.GetBounds(new Point(this.Left, this.Top)).Width / (float)tmpyw) * tmph); + int w = (int)Screen.GetBounds(new Point(this.Left, this.Top)).Width; + bmp = new Bitmap(Other.Blur(new Bitmap(img, new Size(w / 10, h / 10)), 4), new Size(w, h)); + } + + + + private void Form1_Load(object sender, EventArgs e) + { + path = System.IO.Directory.GetCurrentDirectory(); + path_tb.Text = path; + updateDir(); + } + public void updateDir() + { + path_tb.Text = path; + uint filecount = 0; + uint foldercount = 0; + ulong filesize = 0; + browser_lv.Clear(); + Crawler.DirSearch(path); + var CUi = Crawler.CDir; + foreach (string s in CUi) + { + string name = "Null"; + int type = Crawler.index.Get(s).Type; + if (type == 0) + { + name = Crawler.index.Get(s).file.Name; + filesize += Crawler.index.Get(s).file.size; + filecount++; + } + else if (type == 1) + { + name = Crawler.index.Get(s).folder.Name; + foldercount++; + } + + browser_lv.Items.Add(s, name, type); + } + string filesize_t = ""; + if ((filesize) < 1024) + { + filesize_t = filesize.ToString() + "Bytes"; + }else if ((filesize) < 1048576) + { + filesize_t = (Math.Round(filesize/1024f,3)).ToString() + "KiB (Kilibyte)"; + } + else if ((filesize ) < 1073741824) + { + filesize_t = (Math.Round(filesize / 1048576f,3)).ToString() + "MiB (Megibyte)"; + } + else if ((filesize) < 1099511627776) + { + filesize_t = (Math.Round(filesize / 1073741824f,3)).ToString() + "GiB (Gigibyte)"; + } + else if ((filesize) < 1125899906842624) + { + filesize_t = (Math.Round(filesize / 1099511627776f,3)).ToString() + "TiB (Teribyte)"; + } + size_lb.Text =filecount.ToString()+" Files(s) "+filesize_t+"\n"+foldercount.ToString()+" Folder(s)"; + } + + + private void Form1_Move(object sender, EventArgs e) + { + pos = new Point(-this.Left, -this.Top); + //label1.Text = pos.ToString()+Screen.GetBounds(new Point(this.Left,this.Top)).ToString(); + g.DrawImage(bmp, pos.X, pos.Y); + g1.DrawImage(bmp, pos.X, pos.Y); + g1.FillRectangle(new SolidBrush(Color.FromArgb(128, 0, 0, 0)), new Rectangle(0, 0, top_pnl.Width, top_pnl.Height)); + g1.DrawString("FileViewer - " + Crawler.index.Indexed().ToString(), top_pnl.Font, Brushes.White, new Point(0, 0)); + } + + + private void test_1_Resize(object sender, EventArgs e) + { + g = side_pnl.CreateGraphics(); + } + + + private void side_pnl_Resize(object sender, EventArgs e) + { + g = side_pnl.CreateGraphics(); + g1 = top_pnl.CreateGraphics(); + } + + private void side_pnl_SizeChanged(object sender, EventArgs e) + { + g = side_pnl.CreateGraphics(); + g1 = top_pnl.CreateGraphics(); + } + + private void top_pnl_Paint(object sender, PaintEventArgs e) + { + g.DrawImage(bmp, pos.X, pos.Y); + g1.DrawImage(bmp, pos.X, pos.Y); + g1.FillRectangle(new SolidBrush(Color.FromArgb(128, 0, 0, 0)), new Rectangle(0, 0, top_pnl.Width, top_pnl.Height)); + g1.DrawString("FileViewer - "+FileFunction.UINC.ToString(), top_pnl.Font, Brushes.White, new Point(0, 0)); + } + + private void top_pnl_MouseDown(object sender, MouseEventArgs e) + { + loc = e.Location; + } + + private void top_pnl_MouseMove(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + this.Location = new Point(this.Location.X + (e.Location.X - loc.X), this.Location.Y + (e.Location.Y - loc.Y)); + } + } + + private void mini_btn_Click(object sender, EventArgs e) + { + this.WindowState = FormWindowState.Minimized; + } + + private void max_btn_Click(object sender, EventArgs e) + { + if (this.WindowState== FormWindowState.Normal) + { + this.WindowState = FormWindowState.Maximized; + max_btn.Text = ">-<"; + }else + { + this.WindowState = FormWindowState.Normal; + max_btn.Text = "<->"; + } + g = side_pnl.CreateGraphics(); + g1 = top_pnl.CreateGraphics(); + } + + private void close_btn_Click(object sender, EventArgs e) + { + Environment.Exit(0); + } + + private void path_tb_KeyDown(object sender, KeyEventArgs e) + { + if(e.KeyValue == 13) + { + path = path_tb.Text; + updateDir(); + } + } + + private void cmd_btn_Click(object sender, EventArgs e) + { + Process.Start("cmd","/k "+path[0]+path[1]+" && cd "+path); + } + + private void powers_btn_Click(object sender, EventArgs e) + { + Process.Start("powershell", "-command cd " + path+"\npowershell"); + } + + private void browser_lv_SelectedIndexChanged(object sender, EventArgs e) + { + if (browser_lv.SelectedItems.Count > 0) + { + if (Crawler.index.Get(browser_lv.SelectedItems[0].Name).Type == 0) + { + _File file = Crawler.index.Get(browser_lv.SelectedItems[0].Name).file; + fileinfo_lb.Text = "Name: " + file.Name + "\nLocation: " + file.Location + "\nSize: " + file.size + "\nLast Access: " + file.Lastaccess; + } + } + + } + public ListViewItem CSelect = new ListViewItem(); + private void browser_lv_DoubleClick(object sender, MouseEventArgs e) + { + CSelect = browser_lv.SelectedItems[0]; + open(CSelect); + } + public void open(ListViewItem i) + { + if (Crawler.index.Get(i.Name).Type == 0) + { + Process.Start(@"" + Crawler.index.Get(i.Name).file.FullLocation); + }else if (Crawler.index.Get(i.Name).Type == 1) + { + path = Crawler.index.Get(i.Name).folder.FullLocation; + updateDir(); + } + //string s = i.Name; + //if (FileFunction.files.ContainsKey(s)) + //{ + // //browser_lv.Items.Add(s, FileFunction.files[s].Name); + // Process.Start(@"" + FileFunction.files[s].FullLocation); + //} + //else if (FileFunction.folders.ContainsKey(s)) + //{ + // path = FileFunction.folders[s].FullLocation; + + //} + //else + //{ + // MessageBox.Show("Error"); + // Environment.Exit(0); + //} + } + private void browser_lv_ItemChecked(object sender, ItemCheckedEventArgs e) + { + CSelect = browser_lv.SelectedItems[0]; + } + + private void button1_Click(object sender, EventArgs e) + { + if(status_pnl.Visible) + { + this.Height = 32; + button1.Text = "▼"; + status_pnl.Visible = false; + } + else + { + this.Height = 500; + button1.Text = "▲"; + status_pnl.Visible = true; + } + } + + private void home_btn_Click(object sender, EventArgs e) + { + path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); + updateDir(); + } + + private void dirup_btn_Click(object sender, EventArgs e) + { + if (path.Split(new char[] { '\\' }, StringSplitOptions.RemoveEmptyEntries).Length > 1) + { + path = Directory.GetParent(path).ToString(); + updateDir(); + } + else + { + MessageBox.Show("Can't Go Back Due To: At root of current drive.","Warning"); + } + } + + + } +} diff --git a/FileViewer/FileViewer/Form1.resx b/FileViewer/FileViewer/Form1.resx index d831cce..ffe9305 100644 --- a/FileViewer/FileViewer/Form1.resx +++ b/FileViewer/FileViewer/Form1.resx @@ -1,181 +1,181 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w - LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADa - CwAAAk1TRnQBSQFMAgEBAgEAARgBAAEYAQABQAEAAUABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo - BAABAQIAAUADAAEBAQABCAYAAUAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA - AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQ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AEHLP8B9wEPCv8B7wEPARUB8gMAAe09/4IAAQcs/wH3AQ8I/wH0AW0BAAHtAf8EAAHt - Pf+CAAEHLP8B9wEPB/8BBwEQAREB8QYAAe09/4IAAQcs/wH3AQ8F/wH0AesBDgHsAf8HAAHtPf+CAAEH - LP8B9wEPBP8BvAERARAB8AkAAe09/4IAAQcs/wH3AQ8D/wHsAQ4B6wH0CgAB7T3/ggABByz/AfcBDwH/ - AfABFQEPAbwB/wsAAe09/4IAAQcs/wH3AQ8B7QEOAW0B9A0AAe09/4IAAQ8sEAEPAQABDgEHAf/NAAFC - AU0BPgcAAT4DAAEoBAABAQIAAUADAAEBAQABAQYAAQgWAAP/EAABHx8AAR8fAAEfHwABHx8AAR8fAAEf - HwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEf - HwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEf - HwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEB9wABAx8AAQcfAAEf - HwABPx8AAf8eAAEBAf8eAAEDAf8eAAEPAf8eAAEfAf8HAAEBEAAL - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZT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HPP8BBwIAAe04/4cAAQc8/wEHAgAB7Tj/hwABBzz/AQcCAAHt + OP+HAAEHPP8BBwIAAe04/4cAAQc8/wEHAgAB7Tj/hwABBzz/AQcCAAHtOP+HAAEHPP8BBwIAAe04/wEA + BG2CAAEHPP8BBwIAAe09/4IAAQc8/wEHAgAB7T3/ggABBzz/AQcCAAHtPf+CAAEHPP8BBwIAAe09/4IA + AQcs/wHxD+0BbQIAAe09/4IAAQcs/wH3AQ4N7QEVAQABFAEAAe09/4IAAQcs/wH3AQ8L/wHzARIBDgH3 + Af8BAAHtPf+CAAEHLP8B9wEPCv8B7wEPARUB8gMAAe09/4IAAQcs/wH3AQ8I/wH0AW0BAAHtAf8EAAHt + Pf+CAAEHLP8B9wEPB/8BBwEQAREB8QYAAe09/4IAAQcs/wH3AQ8F/wH0AesBDgHsAf8HAAHtPf+CAAEH + LP8B9wEPBP8BvAERARAB8AkAAe09/4IAAQcs/wH3AQ8D/wHsAQ4B6wH0CgAB7T3/ggABByz/AfcBDwH/ + AfABFQEPAbwB/wsAAe09/4IAAQcs/wH3AQ8B7QEOAW0B9A0AAe09/4IAAQ8sEAEPAQABDgEHAf/NAAFC + AU0BPgcAAT4DAAEoBAABAQIAAUADAAEBAQABAQYAAQgWAAP/EAABHx8AAR8fAAEfHwABHx8AAR8fAAEf + HwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEf + HwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEf + HwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEfHwABHx8AAR8fAAEB9wABAx8AAQcfAAEf + HwABPx8AAf8eAAEBAf8eAAEDAf8eAAEPAf8eAAEfAf8HAAEBEAAL + + \ No newline at end of file diff --git a/FileViewer/FileViewer/Program.cs b/FileViewer/FileViewer/Program.cs index 41df324..b9bf5da 100644 --- a/FileViewer/FileViewer/Program.cs +++ b/FileViewer/FileViewer/Program.cs @@ -1,22 +1,22 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace FileViewer -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1()); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace FileViewer +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/FileViewer/FileViewer/Properties/AssemblyInfo.cs b/FileViewer/FileViewer/Properties/AssemblyInfo.cs index ecc5a1b..d6a6b03 100644 --- a/FileViewer/FileViewer/Properties/AssemblyInfo.cs +++ b/FileViewer/FileViewer/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("FileViewer")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("FileViewer")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("20cd6b9d-13a3-4a19-b381-8c50d535cf52")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("FileViewer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("FileViewer")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("20cd6b9d-13a3-4a19-b381-8c50d535cf52")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/FileViewer/FileViewer/Properties/Resources.Designer.cs b/FileViewer/FileViewer/Properties/Resources.Designer.cs index 84de8d7..1d2572f 100644 --- a/FileViewer/FileViewer/Properties/Resources.Designer.cs +++ b/FileViewer/FileViewer/Properties/Resources.Designer.cs @@ -1,102 +1,102 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace FileViewer.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FileViewer.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap _20180827_155533 { - get { - object obj = ResourceManager.GetObject("_20180827_155533", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap doc { - get { - object obj = ResourceManager.GetObject("doc", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder { - get { - object obj = ResourceManager.GetObject("folder", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized string similar to https://gist.github.com/superic/8165746. - /// - internal static string source { - get { - return ResourceManager.GetString("source", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FileViewer.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FileViewer.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _20180827_155533 { + get { + object obj = ResourceManager.GetObject("_20180827_155533", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap doc { + get { + object obj = ResourceManager.GetObject("doc", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap folder { + get { + object obj = ResourceManager.GetObject("folder", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized string similar to https://gist.github.com/superic/8165746. + /// + internal static string source { + get { + return ResourceManager.GetString("source", resourceCulture); + } + } + } +} diff --git a/FileViewer/FileViewer/Properties/Resources.resx b/FileViewer/FileViewer/Properties/Resources.resx index dd5f6cc..f4b0da5 100644 --- a/FileViewer/FileViewer/Properties/Resources.resx +++ b/FileViewer/FileViewer/Properties/Resources.resx @@ -1,133 +1,133 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\doc.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\source.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\20180827_155533.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\folder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\doc.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\source.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + ..\Resources\20180827_155533.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\folder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/FileViewer/FileViewer/Properties/Settings.Designer.cs b/FileViewer/FileViewer/Properties/Settings.Designer.cs index 2d0d52b..f113c03 100644 --- a/FileViewer/FileViewer/Properties/Settings.Designer.cs +++ b/FileViewer/FileViewer/Properties/Settings.Designer.cs @@ -1,30 +1,30 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace FileViewer.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FileViewer.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/FileViewer/FileViewer/Properties/Settings.settings b/FileViewer/FileViewer/Properties/Settings.settings index 3964565..abf36c5 100644 --- a/FileViewer/FileViewer/Properties/Settings.settings +++ b/FileViewer/FileViewer/Properties/Settings.settings @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/FileViewer/FileViewer/bin/Debug/FileViewer.exe b/FileViewer/FileViewer/bin/Debug/FileViewer.exe index f97c9fa..001d856 100644 Binary files a/FileViewer/FileViewer/bin/Debug/FileViewer.exe and b/FileViewer/FileViewer/bin/Debug/FileViewer.exe differ diff --git a/FileViewer/FileViewer/bin/Debug/FileViewer.exe.config b/FileViewer/FileViewer/bin/Debug/FileViewer.exe.config index 731f6de..00bfd11 100644 --- a/FileViewer/FileViewer/bin/Debug/FileViewer.exe.config +++ b/FileViewer/FileViewer/bin/Debug/FileViewer.exe.config @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/FileViewer/FileViewer/bin/Debug/FileViewer.pdb b/FileViewer/FileViewer/bin/Debug/FileViewer.pdb index 363a1e0..eec8842 100644 Binary files a/FileViewer/FileViewer/bin/Debug/FileViewer.pdb and b/FileViewer/FileViewer/bin/Debug/FileViewer.pdb differ diff --git a/FileViewer/FileViewer/fileFunction.cs b/FileViewer/FileViewer/fileFunction.cs index 6eff15b..557633d 100644 --- a/FileViewer/FileViewer/fileFunction.cs +++ b/FileViewer/FileViewer/fileFunction.cs @@ -1,224 +1,373 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.IO; -using System.Diagnostics; - - -namespace FileViewer -{ - public class FileFunction - { - public static ulong UINC = 1; - public static string current_dir = "C:\\"; - public static List<_File> files = new List<_File> { }; - public static List<_Folder> folders = new List<_Folder> { }; - public static List<_File> Nfiles = new List<_File> { }; - public static List<_Folder> Nfolders = new List<_Folder> { }; - public static void DirSearch(string sDir) - { - Nfiles = new List<_File> { }; - Nfolders = new List<_Folder> { }; - try - { - foreach (string f in Directory.GetFiles(sDir)) - { - try - { - var x = new _File(f); - if (!files.Contains(x)) - { - files.Add(x); - } - Nfiles.Add(x); - - - } - catch (Exception e) - { - - System.Windows.Forms.MessageBox.Show("Access denied"); - } - - } - foreach (string d in Directory.GetDirectories(sDir)) - { - try - { - var x = new _Folder(d); - if (!folders.Contains(x)) - { - folders.Add(x); - } - Nfolders.Add(x); - //files.AddRange(DirSearch(d)); - } - catch (Exception e) - { - - System.Windows.Forms.MessageBox.Show("access denied"); - } - } - } - catch (Exception) - { - - System.Windows.Forms.MessageBox.Show("access denied"); - - - - } - - - } - } - public class _Folder - { - public string Name { get; } - public string Location { get; } - public string FullLocation { get; } - public ulong UIN { get; } - public _Folder(string folderpath) - { - FileFunction.UINC++; - UIN = FileFunction.UINC; - FullLocation = folderpath; - Name = Path.GetFileName(folderpath); - Location = Path.GetFileName(Path.GetDirectoryName(folderpath)); - - } - } - public class _File - { - //Unique Identification Number (Future plans to speed up indexing) - public ulong UIN { get; } - //Name Of File E.G. C:\file.txt -> file - public string Name { get; } - //Path Of file E.G. C:\file.txt -> C:\ - public string Location { get; } - //Full path of file E.G. C:\file.txt -> C:\file.txt - public string FullLocation { get; } - //Extension it has, E.G. C:\file.txt -> txt - public string Extension { get; } - //Tags the file has - public List Tags { get; } - //Number corosponding to type, Future plans - /// - /// 0 - binary - /// 1 - image - /// 2 - text - /// 3 - zip - /// 4 - document - /// - public short Type { get; set; } - public _File(string filepath) - { - FileFunction.UINC++; - UIN = FileFunction.UINC; - FullLocation = filepath; - Location = Path.GetPathRoot(filepath); - Extension = Path.GetExtension(filepath); - Name = Path.GetFileName(filepath); - var x = File.GetAttributes(filepath); - if(FileAttributes.ReadOnly == x){ - Tags.Add("RO"); - } - if (FileAttributes.Hidden == x) - { - Tags.Add("Hid"); - } - if (FileAttributes.System == x) - { - Tags.Add("Sys"); - } - if (FileAttributes.Directory == x) - { - Tags.Add("Sys"); - } - - } - } - public class Other - { - public static Bitmap Blur(Bitmap image, Int32 blurSize) - { - return Blur(image, new Rectangle(0, 0, image.Width, image.Height), blurSize); - } - - private static Bitmap Blur(Bitmap image, Rectangle rectangle, Int32 blurSize) - { - Bitmap blurred = new Bitmap(image.Width, image.Height); - - // make an exact copy of the bitmap provided - using (Graphics graphics = Graphics.FromImage(blurred)) - graphics.DrawImage(image, new Rectangle(0, 0, image.Width, image.Height), - new Rectangle(0, 0, image.Width, image.Height), GraphicsUnit.Pixel); - - // look at every pixel in the blur rectangle - for (int xx = rectangle.X; xx < rectangle.X + rectangle.Width; xx++) - { - for (int yy = rectangle.Y; yy < rectangle.Y + rectangle.Height; yy++) - { - int avgR = 0, avgG = 0, avgB = 0; - int blurPixelCount = 0; - - // average the color of the red, green and blue for each pixel in the - // blur size while making sure you don't go outside the image bounds - for (int x = xx; (x < xx + blurSize && x < image.Width); x++) - { - for (int y = yy; (y < yy + blurSize && y < image.Height); y++) - { - Color pixel = blurred.GetPixel(x, y); - - avgR += pixel.R; - avgG += pixel.G; - avgB += pixel.B; - - blurPixelCount++; - } - } - - avgR = avgR / blurPixelCount; - avgG = avgG / blurPixelCount; - avgB = avgB / blurPixelCount; - - // now that we know the average for the blur size, set each pixel to that color - for (int x = xx; x < xx + blurSize && x < image.Width && x < rectangle.Width; x++) - for (int y = yy; y < yy + blurSize && y < image.Height && y < rectangle.Height; y++) - blurred.SetPixel(x, y, Color.FromArgb(avgR, avgG, avgB)); - } - } - - return blurred; - } - } - public class _Index { - /// - /// Unique Identifiyer Number - /// - public ulong UIN {get;set;} - /// - /// Name Of File - /// - public string Name {get;set;} - /// - /// Type - /// - public short Type { get; set; } - public _Index(ulong uin,string name,short type) - { - UIN = uin; - Name = name; - Type = type; - - } - } - - -} +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.IO; +using System.Diagnostics; + + +namespace FileViewer +{ + public class FileFunction + { + public static ulong UINC = 1; + public static string current_dir = "C:\\"; + public static Dictionary files = new Dictionary { }; + public static Dictionary folders = new Dictionary { }; + public static List Nfiles = new List { }; + public static List Nfolders = new List { }; + + + + public static void DirSearch(string sDir) + { + Nfiles = new List { }; + Nfolders = new List { }; + try + { + foreach (string f in Directory.GetFiles(sDir)) + { + try + { + var x = new _File(f); + if (!files.ContainsValue(x)) + { + FileFunction.UINC++; + + files.Add(FileFunction.UINC.ToString(), x); + Nfolders.Add(FileFunction.UINC.ToString()); + } + else + { + + string UIN = files.FirstOrDefault(files => files.Value == x).Key; + Nfiles.Add(UIN); + } + + + + } + catch (Exception e) + { + + System.Windows.Forms.MessageBox.Show("Access denied"); + } + + } + foreach (string d in Directory.GetDirectories(sDir)) + { + try + { + var x = new _Folder(d); + if (!folders.ContainsValue(x)) + { + FileFunction.UINC++; + + folders.Add(FileFunction.UINC.ToString(), x); + Nfolders.Add(FileFunction.UINC.ToString()); + } + else + { + + string UIN = folders.FirstOrDefault(folders => folders.Value == x).Key; + Nfolders.Add(UIN); + } + } + catch (Exception e) + { + + System.Windows.Forms.MessageBox.Show("access denied"); + } + } + } + catch (Exception) + { + + System.Windows.Forms.MessageBox.Show("access denied"); + + + + } + + + } + } + public class Crawler + { + public static _ILst index = new _ILst(); + public static List CDir = new List { }; + + public static void DirSearch(string sDir) + { + CDir = new List { }; + try + { + foreach (string f in Directory.GetFiles(sDir)) + { + try + { + CDir.Add(index.Log(f, 0).ToString()); + } + catch (Exception e) + { + System.Windows.Forms.MessageBox.Show("Access denied"); + } + } + foreach (string d in Directory.GetDirectories(sDir)) + { + try + { + CDir.Add(index.Log(d, 1).ToString()); + } + catch (Exception e) + { + System.Windows.Forms.MessageBox.Show("Access denied"); + } + } + } + catch (Exception) + { + System.Windows.Forms.MessageBox.Show("Access denied"); + } + } + } + public class _Folder + { + public string Name { get; } + public string FullLocation { get; } + + public _Folder(string folderpath) + { + FullLocation = folderpath; + Name = Path.GetFileName(folderpath); + } + } + public class _ILst { + ulong UiC = 0; + public _ILst() + { + + } + public ulong Indexed() + { + return UiC; + } + private List<_Index> index = new List<_Index> { }; + public _Index Get(string key) + { + foreach(_Index i in index) + { + if (i.UI.ToString() == key) + { + return i; + } + } + return null; + } + /// + /// Gives the UI of that file/Folder + /// + /// Path of File/Folder + /// + /// Type: + /// 0 - file, + /// 1 - Folder + /// + public ulong Log(string iPath,short iType) + { + //Unique Identifier + ulong UI = 0; + //UI Valid + bool UiV = false; + foreach (_Index i in index) + { + if ((i.Type == 0) && (iType == 0)){ + if(i.file.FullLocation == iPath) + { + UI = i.UI; + UiV = true; + } + } + else if ((i.Type == 1) && (iType == 1)) + { + if (i.folder.FullLocation == iPath) + { + UI = i.UI; + UiV = true; + } + + } + } + + if (!UiV) + { + UiC++; + UI = UiC; + if (iType == 0) + { + index.Add(new _Index(UI, new _File(iPath))); + } + else if (iType == 1) + { + index.Add(new _Index(UI, new _Folder(iPath))); + } + + } + return UI; + } + } + public class _File + { + //Unique Identification Number (Future plans to speed up indexing) + + //Name Of File E.G. C:\file.txt -> file + public string Name { get; } + //Path Of file E.G. C:\file.txt -> C:\ + public string Location { get; } + //Full path of file E.G. C:\file.txt -> C:\file.txt + public string FullLocation { get; } + //Extension it has, E.G. C:\file.txt -> txt + public string Extension { get; } + //Tags the file has + public List Tags { get; } + //Access Variables + public DateTime Create { get; } + public DateTime Lastaccess { get; } + public DateTime Lastwrite { get; } + //Size of file in bytes + public ulong size { get; } + + //Number corosponding to type, Future plans + /// + /// 0 - binary + /// 1 - image + /// 2 - text + /// 3 - zip + /// 4 - document + /// + public short Type { get; set; } + public _File(string filepath) + { + + FullLocation = filepath; + Location = Directory.GetParent(filepath).ToString(); + Extension = Path.GetExtension(filepath); + Name = Path.GetFileName(filepath); + Create = File.GetCreationTimeUtc(filepath); + Lastaccess = File.GetLastAccessTimeUtc(filepath); + Lastwrite = File.GetLastWriteTimeUtc(filepath); + + size = Convert.ToUInt64(new FileInfo(filepath).Length); + //var x = File.GetAttributes(filepath); + //if(FileAttributes.ReadOnly == x){ + // Tags.Add("RO"); + //} + //if (FileAttributes.Hidden == x) + //{ + // Tags.Add("Hid"); + //} + //if (FileAttributes.System == x) + //{ + // Tags.Add("Sys"); + //} + //if (FileAttributes.Directory == x) + //{ + // Tags.Add("Sys"); + //} + + } + } + public class Other + { + public static Bitmap Blur(Bitmap image, Int32 blurSize) + { + return Blur(image, new Rectangle(0, 0, image.Width, image.Height), blurSize); + } + + private static Bitmap Blur(Bitmap image, Rectangle rectangle, Int32 blurSize) + { + Bitmap blurred = new Bitmap(image.Width, image.Height); + + // make an exact copy of the bitmap provided + using (Graphics graphics = Graphics.FromImage(blurred)) + graphics.DrawImage(image, new Rectangle(0, 0, image.Width, image.Height), + new Rectangle(0, 0, image.Width, image.Height), GraphicsUnit.Pixel); + + // look at every pixel in the blur rectangle + for (int xx = rectangle.X; xx < rectangle.X + rectangle.Width; xx++) + { + for (int yy = rectangle.Y; yy < rectangle.Y + rectangle.Height; yy++) + { + int avgR = 0, avgG = 0, avgB = 0; + int blurPixelCount = 0; + + // average the color of the red, green and blue for each pixel in the + // blur size while making sure you don't go outside the image bounds + for (int x = xx; (x < xx + blurSize && x < image.Width); x++) + { + for (int y = yy; (y < yy + blurSize && y < image.Height); y++) + { + Color pixel = blurred.GetPixel(x, y); + + avgR += pixel.R; + avgG += pixel.G; + avgB += pixel.B; + + blurPixelCount++; + } + } + + avgR = avgR / blurPixelCount; + avgG = avgG / blurPixelCount; + avgB = avgB / blurPixelCount; + + // now that we know the average for the blur size, set each pixel to that color + for (int x = xx; x < xx + blurSize && x < image.Width && x < rectangle.Width; x++) + for (int y = yy; y < yy + blurSize && y < image.Height && y < rectangle.Height; y++) + blurred.SetPixel(x, y, Color.FromArgb(avgR, avgG, avgB)); + } + } + + return blurred; + } + } + public class _Index { + /// + /// Unique Identifiyer Number + /// + public ulong UI {get;set;} + /// + /// File/Folder + /// + public _File file { get; set; } + public _Folder folder { get; set; } + /// + /// Type: + /// 0 - File, + /// 1 - Folder + /// + public short Type { get; set; } + public _Index(ulong ui,_File f) + { + UI = ui; + file = f; + Type = 0; + + + } + public _Index(ulong ui, _Folder f) + { + UI= ui; + folder = f; + Type = 1; + + } + } + + +} diff --git a/FileViewer/FileViewer/obj/Debug/FileViewer.Form1.resources b/FileViewer/FileViewer/obj/Debug/FileViewer.Form1.resources index 58fab54..334b843 100644 Binary files a/FileViewer/FileViewer/obj/Debug/FileViewer.Form1.resources and b/FileViewer/FileViewer/obj/Debug/FileViewer.Form1.resources differ diff --git a/FileViewer/FileViewer/obj/Debug/FileViewer.csproj.CoreCompileInputs.cache b/FileViewer/FileViewer/obj/Debug/FileViewer.csproj.CoreCompileInputs.cache index 793cf1b..97e3980 100644 --- a/FileViewer/FileViewer/obj/Debug/FileViewer.csproj.CoreCompileInputs.cache +++ b/FileViewer/FileViewer/obj/Debug/FileViewer.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -505ed595d12581dd97c22956b9a9805130091df9 +505ed595d12581dd97c22956b9a9805130091df9 diff --git a/FileViewer/FileViewer/obj/Debug/FileViewer.csproj.FileListAbsolute.txt b/FileViewer/FileViewer/obj/Debug/FileViewer.csproj.FileListAbsolute.txt index 959059c..1455f27 100644 --- a/FileViewer/FileViewer/obj/Debug/FileViewer.csproj.FileListAbsolute.txt +++ b/FileViewer/FileViewer/obj/Debug/FileViewer.csproj.FileListAbsolute.txt @@ -1,20 +1,20 @@ -F:\C#\FileViewer\FileViewer\FileViewer\bin\Debug\FileViewer.exe.config -F:\C#\FileViewer\FileViewer\FileViewer\bin\Debug\FileViewer.exe -F:\C#\FileViewer\FileViewer\FileViewer\bin\Debug\FileViewer.pdb -F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.csprojAssemblyReference.cache -F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.Form1.resources -F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.Properties.Resources.resources -F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.csproj.GenerateResource.cache -F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.csproj.CoreCompileInputs.cache -F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.exe -F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.pdb -C:\Users\harry\Documents\Projects\FileViewer\FileViewer\bin\Debug\FileViewer.exe.config -C:\Users\harry\Documents\Projects\FileViewer\FileViewer\bin\Debug\FileViewer.exe -C:\Users\harry\Documents\Projects\FileViewer\FileViewer\bin\Debug\FileViewer.pdb -C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.csprojAssemblyReference.cache -C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.Form1.resources -C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.Properties.Resources.resources -C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.csproj.GenerateResource.cache -C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.csproj.CoreCompileInputs.cache -C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.exe -C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.pdb +F:\C#\FileViewer\FileViewer\FileViewer\bin\Debug\FileViewer.exe.config +F:\C#\FileViewer\FileViewer\FileViewer\bin\Debug\FileViewer.exe +F:\C#\FileViewer\FileViewer\FileViewer\bin\Debug\FileViewer.pdb +F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.csprojAssemblyReference.cache +F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.Form1.resources +F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.Properties.Resources.resources +F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.csproj.GenerateResource.cache +F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.csproj.CoreCompileInputs.cache +F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.exe +F:\C#\FileViewer\FileViewer\FileViewer\obj\Debug\FileViewer.pdb +C:\Users\harry\Documents\Projects\FileViewer\FileViewer\bin\Debug\FileViewer.exe.config +C:\Users\harry\Documents\Projects\FileViewer\FileViewer\bin\Debug\FileViewer.exe +C:\Users\harry\Documents\Projects\FileViewer\FileViewer\bin\Debug\FileViewer.pdb +C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.csprojAssemblyReference.cache +C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.Form1.resources +C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.Properties.Resources.resources +C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.csproj.GenerateResource.cache +C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.csproj.CoreCompileInputs.cache +C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.exe +C:\Users\harry\Documents\Projects\FileViewer\FileViewer\obj\Debug\FileViewer.pdb diff --git a/FileViewer/FileViewer/obj/Debug/FileViewer.csproj.GenerateResource.cache b/FileViewer/FileViewer/obj/Debug/FileViewer.csproj.GenerateResource.cache index 2758e2d..3e0d321 100644 Binary files a/FileViewer/FileViewer/obj/Debug/FileViewer.csproj.GenerateResource.cache and b/FileViewer/FileViewer/obj/Debug/FileViewer.csproj.GenerateResource.cache differ diff --git a/FileViewer/FileViewer/obj/Debug/FileViewer.exe b/FileViewer/FileViewer/obj/Debug/FileViewer.exe index f97c9fa..001d856 100644 Binary files a/FileViewer/FileViewer/obj/Debug/FileViewer.exe and b/FileViewer/FileViewer/obj/Debug/FileViewer.exe differ diff --git a/FileViewer/FileViewer/obj/Debug/FileViewer.pdb b/FileViewer/FileViewer/obj/Debug/FileViewer.pdb index 363a1e0..eec8842 100644 Binary files a/FileViewer/FileViewer/obj/Debug/FileViewer.pdb and b/FileViewer/FileViewer/obj/Debug/FileViewer.pdb differ diff --git a/FileViewer/FileViewer/splash.Designer.cs b/FileViewer/FileViewer/splash.Designer.cs index 2df90da..250c623 100644 --- a/FileViewer/FileViewer/splash.Designer.cs +++ b/FileViewer/FileViewer/splash.Designer.cs @@ -1,39 +1,39 @@ -namespace FileViewer -{ - partial class splash - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "splash"; - } - - #endregion - } +namespace FileViewer +{ + partial class splash + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "splash"; + } + + #endregion + } } \ No newline at end of file diff --git a/FileViewer/FileViewer/splash.cs b/FileViewer/FileViewer/splash.cs index 0495e20..2d5f34c 100644 --- a/FileViewer/FileViewer/splash.cs +++ b/FileViewer/FileViewer/splash.cs @@ -1,20 +1,20 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace FileViewer -{ - public partial class splash : Form - { - public splash() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace FileViewer +{ + public partial class splash : Form + { + public splash() + { + InitializeComponent(); + } + } +}