Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Action<List<ClubListing>> a = delegate(List<ClubListing> list)
- {
- for (int i = 0; i < list.Count; i++)
- {
- var cl = list[i];
- if (cl.MatchingClubListing == null)
- {
- var compare = CompareNames(cl.Club.Name);
- if (compare.Any(c => c.Value == 0 && c.Key.Club.State == cl.Club.State))
- {
- var match = compare.First(c => c.Value == 0 && c.Key.Club.State == cl.Club.State);
- compareDialog.ClubA = cl.Club;
- compareDialog.ClubB = match.Key.Club;
- DialogResult dr = compareDialog.ShowDialog();
- if (dr == DialogResult.Yes)
- {
- cl.MatchingClubListing = match.Key;
- match.Key.MatchingClubListing = cl;
- }
- else if (dr == DialogResult.Abort)
- {
- break;
- }
- }
- }
- this.Invoke(new MethodInvoker(delegate()
- {
- this.prbOperationProgress.Value = i;
- }));
- }
- };
- AsyncCallback callback = new AsyncCallback(SaveAndUpdate);
- var result = a.BeginInvoke(this.lbxLiveClubs.Items.Cast<ClubListing>().ToList(), callback, null);
- Form parent = ...;
- compareDialog.ShowDialog(parent);
Add Comment
Please, Sign In to add comment