예제 #1
0
파일: GroupsTab.cs 프로젝트: egold555/Comet
 private void btnAddMutli_Click(object sender, EventArgs e)
 {
     using (var dialog = new GroupDialogMultiAdd()) {
         if (dialog.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         var name    = dialog.GroupName;
         var count   = dialog.GroupCount;
         var added   = 1;
         var skipped = 0;
         while (added < count + 1)
         {
             var groupName = name + (added + skipped);
             if (tvGroups.Nodes.Find(groupName, false).Length != 0)
             {
                 skipped++;
                 continue;
             }
             CreateGroup(groupName);
             added++;
         }
     }
     tvGroups.Refresh();
     UpdateStats();
 }
예제 #2
0
파일: GroupsTab.cs 프로젝트: jmcadams/vplus
 private void btnAddMutli_Click(object sender, EventArgs e)
 {
     using (var dialog = new GroupDialogMultiAdd()) {
         if (dialog.ShowDialog() != DialogResult.OK) {
             return;
         }
         var name = dialog.GroupName;
         var count = dialog.GroupCount;
         var added = 1;
         var skipped = 0;
         while (added < count + 1) {
             var groupName = name + (added + skipped);
             if (tvGroups.Nodes.Find(groupName, false).Length != 0) {
                 skipped++;
                 continue;
             }
             CreateGroup(groupName);
             added++;
         }
     }
     tvGroups.Refresh();
     UpdateStats();
 }