Beispiel #1
0
        private void tsbAddConnection_Click(object sender, EventArgs e)
        {
            GroupConfigurationElement group = this.GetSelectedGroup();

            if (group != null)
            {
                AddConnectionForm frmAddConnection = new AddConnectionForm(SaveInDB);
                if (frmAddConnection.ShowDialog() == DialogResult.OK)
                {
                    foreach (string connection in frmAddConnection.Connections)
                    {
                        group.FavoriteAliases.Add(new FavoriteAliasConfigurationElement(connection));
                        this.lvConnections.Items.Add(connection);
                    }
                    Settings.DeleteGroup(group.Name);
                    Settings.AddGroup(group);
                }
            }
        }
 private void tsbAddConnection_Click(object sender, EventArgs e)
 {
     GroupConfigurationElement group = this.GetSelectedGroup();
     if (group != null)
     {
         AddConnectionForm frmAddConnection = new AddConnectionForm(SaveInDB);
         if (frmAddConnection.ShowDialog() == DialogResult.OK)
         {
             foreach (string connection in frmAddConnection.Connections)
             {
                 group.FavoriteAliases.Add(new FavoriteAliasConfigurationElement(connection));
                 this.lvConnections.Items.Add(connection);
             }
             Settings.DeleteGroup(group.Name);
             Settings.AddGroup(group);
         }
     }
 }