Exemple #1
0
        private int SkipFlag => SAV.USUM ? 4160 : 3200; // FlagMax - 768

        private void GetComboBoxes()
        {
            var dsregion_list = Util.GetUnsortedCBList("regions3ds");

            var alolatime_list = new[] { new { Text = "Sun Time", Value = 24 * 60 * 60 } };

            Array.Resize(ref alolatime_list, 24);
            for (int i = 1; i < 24; i++)
            {
                alolatime_list[i] = new { Text = $"+{i:00} Hours", Value = i * 60 * 60 }
            }
            ;
            alolatime_list[12] = new { Text = "Moon Time", Value = 12 * 60 * 60 };

            CB_3DSReg.InitializeBinding();
            CB_3DSReg.DataSource = dsregion_list;
            CB_Language.InitializeBinding();
            CB_Language.DataSource = GameInfo.LanguageDataSource(SAV.Generation);
            CB_AlolaTime.InitializeBinding();
            CB_AlolaTime.DataSource = alolatime_list;

            CB_Country.InitializeBinding();
            CB_Region.InitializeBinding();
            Main.SetCountrySubRegion(CB_Country, "countries");

            CB_SkinColor.Items.Clear();
            CB_SkinColor.Items.AddRange(Enum.GetNames(typeof(SkinColor7)));

            L_Vivillon.Text = GameInfo.Strings.Species[(int)Species.Vivillon] + ":";
            CB_Vivillon.InitializeBinding();
            CB_Vivillon.DataSource = PKX.GetFormList((int)Species.Vivillon, GameInfo.Strings.types, GameInfo.Strings.forms, Main.GenderSymbols, SAV.Generation).ToList();

            if (!SAV.USUM)
            {
                BattleStyles.RemoveAt(BattleStyles.Count - 1); // remove Nihilist
            }
            foreach (string t in BattleStyles)
            {
                CB_BallThrowType.Items.Add(t);
                LB_BallThrowTypeUnlocked.Items.Add(t);
                LB_BallThrowTypeLearned.Items.Add(t);
            }

            var stamps = Enum.GetNames(typeof(Stamp7)).Select(z => z.Replace("_", " "));

            foreach (string t in stamps)
            {
                LB_Stamps.Items.Add(t);
            }
        }
Exemple #2
0
        private int SkipFlag => SAV is SAV7USUM ? 4160 : 3200; // FlagMax - 768

        private void GetComboBoxes()
        {
            CB_3DSReg.InitializeBinding();
            CB_3DSReg.DataSource = GameInfo.Regions;
            CB_Language.InitializeBinding();
            CB_Language.DataSource = GameInfo.LanguageDataSource(SAV.Generation);
            CB_AlolaTime.InitializeBinding();
            CB_AlolaTime.DataSource = GetAlolaTimeList();

            CB_Country.InitializeBinding();
            CB_Region.InitializeBinding();
            Main.SetCountrySubRegion(CB_Country, "countries");

            CB_SkinColor.Items.Clear();
            CB_SkinColor.Items.AddRange(Enum.GetNames(typeof(SkinColor7)));

            L_Vivillon.Text = GameInfo.Strings.Species[(int)Species.Vivillon] + ":";
            CB_Vivillon.InitializeBinding();
            CB_Vivillon.DataSource = FormConverter.GetFormList((int)Species.Vivillon, GameInfo.Strings.types, GameInfo.Strings.forms, Main.GenderSymbols, SAV.Generation);

            if (!(SAV is SAV7USUM))
            {
                BattleStyles.RemoveAt(BattleStyles.Count - 1); // remove Nihilist
            }
            foreach (string t in BattleStyles)
            {
                CB_BallThrowType.Items.Add(t);
                LB_BallThrowTypeUnlocked.Items.Add(t);
                LB_BallThrowTypeLearned.Items.Add(t);
            }

            var stamps = Enum.GetNames(typeof(Stamp7)).Select(z => z.Replace("_", " "));

            foreach (string t in stamps)
            {
                LB_Stamps.Items.Add(t);
            }
        }
Exemple #3
0
        private int skipFlag => SAV.USUM ? 4160 : 3200; // FlagMax - 768

        private void GetComboBoxes()
        {
            var dsregion_list = new[] {
                new { Text = "NA/SA", Value = 1 },
                new { Text = "EUR", Value = 2 },
                new { Text = "JPN", Value = 0 },
                new { Text = "CN", Value = 4 },
                new { Text = "KOR", Value = 5 },
                new { Text = "TW", Value = 6 }
            };

            var alolatime_list = new[] { new { Text = "Sun Time", Value = 24 * 60 * 60 } };

            Array.Resize(ref alolatime_list, 24);
            for (int i = 1; i < 24; i++)
            {
                alolatime_list[i] = new { Text = $"+{i:00} Hours", Value = i * 60 * 60 }
            }
            ;
            alolatime_list[12] = new { Text = "Moon Time", Value = 12 * 60 * 60 };

            CB_3DSReg.InitializeBinding();
            CB_3DSReg.DataSource = dsregion_list;
            CB_Language.InitializeBinding();
            CB_Language.DataSource = GameInfo.LanguageDataSource(SAV.Generation);
            CB_AlolaTime.InitializeBinding();
            CB_AlolaTime.DataSource = alolatime_list;

            CB_Country.InitializeBinding();
            CB_Region.InitializeBinding();
            Main.SetCountrySubRegion(CB_Country, "countries");

            CB_SkinColor.Items.Clear();
            string[] skinColors = { "Pale", "Default", "Tan", "Dark" };
            foreach (string c in skinColors)
            {
                CB_SkinColor.Items.Add($"{Main.GenderSymbols[0]} - {c}"); // M
                CB_SkinColor.Items.Add($"{Main.GenderSymbols[1]} - {c}"); // F
            }

            L_Vivillon.Text = GameInfo.Strings.specieslist[666] + ":";
            CB_Vivillon.InitializeBinding();
            CB_Vivillon.DataSource = PKX.GetFormList(666, GameInfo.Strings.types, GameInfo.Strings.forms, Main.GenderSymbols, SAV.Generation).ToList();

            var styles = new List <string>(BattleStyles);

            if (SAV.USUM)
            {
                styles.Add("Nihilist");
            }
            foreach (string t in styles)
            {
                CB_BallThrowType.Items.Add(t);
                LB_BallThrowTypeUnlocked.Items.Add(t);
                LB_BallThrowTypeLearned.Items.Add(t);
            }

            foreach (string t in TrainerStampTitle)
            {
                LB_Stamps.Items.Add(t);
            }
        }