Exemple #1
0
 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();
 }
Exemple #2
0
 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();
 }