diff options
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 + { + + } + + } } |
