Subversion Repositories DevTools

Rev

Rev 5513 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5513 Rev 5836
Line 40... Line 40...
40
	Private InxActive
40
	Private InxActive
41
	Private InxVisible
41
	Private InxVisible
42
	
42
	
43
	
43
	
44
	
44
	
45
	
-
 
46
	Public Property Let AllVisible ( cVal )
45
	Public Property Let AllVisible ( cVal )
47
		If cVal = enumDB_YES Then
46
		If cVal = enumDB_YES Then
48
			mbHideAll = FALSE
47
			mbHideAll = FALSE
49
		Else
48
		Else
50
			mbHideAll = TRUE
49
			mbHideAll = TRUE
Line 335... Line 334...
335
	Public Sub Visible ( sItemName, Value )
334
	Public Sub Visible ( sItemName, Value )
336
		' Y = show, N = hide
335
		' Y = show, N = hide
337
		Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxVisible, Value )
336
		Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxVisible, Value )
338
	End Sub
337
	End Sub
339
	'-----------------------------------------------------------------------------------------------------------------
338
	'-----------------------------------------------------------------------------------------------------------------
-
 
339
    ' Load one row of data
-
 
340
    '   Is a bit round about as this replaces code that was read from the database
-
 
341
    Private Sub LoadRow(aData)
-
 
342
        Dim newArrayDim, nProperty
-
 
343
 
-
 
344
		' Increase array by 1
-
 
345
		newArrayDim = LastItemInx() + 1
-
 
346
		ReDim Preserve mArrPopupMenuDef( mNumOfItemProperties, newArrayDim )
-
 
347
			
-
 
348
		mobjNameDefMap.Add ( Cstr( aData ( InxdbName ) ) ), CStr( newArrayDim )
-
 
349
			
-
 
350
        For nProperty = 0 To mLastItemPropertyInx
-
 
351
            If (nProperty = InxLink) OR (nProperty = InxEventHandler) Then
-
 
352
                ' Link And EventHandlers need to be evaluated
-
 
353
                mArrPopupMenuDef ( nProperty, newArrayDim ) = Eval ( aData ( nProperty ) )
-
 
354
            Else
-
 
355
                mArrPopupMenuDef ( nProperty, newArrayDim ) = aData ( nProperty )
-
 
356
            End If
-
 
357
        Next
-
 
358
    End Sub
-
 
359
 
-
 
360
	'-----------------------------------------------------------------------------------------------------------------
-
 
361
    '   Generate data - instead of reading it from a database
-
 
362
    '   Generate it one row (array) at a time
-
 
363
    '   Array contents need to match the Inx* indexes defined in this class
-
 
364
    Private Sub GenerateData()
-
 
365
 
-
 
366
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
367
                    "1",_
-
 
368
					"pmiNewBom",_
-
 
369
					"New...",_
-
 
370
					"""javascript:go_submit( document.FormState""& StateId &"", """"pmiNewBom"""" );ShowProgress();""",_
-
 
371
					null,_
-
 
372
					null,_
-
 
373
					null,_
-
 
374
					"Create New BOM...",_
-
 
375
					"Y",_
-
 
376
					"Y" )
-
 
377
 
-
 
378
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
379
                    "2",_
-
 
380
					"pmiBomProperties",_
-
 
381
					"BOM Properties",_
-
 
382
					"""#""",_
-
 
383
					null,_
-
 
384
					null,_
-
 
385
					null,_
-
 
386
					null,_
-
 
387
					"Y",_
-
 
388
					"Y" )
-
 
389
 
-
 
390
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
391
                    "3",_
-
 
392
					"pmiAcceptBom",_
-
 
393
					"Accept",_
-
 
394
					"""javascript:go_submit( document.FormState""& StateId &"", """"pmiAcceptBom"""" );ShowProgress();""",_
-
 
395
					null,_
-
 
396
					"icons/mi_accept.gif",_
-
 
397
					"icons/mi_accept.gif",_
-
 
398
					"Accept BOM",_
-
 
399
					"Y",_
-
 
400
					"Y" )
-
 
401
 
-
 
402
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
403
                    "4",_
-
 
404
					"pmiRejectBom",_
-
 
405
					"Reject",_
-
 
406
					"""javascript:go_submit( document.FormState""& StateId &"", """"pmiRejectBom"""" );ShowProgress();""",_
-
 
407
					null,_
-
 
408
					"icons/mi_reject.gif",_
-
 
409
					"icons/mi_reject.gif",_
-
 
410
					"Reject BOM",_
-
 
411
					"Y",_
-
 
412
					"Y" )
-
 
413
 
-
 
414
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
415
                    "5",_
-
 
416
					"pmiReleaseTo",_
-
 
417
					"Release To...",_
-
 
418
					"""javascript:go_submit( document.FormState""& StateId &"", """"pmiReleaseTo"""" );ShowProgress();""",_
-
 
419
					null,_
-
 
420
					"icons/mi_release_to.gif",_
-
 
421
					"icons/mi_release_to.gif",_
-
 
422
					null,_
-
 
423
					"Y",_
-
 
424
					"Y" )
-
 
425
 
-
 
426
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
427
                    "6",_
-
 
428
					"pmiDestroyBom",_
-
 
429
					"Destroy BOM",_
-
 
430
					"""javascript:go_submit( document.FormState""& StateId &"", """"btnDestroyBom"""" );ShowProgress();""",_
-
 
431
					"""onClick=""""return confirmAction('Destroy selected BOM?');""""""",_
-
 
432
					"icons/mi_destroy.gif",_
-
 
433
					"icons/mi_destroy.gif",_
-
 
434
					null,_
-
 
435
					"Y",_
-
 
436
					"Y" )
-
 
437
 
-
 
438
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
439
                    "7",_
-
 
440
					"pmiImportExportBom",_
-
 
441
					"Import and Export...",_
-
 
442
					"""#""",_
-
 
443
					null,_
-
 
444
					null,_
-
 
445
					null,_
-
 
446
					null,_
-
 
447
					"Y",_
-
 
448
					"Y" )
-
 
449
 
-
 
450
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
451
                    "8",_
-
 
452
					"pmiShowHideBom",_
-
 
453
					"Show and Hide...",_
-
 
454
					"""#""",_
-
 
455
					null,_
-
 
456
					null,_
-
 
457
					null,_
-
 
458
					null,_
-
 
459
					"Y",_
-
 
460
					"Y" )
-
 
461
 
-
 
462
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
463
                    "9",_
-
 
464
					"pmiLockBom",_
-
 
465
					"Protect...",_
-
 
466
					"""javascript:go_submit( document.FormState""& StateId &"", """"pmiLockBom"""" );ShowProgress();""",_
-
 
467
					"""onClick=""""return confirmAction('Protecting the BOM will prevent further changes?');""""""",_
-
 
468
					null,_
-
 
469
					null,_
-
 
470
					"Locking the BOM will prevent further changes",_
-
 
471
					"Y",_
-
 
472
					"Y" )
-
 
473
 
-
 
474
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
475
                    "10",_
-
 
476
					"pmiUnlockBom",_
-
 
477
					"Unprotect...",_
-
 
478
					"""javascript:go_submit( document.FormState""& StateId &"", """"pmiUnlockBom"""" );ShowProgress();""",_
-
 
479
					"""onClick=""""return confirmAction('Unprotecting the BOM will allow changes?');""""""",_
-
 
480
					null,_
-
 
481
					null,_
-
 
482
					null,_
-
 
483
					"Y",_
-
 
484
					"Y" )
-
 
485
 
-
 
486
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
487
                    "13",_
-
 
488
					"pmiVersionTree",_
-
 
489
					"Version Tree",_
-
 
490
					"""javascript:go_submit( document.FormState""& StateId &"", """"pmiVersionTree"""" );ShowProgress();""",_
-
 
491
					null,_
-
 
492
					null,_
-
 
493
					null,_
-
 
494
					null,_
-
 
495
					"Y",_
-
 
496
					"Y" )
-
 
497
 
-
 
498
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
499
                    "14",_
-
 
500
					"pmiToProduction",_
-
 
501
					"To Production Manager...",_
-
 
502
					"""javascript:go_submit( document.FormState""& StateId &"", """"pmiToProduction"""" );ShowProgress();""",_
-
 
503
					null,_
-
 
504
					null,_
-
 
505
					null,_
-
 
506
					null,_
-
 
507
					"Y",_
-
 
508
					"Y" )
-
 
509
 
-
 
510
        LoadRow Array( "DEF_MENU_ITEMS",_
-
 
511
                    "15",_
-
 
512
					"pmiUnDeployView",_
-
 
513
					"View",_
-
 
514
					"""javascript:go_submit( document.FormState""& StateId &"", """"pmiUnDeployView"""" );ShowProgress();""",_
-
 
515
					null,_
-
 
516
					"icons/btn_sync.gif",_
-
 
517
					"icons/btn_sync_off.gif",_
-
 
518
					null,_
-
 
519
					"Y",_
-
 
520
					"Y" )
-
 
521
 
-
 
522
    End Sub
-
 
523
	'-----------------------------------------------------------------------------------------------------------------
340
	Private Sub Class_Initialize()
524
	Private Sub Class_Initialize()
341
		'// Perform action on creation of object. e.g. Set myObj = New ThisClassName
525
		'// Perform action on creation of object. e.g. Set myObj = New ThisClassName
342
		Set mobjNameDefMap = CreateObject("Scripting.Dictionary")
526
		Set mobjNameDefMap = CreateObject("Scripting.Dictionary")
343
		Set mobjIdDefMap = CreateObject("Scripting.Dictionary")
527
		Set mobjIdDefMap = CreateObject("Scripting.Dictionary")
344
		Set mobjSeparator = CreateObject("Scripting.Dictionary")
528
		Set mobjSeparator = CreateObject("Scripting.Dictionary")
Line 362... Line 546...
362
		InxImgOff				= 7
546
		InxImgOff				= 7
363
		InxHint					= 8
547
		InxHint					= 8
364
		InxVisible				= 9
548
		InxVisible				= 9
365
		InxActive				= 10
549
		InxActive				= 10
366
		
550
		
-
 
551
        Call GenerateData
367
		
552
 
368
	End Sub
553
	End Sub
369
	'-----------------------------------------------------------------------------------------------------------------
554
	'-----------------------------------------------------------------------------------------------------------------
370
	Private Sub Class_Terminate()
555
	Private Sub Class_Terminate()
371
		'// Perform action on object disposal. e.g. Set myObj = Nothing
556
		'// Perform action on object disposal. e.g. Set myObj = Nothing
372
		Set mobjNameDefMap = Nothing
557
		Set mobjNameDefMap = Nothing