From 994f6b991a56382f530e3d43ad1f3a56c195559d Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Feb 2017 20:19:00 -0500 Subject: SFT making utilities --- ShiftOS.WinForms/Applications/FileSkimmer.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'ShiftOS.WinForms/Applications/FileSkimmer.cs') 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!"); + } + }); + } } -- cgit v1.2.3