FUNCTION TestCJCalendar( nMode ) LOCAL oCal, oDialogs, oResource, oResources, oResourceManager, oDPTheme, oCalTheme
#IFDEF MYOCX LOCAL cLicCalendar := ; "Calendar Control Copyright (c) 2003-2009 Codejock Software"+ Chr(13)+Chr(10) +; "PRODUCT-ID: Codejock.Calendar.ActiveX.v13.0"+ Chr(13)+Chr(10) +; "VALIDATE-CODE: xxx-xxx-xxx-xxx" LOCAL cVer := "13.0.0" LOCAL cPathActiveX := "C:\Programme\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v13.0.0 (30 Day Trial)\Bin\"
#ELSE LOCAL cLicCalendar := ; 'Calendar Control Copyright (c) 2003-2007 Codejock Software' +CCRLF+; 'PRODUCT-ID: Codejock.Calendar.ActiveX.v11.2' +CCRLF+; 'VALIDATE-CODE: zzz-zzz-zzz-zzz' LOCAL cVer := '11.2.2' LOCAL cPathActiveX := "C:\Creative.acp\ActiveX\"
#ENDIF
LOCAL ClsCalTheme2007 := "Codejock.CalendarThemeOffice2007" +'.'+ cVer LOCAL ClsGlobalSettings := "Codejock.CalendarGlobalSettings" +'.'+ cVer LOCAL ClsDialogs := "Codejock.CalendarDialogs" +'.'+ cVer LOCAL ClsDatePicker := "Codejock.DatePicker" +'.'+ cVer LOCAL ClsDPTheme2007 := "Codejock.DatePickerThemeOffice2007" +'.'+ cVer LOCAL ClsResource := "Codejock.CalendarResource" +'.'+ cVer LOCAL ClsResources := "Codejock.CalendarResources" +'.'+ cVer LOCAL ClsResourceManager := "Codejock.CalendarResourcesManager" +'.'+ cVer
#IFDEF __XPP__ #ELSE LOCAL oThread := Thread():new()
// oCal := V32CodeJockPro():New( 'Calendar', cVer, cPathActiveX, cLicCalendar ) oCal:lRegister := .t. oCal:Create() if !( oCal:lCreated ) RETURN nil ENDIF // #ENDIF
// Create Objects in the main thread // oDialogs := CreateObject( ClsDialogs ) oDPTheme := CreateObject( ClsDPTheme2007 ) oCalTheme := CreateObject( ClsCalTheme2007 ) oResources := CreateObject( ClsResources ) oResourceManager := CreateObject( ClsResourceManager )
#if 0 // This can be created in the fired thread oResource := CreateObject( ClsResource ) #endif
if nMode == 0
#IFDEF __XPP__ CJMyCalendar( oDialogs, oResource, oResources, oResourceManager, oDPTheme, oCalTheme, cLicCalendar, 0 ) #ELSE oThread:start( "CJMyCalendar", oDialogs, oResource, oResources, oResourceManager, oDPTheme, oCalTheme, cLicCalendar, 0 ) #ENDIF
ELSE // Threaded Resources do not work in H... ! May be oResources oNly accepts main thread. // //oThread:start( "CJMyCalendar", oDialogs, oResource, oResources, oResourceManager, oDPTheme, oCalTheme, cLicCalendar, 1 ) // CJMyCalendar( oDialogs, oResource, oResources, oResourceManager, oDPTheme, oCalTheme, cLicCalendar, 1 ) endif
RETURN nil
|