Ejemplo n.º 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);
                }
            }
        }
Ejemplo n.º 2
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);
         }
     }
 }