Beispiel #1
0
 private void setTrainer()
 {
     if (trEntry < 0 || !GB_Trainer.Enabled || dumping) return;
     // Gather
     Maison.Trainer tr = new Maison.Trainer
     {
         Class = (ushort) CB_Class.SelectedIndex,
         Count = (ushort) LB_Choices.Items.Count
     };
     tr.Choices = new ushort[tr.Count];
     for (int i = 0; i < tr.Count; i++)
         tr.Choices[i] = Convert.ToUInt16(LB_Choices.Items[i].ToString());
     Array.Sort(tr.Choices);
     File.WriteAllBytes(trFiles[trEntry], tr.Write());
 }
Beispiel #2
0
        private void getTrainer()
        {
            if (trEntry < 0) return;

            // Get
            LB_Choices.Items.Clear();
            Maison.Trainer tr = new Maison.Trainer(File.ReadAllBytes(trFiles[trEntry]));

            CB_Class.SelectedIndex = tr.Class;
            GB_Trainer.Enabled = tr.Count > 0;

            foreach (ushort Entry in tr.Choices)
                LB_Choices.Items.Add(Entry.ToString());
        }