private void countriesToolStripMenuItem_Click(object sender, EventArgs e) { CountriesForm countriesForm = new CountriesForm(); countriesForm.MdiParent = this; countriesForm.Show(); }
private void ShowCountryForm() { Boolean createNewForm = true; CountriesForm countryForm = null; foreach (Form form in this.MdiChildren) { if (form.Name == "CountriesForm") { countryForm = (CountriesForm)form; createNewForm = false; } } if (createNewForm) { countryForm = new CountriesForm(con); countryForm.MdiParent = this; } if (countryForm != null) { countryForm.Show(); countryForm.Activate(); } }
/// <summary> /// <para>Updates the regions on child forms when a region is changed / added / deleted.</para> /// <para>Called by the regions form.</para> /// </summary> public void UpdateRegionsOnForms() { foreach (Form form in this.MdiChildren) { if (form.Name == "CountriesForm") { CountriesForm countriesForm = (CountriesForm)form; countriesForm.UpdateFromOtherForms(); } } }
private void countriesButton_Click(object sender, EventArgs e) { CountriesForm countriesForm = new CountriesForm(_objectModel.Countries); countriesForm.ShowDialog(); }