added LSL2 stored procedures
This commit is contained in:
139
LSL2/STPROC/CHART_TEST.txt
Normal file
139
LSL2/STPROC/CHART_TEST.txt
Normal file
@ -0,0 +1,139 @@
|
||||
COMPILE FUNCTION Chart_Test(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5)
|
||||
|
||||
/*
|
||||
Commuter module for Chart_Test collector window
|
||||
|
||||
11/17/2009 - John C. Henry, J.C. Henry & Co., Inc.
|
||||
*/
|
||||
|
||||
DECLARE SUBROUTINE Set_Property, End_Dialog, Send_Event, Set_Status, Center_Window, Post_Event
|
||||
DECLARE SUBROUTINE ErrMsg, Send_Message, Set_Property, Send_Event, obj_Appwindow
|
||||
DECLARE SUBROUTINE obj_Notes, Security_Err_Msg, End_Window, Start_Window, Create_Note
|
||||
|
||||
DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Notes_Comm
|
||||
DECLARE FUNCTION Send_Message, Msg, Security_Check
|
||||
|
||||
|
||||
|
||||
$INSERT MSG_EQUATES
|
||||
$INSERT APPCOLORS
|
||||
$INSERT LOGICAL
|
||||
|
||||
EQU CRLF$ TO \0D0A\
|
||||
EQU TAB$ TO \09\
|
||||
|
||||
|
||||
|
||||
|
||||
ErrTitle = 'Error in Chart_Test commuter'
|
||||
ErrorMsg = ''
|
||||
|
||||
Result = ''
|
||||
|
||||
|
||||
BEGIN CASE
|
||||
CASE EntID = @WINDOW
|
||||
BEGIN CASE
|
||||
|
||||
CASE Event = 'CREATE' ; GOSUB Create
|
||||
|
||||
END CASE
|
||||
|
||||
CASE EntID = 'NOTES_ATTACH.SAVE_BUTTON' AND Event = 'CLICK' ; GOSUB Save
|
||||
|
||||
CASE 1
|
||||
ErrorMsg = 'Unknown Parameters ':EntID:' - ':Event:' passed to commuter'
|
||||
ErrMsg(ErrorMsg)
|
||||
|
||||
END CASE
|
||||
|
||||
IF ErrorMsg NE '' THEN
|
||||
ErrMsg(ErrTitle:@SVM:ErrorMsg)
|
||||
END
|
||||
|
||||
RETURN Result
|
||||
|
||||
|
||||
|
||||
* * * * * * *
|
||||
Create:
|
||||
* * * * * * *
|
||||
|
||||
|
||||
obj_Appwindow('Create',@WINDOW)
|
||||
|
||||
DEBUG
|
||||
|
||||
hChart = @WINDOW:'.CHART'
|
||||
|
||||
strResult = Send_Message(hChart,'Clear')
|
||||
|
||||
c = Get_Property(hChart,'Constants')
|
||||
|
||||
Charts = Get_Property(hChart,'Charts')
|
||||
|
||||
|
||||
Chart = Send_Message(hChart,'Add')
|
||||
|
||||
chChartTypeColumnClustered = Get_Property(c,'chChartTypeColumnClustered')
|
||||
|
||||
|
||||
Set_Property(Chart,'Type',chChartTypeColumnClustered)
|
||||
Set_Property(Chart,'HasLegend',TRUE$)
|
||||
|
||||
Status = OleStatus() ; IF Status THEN DEBUG
|
||||
|
||||
|
||||
Set_Property(Chart,'HasTitle',TRUE$)
|
||||
Title = Get_Property(Chart,'Title')
|
||||
|
||||
Set_Property(Title,'Caption','Random Walk ':TimeDate() )
|
||||
|
||||
|
||||
SeriesCollection = Get_Property(Chart,'SeriesCollection')
|
||||
|
||||
|
||||
FOR I = 1 TO 4
|
||||
Series = Send_Message(SeriesCollection,'Add')
|
||||
|
||||
Set_Property(Series,'Caption','Q':I)
|
||||
|
||||
Categories = ''
|
||||
Vals = ''
|
||||
|
||||
FOR J = 1 TO 5
|
||||
Categories<J> = 'Region ':J
|
||||
Vals<J> = RND(100)
|
||||
NEXT J
|
||||
|
||||
CONVERT @FM TO TAB$ IN Categories
|
||||
CONVERT @FM TO TAB$ IN Vals
|
||||
|
||||
chDimCategories = Get_Property(c,'chDimCategories')
|
||||
chDimValues = Get_Property(c,'chDimValues')
|
||||
chDimDataLiteral = Get_Property(c,'chDataLiteral')
|
||||
|
||||
|
||||
x = Send_Message(Series,'SetData',chDimCategories,chDimDataLiteral,Categories)
|
||||
x = Send_Message(Series,'SetData',chDimValues,chDimDataLiteral,Vals)
|
||||
|
||||
|
||||
NEXT I
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
* * * * * * *
|
||||
Save:
|
||||
* * * * * * *
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user