예제 #1
0
        public SAV_SecretBase(Form1 frm1)
        {
            InitializeComponent();
            Util.TranslateInterface(this, Form1.curlanguage);
            m_parent = frm1;
            Array.Copy(m_parent.savefile, sav, 0x100000);
            abilitylist = Form1.abilitylist;

            setupComboBoxes();
            popFavorite();
            popFavorite();

            LB_Favorite.SelectedIndex = 0;
            // MT_Flags.Text = BitConverter.ToUInt16(sav, 0x24800 + 0x140).ToString(); PSS Stat transmitted
            MT_Flags.Text = BitConverter.ToUInt32(sav, 0x2942C).ToString(); // read counter
            B_SAV2FAV(null, null);
        }
 public SAV_HallOfFame(Form1 frm1)
 {
     InitializeComponent();
     Util.TranslateInterface(this, Form1.curlanguage);
     m_parent = frm1;
     Array.Copy(m_parent.savefile, sav, 0x100000);
     savindex = m_parent.savindex;
     shiftval = savindex * 0x7F000;
     if (m_parent.savegame_oras)
     {
         data_offset = 0x1F200;
     }
     Array.Copy(sav, shiftval + data_offset, data, 0, data.Length); //Copy HoF section of save into Data
     Setup();
     editor_spec = new object[] {
         GB_OT,
         GB_CurrentMoves,
         CB_Species,
         CB_HeldItem,
         TB_EC,
         TB_VN,
         CAL_MetDate,
         CHK_Nicknamed,
         CHK_Shiny,
         L_PartyNum,
         L_Victory,
         L_Shiny,
         L_Level,
         Label_TID,
         Label_Form,
         Label_Gender,
         Label_HeldItem,
         Label_OT,
         Label_TID,
         Label_SID,
         Label_Species,
         TB_Level,
         NUP_PartyIndex,
         Label_EncryptionConstant,
         Label_MetDate,
     };
     listBox1.SelectedIndex = 0;
     NUP_PartyIndex_ValueChanged(null, null);
     editing = true;
 }
예제 #3
0
        public SAV_SuperTrain()
        {
            trba       = Main.trainingbags;
            trba[0]    = "---";
            offsetTime = SAV.SuperTrain + 0x08;
            offsetSpec = SAV.SuperTrain + 0x188;
            offsetVal  = SAV.SuperTrain + 0x18A;
            InitializeComponent();
            Util.TranslateInterface(this, Main.curlanguage);
            string[] stages = Main.trainingstage;
            listBox1.Items.Clear();
            for (int i = 0; i < 30; i++)
            {
                listBox1.Items.Add((i + 1).ToString("00") + " - " + stages[i + 2]);
            }

            setup();
        }
        public RibbMedal(Form1 frm1)
        {
            InitializeComponent();
            Util.TranslateInterface(this, Form1.curlanguage);
            m_parent = frm1;

            // Set up Training Bag Data
            comboBox1.Items.Clear();
            comboBox1.Items.Add("---");
            for (int i = 1; i < Form1.trainingbags.Length - 1; i++)
            {
                comboBox1.Items.Add(Form1.trainingbags[i]);
            }
            comboBox1.SelectedIndex = m_parent.buff[0x17];
            numericUpDown1.Value    = m_parent.buff[0x16];
            distro = new CheckBox[] { CHK_D0, CHK_D1, CHK_D2, CHK_D3, CHK_D4, CHK_D5 };
            getRibbons();
        }
예제 #5
0
        public RibbonEditor(Main frm1, bool[] badgeChecks, int[] badgeInts)
        {
            this.badgeChecks = badgeChecks;
            this.badgeInts   = badgeInts;

            InitializeComponent();
            int vertScrollWidth = SystemInformation.VerticalScrollBarWidth;

            TLP_Ribbons.Padding = FLP_Ribbons.Padding = new Padding(0, 0, vertScrollWidth, 0);

            // Updating a Control display with autosized elements on every row addition is cpu intensive. Disable layout updates while populating.
            TLP_Ribbons.SuspendLayout();
            FLP_Ribbons.Scroll += Util.PanelScroll;
            TLP_Ribbons.Scroll += Util.PanelScroll;
            populateRibbons();
            Util.TranslateInterface(this, Main.curlanguage);
            TLP_Ribbons.ResumeLayout();
        }
예제 #6
0
        public SAV_Trainer7()
        {
            InitializeComponent();
            if (!Main.unicode)
            {
                try { TB_OTName.Font = PKX.getPKXFont(11); }
                catch (Exception e) { Util.Alert("Font loading failed...", e.ToString()); }
            }

            Util.TranslateInterface(this, Main.curlanguage);
            B_MaxCash.Click += (sender, e) => MT_Money.Text = "9,999,999";

            CB_Gender.Items.Clear();
            CB_Gender.Items.AddRange(Main.gendersymbols.Take(2).ToArray()); // m/f depending on unicode selection

            getComboBoxes();
            getTextBoxes();
        }
예제 #7
0
        public SAV_PokedexSM()
        {
            InitializeComponent();
            CP = new[] { CHK_P1, CHK_P2, CHK_P3, CHK_P4, CHK_P5, CHK_P6, CHK_P7, CHK_P8, CHK_P9, };
            CL = new[] { CHK_L1, CHK_L2, CHK_L3, CHK_L4, CHK_L5, CHK_L6, CHK_L7, CHK_L8, CHK_L9, };
            Util.TranslateInterface(this, Main.curlanguage);

            editing = true;
            // Clear Listbox and ComboBox
            LB_Species.Items.Clear();
            CB_Species.Items.Clear();

            // Fill List
            CB_Species.DisplayMember = "Text";
            CB_Species.ValueMember   = "Value";
            CB_Species.DataSource    = new BindingSource(GameInfo.SpeciesDataSource.Skip(1).ToList(), null);

            for (int i = 1; i < SAV.MaxSpeciesID + 1; i++)
            {
                LB_Species.Items.Add($"{i:000} - {Main.GameStrings.specieslist[i]}");
            }

            // Add Formes
            int ctr = SAV.MaxSpeciesID;

            for (int i = 0; i < SAV.MaxSpeciesID + 1; i++)
            {
                int c = SAV.Personal[i].FormeCount;
                for (int j = 0; j < c; j++)
                {
                    int x = SaveUtil.getDexFormIndexSM(i, c, j);
                    if (x == -1 || j == 0)
                    {
                        continue;
                    }
                    ctr++;
                    LB_Species.Items.Add($"{ctr:000} - {Main.GameStrings.specieslist[i]}-{j}");
                }
            }

            Dex     = new PokeDex7(SAV);
            editing = false;
            LB_Species.SelectedIndex = 0;
        }
예제 #8
0
        public MemoryAmie()    // Keeping the form reference as a lot of control elements are required to operate.
        {
            InitializeComponent();
            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";
            Util.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] + ":";
            }
            try
            {
                disabled = arguments[0];
                notleft  = arguments[1];
                ot       = arguments[2];
                past     = arguments[3];
                withOT   = arguments[4];
            }
            catch
            {
                disabled = "Disabled";
                notleft  = "Never left";
                ot       = "OT";
                past     = "Past Gen";
                withOT   = "Memories with";
            }
            ComboBox[] cba = { CB_Country0, CB_Country1, CB_Country2, CB_Country3, CB_Country4, };
            foreach (ComboBox comboBox in cba)
            {
                comboBox.DisplayMember = "Text";
                comboBox.ValueMember   = "Value";
                Main.setCountrySubRegion(comboBox, "countries");
            }
            getLangStrings();
            loadFields();
        }
예제 #9
0
        public SAV_BoxLayout(int box)
        {
            InitializeComponent();
            Util.TranslateInterface(this, Main.curlanguage);
            editing = true;

            // Repopulate Wallpaper names
            CB_BG.Items.Clear();
            foreach (string wallpaper in Main.wallpapernames)
            {
                CB_BG.Items.Add(wallpaper);
            }

            // Go
            MT_BG1.Text = SAV.Data[SAV.PCFlags + 0].ToString();
            CB_Unlocked.SelectedIndex = SAV.Data[SAV.PCFlags + 1] - 1;
            MT_BG2.Text = SAV.Data[SAV.PCFlags + 2].ToString();
            LB_BoxSelect.SelectedIndex = box;
        }
예제 #10
0
        public SAV_Wondercard(MysteryGift g = null)
        {
            InitializeComponent();
            Util.TranslateInterface(this, Main.curlanguage);
            mga = Main.SAV.GiftAlbum;
            
            switch (SAV.Generation)
            {
                case 4:
                    pba = popG4Gifts().ToArray();
                    break;
                case 5:
                case 6:
                case 7:
                    pba = popG567Gifts().ToArray();
                    break;
                default:
                    throw new ArgumentException("Game not supported.");
            }

            foreach (PictureBox pb in pba)
            {
                pb.AllowDrop = true;
                pb.DragDrop += pbBoxSlot_DragDrop;
                pb.DragEnter += pbBoxSlot_DragEnter;
                pb.MouseDown += pbBoxSlot_MouseDown;
                pb.ContextMenuStrip = mnuVSD;
            }

            setGiftBoxes();
            getReceivedFlags();
            
            if (LB_Received.Items.Count > 0)
                LB_Received.SelectedIndex = 0;

            DragEnter += tabMain_DragEnter;
            DragDrop += tabMain_DragDrop;

            if (g == null)
                clickView(pba[0], null);
            else
                viewGiftData(g);
        }
        public SAV_Pokepuff(Form1 frm1)
        {
            InitializeComponent();
            Util.TranslateInterface(this, Form1.curlanguage);
            m_parent = frm1;
            Array.Copy(m_parent.savefile, sav, 0x100000);
            pfa      = Form1.puffs;
            savindex = m_parent.savindex;
            pfa[0]   = "---";
            setup();

            ToolTip ToolTip1 = new ToolTip();

            ToolTip1.SetToolTip(this.B_Sort, "Hold CTRL to reverse sort.");

            ToolTip ToolTip2 = new ToolTip();

            ToolTip2.SetToolTip(this.B_All, "Hold CTRL to give Deluxe instead of Supreme.");
        }
예제 #12
0
        public SAV_BoxLayout(Form1 frm1)
        {
            m_parent = frm1;
            InitializeComponent();
            Util.TranslateInterface(this, Form1.curlanguage);
            editing = true;
            Array.Copy(m_parent.savefile, sav, 0x100000);
            savindex = m_parent.savindex;

            // Repopulate Wallpaper names
            CB_BG.Items.Clear();
            foreach (string wallpaper in Form1.wallpapernames)
            {
                CB_BG.Items.Add(wallpaper);
            }

            // Go
            LB_BoxSelect.SelectedIndex = m_parent.CB_BoxSelect.SelectedIndex;
        }
예제 #13
0
 public SAV_Link6()
 {
     InitializeComponent();
     foreach (var cb in TAB_Items.Controls.OfType <ComboBox>())
     {
         cb.DisplayMember = "Text";
         cb.ValueMember   = "Value";
         cb.DataSource    = new BindingSource(GameInfo.ItemDataSource.Where(item => item.Value <= SAV.MaxItemID).ToArray(), null);
     }
     Util.TranslateInterface(this, Main.curlanguage);
     byte[] data = SAV.LinkBlock;
     if (data == null)
     {
         Util.Alert("Invalid save file / Link Information");
         Close();
     }
     data = data.Skip(0x1FF).Take(PL6.Size).ToArray();
     loadLinkData(data);
 }
예제 #14
0
        public SuperTrainingEditor()
        {
            InitializeComponent();
            int vertScrollWidth = SystemInformation.VerticalScrollBarWidth;

            TLP_SuperTrain.Padding = TLP_DistSuperTrain.Padding = new Padding(0, 0, vertScrollWidth, 0);

            // Updating a Control display with autosized elements on every row addition is cpu intensive. Disable layout updates while populating.
            TLP_SuperTrain.SuspendLayout();
            TLP_DistSuperTrain.SuspendLayout();
            TLP_SuperTrain.Scroll     += Util.PanelScroll;
            TLP_DistSuperTrain.Scroll += Util.PanelScroll;
            populateRegimens("SuperTrain", TLP_SuperTrain, reglist);
            populateRegimens("DistSuperTrain", TLP_DistSuperTrain, distlist);
            Util.TranslateInterface(this, Main.curlanguage);
            TLP_SuperTrain.ResumeLayout();
            TLP_DistSuperTrain.ResumeLayout();

            if (pkm is PK6)
            {
                CB_Bag.Items.Clear();
                CB_Bag.Items.Add("---");
                for (int i = 1; i < Main.GameStrings.trainingbags.Length - 1; i++)
                {
                    CB_Bag.Items.Add(Main.GameStrings.trainingbags[i]);
                }

                PK6 pk6 = (PK6)pkm;
                CHK_SecretUnlocked.Checked = pk6.SecretSuperTrainingUnlocked;
                CHK_SecretComplete.Checked = pk6.SecretSuperTrainingComplete;
                if (!CHK_SecretUnlocked.Checked) // force update to disable checkboxes
                {
                    CHK_Secret_CheckedChanged(null, null);
                }
                CB_Bag.SelectedIndex = pk6.TrainingBag;
                NUD_BagHits.Value    = pk6.TrainingBagHits;
            }
            else
            {
                L_Bag.Visible = CB_Bag.Visible = L_Hits.Visible = NUD_BagHits.Visible = false;
            }
        }
예제 #15
0
        public SAV_Inventory()
        {
            InitializeComponent();
            Util.TranslateInterface(this, Main.curlanguage);
            if (SAV.Generation <= 3)
            {
                B_GiveAll.Visible = false;
            }
            itemlist = Main.GameStrings.getItemStrings(SAV.Generation, SAV.Version);

            for (int i = 0; i < itemlist.Length; i++)
            {
                if (itemlist[i] == "")
                {
                    itemlist[i] = $"(Item #{i.ToString("000")})";
                }
            }
            Pouches = SAV.Inventory;
            getBags();
        }
예제 #16
0
        public SAV_SuperTrain(Main frm1)
        {
            m_parent   = frm1;
            sav        = (byte[])Main.savefile.Clone();
            trba       = Main.trainingbags;
            trba[0]    = "---";
            offsetTime = Main.SaveGame.SuperTrain + 0x08;
            offsetSpec = Main.SaveGame.SuperTrain + 0x188;
            offsetVal  = Main.SaveGame.SuperTrain + 0x18A;
            InitializeComponent();
            Util.TranslateInterface(this, Main.curlanguage);
            string[] stages = Main.trainingstage;
            listBox1.Items.Clear();
            for (int i = 0; i < 30; i++)
            {
                listBox1.Items.Add((i + 1).ToString("00") + " - " + stages[i + 2]);
            }

            setup();
        }
예제 #17
0
        public MemoryAmie(Form1 frm1)
        {
            InitializeComponent();
            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";
            Util.TranslateInterface(this, Form1.curlanguage);
            m_parent = frm1;
            string[] arguments = Regex.Split(L_Arguments.Text, " ; ");

            for (int i = 5; i < Math.Min(arguments.Length, vartypes.Length + 5); i++)
            {
                if (arguments[i] == null)
                {
                    continue;
                }
                vartypes[i - 5] = arguments[i] + ":";
            }
            try
            {
                disabled = arguments[0];
                notleft  = arguments[1];
                ot       = arguments[2];
                past     = arguments[3];
                withOT   = arguments[4];
            }
            catch
            {
                disabled = "Disabled";
                notleft  = "Never left";
                ot       = "OT";
                past     = "Past Gen";
                withOT   = "Memories with";
            }
            h = m_parent.buff;

            getCountries();
            getLangStrings();
            loadFields();
        }
예제 #18
0
        public SAV_HallOfFame()
        {
            InitializeComponent();
            Util.TranslateInterface(this, Main.curlanguage);
            sav = (byte[])Main.savefile.Clone();

            Array.Copy(sav, Main.SaveGame.HoF, data, 0, data.Length); //Copy HoF section of save into Data
            Setup();
            editor_spec = new object[] {
                GB_OT,
                GB_CurrentMoves,
                CB_Species,
                CB_HeldItem,
                TB_EC,
                TB_VN,
                CAL_MetDate,
                CHK_Nicknamed,
                CHK_Shiny,
                L_PartyNum,
                L_Victory,
                L_Shiny,
                L_Level,
                Label_TID,
                Label_Form,
                Label_Gender,
                Label_HeldItem,
                Label_OT,
                Label_TID,
                Label_SID,
                Label_Species,
                TB_Level,
                NUP_PartyIndex,
                Label_EncryptionConstant,
                Label_MetDate,
            };
            LB_DataEntry.SelectedIndex = 0;
            NUP_PartyIndex_ValueChanged(null, null);
            try { TB_Nickname.Font = PKX.getPKXFont(11); }
            catch (Exception e) { Util.Alert("Font loading failed...", e.ToString()); }
            editing = true;
        }
예제 #19
0
        public SAV_Pokebean()
        {
            InitializeComponent();
            Util.TranslateInterface(this, Main.curlanguage);

            var colors = new[] { "Red", "Blue", "Light Blue", "Green", "Yellow", "Purple", "Orange" };
            var beans  = new List <string>();

            foreach (var color in colors)
            {
                beans.Add($"{color} Bean");
            }
            foreach (var color in colors)
            {
                beans.Add($"{color} Patterned Bean");
            }
            beans.Add("Rainbow Bean");
            beanlist = beans.ToArray();

            Setup();
        }
예제 #20
0
        public SAV_SimplePokedex()
        {
            InitializeComponent();
            Util.TranslateInterface(this, Main.curlanguage);
            seen   = new bool[SAV.MaxSpeciesID];
            caught = new bool[SAV.MaxSpeciesID];

            string[] spec = Util.getSpeciesList(Main.curlanguage);
            for (int i = 0; i < seen.Length; i++)
            {
                PKM tempPkm = new PK6();
                tempPkm.Species = i + 1;
                seen[i]         = SAV.getSeen(tempPkm);
                caught[i]       = SAV.getCaught(tempPkm);
                CLB_Seen.Items.Add(spec[i + 1]);
                CLB_Caught.Items.Add(spec[i + 1]);
                CLB_Seen.SetItemChecked(i, seen[i]);
                CLB_Caught.SetItemChecked(i, caught[i]);
            }
            initialized = true;
        }
예제 #21
0
        public MemoryAmie(Main frm1, bool[] amienabled, int[] amiindex, bool amilite, bool[] amilitebool, int[] amiliteint)
        {
            this.amienabled  = amienabled;
            this.amiindex    = amiindex;
            this.amilite     = amilite;
            this.amilitebool = amilitebool;
            this.amiliteint  = amiliteint;

            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";
            Util.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();
        }
예제 #22
0
        public SAV_Inventory()
        {
            InitializeComponent();
            Util.TranslateInterface(this, Main.curlanguage);

            item_val     = getItems(Main.SAV.ORAS ? Legal.Pouch_Items_ORAS : Legal.Pouch_Items_XY);
            keyitem_val  = getItems(Main.SAV.ORAS ? Legal.Pouch_Key_ORAS : Legal.Pouch_Key_XY);
            tmhm_val     = getItems(Main.SAV.ORAS ? Legal.Pouch_TMHM_ORAS : Legal.Pouch_TMHM_XY, sort: false);
            medicine_val = getItems(Main.SAV.ORAS ? Legal.Pouch_Medicine_ORAS : Legal.Pouch_Medicine_XY);
            berries_val  = getItems(Legal.Pouch_Berry_XY);

            B_DisplayItems.ForeColor = Color.Red;

            // Load Items
            populateList(item_val, Main.SAV.Items.HeldItem);

            B_DisplayItems.Text    = Main.itempouch[0];
            B_DisplayMedicine.Text = Main.itempouch[1];
            B_DisplayTMHM.Text     = Main.itempouch[2];
            B_DisplayBerries.Text  = Main.itempouch[3];
            B_DisplayKeyItems.Text = Main.itempouch[4];
        }
예제 #23
0
        public SAV_Wondercard(byte[] wcdata = null)
        {
            InitializeComponent();
            Util.TranslateInterface(this, Main.curlanguage);
            sav = (byte[])Main.SAV.Data.Clone();
            pba = new[]
            {
                PB_Card01, PB_Card02, PB_Card03, PB_Card04, PB_Card05, PB_Card06,
                PB_Card07, PB_Card08, PB_Card09, PB_Card10, PB_Card11, PB_Card12,
                PB_Card13, PB_Card14, PB_Card15, PB_Card16, PB_Card17, PB_Card18,
                PB_Card19, PB_Card20, PB_Card21, PB_Card22, PB_Card23, PB_Card24,
            };

            foreach (PictureBox pb in pba)
            {
                pb.AllowDrop = true;
                // The PictureBoxes have their own drag&drop event handlers.
            }
            populateWClist();
            populateReceived();

            if (LB_Received.Items.Count > 0)
            {
                LB_Received.SelectedIndex = 0;
            }

            DragEnter += tabMain_DragEnter;
            DragDrop  += tabMain_DragDrop;

            if (wcdata == null || wcdata.Length != WC6.Size)
            {
                // No data to load, load first wc
                clickView(pba[0], null);
                return;
            }

            Array.Copy(wcdata, wondercard_data, wcdata.Length);
            loadwcdata();
        }
예제 #24
0
        public SAV_Inventory()
        {
            InitializeComponent();
            Util.TranslateInterface(this, Main.curlanguage);
            sav = (byte[])Main.SAV.Data.Clone();

            getListItems();
            getListKeyItems();
            getListTMHM();
            getListMedicine();
            getListBerries();

            B_DisplayItems.ForeColor = Color.Red;

            popItems();

            B_DisplayItems.Text    = Main.itempouch[0];
            B_DisplayMedicine.Text = Main.itempouch[1];
            B_DisplayTMHM.Text     = Main.itempouch[2];
            B_DisplayBerries.Text  = Main.itempouch[3];
            B_DisplayKeyItems.Text = Main.itempouch[4];
        }
예제 #25
0
        public SAV_EventFlags()
        {
            InitializeComponent();

            DragEnter += tabMain_DragEnter;
            DragDrop  += tabMain_DragDrop;

            flags     = SAV.EventFlags;
            Constants = SAV.EventConsts;

            CB_Stats.Items.Clear();
            for (int i = 0; i < Constants.Length; i++)
            {
                CB_Stats.Items.Add(i.ToString());
            }

            TLP_Flags.SuspendLayout();
            TLP_Const.SuspendLayout();
            TLP_Flags.Scroll += Util.PanelScroll;
            TLP_Const.Scroll += Util.PanelScroll;
            TLP_Flags.Controls.Clear();
            TLP_Const.Controls.Clear();
            addFlagList(getStringList("flags"));
            addConstList(getStringList("const"));

            TLP_Flags.ResumeLayout();
            TLP_Const.ResumeLayout();

            Util.TranslateInterface(this, Main.curlanguage);

            Text = $"Event Flag Editor ({gamePrefix.ToUpper()})";


            CB_Stats.SelectedIndex = 0;
            nud.Maximum            = flags.Length - 1;
            nud.Text = "0";
        }
예제 #26
0
        public SAV_Inventory(Form1 frm1)
        {
            InitializeComponent();
            Util.TranslateInterface(this, Form1.curlanguage);
            m_parent = frm1;
            Array.Copy(m_parent.savefile, sav, 0x100000);
            savindex = m_parent.savindex;
            shiftval = savindex * 0x7F000;
            if (m_parent.savegame_oras)
            {
                bagoffsets = new int[]
                {
                    0x05800,
                    0x05E40,
                    0x05FC0,
                    0x06170,
                    0x06270,
                };
            }

            getListItems();
            getListKeyItems();
            getListTMHM();
            getListMedicine();
            getListBerries();

            B_DisplayItems.ForeColor = Color.Red;

            popItems();

            B_DisplayItems.Text    = Form1.itempouch[0];
            B_DisplayMedicine.Text = Form1.itempouch[1];
            B_DisplayTMHM.Text     = Form1.itempouch[2];
            B_DisplayBerries.Text  = Form1.itempouch[3];
            B_DisplayKeyItems.Text = Form1.itempouch[4];
        }
예제 #27
0
        public SAV_Wondercard(Form1 frm1)
        {
            InitializeComponent();
            Util.TranslateInterface(this, Form1.curlanguage);
            m_parent = frm1;
            Array.Copy(m_parent.savefile, sav, 0x100000);
            savindex = m_parent.savindex;
            if (m_parent.savegame_oras)
            {
                wcoffset = 0x22100;
            }
            populateWClist();
            populateReceived();

            LB_WCs.SelectedIndex = 0;

            if (LB_Received.Items.Count > 0)
            {
                LB_Received.SelectedIndex = 0;
            }

            this.DragEnter += new DragEventHandler(tabMain_DragEnter);
            this.DragDrop  += new DragEventHandler(tabMain_DragDrop);
        }
예제 #28
0
        public SAV_Trainer(Form1 frm1)
        {
            InitializeComponent();
            Util.TranslateInterface(this, Form1.curlanguage);
            m_parent = frm1;
            Array.Copy(m_parent.savefile, sav, 0x100000);
            savindex = m_parent.savindex;
            savshift = savindex * 0x7F000;
            if (m_parent.savegame_oras)
            {
                psssatoffset                = 0x24800; Maison += 0xA00; VivillonForm = 0x9644;
                this.Width                  = (int)((float)Width * (float)428 / (float)590);
                CB_Multi.Enabled            = true;
                L_MultiplayerSprite.Enabled = true; // Multiplayer Sprite Label

                L_Style.Visible   = false;          // Style Label
                TB_Style.Visible  = false;
                GB_Appear.Visible = false;
            }
            editing = true;
            getComboBoxes();
            getTextBoxes();
            getBadges();

            statdata = new string[] {
                "0x000", "0x000",        // Steps taken?
                "0x004", "0x004",        // Minutes Played / Pokemon Encountered?
                "0x008", "0x008",
                "0x00C", "0x00C",
                "0x010", "0x010",
                "0x014", "0x014",
                "0x018", "0x018",
                "0x01C", "PKMN Captured",
                "0x020", "0x020",
                "0x024", "Eggs Hatched",
                "0x028", "PKMN Evolved",
                "0x02C", "0x02C",
                "0x030", "~People Passed",
                "0x034", "0x034",
                "0x038", "0x038",
                "0x03C", "0x03C",
                "0x040", "0x040",
                "0x044", "0x044",
                "0x048", "0x048",
                "0x04C", "0x04C",
                "0x050", "0x050",
                "0x054", "0x054",
                "0x058", "0x058",
                "0x05C", "0x05C",
                "0x060", "0x060",
                "0x064", "0x064",
                "0x068", "0x068",
                "0x06C", "0x06C",
                "0x070", "0x070",
                "0x074", "0x074",
                "0x078", "0x078",
                "0x07C", "0x07C",
                "0x080", "0x080",
                "0x084", "0x084",
                "0x088", "0x088",
                "0x08C", "0x08C",
                "0x090", "0x090",
                "0x094", "0x094",
                "0x098", "0x098",
                "0x09C", "0x09C",
                "0x0A0", "0x0A0",
                "0x0A4", "0x0A4",
                "0x0A8", "0x0A8",
                "0x0AC", "0x0AC",
                "0x0B0", "0x0B0",
                "0x0B4", "0x0B4",
                "0x0B8", "0x0B8",
                "0x0BC", "0x0BC",
                "0x0C0", "0x0C0",
                "0x0C4", "0x0C4",
                "0x0C8", "0x0C8",
                "0x0CC", "0x0CC",
                "0x0D0", "0x0D0",
                "0x0D4", "0x0D4",
                "0x0D8", "0x0D8",
                "0x0DC", "0x0DC",
                "0x0E0", "0x0E0",
                "0x0E4", "0x0E4",
                "0x0E8", "0x0E8",
                "0x0EC", "Nice! Received",
                "0x0F0", "0x0F0",
                "0x0F4", "Total People Met Online",
                "0x0F8", "0x0F8",
                "0x0FC", "Current Pokemiles",
                "0x100", "Obtained Pokemiles",
                "0x104", "0x104",
                "0x108", "0x108",
                "0x10C", "Super Training Clears",
                "0x110", "Times Judged",
                "0x114", "0x114",
                "0x118", "0x118",        // Link Trades?
                "0x11C", "Link Battle",  // Wins", // ?
                "0x120", "0x120",        // Link Battle Losses?
                "0x124", "0x124",
                "0x128", "0x128",
                "0x12C", "0x12C",
                "0x130", "0x130",
                "0x134", "0x134",
                "0x138", "0x138",
                "0x13C", "0x13C",
                "0x140", "Flags Captured",
                "0x144", "0x144",
                "0x148", "0x148",
                "0x14C", "0x14C",
                "0x150", "0x150",
                "0x154", "0x154",
                "0x158", "0x158",
                "0x15C", "0x15C",
                "0x160", "0x160",
                "0x164", "0x164",
                "0x168", "0x168",
                "0x16C", "0x16C",
                "0x170", "0x170",
                "0x174", "0x174",
                "0x178", "0x178",
                "0x17C", "0x17C",
                "0x180", "0x180",
                "0x184", "0x184",
                "0x188", "0x188",
                "0x18C", "0x18C",
                "0x190", "0x190",
                "0x194", "0x194",
                "0x198", "0x198",
                "0x19C", "0x19C",
                "0x1A0", "0x1A0",
                "0x1A4", "0x1A4",
                "0x1A8", "0x1A8",
                "0x1AC", "0x1AC",
                "0x1B0", "0x1B0",
                "0x1B4", "0x1B4",
                "0x1B8", "0x1B8",
                "0x1BC", "Battle Tests",
                "0x1C0", "0x1C0",
                "0x1C4", "0x1C4",
                "0x1C8", "0x1C8",
                "0x1CC", "0x1CC",
                "0x1D0", "0x1D0",
                "0x1D4", "0x1D4",
                "0x1D8", "0x1D8",
                "0x1DC", "0x1DC",
                "0x1E0", "0x1E0",
                "0x1E4", "0x1E4",
                "0x1E8", "0x1E8",
                "0x1EC", "0x1EC",
                "0x1F0", "0x1F0",
                "0x1F4", "0x1F4",
                "0x1F8", "0x1F8",
                "0x1FC", "0x1FC",
                "0x200", "0x200",
                "0x204", "0x204",
                "0x208", "0x208",
                "0x20C", "0x20C",
                "0x210", "0x210",
                "0x214", "0x214",
                "0x218", "0x218",
                "0x21C", "0x21C",
                "0x220", "0x220",
                "0x224", "0x224",
                "0x228", "0x228",
                "0x22C", "0x22C",
                "0x230", "0x230",
                "0x234", "0x234",
                "0x238", "0x238",
                "0x23C", "0x23C",
                "0x240", "0x240",
                "0x244", "0x244",
                "0x248", "0x248",
                "0x24C", "0x24C",
                "0x250", "0x250",
                "0x254", "0x254",
                "0x258", "0x258",
            }; // Offset, Title. Horrible implementation, but works.

            CB_Stats.Items.Clear();
            for (int i = 0; i < statdata.Length / 2; i++)
            {
                CB_Stats.Items.Add(statdata[2 * i + 1]);
            }
            CB_Stats.SelectedIndex = 0;
        }
예제 #29
0
        public SAV_Trainer()
        {
            InitializeComponent();
            if (!Main.unicode)
            {
                try { TB_OTName.Font = PKX.getPKXFont(11); }
                catch (Exception e) { Util.Alert("Font loading failed...", e.ToString()); }
            }

            Util.TranslateInterface(this, Main.curlanguage);
            sav = (byte[])Main.savefile.Clone();
            if (Main.SaveGame.ORAS)
            {
                Width                       = (int)((float)Width * 428 / 590);
                CB_Multi.Enabled            = true;
                L_MultiplayerSprite.Enabled = true; // Multiplayer Sprite Label

                L_Style.Visible   = false;          // Style Label
                TB_Style.Visible  = false;
                GB_Appear.Visible = false;
            }
            editing = true;
            getComboBoxes();
            getTextBoxes();
            getBadges();
            GB_Map.Enabled = !Main.ramsavloaded;

            statdata = new[] {
                "0x000", "0x000",        // Steps taken?
                "0x004", "0x004",        // Minutes Played / Pokemon Encountered?
                "0x008", "0x008",
                "0x00C", "0x00C",
                "0x010", "0x010",
                "0x014", "0x014",
                "0x018", "0x018",
                "0x01C", "Pokémon Captured",
                "0x020", "0x020",
                "0x024", "Eggs Hatched",
                "0x028", "Pokémon Evolved",
                "0x02C", "0x02C",
                "0x030", "~People Passed",        // I think the following ones are Passerby actions...
                "0x034", "0x034",
                "0x038", "0x038",
                "0x03C", "0x03C",
                "0x040", "Link Trades",
                "0x044", "Link Battles",
                "0x048", "Link Battle Wins",
                "0x04C", "0x04C",
                "0x050", "0x050",
                "0x054", "0x054",
                "0x058", "0x058",
                "0x05C", "0x05C",
                "0x060", "0x060",
                "0x064", "0x064",
                "0x068", "0x068",
                "0x06C", "0x06C",
                "0x070", "0x070",
                "0x074", "0x074",
                "0x078", "0x078",
                "0x07C", "0x07C",
                "0x080", "0x080",
                "0x084", "0x084",
                "0x088", "BP Earned",
                "0x08C", "0x08C",
                "0x090", "0x090",
                "0x094", "0x094",
                "0x098", "0x098",
                "0x09C", "0x09C",
                "0x0A0", "0x0A0",
                "0x0A4", "0x0A4",
                "0x0A8", "0x0A8",
                "0x0AC", "0x0AC",
                "0x0B0", "0x0B0",
                "0x0B4", "0x0B4",
                "0x0B8", "0x0B8",
                "0x0BC", "0x0BC",
                "0x0C0", "0x0C0",
                "0x0C4", "0x0C4",
                "0x0C8", "0x0C8",
                "0x0CC", "0x0CC",
                "0x0D0", "0x0D0",
                "0x0D4", "0x0D4",
                "0x0D8", "0x0D8",
                "0x0DC", "0x0DC",
                "0x0E0", "0x0E0",
                "0x0E4", "0x0E4",
                "0x0E8", "0x0E8",
                "0x0EC", "Nice! Received",
                "0x0F0", "Birthday Wishes",
                "0x0F4", "Total People Met Online",
                "0x0F8", "0x0F8",
                "0x0FC", "Current Pokemiles",
                "0x100", "Obtained Pokemiles",
                "0x104", "0x104",
                "0x108", "0x108",
                "0x10C", "Super Training Clears",
                "0x110", "Judge Evaluations",
                "0x114", "0x114",
                "0x118", "0x118",        // Link Trades?
                "0x11C", "Link Battle",  // Wins", // ?
                "0x120", "0x120",        // Link Battle Losses?
                "0x124", "0x124",
                "0x128", "0x128",
                "0x12C", "0x12C",
                "0x130", "0x130",
                "0x134", "0x134",
                "0x138", "0x138",
                "0x13C", "0x13C",
                "0x140", "Flags Captured",
                "0x144", "0x144",
                "0x148", "0x148",
                "0x14C", "0x14C",
                "0x150", "0x150",
                "0x154", "0x154",
                "0x158", "0x158",
                "0x15C", "0x15C",
                "0x160", "0x160",
                "0x164", "0x164",
                "0x168", "0x168",
                "0x16C", "0x16C",
                "0x170", "0x170",
                "0x174", "0x174",
                "0x178", "0x178",
                "0x17C", "0x17C",
                "0x180", "0x180",
                "0x184", "0x184",
                "0x188", "0x188",
                "0x18C", "0x18C",
                "0x190", "0x190",
                "0x194", "0x194",
                "0x198", "0x198",
                "0x19C", "0x19C",
                "0x1A0", "0x1A0",
                "0x1A4", "0x1A4",
                "0x1A8", "0x1A8",
                "0x1AC", "0x1AC",
                "0x1B0", "0x1B0",
                "0x1B4", "0x1B4",
                "0x1B8", "0x1B8",
                "0x1BC", "Battle Tests",
                "0x1C0", "0x1C0",
                "0x1C4", "0x1C4",
                "0x1C8", "0x1C8",
                "0x1CC", "0x1CC",
                "0x1D0", "0x1D0",
                "0x1D4", "0x1D4",
                "0x1D8", "0x1D8",
                "0x1DC", "0x1DC",
                "0x1E0", "0x1E0",
                "0x1E4", "0x1E4",
                "0x1E8", "0x1E8",
                "0x1EC", "0x1EC",
                "0x1F0", "0x1F0",
                "0x1F4", "0x1F4",
                "0x1F8", "0x1F8",
                "0x1FC", "0x1FC",
                "0x200", "0x200",
                "0x204", "0x204",
                "0x208", "0x208",
                "0x20C", "0x20C",
                "0x210", "0x210",
                "0x214", "0x214",
                "0x218", "0x218",
                "0x21C", "0x21C",
                "0x220", "0x220",
                "0x224", "0x224",
                "0x228", "0x228",
                "0x22C", "0x22C",
                "0x230", "0x230",
                "0x234", "0x234",
                "0x238", "0x238",
                "0x23C", "0x23C",
                "0x240", "0x240",
                "0x244", "0x244",
                "0x248", "0x248",
                "0x24C", "0x24C",
                "0x250", "0x250",
                "0x254", "0x254",
                "0x258", "0x258",
            }; // Offset, Title. Horrible implementation, but works.

            CB_Stats.Items.Clear();
            for (int i = 0; i < statdata.Length / 2; i++)
            {
                CB_Stats.Items.Add(statdata[2 * i + 1]);
            }
            CB_Stats.SelectedIndex = 0;
        }
예제 #30
0
 public SAV_OPower()
 {
     InitializeComponent();
     Util.TranslateInterface(this, Main.curlanguage);
     LoadData();
 }