Exemple #1
0
        private void getTrainer()
        {
            if (trEntry < 0)
            {
                return;
            }

            // Get
            LB_Choices.Items.Clear();
            Maison7.Trainer tr = new Maison7.Trainer(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());
            }
        }
Exemple #2
0
 private void setTrainer()
 {
     if (trEntry < 0 || !GB_Trainer.Enabled || dumping)
     {
         return;
     }
     // Gather
     Maison7.Trainer tr = new Maison7.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);
     trFiles[trEntry] = tr.Write();
 }