コード例 #1
0
 private void tsbAddGroup_Click(object sender, EventArgs e)
 {
     using (NewGroupForm frmNewGroup = new NewGroupForm())
     {
         if (frmNewGroup.ShowDialog() == DialogResult.OK)
         {
             GroupConfigurationElement serversGroup = new GroupConfigurationElement
             {
                 Name            = frmNewGroup.txtGroupName.Text,
                 FavoriteAliases = new FavoriteAliasConfigurationElementCollection()
             };
             Settings.AddGroup(serversGroup);
             this.LoadGroups();
         }
     }
 }
コード例 #2
0
 private void tsbAddGroup_Click(object sender, EventArgs e)
 {
     using (NewGroupForm frmNewGroup = new NewGroupForm())
     {
         if (frmNewGroup.ShowDialog() == DialogResult.OK)
         {
             GroupConfigurationElement serversGroup = new GroupConfigurationElement
                                                          {
                                                              Name = frmNewGroup.txtGroupName.Text,
                                                              FavoriteAliases = new FavoriteAliasConfigurationElementCollection()
                                                          };
             Settings.AddGroup(serversGroup);
             this.LoadGroups();
         }
     }
 }