Beispiel #1
0
        public SAV_PokedexSWSH(SAV8SWSH sav)
        {
            InitializeComponent();
            WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
            SAV = (SAV8SWSH)(Origin = sav).Clone();
            Dex = SAV.Blocks.Zukan;
            var indexes      = Dex.GetRawIndexes(PersonalTable.SWSH, Dex.GetRevision());
            var speciesNames = GameInfo.Strings.Species;

            Indexes = indexes.OrderBy(z => z.GetEntryName(speciesNames)).ToArray();
            CL      = new[] { CHK_L1, CHK_L2, CHK_L3, CHK_L4, CHK_L5, CHK_L6, CHK_L7, CHK_L8, CHK_L9 };
            CHK     = new[] { CLB_1, CLB_2, CLB_3, CLB_4 };

            Loading = true;
            // Clear Listbox and ComboBox
            LB_Species.Items.Clear();
            CB_Species.Items.Clear();
            foreach (var c in CHK)
            {
                c.Items.Clear();
                for (int j = 0; j < 63; j++)
                {
                    c.Items.Add($"{j:00} - N/A");
                }
                c.Items.Add("Gigantamax (0)");
            }

            // Fill List
            CB_Species.InitializeBinding();
            var species = GameInfo.FilteredSources.Species.Where(z => Dex.DexLookup.ContainsKey(z.Value)).ToArray();

            CB_Species.DataSource = new BindingSource(species, null);

            var names = Indexes.Select(z => z.GetEntryName(speciesNames) + (Dex.DexLookup[z.Species].DexType == z.Entry.DexType ? string.Empty : "***"));

            foreach (var n in names)
            {
                LB_Species.Items.Add(n);
            }

            Loading = false;
            LB_Species.SelectedIndex = 0;
            CB_Species.KeyDown      += WinFormsUtil.RemoveDropCB;
            CanSave = true;
        }
Beispiel #2
0
        public SAV_PokedexSWSH(SAV8SWSH sav)
        {
            InitializeComponent();
            WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
            SAV = (SAV8SWSH)(Origin = sav).Clone();
            Dex = SAV.Blocks.Zukan;
            CL  = new[] { CHK_L1, CHK_L2, CHK_L3, CHK_L4, CHK_L5, CHK_L6, CHK_L7, CHK_L8, CHK_L9 };
            CHK = new[] { CLB_1, CLB_2, CLB_3, CLB_4 };

            // Clear Listbox and ComboBox
            LB_Species.Items.Clear();
            CB_Species.Items.Clear();
            foreach (var c in CHK)
            {
                c.Items.Clear();
                for (int j = 0; j < 63; j++)
                {
                    c.Items.Add($"{j:00} - N/A");
                }
                c.Items.Add("Gigantamax");
            }

            // Fill List
            CB_Species.InitializeBinding();
            var species = GameInfo.FilteredSources.Species.Where(z => Zukan8.DexLookup.ContainsKey(z.Value)).ToArray();

            CB_Species.DataSource = new BindingSource(species, null);

            var Species = GameInfo.Strings.Species;
            var names   = Zukan8.GetEntryNames(Species);

            foreach (var n in names)
            {
                LB_Species.Items.Add(n);
            }

            Loading = false;
            LB_Species.SelectedIndex = 0;
            CB_Species.KeyDown      += WinFormsUtil.RemoveDropCB;
            CanSave = true;
        }
Beispiel #3
0
 public SaveBlockAccessor8SWSH(SAV8SWSH sav)
 {
     BlockInfo   = sav.AllBlocks;
     BoxInfo     = new Box8(sav, GetBlock(KBox));
     PartyInfo   = new Party8(sav, GetBlock(KParty));
     Items       = new MyItem8(sav, GetBlock(KItem));
     Zukan       = new Zukan8(sav, GetBlock(KZukan), GetBlockSafe(KZukanR1), GetBlockSafe(KZukanR2));
     MyStatus    = new MyStatus8(sav, GetBlock(KMyStatus));
     Misc        = new Misc8(sav, GetBlock(KMisc));
     BoxLayout   = new BoxLayout8(sav, GetBlock(KBoxLayout));
     TrainerCard = new TrainerCard8(sav, GetBlock(KTrainerCard));
     Played      = new PlayTime8(sav, GetBlock(KPlayTime));
     Fused       = new Fused8(sav, GetBlock(KFused));
     Daycare     = new Daycare8(sav, GetBlock(KDaycare));
     Records     = new Record8(sav, GetBlock(KRecord), Core.Records.MaxType_SWSH);
     Fashion     = new FashionUnlock8(sav, GetBlock(KFashionUnlock));
     Raid        = new RaidSpawnList8(sav, GetBlock(KRaidSpawnList), RaidSpawnList8.RaidCountLegal_O0);
     RaidArmor   = new RaidSpawnList8(sav, GetBlockSafe(KRaidSpawnListR1), RaidSpawnList8.RaidCountLegal_R1);
     RaidCrown   = new RaidSpawnList8(sav, GetBlockSafe(KRaidSpawnListR2), RaidSpawnList8.RaidCountLegal_R2);
     TitleScreen = new TitleScreen8(sav, GetBlock(KTitleScreenTeam));
     TeamIndexes = new TeamIndexes8(sav, GetBlock(KTeamIndexes));
     FameTime    = new HallOfFameTime8(sav, GetBlock(KEnteredHallOfFame));
 }