private void AddressList_SelectedIndexChanged(object sender, EventArgs e) { //該当アイテム. uint selectaddress = (uint)this.Address.Value; List <U.AddrResult> list = ItemForm.MakeItemList((uint addr) => { uint ITEMSTATBOOSTER = Program.ROM.p32(addr + 12); return(selectaddress == ITEMSTATBOOSTER); } ); U.ConvertListBox(list, ref this.ItemListBox); }
private void AddressList_SelectedIndexChanged(object sender, EventArgs e) { //該当アイテム. uint selectaddress = (uint)this.Address.Value; List <U.AddrResult> list = ItemForm.MakeItemList((uint addr) => { uint itemCritical = Program.ROM.p32(addr + 16); return(selectaddress == itemCritical); } ); U.ConvertListBox(list, ref this.ItemListBox); this.N_InputFormRef.ReInit(selectaddress); }
private void AddressList_SelectedIndexChanged(object sender, EventArgs e) { //該当アイテム. uint selectaddress = (uint)this.Address.Value; List <U.AddrResult> list = ItemForm.MakeItemList((uint addr) => { uint itemCritical = Program.ROM.p32(addr + 16); return(selectaddress == itemCritical); } ); U.ConvertListBox(list, ref this.ItemListBox); this.N_InputFormRef.ReInit(selectaddress); //他のアイテムでこのデータを参照しているならば、独立ボタンを出す. IndependencePanel.Visible = UpdateIndependencePanel(); }
string MakeNMMDropDownList(InputFormRef ifr, string basefilename, Dictionary <string, string> addFiles, List <Control> controls, string linktype, int num) { string filename = basefilename + linktype + ".txt"; if (addFiles.ContainsKey(linktype)) { return(addFiles[filename]); } string data = ""; if (linktype == "INDEX") { data = MakeNMMDropDownListInner(ifr.MakeList()); } else if (linktype == "PORTRAIT") { data = MakeNMMDropDownListInner(ImagePortraitForm.MakePortraitList()); } else if (linktype == "UNIT") { List <U.AddrResult> list = UnitForm.MakeUnitList(); data = MakeNMMDropDownListInner(list); } else if (linktype == "CLASS") { data = MakeNMMDropDownListInner(ClassForm.MakeClassList()); } else if (linktype == "ITEM") { data = MakeNMMDropDownListInner(ItemForm.MakeItemList()); } else if (linktype == "SONG") { data = MakeNMMDropDownListInner(SongTableForm.MakeItemList()); } else if (linktype == "COMBO") { Control c = InputFormRef.FindObject(ifr.Prefix, controls, num + "_" + linktype); if (c is ComboBox) { data = MakeNMMDropDownListInner((ComboBox)c); data = string.Join("\r\n", U.ComboBoxToStringList((ComboBox)c)); } } else if (linktype == "ATTRIBUTE") { StringBuilder sb = new StringBuilder(); sb.AppendLine("8"); for (uint n = 0; n < 8; n++) { sb.AppendLine(U.To0xHexString(n) + " " + InputFormRef.GetAttributeName(n)); } data = sb.ToString(); } else if (linktype == "WEAPON") { StringBuilder sb = new StringBuilder(); sb.AppendLine("7"); sb.AppendLine("0x0 -"); sb.AppendLine("0x1 E"); sb.AppendLine("0x31 D"); sb.AppendLine("0x71 C"); sb.AppendLine("0x121 B"); sb.AppendLine("0x181 A"); sb.AppendLine("0x251 S"); data = sb.ToString(); } else if (linktype == "FLAG") { StringBuilder sb = new StringBuilder(); sb.AppendLine("128"); string dummy; for (uint n = 0; n < 128; n++) { sb.AppendLine(U.To0xHexString(n) + " " + InputFormRef.GetFlagName(n, out dummy)); } data = sb.ToString(); } else if (linktype == "BIT") { filename = basefilename + linktype + num + ".txt"; if (addFiles.ContainsKey(linktype)) { return(addFiles[filename]); } data = MakeBitsListInner(ifr, controls, linktype, num); } if (data == "") { return("NULL"); } addFiles[filename] = data; return(filename); }