public void Close(EndCode code) { if(code != EndCode.Hidden) { pluginServer = null; shellBrowser = null; } }
public void Close(EndCode code) { pluginServer = null; if(memoForm != null) { memoForm.Dispose(); } }
public PluginManager(IPluginServer host) { InitializeComponent(); /* icon */ Icon = host.Utils.ToIcon(Icons.package); }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; this.shellBrowser = shellBrowser; if (!this.pluginServer.TryGetLocalizedStrings(this, 7, out ResStrs)) { // if localized strings not found, falls back to default strings in assembly resource of this dll. // this plugin has 2 language resources in assemly, but usually there's no need to do like this. // it only has to have a resource of your own language. if (CultureInfo.CurrentCulture.Parent.Name == "ja") { ResStrs = Resource.viewModes_Ja.Split(new char[] { ';' }); } else if (CultureInfo.CurrentCulture.Parent.Name == "zh-CHS") { ResStrs = Resource.viewModes_zh.Split(new char[] { ';' }); } else { ResStrs = Resource.viewModes.Split(new char[] { ';' }); } } this.pluginServer.NavigationComplete += pluginServer_NavigationComplete; }
public void Close(EndCode code) { if (code != EndCode.Hidden) { this.pluginServer = null; } }
public void Close(EndCode code) { if (code != EndCode.Hidden) { pluginServer = null; shellBrowser = null; } }
public void Close(EndCode code) { this.pluginServer = null; if (this.memoForm != null) { this.memoForm.Dispose(); } }
public void Close(EndCode code) { pluginServer = null; if (memoForm != null) { memoForm.Dispose(); } }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; if (!pluginServer.TryGetLocalizedStrings(this, 1, out this.ResStr)) { this.ResStr = new string[] { StringResources.ButtonNames[8] }; } }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; this.shellBrowser = shellBrowser; if(!pluginServer.TryGetLocalizedStrings(this, 3, out ResStrs)) { if(CultureInfo.CurrentCulture.Parent.Name == "ja") ResStrs = Resource.strQTFolderButton_ja.Split(new char[] { ';' }); else ResStrs = Resource.strQTFolderButton.Split(new char[] { ';' }); } }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; this.shellBrowser = shellBrowser; if(!pluginServer.TryGetLocalizedStrings(this, 1, out ResStr)) { ResStr = new string[] { StringResources.ButtonNames[0] }; } this.pluginServer.SelectionChanged += pluginServer_SelectionChanged; this.pluginServer.NavigationComplete += pluginServer_NavigationComplete; }
public void Close(EndCode code) { this.pluginServer = null; this.shellBrowser = null; if(this.button != null) { this.button.Dispose(); } if(this.fvmw != null) { this.fvmw.Dispose(); } }
public void Close(EndCode code) { pluginServer = null; shellBrowser = null; if(button != null) { button.Dispose(); } if(fvmw != null) { fvmw.Dispose(); } }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; if(!pluginServer.TryGetLocalizedStrings(this, RES_COUNT, out this.ResStrs)) { if(System.Globalization.CultureInfo.CurrentCulture.Parent.Name == "ja") this.ResStrs = Resource.ResStrs_ja.Split(new char[] { ';' }); else this.ResStrs = Resource.ResStrs.Split(new char[] { ';' }); } this.RestoreInitialSize(); }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; if (!pluginServer.TryGetLocalizedStrings(this, 1, out this.ResStr)) { this.ResStr = new string[] { StringResources.ButtonNames[7] }; } this.pluginServer.SelectionChanged += new PluginEventHandler(pluginServer_SelectionChanged); this.pluginServer.NavigationComplete += new PluginEventHandler(pluginServer_NavigationComplete); }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; this.shellBrowser = shellBrowser; if (!pluginServer.TryGetLocalizedStrings(this, 1, out ResStr)) { ResStr = new string[] { StringResources.ButtonNames[0] }; } this.pluginServer.SelectionChanged += pluginServer_SelectionChanged; this.pluginServer.NavigationComplete += pluginServer_NavigationComplete; }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; if(!this.pluginServer.TryGetLocalizedStrings(this, 4, out ResStrs)) { if(CultureInfo.CurrentCulture.Parent.Name == "ja") { ResStrs = Resource.str_ja.Split(new char[] { ';' }); } else { ResStrs = Resource.str_en.Split(new char[] { ';' }); } } this.pluginServer.RegisterMenu(this, MenuType.Tab, ResStrs[0], true); this.pluginServer.NavigationComplete += pluginServer_NavigationComplete; this.pluginServer.ExplorerStateChanged += pluginServer_ExplorerStateChanged; }
public void Close(EndCode code) { this.pluginServer = null; this.shellBrowser = null; if (this.button != null) { this.button.Dispose(); } if (this.fvmw != null) { this.fvmw.Dispose(); } }
public void Close(EndCode code) { pluginServer = null; shellBrowser = null; if (button != null) { button.Dispose(); } if (fvmw != null) { fvmw.Dispose(); } }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; if(!this.pluginServer.TryGetLocalizedStrings(this, 4, out ResStrs)) { if(CultureInfo.CurrentCulture.Parent.Name == "ja") { ResStrs = Resource.str_ja.Split(new char[] { ';' }); } else if(CultureInfo.CurrentCulture.Parent.Name == "zh-CHS") { ResStrs = Resource.str_zh.Split(new char[] { ';' }); } else { ResStrs = Resource.str_en.Split(new char[] { ';' }); } } this.pluginServer.RegisterMenu(this, MenuType.Tab, ResStrs[0], true); this.pluginServer.NavigationComplete += pluginServer_NavigationComplete; this.pluginServer.ExplorerStateChanged += pluginServer_ExplorerStateChanged; }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; this.shellBrowser = shellBrowser; if (!pluginServer.TryGetLocalizedStrings(this, 3, out ResStrs)) { if (CultureInfo.CurrentCulture.Parent.Name == "ja") { ResStrs = Resource.strQTFolderButton_ja.Split(new char[] { ';' }); } else { ResStrs = Resource.strQTFolderButton.Split(new char[] { ';' }); } } }
public static bool MoveSelectedToParent(IPluginServer pluginServer) { try { Address[] addresses; if (!pluginServer.TryGetSelection(out addresses) || addresses.Length == 0) { return(false); } string currentPath = pluginServer.SelectedTab.Address.Path; string sourcePaths = FileOps.MakeSourcePaths(addresses); if (sourcePaths.Length < 2 || currentPath.Length < 4) { return(false); } string targetDir = Path.GetDirectoryName(currentPath); if (!String.IsNullOrEmpty(targetDir)) { const int FO_MOVE = 0x0001; const int FO_COPY = 0x0002; const short FOF_ALLOWUNDO = 0x0040; bool fInCompressedFolder = File.Exists(currentPath); // or unknown virtual folder?? TENUKI here bool fCopy = fInCompressedFolder ^ Control.ModifierKeys == Keys.Control; SHFILEOPSTRUCT sfo = new SHFILEOPSTRUCT(); sfo.hwnd = pluginServer.ExplorerHandle; sfo.wFunc = fCopy ? FO_COPY : FO_MOVE; sfo.pFrom = sourcePaths; sfo.pTo = targetDir + "\0"; sfo.fFlags = FOF_ALLOWUNDO; SHFileOperation(ref sfo); pluginServer.ExecuteCommand(Commands.RefreshBrowser, null); return(true); } } catch { } return(false); }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; this.shellBrowser = shellBrowser; if(!this.pluginServer.TryGetLocalizedStrings(this, 7, out this.ResStrs)) { // if localized strings not found, falls back to default strings in assembly resource of this dll. // this plugin has 2 language resources in assemly, but usually there's no need to do like this. // it only has to have a resource of your own language. if(System.Globalization.CultureInfo.CurrentCulture.Parent.Name == "ja") this.ResStrs = Resource.viewModes_Ja.Split(new char[] { ';' }); else this.ResStrs = Resource.viewModes.Split(new char[] { ';' }); } this.pluginServer.NavigationComplete += new PluginEventHandler(pluginServer_NavigationComplete); }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { // called when this plugin class instantialized. this.pluginServer = pluginServer; this.shellBrowser = shellBrowser; // attached events are automatically detached when plugin closes. this.pluginServer.TabChanged += pluginServer_TabChanged; this.pluginServer.TabAdded += pluginServer_TabAdded; this.pluginServer.TabRemoved += pluginServer_TabRemoved; this.pluginServer.NavigationComplete += pluginServer_NavigationComplete; this.pluginServer.SettingsChanged += pluginServer_SettingsChanged; this.pluginServer.SelectionChanged += pluginServer_SelectionChanged; // registering to QTTabBar menu. this.pluginServer.RegisterMenu(this, MenuType.Both, "SampleSplitButton Menu test", true); }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; if (!pluginServer.TryGetLocalizedStrings(this, RES_COUNT, out ResStrs)) { if (CultureInfo.CurrentCulture.Parent.Name == "ja") { ResStrs = Resource.ResStrs_ja.Split(new char[] { ';' }); } else { ResStrs = Resource.ResStrs.Split(new char[] { ';' }); } } RestoreInitialSize(); }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { // called when this plugin class instantialized. this.pluginServer = pluginServer; this.shellBrowser = shellBrowser; // attached events are automatically detached when plugin closes. this.pluginServer.TabChanged += new PluginEventHandler(pluginServer_TabChanged); this.pluginServer.TabAdded += new PluginEventHandler(pluginServer_TabAdded); this.pluginServer.TabRemoved += new PluginEventHandler(pluginServer_TabRemoved); this.pluginServer.NavigationComplete += new PluginEventHandler(pluginServer_NavigationComplete); this.pluginServer.SettingsChanged += new PluginEventHandler(pluginServer_SettingsChanged); this.pluginServer.SelectionChanged += new PluginEventHandler(pluginServer_SelectionChanged); // registering to QTTabBar menu. this.pluginServer.RegisterMenu(this, MenuType.Both, "SampleSplitButton Menu test", true); }
public static void ShowProperties(IPluginServer pluginServer) { const int SEE_MASK_INVOKEIDLIST = 0x0000000c; const int SEE_MASK_FLAG_NO_UI = 0x00000400; try { IntPtr pIDL = PInvoke.CreatePIDL(pluginServer.SelectedTab.Address.ITEMIDLIST); if (pIDL != IntPtr.Zero) { SHELLEXECUTEINFO sei = new SHELLEXECUTEINFO(); sei.cbSize = Marshal.SizeOf(sei); sei.fMask = SEE_MASK_INVOKEIDLIST | SEE_MASK_FLAG_NO_UI; sei.lpVerb = "properties"; sei.lpIDList = pIDL; ShellExecuteEx(ref sei); Marshal.FreeCoTaskMem(pIDL); } } catch { } }
public void Close(EndCode code) { this.pluginServer = null; this.shellBrowser = null; }
public static bool MoveSelectedToParent(IPluginServer pluginServer) { try { Address[] addresses; if(!pluginServer.TryGetSelection(out addresses) || addresses.Length == 0) return false; string currentPath = pluginServer.SelectedTab.Address.Path; string sourcePaths = FileOps.MakeSourcePaths(addresses); if(sourcePaths.Length < 2 || currentPath.Length < 4) return false; string targetDir = Path.GetDirectoryName(currentPath); if(!String.IsNullOrEmpty(targetDir)) { const int FO_MOVE = 0x0001; const int FO_COPY = 0x0002; const short FOF_ALLOWUNDO = 0x0040; bool fInCompressedFolder = File.Exists(currentPath); // or unknown virtual folder?? TENUKI here bool fCopy = fInCompressedFolder ^ Control.ModifierKeys == Keys.Control; SHFILEOPSTRUCT sfo = new SHFILEOPSTRUCT(); sfo.hwnd = pluginServer.ExplorerHandle; sfo.wFunc = fCopy ? FO_COPY : FO_MOVE; sfo.pFrom = sourcePaths; sfo.pTo = targetDir + "\0"; sfo.fFlags = FOF_ALLOWUNDO; SHFileOperation(ref sfo); pluginServer.ExecuteCommand(Commands.RefreshBrowser, null); return true; } } catch { } return false; }
public static void ShowProperties(IPluginServer pluginServer) { const int SEE_MASK_INVOKEIDLIST = 0x0000000c; const int SEE_MASK_FLAG_NO_UI = 0x00000400; try { IntPtr pIDL = PInvoke.CreatePIDL(pluginServer.SelectedTab.Address.ITEMIDLIST); if(pIDL != IntPtr.Zero) { SHELLEXECUTEINFO sei = new SHELLEXECUTEINFO(); sei.cbSize = Marshal.SizeOf(sei); sei.fMask = SEE_MASK_INVOKEIDLIST | SEE_MASK_FLAG_NO_UI; sei.lpVerb = "properties"; sei.lpIDList = pIDL; ShellExecuteEx(ref sei); Marshal.FreeCoTaskMem(pIDL); } } catch { } }
public void Close(EndCode code) { pluginServer = null; shellBrowser = null; }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; this.shellBrowser = shellBrowser; this.pluginServer.PointedTabChanged += new PluginEventHandler(pluginServer_PointedTabChanged); }
public void Close(EndCode code) { pluginServer = null; }
public void Close(EndCode code) { if(code != EndCode.Hidden) pluginServer = null; }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; this.shellBrowser = shellBrowser; }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; if(!pluginServer.TryGetLocalizedStrings(this, 1, out this.ResStr)) { this.ResStr = new string[] { StringResources.ButtonNames[7] }; } this.pluginServer.SelectionChanged += new PluginEventHandler(pluginServer_SelectionChanged); this.pluginServer.NavigationComplete += new PluginEventHandler(pluginServer_NavigationComplete); }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; if(!pluginServer.TryGetLocalizedStrings(this, 1, out ResStr)) { ResStr = new string[] { StringResources.ButtonNames[8] }; } }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; ReadSettings(); }
public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) { this.pluginServer = pluginServer; MigemoLoader.ReadSettings(); }
public void Close(EndCode code) { this.pluginServer = null; }
public void Close(EndCode code) { this.pluginServer = null; if(this.memoForm != null) { this.memoForm.Dispose(); } }