internal void ApplySetting( Profile profile, string selectedNIC )
        {
            lblProfileName.Text = profile.Name;

            // Invole the profile manager to apply the profile
            ProfileManager manager = new ProfileManager( profile );
            manager.OnStatusUpdate += new StatusUpdate(manager_OnStatusUpdate);
            manager.Run(selectedNIC);

            btnOK.Enabled = true;
        }
        private void createNewProfile()
        {
            using (NewProfileDialog newProfileDialog = new NewProfileDialog())
            {

                if (DialogResult.OK == newProfileDialog.ShowDialog(this))
                {
                    // create a new profile object
                    Profile newProfile = new Profile(newProfileDialog.NewProfileName);
                    _Profiles.Add(newProfile);

                    // show it in the drop down as selected
                    cboProfiles.SelectedIndex = cboProfiles.Items.Add(newProfile.Name);

                    // load the NIC list
                    loadNICs();
                }
            }

            BuildContextMenuWithProfiles();
        }
        /// <summary>
        /// Load a particular profile
        /// </summary>
        /// <param name="profile"></param>
        private void loadProfile(Profile profile)
        {
            // load the NIC list
            loadNICs();

            // load proxy setting
            loadIEProxy();

            btnActivate.Enabled = true;
        }
 public ProfileManager( Profile profile )
 {
     _Profile = profile;
 }