Beispiel #1
0
 private void updateCountry(object sender, EventArgs e)
 {
     if (WinFormsUtil.getIndex(sender as ComboBox) > 0)
     {
         Main.setCountrySubRegion(CB_Region, "sr_" + WinFormsUtil.getIndex(sender as ComboBox).ToString("000"));
     }
 }
Beispiel #2
0
        public MemoryAmie() // Keeping the form reference as a lot of control elements are required to operate.
        {
            InitializeComponent();
            cba = new[] { CB_Country0, CB_Country1, CB_Country2, CB_Country3, CB_Country4 };
            mta = new[] { CB_Region0, CB_Region1, CB_Region2, CB_Region3, CB_Region4, };
            CB_Country0.DisplayMember = CB_Country1.DisplayMember = CB_Country2.DisplayMember = CB_Country3.DisplayMember = CB_Country4.DisplayMember = "Text";
            CB_Country0.ValueMember   = CB_Country1.ValueMember = CB_Country2.ValueMember = CB_Country3.ValueMember = CB_Country4.ValueMember = "Value";
            CB_Region0.DisplayMember  = CB_Region1.DisplayMember = CB_Region2.DisplayMember = CB_Region3.DisplayMember = CB_Region4.DisplayMember = "Text";
            CB_Region0.ValueMember    = CB_Region1.ValueMember = CB_Region2.ValueMember = CB_Region3.ValueMember = CB_Region4.ValueMember = "Value";
            WinFormsUtil.TranslateInterface(this, Main.curlanguage);
            string[] arguments = L_Arguments.Text.Split(new[] { " ; " }, StringSplitOptions.None);

            for (int i = 5; i < Math.Min(arguments.Length, vartypes.Length + 5); i++)
            {
                if (arguments[i] == null)
                {
                    continue;
                }
                vartypes[i - 5] = arguments[i] + ":";
            }
            args[0] = arguments.Length > 0 ? arguments[0] ?? "Disabled" : "Disabled";
            args[1] = arguments.Length > 1 ? arguments[1] ?? "Never left" : "Never left";
            args[2] = arguments.Length > 2 ? arguments[2] ?? "OT" : "OT";
            args[3] = arguments.Length > 3 ? arguments[3] ?? "Past Gen": "Past Gen";
            args[4] = arguments.Length > 4 ? arguments[4] ?? "Memories with" : "Memories with";
            foreach (ComboBox comboBox in cba)
            {
                comboBox.DisplayMember = "Text";
                comboBox.ValueMember   = "Value";
                Main.setCountrySubRegion(comboBox, "countries");
            }
            getLangStrings();
            loadFields();
        }
        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 language_list = new[] {
                new { Text = "ENG", Value = 2 },
                new { Text = "JPN", Value = 1 },
                new { Text = "FRE", Value = 3 },
                new { Text = "ITA", Value = 4 },
                new { Text = "GER", Value = 5 },
                new { Text = "SPA", Value = 7 },
                new { Text = "KOR", Value = 8 },
                new { Text = "CHS", Value = 9 },
                new { Text = "CHT", Value = 10 },
            };

            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.DisplayMember    = "Text";
            CB_3DSReg.ValueMember      = "Value";
            CB_3DSReg.DataSource       = dsregion_list;
            CB_Language.DisplayMember  = "Text";
            CB_Language.ValueMember    = "Value";
            CB_Language.DataSource     = language_list;
            CB_AlolaTime.DisplayMember = "Text";
            CB_AlolaTime.ValueMember   = "Value";
            CB_AlolaTime.DataSource    = alolatime_list;

            CB_Country.DisplayMember = "Text";
            CB_Country.ValueMember   = "Value";
            CB_Region.DisplayMember  = "Text";
            CB_Region.ValueMember    = "Value";
            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
            }
        }
Beispiel #4
0
        private void changeCountryIndex(object sender, EventArgs e)
        {
            int index = Array.IndexOf(cba, sender);

            if (WinFormsUtil.getIndex(sender as ComboBox) > 0)
            {
                Main.setCountrySubRegion(mta[index], "sr_" + WinFormsUtil.getIndex(sender as ComboBox).ToString("000"));
                mta[index].Enabled = true;
            }
            else
            {
                mta[index].DataSource    = new[] { new { Text = "", Value = 0 } };
                mta[index].Enabled       = false;
                mta[index].SelectedValue = 0;
            }
        }
Beispiel #5
0
        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 language_list = new[] {
                new { Text = "ENG", Value = 2 },
                new { Text = "JPN", Value = 1 },
                new { Text = "FRE", Value = 3 },
                new { Text = "ITA", Value = 4 },
                new { Text = "GER", Value = 5 },
                new { Text = "SPA", Value = 7 },
                new { Text = "KOR", Value = 8 },
                new { Text = "CHS", Value = 9 },
                new { Text = "CHT", Value = 10 },
            };

            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.DisplayMember    = "Text";
            CB_3DSReg.ValueMember      = "Value";
            CB_3DSReg.DataSource       = dsregion_list;
            CB_Language.DisplayMember  = "Text";
            CB_Language.ValueMember    = "Value";
            CB_Language.DataSource     = language_list;
            CB_AlolaTime.DisplayMember = "Text";
            CB_AlolaTime.ValueMember   = "Value";
            CB_AlolaTime.DataSource    = alolatime_list;

            CB_Country.DisplayMember = "Text";
            CB_Country.ValueMember   = "Value";
            CB_Region.DisplayMember  = "Text";
            CB_Region.ValueMember    = "Value";
            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.DisplayMember = "Text";
            CB_Vivillon.ValueMember   = "Value";
            CB_Vivillon.DataSource    = PKX.getFormList(666, GameInfo.Strings.types, GameInfo.Strings.forms, Main.gendersymbols).ToList();

            foreach (string t in BattleStyles)
            {
                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);
            }
        }
Beispiel #6
0
        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 language_list = new[] {
                new { Text = "ENG", Value = 2 },
                new { Text = "JPN", Value = 1 },
                new { Text = "FRE", Value = 3 },
                new { Text = "ITA", Value = 4 },
                new { Text = "GER", Value = 5 },
                new { Text = "SPA", Value = 7 },
                new { Text = "KOR", Value = 8 }
            };

            CB_3DSReg.DisplayMember   = "Text";
            CB_3DSReg.ValueMember     = "Value";
            CB_3DSReg.DataSource      = dsregion_list;
            CB_Language.DisplayMember = "Text";
            CB_Language.ValueMember   = "Value";
            CB_Language.DataSource    = language_list;

            CB_Country.DisplayMember = "Text";
            CB_Country.ValueMember   = "Value";
            CB_Region.DisplayMember  = "Text";
            CB_Region.ValueMember    = "Value";
            Main.setCountrySubRegion(CB_Country, "countries");

            var oras_sprite_list = new[] {
                //new { Text = "Calem",                       Value = 00 },
                //new { Text = "Serena",                      Value = 01 },
                new { Text = "Sycamore", Value = 02 },
                new { Text = "Diantha", Value = 03 },
                new { Text = "Wikstrom", Value = 04 },
                new { Text = "Malva", Value = 05 },
                new { Text = "Drasna", Value = 06 },
                new { Text = "Siebold", Value = 07 },
                new { Text = "Viola", Value = 08 },
                new { Text = "Grant", Value = 09 },
                new { Text = "Korrina", Value = 10 },
                new { Text = "Ramos", Value = 11 },
                new { Text = "Clemont", Value = 12 },
                new { Text = "Valerie", Value = 13 },
                new { Text = "Olympia", Value = 14 },
                new { Text = "Wulfric", Value = 15 },
                new { Text = "Youngster (XY)", Value = 16 },
                //new { Text = "(None)",                      Value = 17 },
                new { Text = "Lass (XY)", Value = 18 },
                new { Text = "Lady (XY)", Value = 19 },
                new { Text = "Schoolgirl (XY)", Value = 20 },
                new { Text = "Battle Girl (XY)", Value = 21 },
                new { Text = "Schoolboy (XY)", Value = 22 },
                new { Text = "Rich Boy (XY)", Value = 23 },
                new { Text = "Female Ace Trainer (XY)", Value = 24 },
                //new { Text = "(None)",                      Value = 25 },
                new { Text = "Female Ranger (XY)", Value = 26 },
                new { Text = "Male Ace Trainer (XY)", Value = 27 },
                new { Text = "Male Ranger (XY)", Value = 28 },
                new { Text = "Madame", Value = 29 },
                new { Text = "Monsieur", Value = 30 },
                new { Text = "Black Belt (XY)", Value = 31 },
                new { Text = "Male Punk (XY)", Value = 32 },
                new { Text = "Fairy Tale Girl (XY)", Value = 33 },
                new { Text = "Shauna", Value = 34 },
                new { Text = "Tierno", Value = 35 },
                new { Text = "Trevor", Value = 36 },
                new { Text = "Brendan", Value = 37 },
                new { Text = "May", Value = 38 },
                //new { Text = "(None)",                      Value = 39 },
                new { Text = "Hiker", Value = 40 },
                new { Text = "Aroma Lady", Value = 41 },
                new { Text = "Male Schoolkid", Value = 42 },
                new { Text = "Female Schoolkid", Value = 43 },
                new { Text = "Black Belt (ORAS)", Value = 44 },
                new { Text = "Battle Girl (ORAS)", Value = 45 },
                new { Text = "Pokemaniac (ORAS)", Value = 46 },
                new { Text = "Fairy Tale Girl (ORAS)", Value = 47 },
                new { Text = "Victor Winstrate", Value = 48 },
                new { Text = "Victoria Winstrate", Value = 49 },
                new { Text = "Male Ranger (ORAS)", Value = 50 },
                new { Text = "Female Ranger (ORAS)", Value = 51 },
                new { Text = "Male Swimmer (ORAS)", Value = 52 },
                new { Text = "Hex Maniac", Value = 53 },
                new { Text = "Male Ace Trainer (ORAS)", Value = 54 },
                new { Text = "Female Ace Trainer (ORAS)", Value = 55 },
                new { Text = "Street Thug", Value = 56 },
                new { Text = "Delinquent", Value = 57 },
                new { Text = "Male Expert", Value = 58 },
                new { Text = "Female Expert", Value = 59 },
                new { Text = "Lady (ORAS)", Value = 60 },
                new { Text = "Rich Boy (ORAS)", Value = 61 },
                new { Text = "Ninja Boy", Value = 62 },
                new { Text = "Beauty (ORAS)", Value = 63 },
                new { Text = "Guitarist", Value = 64 },
                new { Text = "Lass (ORAS)", Value = 65 },
                new { Text = "Male Breeder (ORAS)", Value = 66 },
                new { Text = "Female Breeder (ORAS)", Value = 67 },
                new { Text = "Camper", Value = 68 },
                new { Text = "Picnicker", Value = 69 },
                new { Text = "Wally", Value = 70 },
                new { Text = "Steven", Value = 71 },
                new { Text = "Maxie", Value = 72 },
                new { Text = "Archie", Value = 73 },
                new { Text = "Pokécenter", Value = 0x80 },
                new { Text = "Gift", Value = 0x81 },
            };

            CB_MultiplayerSprite.DisplayMember = "Text";
            CB_MultiplayerSprite.ValueMember   = "Value";
            CB_MultiplayerSprite.DataSource    = oras_sprite_list;

            L_Vivillon.Text           = GameInfo.Strings.specieslist[666] + ":";
            CB_Vivillon.DisplayMember = "Text";
            CB_Vivillon.ValueMember   = "Value";
            CB_Vivillon.DataSource    = PKX.getFormList(666, GameInfo.Strings.types, GameInfo.Strings.forms, Main.gendersymbols).ToList();
        }