Merged PR 16672: updated 5S form and PM History form to fit longer descriptions
updated 5S form and PM History form to fit longer descriptions Related work items: #110769
This commit is contained in:
@ -1,8 +1,38 @@
|
||||
Compile function NDW_5S_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : NDW_5S_Events
|
||||
|
||||
Description : This function acts as a commuter module for all events related to this window.
|
||||
|
||||
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||
limited to the events which are currently promoted.
|
||||
|
||||
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||
formatted like this:
|
||||
|
||||
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||
|
||||
Parameters :
|
||||
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||
Param1-15 [in] -- Additional event parameter holders
|
||||
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||
EVENT_SETUP insert
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
05/14/2025 djs Modified edit table properties to fit longer descriptions
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_5S
|
||||
|
||||
|
||||
$Insert EVENT_SETUP
|
||||
$Insert APP_INSERTS
|
||||
$Insert PM_SPEC_EQUATES
|
||||
$Insert PM_EQUATES
|
||||
@ -21,7 +51,6 @@ EQU COL$SCHED_START TO 5
|
||||
EQU COL$LATE_START TO 6
|
||||
EQU COL$ACTION TO 7
|
||||
|
||||
|
||||
// Form colors
|
||||
EQU RED$FIVES TO '5924072'
|
||||
EQU GREEN$FIVES TO '7596927'
|
||||
@ -34,11 +63,11 @@ If Event EQ 'OLE' then
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
* Transfer Param4 to Param3
|
||||
* Transfer Param5 to Param4
|
||||
* Transfer Param6 to Param5
|
||||
* Transfer Param7 to Param6
|
||||
* Transfer Param8 to Param7
|
||||
Transfer Param4 to Param3
|
||||
Transfer Param5 to Param4
|
||||
Transfer Param6 to Param5
|
||||
Transfer Param7 to Param6
|
||||
Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
@ -79,8 +108,11 @@ Event CHK_ARCHIVED.CLICK()
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event CMB_AREA.CHANGED(NewData)
|
||||
|
||||
GoSub GetKeys
|
||||
|
||||
end event
|
||||
|
||||
|
||||
@ -144,9 +176,9 @@ Event EDT_5S_TABLE.OnButtonClick(Cell, Point, Button, Shift, Ctrl)
|
||||
GoSub GetKeys
|
||||
end
|
||||
Case ColClicked EQ COL$PM_ID
|
||||
|
||||
Null
|
||||
Case Otherwise$
|
||||
|
||||
Null
|
||||
End Case
|
||||
|
||||
end event
|
||||
@ -169,20 +201,12 @@ Event EDT_5S_TABLE.OnDblClick(Cell, Point, Button, Shift, Ctrl)
|
||||
|
||||
Start_Window('NDW_PM_HISTORY', @Window, PMSID)
|
||||
Case Otherwise$
|
||||
|
||||
Null
|
||||
End Case
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event EDT_5S_TABLE.OnLostFocus()
|
||||
|
||||
//Set_Property(@Window : '.EDT_SEL_ROW', 'TEXT', ''); *Clear out selected row.
|
||||
//Set_Property(@Window : '.PUB_VIEW_SELECTED', 'ENABLED', 0)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_ADD_NEW_PM_SPEC.CLICK()
|
||||
|
||||
Start_Window('PM_SPEC', @Window, '')
|
||||
@ -217,11 +241,12 @@ end event
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
GetKeys:
|
||||
|
||||
ShowArchived = Get_Property(@Window : '.CHK_ARCHIVED', 'CHECK')
|
||||
SelectedArea = Get_Property(@Window : '.CMB_AREA', 'TEXT')
|
||||
|
||||
FiveSPMKeys = Pm_Services('Get5SPMs', ShowArchived, SelectedArea)
|
||||
|
||||
|
||||
FormatData:
|
||||
|
||||
TableData = ''
|
||||
@ -250,17 +275,17 @@ FormatData:
|
||||
TableData<tPos, COL$LATE_START> = LateStarts
|
||||
Next PMKey
|
||||
|
||||
|
||||
PopulateTable:
|
||||
|
||||
EdtTableCtrl = @Window : '.EDT_5S_TABLE'
|
||||
TableData = SRP_Array("Rotate", TableData)
|
||||
Set_Property(EdtTableCtrl, "OLE.ARRAY", TableData)
|
||||
//Set last column in row to a PUB
|
||||
// Set last column in row to a PUB
|
||||
Set_Property(EdtTableCtrl, "OLE.CellType[7; ALL]", "Push Button")
|
||||
Set_Property(EdtTableCtrl, "OLE.CellText[7; ALL]", "Click To Complete")
|
||||
Set_Property(EdtTableCtrl, "OLE.CellImage[7; ALL]", 1)
|
||||
|
||||
//Get All Cell Settings
|
||||
// Get All Cell Settings
|
||||
ColumnSettings = Get_Property(EdtTableCtrl, "OLE.CellType[3; ALL]")
|
||||
ColumnSettings<2,3> = 0; *Turns off data from cell 7 of each row.
|
||||
Set_Property(EdtTableCtrl, "OLE.CellType[7; ALL]", ColumnSettings)
|
||||
@ -268,7 +293,7 @@ PopulateTable:
|
||||
|
||||
ColorCodeRows:
|
||||
|
||||
//Here we color code all the rows based on whether they're not due, due, or overdue.
|
||||
// Here we color code all the rows based on whether they're not due, due, or overdue.
|
||||
TableData = Get_Property(EdtTableCtrl, "OLE.ARRAY")
|
||||
TableData = SRP_Array('Rotate', TableData)
|
||||
CurrDTM = SRP_Datetime('Now')
|
||||
@ -318,7 +343,6 @@ SetupForm:
|
||||
Set_Property(@Window : '.PUB_ADD_NEW_PM_SPEC', 'VISIBLE', 0)
|
||||
Set_Property(@Window : '.PUB_VIEW_SELECTED', 'VISIBLE', 0)
|
||||
end
|
||||
|
||||
Set_Property(@Window : '.PUB_VIEW_SELECTED', 'ENABLED', 0)
|
||||
|
||||
return
|
||||
@ -327,51 +351,44 @@ return
|
||||
Setup_OLE_Controls:
|
||||
|
||||
EdtTableCtrl = @Window : '.EDT_5S_TABLE'
|
||||
//Row Selection Settings
|
||||
// Row Selection Settings
|
||||
RowSelArray = Get_Property(EdtTableCtrl, "OLE.SelectionStyle")
|
||||
RowSelArray<7> = 'Header'
|
||||
RowSelArray<8> = True$;*Always show row selection
|
||||
Set_Property(EdtTableCtrl, "OLE.SelectionStyle", RowSelArray)
|
||||
Set_Property(EdtTableCtrl, 'OLE.Redraw', False$)
|
||||
//Set up columns
|
||||
// Set up columns
|
||||
Set_Property(EdtTableCtrl, "OLE.Dimension", 7);*Define number of columns
|
||||
|
||||
HeaderTitles = 'PM ID':@VM:'Desc':@VM:'Last PM':@VM:'Early Start':@VM:'Sched Start':@VM:'Late Start':@VM:'Action'; *Define the column header titles
|
||||
Set_Property(EdtTableCtrl, "OLE.TitleList", HeaderTitles); *Set the column titles
|
||||
|
||||
//Set the column Sizes
|
||||
// Set the column Sizes
|
||||
Set_Property(EdtTableCtrl, "OLE.HeaderColumn[1]", '':@FM:False$)
|
||||
ColSize = Get_Property(EdtTableCtrl, "OLE.DataColumn[1]")
|
||||
|
||||
//Column 1
|
||||
// Column 1
|
||||
ColSize<1> = 45
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$PM_ID:"]", ColSize)
|
||||
|
||||
//Column 2
|
||||
ColSize<1> = 160
|
||||
//ColSize<4> = True$
|
||||
// Column 2
|
||||
ColSize<1> = 200
|
||||
ColSize<4> = True$
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$DESC:"]", ColSize)
|
||||
//Set_Property(Ctrl, "OLE.DataColumn[":COL$ELAP_HRS:"]", ColSize)
|
||||
|
||||
//Column 3
|
||||
ColSize<4> = False$
|
||||
// Column 3
|
||||
ColSize<1> = 110
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$LAST_PM:"]", ColSize)
|
||||
|
||||
//Column 4
|
||||
// Column 4
|
||||
ColSize<1> = 110
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$EARLY_START:"]", ColSize)
|
||||
|
||||
//Column 5
|
||||
// Column 5
|
||||
ColSize<1> = 110
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$SCHED_START:"]", ColSize)
|
||||
|
||||
//Column 6
|
||||
ColSize<1> = 110
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$LATE_START:"]", ColSize)
|
||||
|
||||
//Column 7
|
||||
ColSize<1> = 110
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$ACTION:"]", ColSize)
|
||||
|
||||
Set_Property(EdtTableCtrl, 'OLE.Border', 'XP Flat')
|
||||
Set_Property(EdtTableCtrl, 'OLE.Font', 'Segoe UI' : @SVM : '15')
|
||||
Set_Property(EdtTableCtrl, "OLE.CellProtection[All; All]", 'RO')
|
||||
@ -388,5 +405,3 @@ Setup_OLE_Controls:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user