コード例 #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;
        }
コード例 #2
0
ファイル: UnmanagedLibrary.cs プロジェクト: kingpin2k/MCS
 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;
 }