Exemple #1
0
        // Created and used internally by plugin
        internal PluginStringLocator(Plugin plugin)
        {
            this.plugin = plugin;

            reader   = CreateReader(plugin, "strings", false);
            dlreader = CreateReader(plugin, "dlstrings", true);
            ilreader = CreateReader(plugin, "ilstrings", true);
        }
Exemple #2
0
 private string GetStringFromReader(StringTableReader reader, uint index)
 {
     if (reader != null)
     {
         return(reader.ReadString(index));
     }
     else
     {
         throw new InvalidDataException("One or more locale string file(s) could not be located for plugin: " + plugin.FileName);
     }
 }
Exemple #3
0
 public void Dispose()
 {
     if (reader != null)
     {
         reader.Dispose();
         reader = null;
     }
     if (dlreader != null)
     {
         dlreader.Dispose();
         dlreader = null;
     }
     if (ilreader != null)
     {
         ilreader.Dispose();
         ilreader = null;
     }
 }