Exemplo n.º 1
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frm = new Forms.Sheet {
                MdiParent = this, PokemonList = _pokemon, MoveList = _moves, AbilityList = _abilities
            };

            Bind(frm);
            frm.Show();
        }
Exemplo n.º 2
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var ofd = new OpenFileDialog {
                Filter = "Pokémon File|*.xml", Title = "Open Pokémon", Multiselect = true
            };

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                for (int i = 0; i < ofd.FileNames.Length; i++)
                {
                    var x = new Forms.Sheet {
                        MdiParent = this, PokemonList = _pokemon, MoveList = _moves, AbilityList = _abilities
                    };
                    Bind(x);
                    x.Show();
                    x.LoadXml(ofd.FileNames[i]);
                }
            }
        }
Exemplo n.º 3
0
 public void Bind(Forms.Sheet window)
 {
     window.TitleChanged += frm_TitleChanged;
     window.FormClosing  += frm_FormClosing;
 }