示例#1
0
        private void countriesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CountriesForm countriesForm = new CountriesForm();

            countriesForm.MdiParent = this;
            countriesForm.Show();
        }
示例#2
0
        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();
            }
        }
示例#3
0
 /// <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();
         }
     }
 }
示例#4
0
        private void countriesButton_Click(object sender, EventArgs e)
        {
            CountriesForm countriesForm = new CountriesForm(_objectModel.Countries);

            countriesForm.ShowDialog();
        }