Ejemplo n.º 1
0
        public void UnregisterShellExtension()
        {
            // unregister the context menu
            //FileShellExtension.Unregister("*", Resources.ApplicationName);
            //FileShellExtension.Unregister("Directory", Resources.ApplicationName);
#if DEBUG
            FileShellExtension.Unregister("AllFileSystemObjects", Resources.ApplicationName + "_DEBUG");
#else
            FileShellExtension.Unregister("AllFileSystemObjects", Resources.ApplicationName);
#endif
        }
Ejemplo n.º 2
0
        public void RegisterShellExtension()
        {
            // register context menu - full path to self, %L is placeholder for selected file
            //FileShellExtension.Register("*", Resources.ApplicationName, MenuText, string.Format("\"{0}\" \"%L\"", Application.ExecutablePath));
            //FileShellExtension.Register("Directory", Resources.ApplicationName, MenuText, string.Format("\"{0}\" \"%L\"", Application.ExecutablePath));
#if DEBUG
            FileShellExtension.Register("AllFileSystemObjects", Resources.ApplicationName + "_DEBUG", MenuText + " (debug)", string.Format("\"{0}\" \"%L\"", Application.ExecutablePath));
#else
            FileShellExtension.Register("AllFileSystemObjects", Resources.ApplicationName, MenuText, string.Format("\"{0}\" \"%L\"", Application.ExecutablePath));
#endif
        }