-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlearnMil007.clw
More file actions
3282 lines (2836 loc) · 161 KB
/
Copy pathlearnMil007.clw
File metadata and controls
3282 lines (2836 loc) · 161 KB
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
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
MEMBER('learnMil.clw') ! This is a MEMBER module
INCLUDE('ABBROWSE.INC'),ONCE
INCLUDE('ABDROPS.INC'),ONCE
INCLUDE('ABEIP.INC'),ONCE
INCLUDE('ABPOPUP.INC'),ONCE
INCLUDE('ABRESIZE.INC'),ONCE
INCLUDE('ABTOOLBA.INC'),ONCE
INCLUDE('ABWINDOW.INC'),ONCE
MAP
INCLUDE('LEARNMIL007.INC'),ONCE !Local module procedure declarations
INCLUDE('LEARNMIL002.INC'),ONCE !Req'd for module callout resolution
INCLUDE('LEARNMIL003.INC'),ONCE !Req'd for module callout resolution
INCLUDE('LEARNMIL004.INC'),ONCE !Req'd for module callout resolution
INCLUDE('LEARNMIL008.INC'),ONCE !Req'd for module callout resolution
INCLUDE('LEARNMIL010.INC'),ONCE !Req'd for module callout resolution
END
!!! <summary>
!!! Generated from procedure template - Window
!!! Form MissionTASKORG
!!! </summary>
U_MissionTASKORG PROCEDURE
CurrentTab STRING(80) !
ActionMessage CSTRING(40) !
FDCB8::View:FileDropCombo VIEW(OrgMissions)
PROJECT(OrgMiss:ID)
PROJECT(OrgMiss:Organization)
JOIN(myOrg:PKID,OrgMiss:Organization)
PROJECT(myOrg:Name)
PROJECT(myOrg:ID)
END
END
FDCB9::View:FileDropCombo VIEW(C2IPExplorer)
PROJECT(C2IPExp:ID)
PROJECT(C2IPExp:C2IP)
JOIN(C2IP:PKID,C2IPExp:C2IP)
PROJECT(C2IP:Name)
PROJECT(C2IP:ID)
PROJECT(C2IP:Type)
JOIN(tpyC2IP:PKID,C2IP:Type)
PROJECT(tpyC2IP:Code)
PROJECT(tpyC2IP:ID)
END
END
END
Queue:FileDropCombo QUEUE !Queue declaration for browse/combo box using ?myOrg:Name
myOrg:Name LIKE(myOrg:Name) !List box control field - type derived from field
OrgMiss:ID LIKE(OrgMiss:ID) !Primary key field - type derived from field
myOrg:ID LIKE(myOrg:ID) !Related join file key field - type derived from field
Mark BYTE !Entry's marked status
ViewPosition STRING(1024) !Entry's view position
END
Queue:FileDropCombo:1 QUEUE !Queue declaration for browse/combo box using ?C2IP:Name
C2IP:Name LIKE(C2IP:Name) !List box control field - type derived from field
tpyC2IP:Code LIKE(tpyC2IP:Code) !List box control field - type derived from field
C2IPExp:ID LIKE(C2IPExp:ID) !Primary key field - type derived from field
C2IP:ID LIKE(C2IP:ID) !Related join file key field - type derived from field
tpyC2IP:ID LIKE(tpyC2IP:ID) !Related join file key field - type derived from field
Mark BYTE !Entry's marked status
ViewPosition STRING(1024) !Entry's view position
END
History::MissTSK:Record LIKE(MissTSK:RECORD),THREAD
QuickWindow WINDOW('Form MissionTASKORG'),AT(,,417,84),FONT('Microsoft Sans Serif',8,,FONT:regular,CHARSET:DEFAULT), |
RESIZE,CENTER,GRAY,IMM,MDI,HLP('U_MissionTASKORG'),SYSTEM
SHEET,AT(4,4,411,58),USE(?CurrentTab)
TAB('&1) General'),USE(?Tab:1)
PROMPT('ID:'),AT(8,20),USE(?MissTSK:ID:Prompt),TRN
ENTRY(@n-10.0),AT(61,20,48,10),USE(MissTSK:ID),DECIMAL(12)
PROMPT('Mission:'),AT(8,34),USE(?MissTSK:Mission:Prompt),TRN
ENTRY(@n-10.0),AT(61,34,48,10),USE(MissTSK:Mission),DECIMAL(12)
PROMPT('TASKORG C2IP:'),AT(8,48),USE(?MissTSK:TASKORGC2IP:Prompt),TRN
ENTRY(@n-10.0),AT(61,48,48,10),USE(MissTSK:TASKORGC2IP),DECIMAL(12)
COMBO(@s100),AT(115,34,291,10),USE(myOrg:Name),DROP(5),FORMAT('400L(2)|M~Name~L(0)@s100@'), |
FROM(Queue:FileDropCombo),IMM
COMBO(@s100),AT(115,48,291,9),USE(C2IP:Name),DROP(5),FORMAT('100L(2)|M~C2IP Name~C(0)@s' & |
'100@40L(2)|M~C2IP Type~C(0)@s20@'),FROM(Queue:FileDropCombo:1),IMM
END
END
BUTTON('&OK'),AT(259,68,49,14),USE(?OK),LEFT,ICON('WAOK.ICO'),DEFAULT,FLAT,MSG('Accept dat' & |
'a and close the window'),TIP('Accept data and close the window')
BUTTON('&Cancel'),AT(313,68,49,14),USE(?Cancel),LEFT,ICON('WACANCEL.ICO'),FLAT,MSG('Cancel operation'), |
TIP('Cancel operation')
BUTTON('&Help'),AT(365,68,49,14),USE(?Help),LEFT,ICON('WAHELP.ICO'),FLAT,MSG('See Help Window'), |
STD(STD:Help),TIP('See Help Window')
END
ThisWindow CLASS(WindowManager)
Ask PROCEDURE(),DERIVED
Init PROCEDURE(),BYTE,PROC,DERIVED
Kill PROCEDURE(),BYTE,PROC,DERIVED
Run PROCEDURE(),BYTE,PROC,DERIVED
Run PROCEDURE(USHORT Number,BYTE Request),BYTE,PROC,DERIVED
TakeAccepted PROCEDURE(),BYTE,PROC,DERIVED
END
Toolbar ToolbarClass
ToolbarForm ToolbarUpdateClass ! Form Toolbar Manager
Resizer CLASS(WindowResizeClass)
Init PROCEDURE(BYTE AppStrategy=AppStrategy:Resize,BYTE SetWindowMinSize=False,BYTE SetWindowMaxSize=False)
END
FDCB8 CLASS(FileDropComboClass) ! File drop combo manager
Q &Queue:FileDropCombo !Reference to browse queue type
END
FDCB9 CLASS(FileDropComboClass) ! File drop combo manager
Q &Queue:FileDropCombo:1 !Reference to browse queue type
END
CurCtrlFeq LONG
FieldColorQueue QUEUE
Feq LONG
OldColor LONG
END
CODE
GlobalResponse = ThisWindow.Run() ! Opens the window and starts an Accept Loop
!---------------------------------------------------------------------------
DefineListboxStyle ROUTINE
!|
!| This routine create all the styles to be shared in this window
!| It`s called after the window open
!|
!---------------------------------------------------------------------------
ThisWindow.Ask PROCEDURE
CODE
CASE SELF.Request ! Configure the action message text
OF ViewRecord
ActionMessage = 'View Mission''s TaskOrg'
OF InsertRecord
ActionMessage = 'Define New TaskOrg'
OF ChangeRecord
ActionMessage = 'Modify TaskOrg'
END
QuickWindow{PROP:Text} = ActionMessage ! Display status message in title bar
PARENT.Ask
ThisWindow.Init PROCEDURE
ReturnValue BYTE,AUTO
CODE
GlobalErrors.SetProcedureName('U_MissionTASKORG')
SELF.Request = GlobalRequest ! Store the incoming request
ReturnValue = PARENT.Init()
IF ReturnValue THEN RETURN ReturnValue.
SELF.FirstField = ?MissTSK:ID:Prompt
SELF.VCRRequest &= VCRRequest
SELF.Errors &= GlobalErrors ! Set this windows ErrorManager to the global ErrorManager
CLEAR(GlobalRequest) ! Clear GlobalRequest after storing locally
CLEAR(GlobalResponse)
SELF.AddItem(Toolbar)
SELF.HistoryKey = CtrlH
SELF.AddHistoryFile(MissTSK:Record,History::MissTSK:Record)
SELF.AddHistoryField(?MissTSK:ID,1)
SELF.AddHistoryField(?MissTSK:Mission,2)
SELF.AddHistoryField(?MissTSK:TASKORGC2IP,3)
SELF.AddUpdateFile(Access:MissionTASKORG)
SELF.AddItem(?Cancel,RequestCancelled) ! Add the cancel control to the window manager
Relate:C2IPExplorer.Open ! File C2IPExplorer used by this procedure, so make sure it's RelationManager is open
SELF.FilesOpened = True
SELF.Primary &= Relate:MissionTASKORG
IF SELF.Request = ViewRecord AND NOT SELF.BatchProcessing ! Setup actions for ViewOnly Mode
SELF.InsertAction = Insert:None
SELF.DeleteAction = Delete:None
SELF.ChangeAction = Change:None
SELF.CancelAction = Cancel:Cancel
SELF.OkControl = 0
ELSE
SELF.ChangeAction = Change:Caller ! Changes allowed
SELF.CancelAction = Cancel:Cancel+Cancel:Query ! Confirm cancel
SELF.OkControl = ?OK
IF SELF.PrimeUpdate() THEN RETURN Level:Notify.
END
SELF.Open(QuickWindow) ! Open window
Do DefineListboxStyle
IF SELF.Request = ViewRecord ! Configure controls for View Only mode
?MissTSK:ID{PROP:ReadOnly} = True
?MissTSK:Mission{PROP:ReadOnly} = True
?MissTSK:TASKORGC2IP{PROP:ReadOnly} = True
DISABLE(?myOrg:Name)
DISABLE(?C2IP:Name)
END
Resizer.Init(AppStrategy:Surface,Resize:SetMinSize) ! Controls like list boxes will resize, whilst controls like buttons will move
SELF.AddItem(Resizer) ! Add resizer to window manager
INIMgr.Fetch('U_MissionTASKORG',QuickWindow) ! Restore window settings from non-volatile store
Resizer.Resize ! Reset required after window size altered by INI manager
ToolBarForm.HelpButton=?Help
SELF.AddItem(ToolbarForm)
FDCB8.Init(myOrg:Name,?myOrg:Name,Queue:FileDropCombo.ViewPosition,FDCB8::View:FileDropCombo,Queue:FileDropCombo,Relate:OrgMissions,ThisWindow,GlobalErrors,0,1,0)
FDCB8.Q &= Queue:FileDropCombo
FDCB8.AddSortOrder(OrgMiss:PKID)
FDCB8.AddField(myOrg:Name,FDCB8.Q.myOrg:Name) !List box control field - type derived from field
FDCB8.AddField(OrgMiss:ID,FDCB8.Q.OrgMiss:ID) !Primary key field - type derived from field
FDCB8.AddField(myOrg:ID,FDCB8.Q.myOrg:ID) !Related join file key field - type derived from field
FDCB8.AddUpdateField(OrgMiss:ID,MissTSK:Mission)
ThisWindow.AddItem(FDCB8.WindowComponent)
FDCB8.DefaultFill = 0
FDCB9.Init(C2IP:Name,?C2IP:Name,Queue:FileDropCombo:1.ViewPosition,FDCB9::View:FileDropCombo,Queue:FileDropCombo:1,Relate:C2IPExplorer,ThisWindow,GlobalErrors,1,1,0)
FDCB9.AskProcedure = 1
FDCB9.Q &= Queue:FileDropCombo:1
FDCB9.AddSortOrder(C2IPExp:KOrganization)
FDCB9.AddField(C2IP:Name,FDCB9.Q.C2IP:Name) !List box control field - type derived from field
FDCB9.AddField(tpyC2IP:Code,FDCB9.Q.tpyC2IP:Code) !List box control field - type derived from field
FDCB9.AddField(C2IPExp:ID,FDCB9.Q.C2IPExp:ID) !Primary key field - type derived from field
FDCB9.AddField(C2IP:ID,FDCB9.Q.C2IP:ID) !Related join file key field - type derived from field
FDCB9.AddField(tpyC2IP:ID,FDCB9.Q.tpyC2IP:ID) !Related join file key field - type derived from field
FDCB9.AddUpdateField(C2IPExp:C2IP,MissTSK:TASKORGC2IP)
ThisWindow.AddItem(FDCB9.WindowComponent)
FDCB9.DefaultFill = 0
SELF.SetAlerts()
RETURN ReturnValue
ThisWindow.Kill PROCEDURE
ReturnValue BYTE,AUTO
CODE
ReturnValue = PARENT.Kill()
IF ReturnValue THEN RETURN ReturnValue.
IF SELF.FilesOpened
Relate:C2IPExplorer.Close
END
IF SELF.Opened
INIMgr.Update('U_MissionTASKORG',QuickWindow) ! Save window data to non-volatile store
END
GlobalErrors.SetProcedureName
RETURN ReturnValue
ThisWindow.Run PROCEDURE
ReturnValue BYTE,AUTO
CODE
ReturnValue = PARENT.Run()
IF SELF.Request = ViewRecord ! In View Only mode always signal RequestCancelled
ReturnValue = RequestCancelled
END
RETURN ReturnValue
ThisWindow.Run PROCEDURE(USHORT Number,BYTE Request)
ReturnValue BYTE,AUTO
CODE
ReturnValue = PARENT.Run(Number,Request)
IF SELF.Request = ViewRecord
ReturnValue = RequestCancelled ! Always return RequestCancelled if the form was opened in ViewRecord mode
ELSE
GlobalRequest = Request
UpdateC2IPs
ReturnValue = GlobalResponse
END
RETURN ReturnValue
ThisWindow.TakeAccepted PROCEDURE
ReturnValue BYTE,AUTO
Looped BYTE
CODE
LOOP ! This method receive all EVENT:Accepted's
IF Looped
RETURN Level:Notify
ELSE
Looped = 1
END
ReturnValue = PARENT.TakeAccepted()
CASE ACCEPTED()
OF ?C2IP:Name
FDCB9.TakeAccepted()
OF ?OK
ThisWindow.Update()
IF SELF.Request = ViewRecord AND NOT SELF.BatchProcessing THEN
POST(EVENT:CloseWindow)
END
END
RETURN ReturnValue
END
ReturnValue = Level:Fatal
RETURN ReturnValue
Resizer.Init PROCEDURE(BYTE AppStrategy=AppStrategy:Resize,BYTE SetWindowMinSize=False,BYTE SetWindowMaxSize=False)
CODE
PARENT.Init(AppStrategy,SetWindowMinSize,SetWindowMaxSize)
SELF.SetParentDefaults() ! Calculate default control parent-child relationships based upon their positions on the window
!!! <summary>
!!! Generated from procedure template - Window
!!! Window
!!! </summary>
create_COP PROCEDURE (ULONG pOrgRef, ULONG pMissionRef)
sCOPName STRING(100) !
nC2IERef DECIMAL(7) !
nC2IPRef DECIMAL(7) !
QuickWindow WINDOW('Create COP'),AT(,,523,345),FONT('Microsoft Sans Serif',8,,FONT:regular,CHARSET:DEFAULT), |
RESIZE,CENTER,GRAY,IMM,HLP('create_COP'),SYSTEM
BUTTON('&OK'),AT(367,329,49,14),USE(?Ok),LEFT,ICON('WAOK.ICO'),FLAT,MSG('Accept operation'), |
TIP('Accept Operation')
BUTTON('&Cancel'),AT(420,329,49,14),USE(?Cancel),LEFT,ICON('WACANCEL.ICO'),FLAT,MSG('Cancel Operation'), |
TIP('Cancel Operation')
BUTTON('&Help'),AT(472,329,49,14),USE(?Help),LEFT,ICON('WAHELP.ICO'),FLAT,MSG('See Help Window'), |
STD(STD:Help),TIP('See Help Window')
PROMPT('Name:'),AT(2,10),USE(?sCOPName:Prompt)
ENTRY(@s100),AT(53,10,361,10),USE(sCOPName)
END
ThisWindow CLASS(WindowManager)
Init PROCEDURE(),BYTE,PROC,DERIVED
Kill PROCEDURE(),BYTE,PROC,DERIVED
TakeAccepted PROCEDURE(),BYTE,PROC,DERIVED
END
Toolbar ToolbarClass
Resizer CLASS(WindowResizeClass)
Init PROCEDURE(BYTE AppStrategy=AppStrategy:Resize,BYTE SetWindowMinSize=False,BYTE SetWindowMaxSize=False)
END
CODE
GlobalResponse = ThisWindow.Run() ! Opens the window and starts an Accept Loop
!---------------------------------------------------------------------------
DefineListboxStyle ROUTINE
!|
!| This routine create all the styles to be shared in this window
!| It`s called after the window open
!|
!---------------------------------------------------------------------------
ThisWindow.Init PROCEDURE
ReturnValue BYTE,AUTO
CODE
GlobalErrors.SetProcedureName('create_COP')
SELF.Request = GlobalRequest ! Store the incoming request
ReturnValue = PARENT.Init()
IF ReturnValue THEN RETURN ReturnValue.
SELF.FirstField = ?Ok
SELF.VCRRequest &= VCRRequest
SELF.Errors &= GlobalErrors ! Set this windows ErrorManager to the global ErrorManager
CLEAR(GlobalRequest) ! Clear GlobalRequest after storing locally
CLEAR(GlobalResponse)
SELF.AddItem(Toolbar)
IF SELF.Request = SelectRecord
SELF.AddItem(?Ok,RequestCancelled) ! Add the close control to the window manger
ELSE
SELF.AddItem(?Ok,RequestCompleted) ! Add the close control to the window manger
END
SELF.AddItem(?Cancel,RequestCancelled) ! Add the cancel control to the window manager
Relate:C2IPExplorer.Open ! File C2IPExplorer used by this procedure, so make sure it's RelationManager is open
Relate:_C2IEs.Open ! File _C2IEs used by this procedure, so make sure it's RelationManager is open
Relate:_C2IPContent.SetOpenRelated()
Relate:_C2IPContent.Open ! File _C2IPContent used by this procedure, so make sure it's RelationManager is open
Access:type_C2IP.UseFile ! File referenced in 'Other Files' so need to inform it's FileManager
Access:_C2IPs.UseFile ! File referenced in 'Other Files' so need to inform it's FileManager
Access:type_C2IE.UseFile ! File referenced in 'Other Files' so need to inform it's FileManager
SELF.FilesOpened = True
SELF.Open(QuickWindow) ! Open window
Do DefineListboxStyle
Resizer.Init(AppStrategy:Surface,Resize:SetMinSize) ! Controls like list boxes will resize, whilst controls like buttons will move
SELF.AddItem(Resizer) ! Add resizer to window manager
INIMgr.Fetch('create_COP',QuickWindow) ! Restore window settings from non-volatile store
Resizer.Resize ! Reset required after window size altered by INI manager
SELF.SetAlerts()
! Create COP C2IP
sCOPName = ''
LOOP 10 TIMES
sCOPName = CLIP(sCOPName) & CHR(RANDOM(97, 122))
END
IF LEN(CLIP(sCOPName))>0 THEN
! Create default OVERLAY C2IE
Access:_C2IEs.PrimeAutoInc()
nC2IERef = _C2IE:ID
tpyC2IE:Code = 'OVERLAY'
IF Access:type_C2IE.Fetch(tpyC2IE:KCode) = Level:Benign THEN
_C2IE:Type = tpyC2IE:ID
END
_C2IE:Name = sCOPName
IF Access:_C2IEs.TryInsert() = Level:Benign THEN
! Create COP C2IP
Access:_C2IPs.PrimeAutoInc()
nC2IPRef = _C2IP:ID
tpyC2IP:Code = 'COP'
IF Access:type_C2IP.Fetch(tpyC2IP:KCode) = Level:Benign THEN
_C2IP:Type = tpyC2IP:ID
END
_C2IP:Name = sCOPName
IF Access:_C2IPs.TryInsert() = Level:Benign THEN
! Create association C2IP - C2IE
Access:_C2IPContent.PrimeAutoInc()
_C2IPCt:C2IPPackage = nC2IPRef
_C2IPCt:C2IEInstance = nC2IERef
IF Access:_C2IPContent.TryInsert() = Level:Benign THEN
!MESSAGE('COP created')
! Add the new C2IP to the current C2IP Explorer
Access:C2IPExplorer.PrimeAutoInc()
C2IPExp:Organization = pOrgRef
C2IPExp:C2IP = nC2IPRef
C2IPExp:Mission = pMissionRef
IF Access:C2IPExplorer.TryInsert() = Level:Benign THEN
MESSAGE('C2IP COP created')
END
END
END
END
END
RETURN ReturnValue
ThisWindow.Kill PROCEDURE
ReturnValue BYTE,AUTO
CODE
ReturnValue = PARENT.Kill()
IF ReturnValue THEN RETURN ReturnValue.
IF SELF.FilesOpened
Relate:C2IPExplorer.Close
Relate:_C2IEs.Close
Relate:_C2IPContent.Close
END
IF SELF.Opened
INIMgr.Update('create_COP',QuickWindow) ! Save window data to non-volatile store
END
GlobalErrors.SetProcedureName
RETURN ReturnValue
ThisWindow.TakeAccepted PROCEDURE
ReturnValue BYTE,AUTO
Looped BYTE
CODE
LOOP ! This method receive all EVENT:Accepted's
IF Looped
RETURN Level:Notify
ELSE
Looped = 1
END
ReturnValue = PARENT.TakeAccepted()
CASE ACCEPTED()
OF ?Ok
ThisWindow.Update()
! Update COP C2IP Name
_C2IP:Name = sCOPName
IF LEN(CLIP(sCOPName))>0 THEN
IF Access:_C2IPs.TryUpdate() = Level:Benign THEN
! COP C2IP Name saved
END
END
END
RETURN ReturnValue
END
ReturnValue = Level:Fatal
RETURN ReturnValue
Resizer.Init PROCEDURE(BYTE AppStrategy=AppStrategy:Resize,BYTE SetWindowMinSize=False,BYTE SetWindowMaxSize=False)
CODE
PARENT.Init(AppStrategy,SetWindowMinSize,SetWindowMaxSize)
SELF.SetParentDefaults() ! Calculate default control parent-child relationships based upon their positions on the window
!!! <summary>
!!! Generated from procedure template - Window
!!! COP Editor
!!! </summary>
COPApp PROCEDURE (ULONG pC2IPRef,ULONG pOrgRef,ULONG pMissionRef,ULONG pTASKORGC2IPRef)
CurrentTab STRING(80) !
vOvrlRef DECIMAL(7),DIM(20) !
nOvrlRef STRING(20) !
selC2IPRef DECIMAL(7) !
selC2IPName STRING(100) !
selC2IERef DECIMAL(7) !
selC2IEBSORef DECIMAL(7) !
selBSORef DECIMAL(7) !
selBSOHostility DECIMAL(7) !
sBSOTypeCode STRING(20) !
sBSOHostilityCode STRING(20) !
sBSOCode STRING(20) !
sC2IETypeCode STRING(20) !
sMoveToOvrlOptMenu STRING(100) !
nMoveToOvrlSelection SIGNED !
vActPoints LONG,DIM(20) !
sCOPName STRING(100) !
sPrevCOPName STRING(100) !
nC2IERef DECIMAL(7) !
nC2IPRef DECIMAL(7) !
COPBSOs QUEUE,PRE(copBSO) !
C2IEUnitRef DECIMAL(7) !
xPos DECIMAL(7) !
yPos DECIMAL(7) !
END !
bBSOFoundOnCanvas BYTE !
nBSOFoundPos ULONG !
BRW1::View:Browse VIEW(C2IPContent)
PROJECT(C2IPCt:ID)
PROJECT(C2IPCt:C2IPPackage)
PROJECT(C2IPCt:C2IEInstance)
JOIN(C2IE:PKID,C2IPCt:C2IEInstance)
PROJECT(C2IE:Name)
PROJECT(C2IE:ID)
PROJECT(C2IE:Type)
JOIN(tpyC2IE:PKID,C2IE:Type)
PROJECT(tpyC2IE:Code)
PROJECT(tpyC2IE:ID)
END
END
END
Queue:Browse:1 QUEUE !Queue declaration for browse/combo box using ?Browse:1
C2IPCt:ID LIKE(C2IPCt:ID) !List box control field - type derived from field
C2IPCt:C2IPPackage LIKE(C2IPCt:C2IPPackage) !List box control field - type derived from field
C2IPCt:C2IEInstance LIKE(C2IPCt:C2IEInstance) !List box control field - type derived from field
tpyC2IE:Code LIKE(tpyC2IE:Code) !List box control field - type derived from field
C2IE:Name LIKE(C2IE:Name) !List box control field - type derived from field
C2IE:ID LIKE(C2IE:ID) !Related join file key field - type derived from field
tpyC2IE:ID LIKE(tpyC2IE:ID) !Related join file key field - type derived from field
Mark BYTE !Entry's marked status
ViewPosition STRING(1024) !Entry's view position
END
BRW9::View:Browse VIEW(c2ieTaskOrg)
PROJECT(c2ieTO:ID)
PROJECT(c2ieTO:C2IE)
JOIN(P,'UniP:ID=c2ieTO:Parent')
PROJECT(UniP:Code)
END
JOIN(C1,'UniC1:ID=c2ieTO:Child1')
PROJECT(UniC1:Code)
END
JOIN(C2,'UniC2:ID=c2ieTO:Child2')
PROJECT(UniC2:Code)
END
JOIN(C3,'UniC3:ID=c2ieTO:Child3')
PROJECT(UniC3:Code)
END
END
Queue:Browse QUEUE !Queue declaration for browse/combo box using ?List
UniP:Code LIKE(UniP:Code) !List box control field - type derived from field
UniC1:Code LIKE(UniC1:Code) !List box control field - type derived from field
UniC2:Code LIKE(UniC2:Code) !List box control field - type derived from field
UniC3:Code LIKE(UniC3:Code) !List box control field - type derived from field
c2ieTO:ID LIKE(c2ieTO:ID) !Primary key field - type derived from field
c2ieTO:C2IE LIKE(c2ieTO:C2IE) !Browse key field - type derived from field
Mark BYTE !Entry's marked status
ViewPosition STRING(1024) !Entry's view position
END
BRW10::View:Browse VIEW(c2ieUnits)
PROJECT(c2ieUni:ID)
PROJECT(c2ieUni:Hostility)
PROJECT(c2ieUni:C2IE)
PROJECT(c2ieUni:Unit)
JOIN(Uni:PKID,c2ieUni:Unit)
PROJECT(Uni:Code)
PROJECT(Uni:Name)
PROJECT(Uni:ID)
PROJECT(Uni:BSOType)
JOIN(tpyBSO:PKID,Uni:BSOType)
PROJECT(tpyBSO:Code)
PROJECT(tpyBSO:ID)
END
END
JOIN(tpyHstl:PKID,c2ieUni:Hostility)
PROJECT(tpyHstl:Code)
PROJECT(tpyHstl:ID)
END
JOIN(_meta_c2ieUni:Kc2ieUni,c2ieUni:ID)
PROJECT(_meta_c2ieUni:movedToOverlay)
END
JOIN(c2ieUniPos:Kc2ieUnit,c2ieUni:ID)
PROJECT(c2ieUniPos:xPos)
PROJECT(c2ieUniPos:yPos)
END
END
Queue:Browse:2 QUEUE !Queue declaration for browse/combo box using ?List:2
c2ieUni:ID LIKE(c2ieUni:ID) !List box control field - type derived from field
tpyBSO:Code LIKE(tpyBSO:Code) !List box control field - type derived from field
Uni:Code LIKE(Uni:Code) !List box control field - type derived from field
Uni:Name LIKE(Uni:Name) !List box control field - type derived from field
Uni:Name_Icon LONG !Entry's icon ID
c2ieUni:Hostility LIKE(c2ieUni:Hostility) !List box control field - type derived from field
tpyHstl:Code LIKE(tpyHstl:Code) !List box control field - type derived from field
_meta_c2ieUni:movedToOverlay LIKE(_meta_c2ieUni:movedToOverlay) !List box control field - type derived from field
c2ieUniPos:xPos LIKE(c2ieUniPos:xPos) !List box control field - type derived from field
c2ieUniPos:yPos LIKE(c2ieUniPos:yPos) !List box control field - type derived from field
c2ieUni:C2IE LIKE(c2ieUni:C2IE) !Browse key field - type derived from field
Uni:ID LIKE(Uni:ID) !Related join file key field - type derived from field
tpyBSO:ID LIKE(tpyBSO:ID) !Related join file key field - type derived from field
tpyHstl:ID LIKE(tpyHstl:ID) !Related join file key field - type derived from field
Mark BYTE !Entry's marked status
ViewPosition STRING(1024) !Entry's view position
END
BRW11::View:Browse VIEW(c2ieUnitsPositions)
PROJECT(c2ieUniPos:c2ieUnit)
PROJECT(c2ieUniPos:xPos)
PROJECT(c2ieUniPos:yPos)
PROJECT(c2ieUniPos:ID)
END
Queue:Browse:3 QUEUE !Queue declaration for browse/combo box using ?List:3
c2ieUniPos:c2ieUnit LIKE(c2ieUniPos:c2ieUnit) !List box control field - type derived from field
c2ieUniPos:xPos LIKE(c2ieUniPos:xPos) !List box control field - type derived from field
c2ieUniPos:yPos LIKE(c2ieUniPos:yPos) !List box control field - type derived from field
c2ieUniPos:ID LIKE(c2ieUniPos:ID) !Primary key field - type derived from field
Mark BYTE !Entry's marked status
ViewPosition STRING(1024) !Entry's view position
END
QuickWindow WINDOW('COP App'),AT(,,799,346),FONT('Microsoft Sans Serif',8,,FONT:regular,CHARSET:DEFAULT), |
RESIZE,CENTER,GRAY,IMM,MDI,HLP('OverlayEditorApp2'),SYSTEM
LIST,AT(10,30,130,124),USE(?Browse:1),HVSCROLL,FORMAT('0R(2)|M~ID~C(0)@n-10.0@0R(2)|M~C' & |
'2IP Pck~C(0)@n-10.0@0R(2)|M~ID~C(0)@n-10.0@[40R(2)|M~C2IE Type~C(0)@s20@100R(2)|M~C2' & |
'IE Name~C(0)@s100@]|~C2IE (Information Element)~'),FROM(Queue:Browse:1),IMM,MSG('Browsing t' & |
'he C2IPContent file')
BUTTON('&Insert'),AT(9,156,37,14),USE(?Insert:4),LEFT,FLAT,MSG('Insert a Record'),TIP('Insert a Record')
BUTTON('&Change'),AT(39,156,37,14),USE(?Change:4),LEFT,DEFAULT,FLAT,MSG('Change the Record'), |
TIP('Change the Record')
BUTTON('&Delete'),AT(79,156,36,14),USE(?Delete:4),LEFT,FLAT,MSG('Delete the Record'),TIP('Delete the Record')
LIST,AT(9,194,281,100),USE(?List),DECIMAL(12),HVSCROLL,FORMAT('[60L(2)|M~1stOrdEch~C(0)' & |
'@s20@60L(2)|M~1stOrdSubOrd~C(0)@s20@60L(2)|M~2ndOrdSubOrd~C(0)@s20@60L(2)|M~3rddOrdS' & |
'ubOrd~C(0)@s20@]|~TASKORG~'),FROM(Queue:Browse),IMM,VCR
BUTTON('Move to Overlay'),AT(369,280),USE(?BUTTON_MoveToOverlay)
LIST,AT(143,30,205,124),USE(?List:2),HVSCROLL,DRAGID('moveToOvrl'),FORMAT('0L(2)|M~ID~D' & |
'(12)@n-10.0@[40L(2)|M~BSO Type~C(0)@s20@40L(2)|M~BSO Code~C(0)@s20@80L(2)|MI~BSO Nam' & |
'e~C(0)@s100@0L(2)|M~Hostility~D(12)@n-10.0@]|~BSO~40L(2)|M~Hostility~C(0)@s20@0L(2)|' & |
'M~Moved~C(0)@n3@0L(2)|M~x Pos~D(12)@n-10.0@0L(2)|M~y Pos~D(12)@n-10.0@'),FROM(Queue:Browse:2), |
IMM,VCR
BUTTON('&Insert'),AT(144,158,42,12),USE(?Insert)
BUTTON('&Change'),AT(185,158,42,12),USE(?Change)
BUTTON('&Delete'),AT(228,158,42,12),USE(?Delete)
LIST,AT(353,30,82,124),USE(?List:3),DECIMAL(12),FORMAT('0L(2)|M~ID~D(12)@n-10.0@40L(2)|' & |
'M~xPos~C(0)@n-10.0@40L(2)|M~yPos~C(0)@n-10.0@'),FROM(Queue:Browse:3),IMM
BUTTON('&Insert'),AT(353,160,42,12),USE(?Insert:2)
BUTTON('&Change'),AT(353,170,42,12),USE(?Change:2)
BUTTON('&Delete'),AT(394,170,42,12),USE(?Delete:2)
BUTTON('Define Action'),AT(369,298),USE(?BUTTON1)
BUTTON('Action Properties'),AT(353,193),USE(?BUTTON_ActProp)
BUTTON('&Close'),AT(568,329,49,14),USE(?Close),LEFT,ICON('WACLOSE.ICO'),FLAT,MSG('Close Window'), |
TIP('Close Window')
BUTTON('&Help'),AT(621,329,49,14),USE(?Help),LEFT,ICON('WAHELP.ICO'),FLAT,MSG('See Help Window'), |
STD(STD:Help),TIP('See Help Window')
IMAGE,AT(442,2,355,322),USE(?Draw)
PROMPT('Name:'),AT(9,9),USE(?sCOPName:Prompt)
ENTRY(@s100),AT(50,8,385,10),USE(sCOPName),FONT(,,,FONT:regular)
REGION,AT(442,2,348,324),USE(?PANEL1),DROPID('moveToOvrl'),IMM
BUTTON('compute COPBSOs'),AT(9,298),USE(?BUTTON2)
END
ThisWindow CLASS(WindowManager)
Init PROCEDURE(),BYTE,PROC,DERIVED
Kill PROCEDURE(),BYTE,PROC,DERIVED
Run PROCEDURE(USHORT Number,BYTE Request),BYTE,PROC,DERIVED
TakeAccepted PROCEDURE(),BYTE,PROC,DERIVED
TakeFieldEvent PROCEDURE(),BYTE,PROC,DERIVED
END
Toolbar ToolbarClass
BRWC2IPContent CLASS(BrowseClass) ! Browse using ?Browse:1
Q &Queue:Browse:1 !Reference to browse queue
Init PROCEDURE(SIGNED ListBox,*STRING Posit,VIEW V,QUEUE Q,RelationManager RM,WindowManager WM)
TakeNewSelection PROCEDURE(),DERIVED
END
BRW1::Sort0:Locator StepLocatorClass ! Default Locator
BRW1::Sort0:StepClass StepRealClass ! Default Step Manager
BRWC2IETaskorg CLASS(BrowseClass) ! Browse using ?List
Q &Queue:Browse !Reference to browse queue
END
BRW9::Sort0:Locator StepLocatorClass ! Default Locator
BRWC2IEBSOs CLASS(BrowseClass) ! Browse using ?List:2
Q &Queue:Browse:2 !Reference to browse queue
Init PROCEDURE(SIGNED ListBox,*STRING Posit,VIEW V,QUEUE Q,RelationManager RM,WindowManager WM)
SetQueueRecord PROCEDURE(),DERIVED
TakeNewSelection PROCEDURE(),DERIVED
END
BRW10::Sort0:Locator StepLocatorClass ! Default Locator
BRWBOSPos CLASS(BrowseClass) ! Browse using ?List:3
Q &Queue:Browse:3 !Reference to browse queue
Init PROCEDURE(SIGNED ListBox,*STRING Posit,VIEW V,QUEUE Q,RelationManager RM,WindowManager WM)
END
BRW11::Sort0:Locator StepLocatorClass ! Default Locator
BRW10::EIPManager BrowseEIPManager ! Browse EIP Manager for Browse using ?List:2
EditInPlace::c2ieUni:ID EditEntryClass ! Edit-in-place class for field c2ieUni:ID
EditInPlace::tpyBSO:Code EditEntryClass ! Edit-in-place class for field tpyBSO:Code
EditInPlace::Uni:Code EditEntryClass ! Edit-in-place class for field Uni:Code
EditInPlace::Uni:Name EditEntryClass ! Edit-in-place class for field Uni:Name
EditInPlace::c2ieUni:Hostility EditEntryClass ! Edit-in-place class for field c2ieUni:Hostility
EditInPlace::tpyHstl:Code EditEntryClass ! Edit-in-place class for field tpyHstl:Code
EditInPlace::_meta_c2ieUni:movedToOverlay EditEntryClass ! Edit-in-place class for field _meta_c2ieUni:movedToOverlay
EditInPlace::c2ieUniPos:xPos EditEntryClass ! Edit-in-place class for field c2ieUniPos:xPos
EditInPlace::c2ieUniPos:yPos EditEntryClass ! Edit-in-place class for field c2ieUniPos:yPos
BRW11::EIPManager BrowseEIPManager ! Browse EIP Manager for Browse using ?List:3
EditInPlace::c2ieUniPos:c2ieUnit EditEntryClass ! Edit-in-place class for field c2ieUniPos:c2ieUnit
EditInPlace::c2ieUniPos:xPos EditEntryClass ! Edit-in-place class for field c2ieUniPos:xPos
EditInPlace::c2ieUniPos:yPos EditEntryClass ! Edit-in-place class for field c2ieUniPos:yPos
Resizer CLASS(WindowResizeClass)
Init PROCEDURE(BYTE AppStrategy=AppStrategy:Resize,BYTE SetWindowMinSize=False,BYTE SetWindowMaxSize=False)
END
! ----- DrwOverlay --------------------------------------------------------------------------
DrwOverlay Class(Draw)
! derived method declarations
End ! DrwOverlay
! ----- end DrwOverlay -----------------------------------------------------------------------
CODE
GlobalResponse = ThisWindow.Run() ! Opens the window and starts an Accept Loop
!---------------------------------------------------------------------------
DefineListboxStyle ROUTINE
!|
!| This routine create all the styles to be shared in this window
!| It`s called after the window open
!|
!---------------------------------------------------------------------------
_newCOPC2IP ROUTINE
DATA
CODE
IF LEN(CLIP(sCOPName))>0 THEN
! Create default OVERLAY C2IE
Access:_C2IEs.PrimeAutoInc()
nC2IERef = _C2IE:ID
tpyC2IE:Code = 'OVERLAY'
IF Access:type_C2IE.Fetch(tpyC2IE:KCode) = Level:Benign THEN
_C2IE:Type = tpyC2IE:ID
END
_C2IE:Name = sCOPName
IF Access:_C2IEs.TryInsert() = Level:Benign THEN
! Create COP C2IP
Access:_C2IPs.PrimeAutoInc()
nC2IPRef = _C2IP:ID
selC2IPRef = nC2IPRef
tpyC2IP:Code = 'COP'
IF Access:type_C2IP.Fetch(tpyC2IP:KCode) = Level:Benign THEN
_C2IP:Type = tpyC2IP:ID
END
_C2IP:Name = sCOPName
IF Access:_C2IPs.TryInsert() = Level:Benign THEN
! Create association C2IP - C2IE
Access:_C2IPContent.PrimeAutoInc()
_C2IPCt:C2IPPackage = nC2IPRef
_C2IPCt:C2IEInstance = nC2IERef
IF Access:_C2IPContent.TryInsert() = Level:Benign THEN
!MESSAGE('COP created')
! Add the new C2IP to the current C2IP Explorer
Access:C2IPExplorer.PrimeAutoInc()
C2IPExp:Organization = pOrgRef
C2IPExp:C2IP = nC2IPRef
C2IPExp:Mission = pMissionRef
IF Access:C2IPExplorer.TryInsert() = Level:Benign THEN
!MESSAGE('C2IP COP created')
END
END
END
END
END
EXIT
_attachTASKORGC2IP ROUTINE
DATA
CODE
! attach TASKORG C2IP
Access:_C2IPContent.PrimeAutoInc()
_C2IPCt:C2IPPackage = nC2IPRef
! reference C2IE associated to the C2iP
C2IPCt:C2IPPackage = pTASKORGC2IPRef
IF Access:C2IPContent.TryFetch(C2IPCt:KC2IP) = Level:Benign THEN
_C2IPCt:C2IEInstance = C2IPCt:C2IEInstance
END
IF Access:_C2IPContent.TryInsert() = Level:Benign THEN
!MESSAGE('COP created')
END
EXIT
_drawUnits ROUTINE
DATA
CODE
DrwOverlay.Blank(COLOR:White)
DrwOverlay.Display()
! loop C2IP Content (list of C2IEs)
SET(_C2IPContent)
LOOP
IF Access:_C2IPContent.Next() = Level:Benign THEN
IF _C2IPCt:C2IPPackage = selC2IPRef THEN
selC2IERef = _C2IPCt:C2IEInstance
! Determine C2IE type
! Locate C2IE in C2IEs table and find out C2IE type
_C2IE:ID = _C2IPCt:C2IEInstance
IF Access:_C2IEs.TryFetch(_C2IE:PKID) = Level:Benign THEN
! Evaluate C2IE type
! Locate C2IE type in type_C2IE table
tpyC2IE:ID = _C2IE:Type
IF Access:type_C2IE.TryFetch(tpyC2IE:PKID) = Level:Benign THEN
sC2IETypeCode= tpyC2IE:Code
CASE tpyC2IE:Code
OF 'OVERLAY'
! Computer the number of Overlays
IF nOvrlRef < 20 THEN
! increase the C2IE references (of type OVERLAY)
nOvrlRef = nOvrlRef + 1
vOvrlRef[nOvrlRef] = _C2IE:ID
END
! Add C2IE Name to Options Menu
IF LEN(CLIP(sMoveToOvrlOptMenu))<>0 THEN
sMoveToOvrlOptMenu = CLIP(sMoveToOvrlOptMenu) & '|' & CLIP(_C2IE:Name)
ELSE
sMoveToOvrlOptMenu = CLIP(_C2IE:Name)
END
OF 'TASKORG'
OF 'COP'
ELSE
END
END
END
! loop C2IE Units (list of Units/list of BSOs)
SET(_c2ieUnits)
LOOP
IF Access:_c2ieUnits.Next() = Level:Benign THEN
IF _c2ieUni:C2IE = selC2IERef THEN
! Display BSO code/short name
! Determine BSO type code
! Determine BSO hostility code
! Determine BSO Hostility code
tpyHstl:ID = _c2ieUni:Hostility
IF Access:type_Hostility.TryFetch(tpyHstl:PKID) = Level:Benign THEN
sBSOHostilityCode = CLIP(tpyHstl:Code)
END
! look for BSO in the BSO table
_Uni:ID = _c2ieUni:Unit
IF Access:_Units.TryFetch(_Uni:PKID) = Level:Benign THEN
! BSO found
! Determine BSO code/short name
sBSOCode = _Uni:Code
!DrwOverlay.Show(_c2ieUniPos:xPos + 5, _c2ieUniPos:yPos + 11, _Uni:Code)
!MESSAGE('found ' & _Uni:Code)
! Determine BSO type code / Unit/Actions/Tactical graphics, aso
tpyBSO:ID = _Uni:BSOType
IF Access:type_BSO.TryFetch(tpyBSO:PKID) = Level:Benign THEN
sBSOTypeCode = CLIP(tpyBSO:Code)
END
END
! Determine positions
_c2ieUniPos:c2ieUnit = _c2ieUni:ID
IF Access:_c2ieUnitsPositions.TryFetch(_c2ieUniPos:Kc2ieUnit) = Level:Benign THEN
! Draw depending on the BSO Type
CASE CLIP(sBSOTypeCode)
OF 'Unit'
! Draw depending on the BSO used Hostility
! Check hostility
CASE CLIP(sBSOHostilityCode)
OF 'Friendly'
!Friendly
DrwOverlay.Box(_c2ieUniPos:xPos, _c2ieUniPos:yPos, 50, 30, COLOR:Aqua)
! Draw BSO Name
DrwOverlay.Show(_c2ieUniPos:xPos + 5, _c2ieUniPos:yPos + 11, sBSOCode)
OF 'Enemy'
!Enemy
DrwOverlay.Box(_c2ieUniPos:xPos, _c2ieUniPos:yPos, 50, 30, COLOR:Red)
! Draw BSO Name
DrwOverlay.Show(_c2ieUniPos:xPos + 5, _c2ieUniPos:yPos + 11, sBSOCode)
ELSE
!Default friendly
DrwOverlay.Box(_c2ieUniPos:xPos, _c2ieUniPos:yPos, 50, 30, COLOR:Aqua)
! Draw BSO Name
DrwOverlay.Show(_c2ieUniPos:xPos + 5, _c2ieUniPos:yPos + 11, sBSOCode)
END
OF 'Action'
! Determine Action type - TBD
! Determine Action Drawing Positions
_FillActionVectorPositions(_c2ieUniPos:xPos, _c2ieUniPos:yPos, vActPoints)
CASE CLIP(sBSOHostilityCode)
OF 'Friendly'
! Friendly
DrwOverlay.Polygon(vActPoints, COLOR:Aqua, 7)
! Draw BSO Name
DrwOverlay.Show(_c2ieUniPos:xPos + 5, _c2ieUniPos:yPos + 11, sBSOCode)
OF 'Enemy'
! Enemy
DrwOverlay.Polygon(vActPoints, COLOR:Red, 7)
! Draw BSO Name
DrwOverlay.Show(_c2ieUniPos:xPos + 5, _c2ieUniPos:yPos + 11, sBSOCode)
ELSE
! default Friendly
DrwOverlay.Polygon(vActPoints, COLOR:Aqua, 7)
! Draw BSO Name
DrwOverlay.Show(_c2ieUniPos:xPos + 5, _c2ieUniPos:yPos + 11, sBSOCode)
END
OF 'TactGraph'
! Draw depending on the BSO used Hostility
! Check hostility
CASE CLIP(sBSOHostilityCode)
OF 'Friendly'
!Friendly
DrwOverlay.Ellipse(_c2ieUniPos:xPos, _c2ieUniPos:yPos, 50, 30, COLOR:Aqua)
! Draw BSO Name
DrwOverlay.Show(_c2ieUniPos:xPos + 5, _c2ieUniPos:yPos + 11, sBSOCode)
OF 'Enemy'
!Enemy
DrwOverlay.Ellipse(_c2ieUniPos:xPos, _c2ieUniPos:yPos, 50, 30, COLOR:Red)
! Draw BSO Name
DrwOverlay.Show(_c2ieUniPos:xPos + 5, _c2ieUniPos:yPos + 11, sBSOCode)
ELSE
!Default friendly
DrwOverlay.Ellipse(_c2ieUniPos:xPos, _c2ieUniPos:yPos, 50, 30, COLOR:Aqua)
! Draw BSO Name
DrwOverlay.Show(_c2ieUniPos:xPos + 5, _c2ieUniPos:yPos + 11, sBSOCode)
END
END
END
END
ELSE
BREAK
END
END
END
ELSE
BREAK
END
END
DrwOverlay.Display()
EXIT