/// <summary> /// Private event that fires when form loads. /// /// Opening Phonebook for current user and getting their settings. /// /// Connections will equal null for the first time they run this program /// because no user settings connections will have been defined. /// /// Connection will equal zero if all connections have been erased /// or no connections exist on the current machine. /// /// </summary> private void frmConnectionManager_Load(object sender, EventArgs e) { pb.Open(true); this.userSettings = new UserSettings(); if (this.userSettings.Connections == null || this.userSettings.Connections.Count == 0) { this.userSettings.Connections = PopulateEntries(); this.userSettings.Save(); this.userSettings.Reload(); } //ShowActiveConnection(); this.ddlConnections.Items.AddRange(this.userSettings.Connections.ToArray()); if (ddlConnections.Items.Count == 1) ddlConnections.SelectedIndex = 0; }
public vpnlaunch() { InitializeComponent(); this.userSettings = new UserSettings(); }