Example #1
0
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            CreditsInfoSingle item = (CreditsInfoSingle)listBox1.SelectedItem;

            for (int i = 0; i < CreditsInfoSingle.Size / 4; ++i)
            {
                labels[i].Text = ((CreditsData)i).ToString();
                switch (i)
                {
                default:
                    textboxes[i].Text = item.Data[i].ToString();
                    break;

                case 1:
                case 2:
                    textboxes[i].Text = item.Data[i].ToString("X");
                    break;

                case 3:
                case 4:
                    textboxes[i].Text = NumberUtils.UIntToFloat(item.Data[i]).ToString();
                    break;
                }
            }

            //TSSEntry entry = GetEntry(item.UnknownRest[(int)ItemData.NamePointer]);
            //labelName.Text = String.IsNullOrEmpty(entry.StringENG) ? entry.StringJPN : entry.StringENG;
            //entry = GetEntry(item.UnknownRest[(int)ItemData.DescriptionPointer]);
            //labelDescription.Text = String.IsNullOrEmpty(entry.StringENG) ? entry.StringJPN : entry.StringENG;
            //entry = GetEntry(item.UnknownRest[(int)ItemData.UnknownTextPointer]);
            //labelUnknown.Text = String.IsNullOrEmpty(entry.StringENG) ? entry.StringJPN : entry.StringENG;
        }
 public override string ToString()
 {
     return
         (Offset.ToString("X6") + ": [" + Data[0] + "] "
          + (Data[0] == 2 ? " --- Image: " + Credits.GetInFileString((int)Data[2] + 0xD60) + " --- " : "")
          + (Data[0] == 3 ? " --- Free Space: " + NumberUtils.UIntToFloat(Data[4]).ToString() + " --- " : "")
          + (Data[0] == 5 ? " --- Text Size?: " + NumberUtils.UIntToFloat(Data[4]).ToString() + " --- " : "")
          + (TSS != null ? this.GetEntry(Data[(int)CreditsData.EntryNumber]).StringJpn : "")
         );
 }