aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/FileSkimmer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.WinForms/Applications/FileSkimmer.cs')
-rw-r--r--ShiftOS.WinForms/Applications/FileSkimmer.cs34
1 files changed, 32 insertions, 2 deletions
diff --git a/ShiftOS.WinForms/Applications/FileSkimmer.cs b/ShiftOS.WinForms/Applications/FileSkimmer.cs
index 3b4b2e7..6309775 100644
--- a/ShiftOS.WinForms/Applications/FileSkimmer.cs
+++ b/ShiftOS.WinForms/Applications/FileSkimmer.cs
@@ -125,6 +125,14 @@ namespace ShiftOS.WinForms.Applications
private string currentdir = "";
+ public void pinDirectory(string path)
+ {
+ int amountsCalled = -1;
+ amountsCalled = amountsCalled + 1;
+ pinnedItems.Nodes.Add(path);
+ pinnedItems.Nodes[amountsCalled].Nodes.Add("test");
+ }
+
public void ChangeDirectory(string path)
{
currentdir = path;
@@ -406,7 +414,29 @@ namespace ShiftOS.WinForms.Applications
}
catch { }
}
- }
-
+ private void pinToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Infobox.PromptYesNo("Pin folder", "Are you sure you want to pin \"" + lvitems.SelectedItems[0].Text + "\"?", (result) =>
+ {
+ if (result == true)
+ {
+ if (currentdir != "__system")
+ {
+ pinDirectory(currentdir + "/" + lvitems.SelectedItems[0].Text);
+ ResetList();
+ }
+ else
+ {
+ Infobox.Show("Cannot Pin", "You cannot pin a system drive.");
+ }
+
+ }
+ });
+ }
+ catch { }
+ }
+ }
}