private void UpdateTGIN() { if (internalchg) return; details = new TGIN(); details.ResType = cbType.Value; details.ResGroup = ResourceGroup; details.ResInstance = Instance; details.ResName = ResourceName; }
bool importFile(string filename, TGIN tgin, bool useName, bool rename, bool compress, DuplicateHandling dups, bool select) { IResourceKey rk = (TGIBlock)tgin; string resName = tgin.ResName; bool nmOK = true; MemoryStream ms = new MemoryStream(); BinaryWriter w = new BinaryWriter(ms); BinaryReader r = new BinaryReader(new FileStream(filename, FileMode.Open, FileAccess.Read)); w.Write(r.ReadBytes((int)r.BaseStream.Length)); r.Close(); w.Flush(); if (useName && resName != null && resName.Length > 0) nmOK = browserWidget1.ResourceName(rk.Instance, resName, true, rename); IResourceIndexEntry rie = NewResource(rk, ms, dups, compress); if (rie != null) browserWidget1.Add(rie, select); return nmOK; }
private void FillPanel() { internalchg = true; try { details = this.tbFilename.Text; cbType.Value = details.ResType; tbGroup.Text = "0x" + details.ResGroup.ToString("X8"); tbInstance.Text = "0x" + details.ResInstance.ToString("X16"); tbName.Text = details.ResName; btnOK.Enabled = btnOKCanEnable; } finally { internalchg = false; } }