예제 #1
0
 public PluginServer(QTTabBarClass tabBar)
 {
     this.tabBar = tabBar;
     shellBrowser = (QTPlugin.Interop.IShellBrowser)this.tabBar.ShellBrowser.GetIShellBrowser();
     dicLocalizingStrings = new Dictionary<string, string[]>();
     foreach(string file in Config.Lang.PluginLangFiles) {
         if(file.Length <= 0 || !File.Exists(file)) continue;
         var dict = QTUtility.ReadLanguageFile(file);
         if(dict == null) continue;
         foreach(var pair in dict) {
             dicLocalizingStrings[pair.Key] = pair.Value;
         }
     }
     LoadStartupPlugins();
 }
예제 #2
0
 public void Dispose()
 {
     // todo check
     ClearEvents();
     foreach (Plugin plugin in dicPluginInstances.Values)
     {
         if (plugin.PluginInformation != null)
         {
             plugin.Close(EndCode.WindowClosed);
         }
     }
     FilterPlugin     = null;
     FilterCorePlugin = null;
     dicPluginInstances.Clear();
     tabBar       = null;
     shellBrowser = null;
 }
예제 #3
0
 public PluginServer(QTTabBarClass tabBar)
 {
     this.tabBar          = tabBar;
     shellBrowser         = (QTPlugin.Interop.IShellBrowser) this.tabBar.ShellBrowser.GetIShellBrowser();
     dicLocalizingStrings = new Dictionary <string, string[]>();
     foreach (string file in Config.Lang.PluginLangFiles)
     {
         if (file.Length <= 0 || !File.Exists(file))
         {
             continue;
         }
         var dict = QTUtility.ReadLanguageFile(file);
         if (dict == null)
         {
             continue;
         }
         foreach (var pair in dict)
         {
             dicLocalizingStrings[pair.Key] = pair.Value;
         }
     }
     LoadStartupPlugins();
 }
예제 #4
0
 public void Dispose()
 {
     // todo check
     ClearEvents();
     foreach(Plugin plugin in dicPluginInstances.Values) {
         if(plugin.PluginInformation != null) {
             plugin.Close(EndCode.WindowClosed);
         }
     }
     FilterPlugin = null;
     FilterCorePlugin = null;
     dicPluginInstances.Clear();
     tabBar = null;
     shellBrowser = null;
 }
예제 #5
0
 public void Dispose() {
     tabBar = null;
     pluginManager = null;
     shellBrowser = null;
 }
예제 #6
0
 public PluginServer(QTTabBarClass tabBar, PluginManager manager) {
     this.tabBar = tabBar;
     shellBrowser = (QTPlugin.Interop.IShellBrowser)this.tabBar.ShellBrowser.GetIShellBrowser();
     pluginManager = manager;
     if((QTUtility.Path_PluginLangFile.Length > 0) && File.Exists(QTUtility.Path_PluginLangFile)) {
         dicLocalizingStrings = QTUtility.ReadLanguageFile(QTUtility.Path_PluginLangFile);
     }
     if(dicLocalizingStrings == null) {
         dicLocalizingStrings = new Dictionary<string, string[]>();
     }
 }
예제 #7
0
 public void Dispose() {
     this.tabBar = null;
     this.pluginManager = null;
     this.shellBrowser = null;
 }