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(); }
private void update_list() { List <string> items = null; if (ty == "monster") { items = drive.get_list_of_monsters(); } if (ty == "encounter") { items = drive.get_list_of_encounters(); } listBox1.Items.Clear(); foreach (string i in items) { listBox1.Items.Add(i); } }
private bool check_monster_ok() { if (drive.get_list_of_monsters().Contains(Monster_Select.Text)) { return(true); } MessageBox.Show("Monster " + Monster_Select.Text + " not Found!", "", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); }
public fightercreate(sql_driver d, string encounter_name) { InitializeComponent(); drive = d; _name = encounter_name; foreach (string mnam in d.get_list_of_monsters()) { Monster_Select.Items.Add(mnam); } }