Пример #1
0
        // Close this form, pass selected profile information to the main form and open it.
        private void SelectProfile()
        {
            if (listBoxProfile.SelectedIndex == -1)
            {
                MessageBox.Show(@"No Profile Selected");
            }
            else
            {
                var profileId = listBoxProfile.SelectedIndex + 1;

                Hide(); // hide current form

                var formSelect = new FormSelect(profileId);
                formSelect.Show();
            }
        }
Пример #2
0
 private void buttonBack_Click(object sender, EventArgs e)
 {
     var formSelect = new FormSelect(_profileId);
     formSelect.Show();
     Close();
 }