diff options
| author | Michael <[email protected]> | 2017-04-21 19:42:41 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-04-21 19:42:41 -0400 |
| commit | f9f834b1c31f2b6c611f44b2eba8d7ec816145f5 (patch) | |
| tree | 6d4084dfd38ebf11e68647f2a88d3d94e4d76157 /ShiftOS.WinForms/Applications/FileSkimmer.cs | |
| parent | 1e74f09670a89d8fdf51215aa7a275c335e80211 (diff) | |
| download | shiftos_thereturn-f9f834b1c31f2b6c611f44b2eba8d7ec816145f5.tar.gz shiftos_thereturn-f9f834b1c31f2b6c611f44b2eba8d7ec816145f5.tar.bz2 shiftos_thereturn-f9f834b1c31f2b6c611f44b2eba8d7ec816145f5.zip | |
Add copying/moving of files/dirs
Diffstat (limited to 'ShiftOS.WinForms/Applications/FileSkimmer.cs')
| -rw-r--r-- | ShiftOS.WinForms/Applications/FileSkimmer.cs | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/Applications/FileSkimmer.cs b/ShiftOS.WinForms/Applications/FileSkimmer.cs index 689c718..4b11d24 100644 --- a/ShiftOS.WinForms/Applications/FileSkimmer.cs +++ b/ShiftOS.WinForms/Applications/FileSkimmer.cs @@ -324,6 +324,69 @@ namespace ShiftOS.WinForms.Applications copyToolStripMenuItem.Visible = false; } } + + private void copyToolStripMenuItem_Click(object sender, EventArgs e) + { + try + { + string path = currentdir + "/" + lvitems.SelectedItems[0].Tag.ToString(); + if (DirectoryExists(path)) + { + FileSkimmerBackend.GetFile(new[] { "Directory" }, FileOpenerStyle.Save, (newPath) => + { + Copy(path, newPath); + ResetList(); + }); + } + else if (FileExists(path)) + { + string[] psplit = path.Split('.'); + string ext = "." + psplit[psplit.Length - 1]; + FileSkimmerBackend.GetFile(new[] { ext }, FileOpenerStyle.Save, (newPath) => + { + Copy(path, newPath); + ResetList(); + }); + + } + } + catch + { + + } + } + + private void moveToolStripMenuItem_Click(object sender, EventArgs e) + { + try + { + string path = currentdir + "/" + lvitems.SelectedItems[0].Tag.ToString(); + if (DirectoryExists(path)) + { + FileSkimmerBackend.GetFile(new[] { "Directory" }, FileOpenerStyle.Save, (newPath) => + { + Utils.Move(path, newPath); + ResetList(); + }); + } + else if (FileExists(path)) + { + string[] psplit = path.Split('.'); + string ext = psplit[psplit.Length - 1]; + FileSkimmerBackend.GetFile(new[] { ext }, FileOpenerStyle.Save, (newPath) => + { + Utils.Move(path, newPath); + ResetList(); + }); + + } + } + catch + { + + } + + } } |
