Пример #1
0
        /// <summary>
        /// New
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            CountryDetails d = new CountryDetails();

            d.OnButtonSave   += new TBButtonPressed(OnCountryListChanged);
            d.SelectedCountry = null;

            CountryDetailsController dc = new CountryDetailsController(d);

            dc.ShowInContainer(ViewContainer, GVControlAlign.Fill);
        }
Пример #2
0
        /// <summary>
        /// Edit
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                return;
            }

            TCountry sc = listView1.SelectedItems[0].Tag as TCountry;

            CountryDetails d = new CountryDetails();

            d.OnButtonSave   += new TBButtonPressed(OnCountryListChanged);
            d.SelectedCountry = sc;

            CountryDetailsController dc = new CountryDetailsController(d);

            dc.ShowInContainer(ViewContainer, GVControlAlign.Fill);
        }
Пример #3
0
 public CountryDetailsController(CountryDetails v)
 {
     View         = v;
     v.Controller = this;
 }