Control UInt32Editor(bool enabled, string name, ref int tabIndex, ObjKeyResource.ObjKeyResource.ComponentDataType cdt) { ObjKeyResource.ObjKeyResource.CDTUInt32 cdtUInt32 = cdt as ObjKeyResource.ObjKeyResource.CDTUInt32; Label lb = new Label(); lb.AutoSize = true; lb.Text = "0xDDDDDDDD"; TextBox tb = new TextBox(); tb.Anchor = AnchorStyles.Left; tb.Enabled = enabled; tb.Name = "tb" + name; tb.TabIndex = tabIndex++; tb.Text = cdtUInt32 == null ? "" : "0x" + cdtUInt32.Data.ToString("X8"); tb.Width = lb.PreferredWidth; tb.TextChanged += new EventHandler(tb_TextChanged); return tb; }
Control ResourceKeyEditor(bool enabled, string name, ref int tabIndex, ObjKeyResource.ObjKeyResource.ComponentDataType cdt) { ObjKeyResource.ObjKeyResource.CDTResourceKey cdtResourceKey = cdt as ObjKeyResource.ObjKeyResource.CDTResourceKey; Label lb = new Label(); lb.AutoSize = true; lb.Text = "(WWWW) 0xDDDDDDDD-0xDDDDDDDD-0xDDDDDDDDDDDDDDDD"; TGIBlockCombo tbc = new TGIBlockCombo(objk.TGIBlocks, cdtResourceKey == null ? -1 : cdtResourceKey.Data, false); tbc.Anchor = AnchorStyles.Left; tbc.Enabled = enabled; tbc.Name = "tbc" + name; tbc.TabIndex = tabIndex++; tbc.Width = lb.PreferredWidth; tbc.TGIBlockListChanged += new EventHandler(tbc_TGIBlockListChanged); return tbc; }
Control StringEditor(bool enabled, string name, ref int tabIndex, ObjKeyResource.ObjKeyResource.ComponentDataType cdt) { ObjKeyResource.ObjKeyResource.CDTString cdtString = cdt as ObjKeyResource.ObjKeyResource.CDTString; TextBox tb = new TextBox(); tb.Anchor = AnchorStyles.Left | AnchorStyles.Right; tb.Enabled = enabled; tb.Name = "tb" + name; tb.TabIndex = tabIndex++; tb.Text = cdtString == null ? "" : cdtString.Data; return tb; }