dupliate coordiante data form
Inheritance: System.Windows.Forms.Form
Example #1
0
        /// <summary>
        /// display the duplicate form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void duplicateButton_Click(object sender, EventArgs e)
        {
            using (DuplicateForm duplicateForm = new DuplicateForm(m_data,
                                                                   this,
                                                                   locationListBox.SelectedItem.ToString()))
            {
                if (DialogResult.OK != duplicateForm.ShowDialog())
                {
                    return;
                }
            }
            //refresh the form
            locationListBox.Items.Clear();
            m_data.GatData();
            this.DisplayInformation();

            //make the new project location is the selected item after it was duplicated
            for (int i = 0; i < locationListBox.Items.Count; i++)
            {
                if (m_newLocationName == locationListBox.Items[i].ToString())
                {
                    locationListBox.SelectedIndex = i;
                }
            }
        }
Example #2
0
        /// <summary>
        /// display the duplicate form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void duplicateButton_Click(object sender, EventArgs e)
        {
            using (DuplicateForm duplicateForm = new DuplicateForm(m_data,
                                                                     this,
                                                locationListBox.SelectedItem.ToString()))
            {

                if (DialogResult.OK != duplicateForm.ShowDialog())
                {
                    return;
                }
            }
            //refresh the form
            locationListBox.Items.Clear();
            m_data.GatData();
            this.DisplayInformation();

            //make the new project location is the selected item after it was duplicated
            for (int i = 0; i < locationListBox.Items.Count; i++)
            {
                if (m_newLocationName == locationListBox.Items[i].ToString())
                {
                    locationListBox.SelectedIndex = i;
                }
            }
        }