Esempio n. 1
0
        private void newMonsterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!(check_if_db_open()))
            {
                return;
            }
            name_input n_in = new name_input();

            n_in.ShowDialog();
            if (n_in.name == "")
            {
                return;
            }
            if (current_driver.get_list_of_monsters().Contains(n_in.name))
            {
                var yn = MessageBox.Show("Monster " + n_in.name + " alredy exists replace?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (yn != DialogResult.Yes)
                {
                    return;
                }
            }
            current_driver.new_monster(n_in.name);
            monster        m  = current_driver.read_monster(n_in.name);
            Monster_Editor me = new Monster_Editor(current_driver, m);

            me.ShowDialog();
        }
Esempio n. 2
0
        private void newEncounterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!(check_if_db_open()))
            {
                return;
            }
            name_input n = new name_input();

            n.ShowDialog();
            if (n.name == "")
            {
                return;
            }
            ;
            if (current_driver.get_list_of_encounters().Contains(n.name))
            {
                var yn = MessageBox.Show("Encounter " + n.name + " alredy exists replace?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (yn != DialogResult.Yes)
                {
                    return;
                }
            }
            current_driver.new_encounter(n.name);
            encounterEdit eedit = new encounterEdit(current_driver, n.name);

            eedit.ShowDialog();
        }
Esempio n. 3
0
        private void runEncounterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!(check_if_db_open()))
            {
                return;
            }
            name_input n_in = new name_input();

            n_in.ShowDialog();
            if (n_in.name == "")
            {
                return;
            }
            if (!(current_driver.get_list_of_encounters().Contains(n_in.name)))
            {
                MessageBox.Show("encounter " + n_in.name + " doesnt exist", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            _encounter_name = n_in.name;
            update_fighters();
        }
Esempio n. 4
0
        private void editMonsterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!(check_if_db_open()))
            {
                return;
            }
            name_input n_in = new name_input();

            n_in.ShowDialog();
            if (n_in.name == "")
            {
                return;
            }
            if (!(current_driver.get_list_of_monsters().Contains(n_in.name)))
            {
                MessageBox.Show("Monster " + n_in.name + " doesnt exist", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            monster        m  = current_driver.read_monster(n_in.name);
            Monster_Editor me = new Monster_Editor(current_driver, m);

            me.ShowDialog();
        }
Esempio n. 5
0
        private void Add_Click(object sender, EventArgs e)
        {
            name_input n = new name_input();

            n.ShowDialog();
            if (!(check_ok(n.name)))
            {
                return;
            }
            ;
            if (ty == "monster")
            {
                drive.new_monster(n.name);
                Monster_Editor me = new Monster_Editor(drive, drive.read_monster(n.name));
                me.ShowDialog();
            }
            if (ty == "encounter")
            {
                drive.new_encounter(n.name);
                encounterEdit en = new encounterEdit(drive, n.name);
                en.ShowDialog();
            }
            update_list();
        }