Ejemplo n.º 1
0
        public void UpdateStringResource(int id, string value, ushort?language)
        {
            this.CheckIsWriteMode();
            int blockID;
            int index;

            this.GetStringTableFromStringID(id, out blockID, out index);
            UnmanagedLibrary.StringTable stringTable;
            if (!this.stringTables.TryGetValue(blockID, out stringTable))
            {
                byte[] bytes;
                using (new UnmanagedLibrary(this.fileName))
                    bytes = this.GetResource(blockID, (object)6).GetBytes(language);
                stringTable = new UnmanagedLibrary.StringTable(bytes);
                this.stringTables[blockID] = stringTable;
            }
            stringTable[index] = value;
        }
Ejemplo n.º 2
0
 public void UpdateStringResource(int id, string value, ushort? language)
 {
     this.CheckIsWriteMode();
     int blockID;
     int index;
     this.GetStringTableFromStringID(id, out blockID, out index);
     UnmanagedLibrary.StringTable stringTable;
     if (!this.stringTables.TryGetValue(blockID, out stringTable))
     {
         byte[] bytes;
         using (new UnmanagedLibrary(this.fileName))
             bytes = this.GetResource(blockID, (object)6).GetBytes(language);
         stringTable = new UnmanagedLibrary.StringTable(bytes);
         this.stringTables[blockID] = stringTable;
     }
     stringTable[index] = value;
 }