private void btn_new_Click(object sender, EventArgs e) { TerrainDialog terrain_dialog = new TerrainDialog(this); terrain_dialog.ShowDialog(this); // Refresh list PopulateList(); if (this.Focused == false) { this.Focus(); } }
private void btn_edit_Click(object sender, EventArgs e) { if (btn_edit.Enabled == false) { return; } TerrainType selected_terrain = (TerrainType)listbx_terrain.SelectedItem; TerrainDialog terrain_dialog = new TerrainDialog(this, selected_terrain.Id); terrain_dialog.ShowDialog(this); this.Focus(); // Refresh list PopulateList(); btn_edit.Enabled = false; }