Ejemplo n.º 1
0
        public int Start(byte[,] pokemon, string path, int row, int column)
        {
            File_Manager fm = new File_Manager();

            byte[] inputFile;
            int    found = 0;

            inputFile = fm.OpenFile(path);
            found     = SearchPokemon(pokemon, inputFile, row, column);

            return(found);
        }
Ejemplo n.º 2
0
        private void SaveDialog(int slot)
        {
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();

            if (Gen3.Checked == true)
            {
                saveFileDialog1.Filter = "PK3|*.pk3";
            }
            if (Gen4.Checked == true)
            {
                saveFileDialog1.Filter = "PK4|*.pk4";
            }
            if (Gen5.Checked == true)
            {
                saveFileDialog1.Filter = "PK5|*.pk5";
            }
            if (Gen6.Checked == true)
            {
                saveFileDialog1.Filter = "PK6|*.pk6";
            }

            saveFileDialog1.Title = "Save Pokemon";
            saveFileDialog1.ShowDialog();
            File_Manager fm = new File_Manager();

            if (saveFileDialog1.FileName != "")
            {
                byte[] saveData = new byte[column];
                for (int i = 0; i < column; i++)
                {
                    saveData[i] = pokemon[slot - 1, i];
                }

                fm.WriteFile(string.Format("{0}", saveFileDialog1.FileName), saveData);
            }
        }