void IconImage_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { if (MainWindowReferance.FoldersBack.Count == 1) { string deleteEntry = MainWindowReferance.Category.Content.ToString(); MainWindowReferance.DeleteEntry(MainWindowReferance.DisplayMessage("Do you want to remove the file \"" + Path.GetFileNameWithoutExtension(LinkPath) + "\" from this library?", "Delete Conformation", MessageBoxButton.YesNo), LinkPath, LIBRARIES_DIRECTORY + deleteEntry + ".boxolibrary"); MainWindowReferance.InitializeGrid(LIBRARIES_DIRECTORY + deleteEntry + ".boxolibrary"); } }
void IconImage_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (e.ClickCount == 2) { try { switch (Path.GetExtension(LinkPath)) { case "": if (MainWindowReferance.AlternateOpening.IsChecked == false) { MainWindowReferance.FoldersBack.Push(LinkPath); MainWindowReferance.InitializeGrid(LinkPath); break; } else { goto default; } default: ProcessStartInfo App = new ProcessStartInfo(); App.UseShellExecute = true; App.WorkingDirectory = Path.GetDirectoryName(LinkPath); App.FileName = Path.GetFileName(LinkPath); Process.Start(App); break; } } catch { if (MainWindowReferance.FoldersBack.Count == 1) { string deleteEntry = MainWindowReferance.Category.Content.ToString(); MainWindowReferance.DeleteEntry(MainWindowReferance.DisplayMessage("The file or folder is not avilable anymore \n\nDo you want to remove the file \"" + Path.GetFileNameWithoutExtension(LinkPath) + "\" from this library?", "Delete Conformation", MessageBoxButton.YesNo), LinkPath, LIBRARIES_DIRECTORY + deleteEntry + ".boxolibrary"); MainWindowReferance.InitializeGrid(LIBRARIES_DIRECTORY + deleteEntry + ".boxolibrary"); } } } }