示例#1
0
        /// <summary>
        /// new location
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonNew_Click(object sender, EventArgs e)
        {
            EditLocationPanel d = new EditLocationPanel();

            d.setLocation(null);
            d.PrefferedCountry    = m_wndCountry.SelectedItem;
            d.OnEditLocationDone += new TBButtonPressed(OnEditLocationDone);
            EditLocationPanelController dc = new EditLocationPanelController(d);

            dc.ViewContainer = Controller.ViewContainer;

            Controller.ViewContainer.AddControl(dc, GVControlAlign.Center);
        }
示例#2
0
        /// <summary>
        /// edit location
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            if (listViewLocations.SelectedItems.Count == 0)
            {
                return;
            }

            TLocation loc = listViewLocations.SelectedItems[0].Tag as TLocation;

            EditLocationPanel d = new EditLocationPanel();

            d.setLocation(loc);
            d.PrefferedCountry    = m_wndCountry.SelectedItem;
            d.OnEditLocationDone += new TBButtonPressed(OnEditLocationDone);
            EditLocationPanelController dc = new EditLocationPanelController(d);

            dc.ShowInContainer(Controller.ViewContainer, GVControlAlign.Center);
        }