diff options
Diffstat (limited to 'ShiftOS.WinForms/Applications')
| -rw-r--r-- | ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs | 46 | ||||
| -rw-r--r-- | ShiftOS.WinForms/Applications/FileSkimmer.cs | 23 | ||||
| -rw-r--r-- | ShiftOS.WinForms/Applications/FileSkimmer.resx | 3 |
3 files changed, 66 insertions, 6 deletions
diff --git a/ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs b/ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs index df31977..b75f801 100644 --- a/ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs +++ b/ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs @@ -55,7 +55,11 @@ namespace ShiftOS.WinForms.Applications this.lvitems = new System.Windows.Forms.ListView(); this.panel1 = new System.Windows.Forms.Panel(); this.lbcurrentfolder = new System.Windows.Forms.Label(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.newFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.panel1.SuspendLayout(); + this.menuStrip1.SuspendLayout(); this.SuspendLayout(); // // lvitems @@ -63,7 +67,7 @@ namespace ShiftOS.WinForms.Applications this.lvitems.Dock = System.Windows.Forms.DockStyle.Fill; this.lvitems.Location = new System.Drawing.Point(0, 0); this.lvitems.Name = "lvitems"; - this.lvitems.Size = new System.Drawing.Size(634, 356); + this.lvitems.Size = new System.Drawing.Size(634, 332); this.lvitems.TabIndex = 0; this.lvitems.UseCompatibleStateImageBehavior = false; this.lvitems.DoubleClick += new System.EventHandler(this.lvitems_DoubleClick); @@ -73,31 +77,58 @@ namespace ShiftOS.WinForms.Applications this.panel1.Controls.Add(this.lvitems); this.panel1.Controls.Add(this.lbcurrentfolder); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Location = new System.Drawing.Point(0, 24); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(634, 369); + this.panel1.Size = new System.Drawing.Size(634, 345); this.panel1.TabIndex = 1; // // lbcurrentfolder // this.lbcurrentfolder.Dock = System.Windows.Forms.DockStyle.Bottom; - this.lbcurrentfolder.Location = new System.Drawing.Point(0, 356); + this.lbcurrentfolder.Location = new System.Drawing.Point(0, 332); this.lbcurrentfolder.Name = "lbcurrentfolder"; this.lbcurrentfolder.Size = new System.Drawing.Size(634, 13); this.lbcurrentfolder.TabIndex = 1; this.lbcurrentfolder.Text = "label1"; // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newFolderToolStripMenuItem, + this.deleteToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(634, 24); + this.menuStrip1.TabIndex = 2; + this.menuStrip1.Text = "menuStrip1"; + // + // newFolderToolStripMenuItem + // + this.newFolderToolStripMenuItem.Name = "newFolderToolStripMenuItem"; + this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(79, 20); + this.newFolderToolStripMenuItem.Text = "New Folder"; + this.newFolderToolStripMenuItem.Click += new System.EventHandler(this.newFolderToolStripMenuItem_Click); + // + // deleteToolStripMenuItem + // + this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; + this.deleteToolStripMenuItem.Size = new System.Drawing.Size(52, 20); + this.deleteToolStripMenuItem.Text = "Delete"; + // // FileSkimmer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(634, 369); this.Controls.Add(this.panel1); + this.Controls.Add(this.menuStrip1); this.Name = "FileSkimmer"; - this.Text = "{FILE_SKIMMER_NAME}"; + this.Size = new System.Drawing.Size(634, 369); this.Load += new System.EventHandler(this.FileSkimmer_Load); this.panel1.ResumeLayout(false); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -106,5 +137,8 @@ namespace ShiftOS.WinForms.Applications private System.Windows.Forms.ListView lvitems; private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Label lbcurrentfolder; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem newFolderToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; } }
\ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/FileSkimmer.cs b/ShiftOS.WinForms/Applications/FileSkimmer.cs index ec8fd00..2881dc0 100644 --- a/ShiftOS.WinForms/Applications/FileSkimmer.cs +++ b/ShiftOS.WinForms/Applications/FileSkimmer.cs @@ -258,6 +258,29 @@ namespace ShiftOS.WinForms.Applications public void OnUpgrade() { } + + private void newFolderToolStripMenuItem_Click(object sender, EventArgs e) + { + Infobox.PromptText("New Folder", "Please type a name for your folder.", (path) => + { + if (!string.IsNullOrWhiteSpace(path)) + { + if(!Utils.DirectoryExists(this.currentdir + "/" + path)) + { + Utils.CreateDirectory(currentdir + "/" + path); + this.ResetList(); + } + else + { + Infobox.Show("New folder", "A folder with that name already exists."); + } + } + else + { + Infobox.Show("New folder", "You can't create a folder with no name!"); + } + }); + } } diff --git a/ShiftOS.WinForms/Applications/FileSkimmer.resx b/ShiftOS.WinForms/Applications/FileSkimmer.resx index 1af7de1..d5494e3 100644 --- a/ShiftOS.WinForms/Applications/FileSkimmer.resx +++ b/ShiftOS.WinForms/Applications/FileSkimmer.resx @@ -117,4 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> </root>
\ No newline at end of file |
