示例#1
0
 public void Close(EndCode code)
 {
     if(code != EndCode.Hidden) {
         pluginServer = null;
         shellBrowser = null;
     }
 }
示例#2
0
 public void Close(EndCode code)
 {
     pluginServer = null;
     if(memoForm != null) {
         memoForm.Dispose();
     }
 }
示例#3
0
        public PluginManager(IPluginServer host)
        {
            InitializeComponent();

            /* icon */
            Icon = host.Utils.ToIcon(Icons.package);
        }
示例#4
0
        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;
        }
示例#5
0
 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;
     }
 }
示例#7
0
 public void Close(EndCode code)
 {
     this.pluginServer = null;
     if (this.memoForm != null)
     {
         this.memoForm.Dispose();
     }
 }
示例#8
0
 public void Close(EndCode code)
 {
     pluginServer = null;
     if (memoForm != null)
     {
         memoForm.Dispose();
     }
 }
示例#9
0
        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] };
            }
        }
示例#10
0
        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[] { ';' });
            }
        }
示例#11
0
        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;
        }
示例#12
0
        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();
            }
        }
示例#13
0
        public void Close(EndCode code) {
            pluginServer = null;
            shellBrowser = null;

            if(button != null) {
                button.Dispose();
            }

            if(fvmw != null) {
                fvmw.Dispose();
            }
        }
示例#14
0
        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();
        }
示例#15
0
        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);
        }
示例#16
0
        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;
        }
示例#17
0
 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;
 }
示例#18
0
        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();
            }
        }
示例#19
0
        public void Close(EndCode code)
        {
            pluginServer = null;
            shellBrowser = null;

            if (button != null)
            {
                button.Dispose();
            }

            if (fvmw != null)
            {
                fvmw.Dispose();
            }
        }
示例#20
0
 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[] { ';' });
                }
            }
        }
示例#22
0
        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);
        }
示例#23
0
        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);
        }
示例#24
0
        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();
        }
示例#26
0
        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);
        }
示例#27
0
        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 {
            }
        }
示例#28
0
 public void Close(EndCode code)
 {
     this.pluginServer = null;
     this.shellBrowser = null;
 }
示例#29
0
        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;
        }
示例#30
0
        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 {
            }
        }
示例#31
0
 public void Close(EndCode code)
 {
     pluginServer = null;
     shellBrowser = null;
 }
示例#32
0
 public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser)
 {
     this.pluginServer = pluginServer;
     this.shellBrowser = shellBrowser;
     this.pluginServer.PointedTabChanged += new PluginEventHandler(pluginServer_PointedTabChanged);
 }
示例#33
0
 public void Close(EndCode code) {
     pluginServer = null;
 }
示例#34
0
 public void Close(EndCode code) {
     this.pluginServer = null;
     this.shellBrowser = null;
 }
示例#35
0
 public void Close(EndCode code) {
     if(code != EndCode.Hidden)
         pluginServer = null;
 }
示例#36
0
 public void Close(EndCode code) {
     pluginServer = null;
     shellBrowser = null;
 }
示例#37
0
 public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) {
 }
示例#38
0
 public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser)
 {
     this.pluginServer = pluginServer;
     this.shellBrowser = shellBrowser;
 }
示例#39
0
 public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser)
 {
 }
示例#40
0
        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);
        }
示例#41
0
 public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) {
     this.pluginServer = pluginServer;
     this.shellBrowser = shellBrowser;
 }
示例#42
0
        public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) {
            this.pluginServer = pluginServer;

            if(!pluginServer.TryGetLocalizedStrings(this, 1, out ResStr)) {
                ResStr = new string[] { StringResources.ButtonNames[8] };
            }
        }
示例#43
0
 public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser)
 {
     this.pluginServer = pluginServer;
     ReadSettings();
 }
示例#44
0
 public void Open(IPluginServer pluginServer, IShellBrowser shellBrowser) {
     this.pluginServer = pluginServer;
     MigemoLoader.ReadSettings();
 }
示例#45
0
 public void Close(EndCode code)
 {
     this.pluginServer = null;
 }
示例#46
0
 public void Close(EndCode code) {
     this.pluginServer = null;
     if(this.memoForm != null) {
         this.memoForm.Dispose();
     }
 }