-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDropListEditorPanel.cpp
629 lines (574 loc) · 17.8 KB
/
DropListEditorPanel.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
// wx includes
#include <wx/wx.h>
#include <wx/string.h>
#include <wx/regex.h>
#include <wx/menu.h>
// Statsgen Includes
#include "DropListEditorPanel.h"
#include "GlobalStatistics.h"
#include "StaticFunctions.h"
BEGIN_EVENT_TABLE(DropListEditorPanel, wxPanel)
EVT_SIZE(DropListEditorPanel::OnResize)
EVT_LIST_ITEM_RIGHT_CLICK(WINDOW_ID_DROPLIST,
DropListEditorPanel::OnDropListRightClick)
EVT_LIST_ITEM_RIGHT_CLICK(WINDOW_ID_PLAYERCACHE,
DropListEditorPanel::OnPlayerRightClick)
EVT_MENU(PLAYER_POPUP_ADD_DROP,DropListEditorPanel::OnPopupMenu)
EVT_MENU(PLAYER_POPUP_ADD_ALLOW,DropListEditorPanel::OnPopupMenu)
EVT_MENU(PLAYER_POPUP_ADD_CHEAT,DropListEditorPanel::OnPopupMenu)
EVT_MENU(DROPLIST_POPUP_DELETE,DropListEditorPanel::OnPopupMenu)
EVT_MENU(DROPLIST_POPUP_ALLOW,DropListEditorPanel::OnPopupMenu)
EVT_MENU(DROPLIST_POPUP_DROP,DropListEditorPanel::OnPopupMenu)
EVT_MENU(DROPLIST_POPUP_DONT_DROP,DropListEditorPanel::OnPopupMenu)
EVT_MENU(DROPLIST_POPUP_CHEAT,DropListEditorPanel::OnPopupMenu)
EVT_MENU(DROPLIST_POPUP_DONTUSECOLOURCODES,DropListEditorPanel::OnPopupMenu)
EVT_MENU(DROPLIST_POPUP_USECOLOURCODES,DropListEditorPanel::OnPopupMenu)
EVT_MENU(DROPLIST_POPUP_USEEXACTMATCH,DropListEditorPanel::OnPopupMenu)
EVT_MENU(DROPLIST_POPUP_USEPREFIXMATCH,DropListEditorPanel::OnPopupMenu)
EVT_MENU(DROPLIST_POPUP_USEREGEXPMATCH,DropListEditorPanel::OnPopupMenu)
EVT_LIST_END_LABEL_EDIT(WINDOW_ID_DROPLIST,DropListEditorPanel::OnLabelEdit)
EVT_TEXT(WINDOW_ID_TEXTCTRL_CONFIGVALUE,DropListEditorPanel::OnTextChange)
END_EVENT_TABLE()
DropListEditorPanel::DropListEditorPanel()
{
playerCache=NULL;
dropListList=NULL;
filterString="";
// Lets load up the current DropList List into
// the global statistics - we can transfer
// it across into the tree during creation
globalStatistics.dropList.Load();
}
bool DropListEditorPanel::Create(wxWindow *parent,
wxWindowID id,
const wxPoint &pos,
const wxSize &size,
long style,
const wxString &name)
{
wxString dummyConfigKey="/tmp/tmp";
wxString labelText="Player Filter";
wxString configKey;
wxPanel::Create( parent, id,
pos,
size,
style,
name);
playerCache=new PlayerCachePanel(dummyConfigKey,labelText);
playerCache->SetFilterType(PlayerCachePanel::FILTER_TYPE_NO_CASE);
playerCache->Create(this,
WINDOW_ID_PLAYERCACHE,
wxDefaultPosition,
wxDefaultSize);
dropListList=new wxListCtrl(this,
WINDOW_ID_DROPLIST,
wxDefaultPosition,
wxDefaultSize,
wxLC_REPORT|
wxLC_EDIT_LABELS);
RefreshDropListTree();
configItems=new GroupedConfigItemsPanel("Minimum Players");
configItems->Create(this,WINDOW_ID_TEXTCTRL_CONFIGVALUE,wxDefaultPosition,wxDefaultSize);
configKey="/General/MinPlayersInRound";
configItems->Add("Minimum Players In Round For It To Count",configKey,"0",3);
configKey="/General/MinRoundsPerPlayer";
configItems->Add("Minimum Rounds Per Player",configKey,"0",6);
configKey="/tmp/DropListPlayerFilter";
configItems->Add("Drop List Player Filter",configKey,"",-1);
wxSizeEvent dummyEvent;
OnResize(dummyEvent);
return (true);
}
void DropListEditorPanel::OnTextChange(wxCommandEvent &event)
{
wxString configKey;
wxString newFilterString;
configKey="/tmp/DropListPlayerFilter";
globalStatistics.configData.ReadTextValue(configKey,&newFilterString);
if (newFilterString.Cmp(filterString)!=0)
{
// filter string has changed
RefreshDropListTree();
}
}
void DropListEditorPanel::OnResize(wxSizeEvent &event)
{
wxSize itemSize;
int playerCacheWidth;
int playerCacheHeight;
int panelWidth;
int panelHeight;
int dropListWidth;
int dropListHeight;
int configWidth;
int configHeight;
wxString msg;
if (dropListList!=NULL)
{
itemSize=GetSize();
panelWidth=itemSize.GetWidth();
panelHeight=itemSize.GetHeight();
configItems->SetSize(0,0,1,1);
itemSize=configItems->GetSize();
configWidth=panelWidth;
configHeight=itemSize.GetHeight();
configHeight=configItems->PreferredHeight();
panelHeight-=configHeight;
playerCacheWidth=panelWidth;
playerCacheHeight=panelHeight/2;
dropListWidth=panelWidth;
dropListHeight=panelHeight/2;
configItems->SetSize(0,0,configWidth,configHeight);
dropListList->SetSize(0,configHeight,dropListWidth,dropListHeight);
playerCache->SetSize(0,dropListHeight+configHeight,playerCacheWidth,playerCacheHeight);
}
}
void DropListEditorPanel::AddDropListEntry(int index,
DropListEntry &dropEntry)
{
long itemIndex;
long listIndex;
long rowNumber;
int allowCount;
wxString allowDropText;
wxString whyDroppedText;
wxString matchTypeText;
wxString colourText;
wxString configKey;
bool addRow;
configKey="/tmp/DropListPlayerFilter";
globalStatistics.configData.ReadTextValue(configKey,&filterString);
allowCount=globalStatistics.dropList.allowList.GetCount();
rowNumber=index;
itemIndex=index;
itemIndex++;
allowDropText =DROPLISTPANEL_ALLOW;
whyDroppedText ="";
matchTypeText =DROPLISTPANEL_EXACT;
colourText =DROPLISTPANEL_NONCOLOURED;
if (dropEntry.DropType())
{
itemIndex*=-1;
rowNumber+=allowCount;
allowDropText=DROPLISTPANEL_DROP;
whyDroppedText=DROPLISTPANEL_PLAYERDROP;
if (dropEntry.cheat)
{
whyDroppedText=DROPLISTPANEL_PLAYERCHEAT;
}
}
if (dropEntry.dontDrop)
{
allowDropText=DROPLISTPANEL_DONT_DROP;
}
if (dropEntry.prefix)
{
matchTypeText =DROPLISTPANEL_PREFIX;
}
if (dropEntry.regularExpression)
{
matchTypeText =DROPLISTPANEL_REGEXP;
}
if (dropEntry.coloured)
{
colourText =DROPLISTPANEL_COLOURED;
}
addRow=true;
if ((!dropEntry.prefix)&&
(!dropEntry.regularExpression)&&
(dropEntry.DropType())&&
(filterString.Length()>0))
{
wxString decolourisedName;
decolourisedName=DecolouriseName(dropEntry.name).MakeLower();
filterString=filterString.MakeLower();
if (decolourisedName.Contains(filterString))
{
// filter enabled and name contains filter string
}
else
{
// filter string enabled and filter string not in
// name
addRow=false;
}
}
if (addRow)
{
rowNumber=dropListList->GetItemCount();
listIndex=dropListList->InsertItem(rowNumber,dropEntry.name);
dropListList->SetItemData(listIndex,itemIndex);
dropListList->SetItem(rowNumber,1,DecolouriseName(dropEntry.name));
dropListList->SetItem(rowNumber,2,allowDropText);
dropListList->SetItem(rowNumber,3,whyDroppedText);
dropListList->SetItem(rowNumber,4,colourText);
dropListList->SetItem(rowNumber,5,matchTypeText);
}
}
void DropListEditorPanel::RefreshDropListTree()
{
DropListEntry dropListEntry;
wxListItem listColumn;
int dropListCount;
int dropListIndex;
globalStatistics.dropList.Sort();
dropListList->Hide();
dropListList->DeleteAllColumns();
dropListList->DeleteAllItems();
listColumn.SetText("Name");
dropListList->InsertColumn(0,listColumn);
listColumn.SetText("");
dropListList->InsertColumn(1,listColumn);
listColumn.SetText("Allow/Drop");
dropListList->InsertColumn(2,listColumn);
listColumn.SetText("Why Dropped");
dropListList->InsertColumn(3,listColumn);
listColumn.SetText("Coloured Codes");
dropListList->InsertColumn(4,listColumn);
listColumn.SetText("Match Type");
dropListList->InsertColumn(5,listColumn);
dropListCount=globalStatistics.dropList.allowList.GetCount();
for (dropListIndex=0;dropListIndex<dropListCount;dropListIndex++)
{
dropListEntry=globalStatistics.dropList.allowList.Item(dropListIndex);
AddDropListEntry(dropListIndex,dropListEntry);
}
dropListCount=globalStatistics.dropList.dropList.GetCount();
for (dropListIndex=0;dropListIndex<dropListCount;dropListIndex++)
{
dropListEntry=globalStatistics.dropList.dropList.Item(dropListIndex);
AddDropListEntry(dropListIndex,dropListEntry);
}
dropListList->SetColumnWidth(0,wxLIST_AUTOSIZE);
dropListList->SetColumnWidth(1,wxLIST_AUTOSIZE);
dropListList->SetColumnWidth(2,wxLIST_AUTOSIZE);
dropListList->SetColumnWidth(3,wxLIST_AUTOSIZE);
dropListList->SetColumnWidth(4,wxLIST_AUTOSIZE);
dropListList->SetColumnWidth(5,wxLIST_AUTOSIZE);
dropListList->Show();
}
void DropListEditorPanel::OnDropListRightClick(wxListEvent &event)
{
wxString msg;
wxMenu popupMenu(_T(""));
wxString menuItem;
// What have we right clicked on - parent or child?
menuItem="Delete"; popupMenu.Append(DROPLIST_POPUP_DELETE,menuItem);
popupMenu.AppendSeparator();
menuItem="Dont Use Colour Codes"; popupMenu.Append(DROPLIST_POPUP_DONTUSECOLOURCODES,menuItem);
menuItem="Use Colour Codes"; popupMenu.Append(DROPLIST_POPUP_USECOLOURCODES,menuItem);
popupMenu.AppendSeparator();
menuItem="Only Allow These Players"; popupMenu.Append(DROPLIST_POPUP_ALLOW,menuItem);
menuItem="These Players Are Cheats"; popupMenu.Append(DROPLIST_POPUP_CHEAT,menuItem);
menuItem="Drop These Players"; popupMenu.Append(DROPLIST_POPUP_DROP,menuItem);
menuItem="Don't Drop These Players"; popupMenu.Append(DROPLIST_POPUP_DONT_DROP,menuItem);
popupMenu.AppendSeparator();
menuItem="Use Exact Match"; popupMenu.Append(DROPLIST_POPUP_USEEXACTMATCH,menuItem);
menuItem="Use Prefix Match"; popupMenu.Append(DROPLIST_POPUP_USEPREFIXMATCH,menuItem);
menuItem="Use Regular Exp Match"; popupMenu.Append(DROPLIST_POPUP_USEREGEXPMATCH,menuItem);
popupMenu.AppendSeparator();
popupMenu.Append(DROPLIST_POPUP_CANCEL,_T("Cancel"));
PopupMenu(&popupMenu);
}
void DropListEditorPanel::OnPlayerRightClick(wxListEvent &event)
{
wxString msg;
wxString menuItem;
wxMenu popupMenu(_T(""));
// Right clicked on an item in the Player Cache
menuItem="Add To Players To Be Dropped";
popupMenu.Append(PLAYER_POPUP_ADD_DROP,menuItem);
menuItem="Add To Players Who Are Cheats";
popupMenu.Append(PLAYER_POPUP_ADD_CHEAT,menuItem);
menuItem="Add To Players To Allow";
popupMenu.Append(PLAYER_POPUP_ADD_ALLOW,menuItem);
popupMenu.AppendSeparator();
popupMenu.Append(DROPLIST_POPUP_CANCEL,_T("Cancel"));
PopupMenu(&popupMenu);
}
void DropListEditorPanel::OnPopupMenu(wxCommandEvent &event)
{
wxString msg;
int id;
bool removeColourCodes;
wxString howMatched;
wxArrayInt selectedPlayers;
int selectedCount;
int cacheIndex;
wxString decolouredName;
wxString longestMatch;
int length;
int charIndex;
PlayerCacheEntry cacheEntry;
int playerIndex;
int playerCount;
long selectedItem=-1;
int listIndex;
wxString nameToRemove;
id=event.GetId();
switch (id)
{
case DROPLIST_POPUP_ALLOW:
case DROPLIST_POPUP_DONT_DROP:
case DROPLIST_POPUP_DROP:
case DROPLIST_POPUP_CHEAT:
case DROPLIST_POPUP_DONTUSECOLOURCODES:
case DROPLIST_POPUP_USECOLOURCODES:
case DROPLIST_POPUP_USEEXACTMATCH:
case DROPLIST_POPUP_USEPREFIXMATCH:
case DROPLIST_POPUP_USEREGEXPMATCH:
selectedPlayers.Clear();
selectedItem=dropListList->GetNextItem(selectedItem,
wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED);
while (selectedItem!=-1)
{
listIndex=(int)dropListList->GetItemData(selectedItem);
DropListEntry oldEntry;
DropListEntry newEntry;
if (listIndex<0)
{
listIndex=abs(listIndex);
listIndex--;
oldEntry=globalStatistics.dropList.dropList.Item(listIndex);
}
else
{
listIndex--;
oldEntry=globalStatistics.dropList.allowList.Item(listIndex);
}
newEntry=oldEntry;
switch (id)
{
case DROPLIST_POPUP_ALLOW:
newEntry.drop=false;
newEntry.cheat=false;
newEntry.dontDrop=false;
break;
case DROPLIST_POPUP_DONT_DROP:
newEntry.drop=false;
newEntry.cheat=false;
newEntry.dontDrop=true;
break;
case DROPLIST_POPUP_DROP:
newEntry.drop=true;
newEntry.cheat=false;
newEntry.dontDrop=false;
break;
case DROPLIST_POPUP_CHEAT:
newEntry.drop=true;
newEntry.cheat=true;
newEntry.dontDrop=false;
break;
case DROPLIST_POPUP_DONTUSECOLOURCODES:
newEntry.coloured=false;
break;
case DROPLIST_POPUP_USECOLOURCODES:
newEntry.coloured=true;
break;
case DROPLIST_POPUP_USEEXACTMATCH:
newEntry.prefix=false;
newEntry.regularExpression=false;
break;
case DROPLIST_POPUP_USEPREFIXMATCH:
newEntry.prefix=true;
newEntry.regularExpression=false;
break;
case DROPLIST_POPUP_USEREGEXPMATCH:
newEntry.prefix=true;
newEntry.regularExpression=true;
break;
}
globalStatistics.dropList.RemoveEntry(oldEntry);
globalStatistics.dropList.AddEntry(newEntry);
selectedItem=dropListList->GetNextItem(selectedItem,
wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED);
}
RefreshDropListTree();
break;
case DROPLIST_POPUP_DELETE:
selectedPlayers.Clear();
selectedItem=dropListList->GetNextItem(selectedItem,
wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED);
while (selectedItem!=-1)
{
listIndex=(int)dropListList->GetItemData(selectedItem);
nameToRemove=dropListList->GetItemText(selectedItem);
DropListEntry dropListEntry;
dropListEntry.drop=(listIndex<0); // negative index for drop
dropListEntry.name=nameToRemove;
globalStatistics.dropList.RemoveEntry(dropListEntry);
selectedItem=dropListList->GetNextItem(selectedItem,
wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED);
}
RefreshDropListTree();
break;
case PLAYER_POPUP_ADD_ALLOW:
case PLAYER_POPUP_ADD_DROP:
case PLAYER_POPUP_ADD_CHEAT:
// Some sub category questions now
// some are dependent on the amount of
// players selected
removeColourCodes=(wxMessageBox("Remove Colour Codes?","Confirm",wxYES_NO)==wxYES);
playerCache->GetSelectedPlayers(selectedPlayers);
selectedCount=selectedPlayers.GetCount();
if (selectedCount>1)
{
// we are possibly adding a prefix
wxArrayString choices;
wxString choice;
choice=DROPLISTPANEL_EXACT;choices.Add(choice);
choice=DROPLISTPANEL_PREFIX;choices.Add(choice);
choice=DROPLISTPANEL_REGEXP;choices.Add(choice);
howMatched=wxGetSingleChoice("How Do You Want To Match The Names?","Choose",choices);
}
else
{
howMatched=DROPLISTPANEL_EXACT;
}
wxArrayString namesToAdd;
wxString nameToAdd;
if (howMatched.Cmp(DROPLISTPANEL_EXACT)!=0)
{
// we have asked for a prefix type match
playerIndex=selectedPlayers.Item(0);
cacheEntry=globalStatistics.playerCache.Item(playerIndex);
if (removeColourCodes)
{
longestMatch=DecolouriseName(cacheEntry.name);
}
else
{
longestMatch=cacheEntry.name;
}
for (cacheIndex=1;cacheIndex<selectedCount;cacheIndex++)
{
playerIndex=selectedPlayers.Item(cacheIndex);
cacheEntry=globalStatistics.playerCache.Item(playerIndex);
if (removeColourCodes)
{
decolouredName=DecolouriseName(cacheEntry.name);
}
else
{
decolouredName=cacheEntry.name;
}
length=longestMatch.Length();
if (length>decolouredName.Length())
{
length=decolouredName.Length();
}
// now we need to scan each character
// in the longest match and the decoloured name
// and match when we reach a new character
for (charIndex=0;charIndex<length;charIndex++)
{
if (longestMatch[charIndex]!=decolouredName[charIndex])
{
longestMatch=longestMatch.Left(charIndex);
}
}
}
if (longestMatch.Length()>1)
{
// found a common piece of string at least 2 char long
// convert it to a regular expression if needed
wxString regularExpression="^";
if (howMatched.Cmp(DROPLISTPANEL_REGEXP)==0)
{
length=longestMatch.Length();
for (charIndex=0;charIndex<length;charIndex++)
{
regularExpression+="\\";
regularExpression+=longestMatch[charIndex];
}
regularExpression+=".*";
longestMatch=regularExpression;
}
// Longest Match is the prefix
nameToAdd=longestMatch;
namesToAdd.Add(nameToAdd);
}
else
{
// Sod it - no match - just add each name individually
howMatched=DROPLISTPANEL_EXACT;
for (cacheIndex=0;cacheIndex<selectedCount;cacheIndex++)
{
playerIndex=selectedPlayers.Item(cacheIndex);
cacheEntry=globalStatistics.playerCache.Item(playerIndex);
if (removeColourCodes)
{
nameToAdd=DecolouriseName(cacheEntry.name);
}
else
{
nameToAdd=cacheEntry.name;
}
namesToAdd.Add(nameToAdd);
}
}
}
else
{
// exact match -
for (cacheIndex=0;cacheIndex<selectedCount;cacheIndex++)
{
playerIndex=selectedPlayers.Item(cacheIndex);
cacheEntry=globalStatistics.playerCache.Item(playerIndex);
if (removeColourCodes)
{
nameToAdd=DecolouriseName(cacheEntry.name);
}
else
{
nameToAdd=cacheEntry.name;
}
namesToAdd.Add(nameToAdd);
}
}
// ok - by now we have a list of names to add -
// we know what to add them to and what they are
// we know how to match them
playerCount=namesToAdd.GetCount();
for (playerIndex=0;playerIndex<playerCount;playerIndex++)
{
DropListEntry dropListEntry;
nameToAdd=namesToAdd.Item(playerIndex);
dropListEntry.name=nameToAdd;
dropListEntry.dontDrop=false;
dropListEntry.drop=(id!=PLAYER_POPUP_ADD_ALLOW);
dropListEntry.cheat=(id==PLAYER_POPUP_ADD_CHEAT);
dropListEntry.coloured=(!removeColourCodes);
dropListEntry.prefix=(howMatched.Cmp(DROPLISTPANEL_EXACT)!=0);
dropListEntry.regularExpression=(howMatched.Cmp(DROPLISTPANEL_REGEXP)==0);
globalStatistics.dropList.AddEntry(dropListEntry);
}
RefreshDropListTree();
break;
}
}
void DropListEditorPanel::OnLabelEdit(wxListEvent &event)
{
wxString msg;
wxString menuItem;
wxMenu popupMenu(_T(""));
long index;
long dropListIndex;
DropListEntry dropListEntry;
index=event.GetIndex();
dropListIndex=dropListList->GetItemData(index);
if (dropListIndex<0)
{
// Drop List
dropListEntry=globalStatistics.dropList.dropList.Item(abs(dropListIndex)-1);
}
else
{
// Allow List
dropListEntry=globalStatistics.dropList.allowList.Item(abs(dropListIndex)-1);
}
}