private void InfoBtn_Click(object sender, EventArgs e) { SelectedItem = StartMenuListDisplay.GetItemText(StartMenuListDisplay.SelectedItem); FileInfoPath2 = Directory.GetFiles(@StartMenu.path, "*" + SelectedItem, SearchOption.AllDirectories); UpdateInfoText(); }
private void DeleteBtn_Click(object sender, EventArgs e) { SelectedItem = StartMenuListDisplay.GetItemText(StartMenuListDisplay.SelectedItem); FileInfoPath2 = Directory.GetFiles(@StartMenu.path, "*" + SelectedItem, SearchOption.AllDirectories); foreach (string name in FileInfoPath2) { Console.WriteLine("Deleted = " + name); MessageBox.Show("Deleted " + SelectedItem + " Restart the program when done deleting the programs you disire", "Deleted"); File.Delete(name); } }
void SetUpTest() { SelectedItem = StartMenuListDisplay.GetItemText(StartMenuListDisplay.SelectedItem); FileInfoPath2 = Directory.GetFiles(@StartMenu.path, "*" + SelectedItem, SearchOption.AllDirectories); }