Пример #1
0
 private static void Uninstall(bool allUsers, ImageFileType[] types)
 {
     try
     {
         ShortcutMenu.UninstallHandler(allUsers, types);
     }
     catch (Exception ex)
     {
         ErrorMsgBox(
             "Uninstallation failed",
             "Could not remove context menu entries from Windows Explorer.\n\n" +
             ex.Message);
         return;
     }
     InfoMsgBox(
         "Uninstallation succeeded",
         "Context menu entries were removed from Windows Explorer.");
 }
Пример #2
0
 private static void Install(string menuText, bool includeFileName, bool allUsers, bool resizeOnUpload, ImageFileType[] types)
 {
     try
     {
         ShortcutMenu.InstallHandler(menuText, includeFileName, allUsers, resizeOnUpload, types);
     }
     catch (Exception ex)
     {
         ErrorMsgBox(
             "Installation failed",
             "Could not add context menu entries to Windows Explorer.\n\n" +
             ex.Message);
         return;
     }
     InfoMsgBox(
         "Installation succeeded",
         "Context menu entries were added to Windows Explorer. " +
         "Remember to reinstall the program if you move or rename it!");
 }