Beispiel #1
0
        void CreateNewProfile()
        {
            FormNewProfile formNewProfile = new FormNewProfile();

            formNewProfile.ShowDialog();
            string profileName = formNewProfile.ProfileName;

            if (profileName != "")
            {
                Profile p = new Profile(profileName);
                _profileList.Add(p);
                comboBox2.DataSource   = null;
                comboBox2.DataSource   = _profileList;
                comboBox2.SelectedItem = p;
            }
        }
Beispiel #2
0
        private void AddProfile_Click(object sender, EventArgs e)
        {
            var dialog = new FormNewProfile();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                if (!string.IsNullOrEmpty(dialog.profileName))
                {
                    Profile p = new Profile(dialog.profileName);
                    profileList.Add(p);
                    profileComboBox.DataSource   = null;
                    profileComboBox.DataSource   = profileList;
                    profileComboBox.SelectedItem = p;
                }
            }
        }
Beispiel #3
0
 void createNewProfile()
 {
     FormNewProfile formNewProfile = new FormNewProfile();
     formNewProfile.ShowDialog();
     string profileName = formNewProfile.profileName;
     if (profileName != "") {
         Profile p = new Profile(profileName);
         profileList.Add(p);
         comboBox2.DataSource = null;
         comboBox2.DataSource = profileList;
         comboBox2.SelectedItem = p;
     }
 }
Beispiel #4
0
		private void createNewProfile()
		{
			FormNewProfile formNewProfile = new FormNewProfile();
			formNewProfile.ShowDialog();
			string profileName = formNewProfile.profileName;
			if (profileName != "")
			{
				Profile p = new Profile(profileName);
				_ProfileList.Add(p);
				ComboProfiles.DataSource = null;
				ComboProfiles.DataSource = _ProfileList;
				ComboProfiles.SelectedItem = p;
			}
		}