Initial: flux text FoxBin2Prg (git urmareste .??2 in-arbore, binarele VFP git-ignored)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
990
Clase/Vechi/appwiz.vc2
Normal file
990
Clase/Vechi/appwiz.vc2
Normal file
@@ -0,0 +1,990 @@
|
||||
*--------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
|
||||
*--------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
*< FOXBIN2PRG: Version="1.21" SourceFile="appwiz.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
|
||||
*
|
||||
*
|
||||
*< LIBCOMMENT: Application Wizard framework class library. />
|
||||
*
|
||||
DEFINE CLASS wzaboutdialog AS form && About form class used as an About dialog in the framework for the Application Wizard.
|
||||
*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />
|
||||
|
||||
*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder
|
||||
*< OBJECTDATA: ObjPath="Shape1" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Shape2" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="CMDTERMIN1" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image1" UniqueID="" Timestamp="" />
|
||||
|
||||
*<PropValue>
|
||||
AlwaysOnTop = .T.
|
||||
AutoCenter = .T.
|
||||
BorderStyle = 3
|
||||
Caption = ""
|
||||
Closable = .F.
|
||||
ControlBox = .F.
|
||||
DoCreate = .T.
|
||||
FontSize = 8
|
||||
Height = 151
|
||||
KeyPreview = .T.
|
||||
MaxButton = .F.
|
||||
MinButton = .F.
|
||||
Movable = .F.
|
||||
Name = "wzaboutdialog"
|
||||
Width = 353
|
||||
WindowType = 1
|
||||
*</PropValue>
|
||||
|
||||
ADD OBJECT 'CMDTERMIN1' AS cmdtermin WITH ;
|
||||
Left = 243, ;
|
||||
Name = "CMDTERMIN1", ;
|
||||
Top = 101
|
||||
*< END OBJECT: ClassLib="..\..\contab\clase\ferestrebaza.vcx" BaseClass="commandbutton" />
|
||||
|
||||
ADD OBJECT 'Image1' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 60, ;
|
||||
Left = 24, ;
|
||||
Name = "Image1", ;
|
||||
Picture = ..\..\contab\grafice\mfix.ico, ;
|
||||
Stretch = 2, ;
|
||||
Top = 24, ;
|
||||
Width = 60
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Label1' AS label WITH ;
|
||||
AutoSize = .T., ;
|
||||
Caption = "Programul MFix2000", ;
|
||||
FontBold = .F., ;
|
||||
FontName = "Arial Black", ;
|
||||
FontSize = 10, ;
|
||||
Height = 20, ;
|
||||
Left = 97, ;
|
||||
Name = "Label1", ;
|
||||
Top = 31, ;
|
||||
Width = 150, ;
|
||||
ZOrderSet = 5
|
||||
*< END OBJECT: BaseClass="label" />
|
||||
|
||||
ADD OBJECT 'Label2' AS label WITH ;
|
||||
AutoSize = .T., ;
|
||||
Caption = "este produs de firma", ;
|
||||
FontBold = .F., ;
|
||||
FontName = "Arial", ;
|
||||
FontSize = 10, ;
|
||||
Height = 18, ;
|
||||
Left = 97, ;
|
||||
Name = "Label2", ;
|
||||
Top = 67, ;
|
||||
Width = 120, ;
|
||||
ZOrderSet = 6
|
||||
*< END OBJECT: BaseClass="label" />
|
||||
|
||||
ADD OBJECT 'Label3' AS label WITH ;
|
||||
AutoSize = .T., ;
|
||||
Caption = "ROMFAST S.R.L.", ;
|
||||
FontBold = .F., ;
|
||||
FontName = "Arial", ;
|
||||
FontSize = 10, ;
|
||||
Height = 18, ;
|
||||
Left = 222, ;
|
||||
Name = "Label3", ;
|
||||
Top = 67, ;
|
||||
Width = 106, ;
|
||||
ZOrderSet = 7
|
||||
*< END OBJECT: BaseClass="label" />
|
||||
|
||||
ADD OBJECT 'Shape1' AS shape WITH ;
|
||||
Height = 130, ;
|
||||
Left = 8, ;
|
||||
Name = "Shape1", ;
|
||||
SpecialEffect = 0, ;
|
||||
Top = 9, ;
|
||||
Width = 333, ;
|
||||
ZOrderSet = 0
|
||||
*< END OBJECT: BaseClass="shape" />
|
||||
|
||||
ADD OBJECT 'Shape2' AS shape WITH ;
|
||||
Height = 2, ;
|
||||
Left = 97, ;
|
||||
Name = "Shape2", ;
|
||||
SpecialEffect = 0, ;
|
||||
Top = 55, ;
|
||||
Width = 227, ;
|
||||
ZOrderSet = 1
|
||||
*< END OBJECT: BaseClass="shape" />
|
||||
|
||||
PROCEDURE KeyPress
|
||||
LPARAMETERS nKeyCode, nShiftAltCtrl
|
||||
|
||||
IF nKeyCode=23 OR nKeyCode=27
|
||||
this.Release
|
||||
ENDIF
|
||||
|
||||
ENDPROC
|
||||
|
||||
ENDDEFINE
|
||||
|
||||
DEFINE CLASS wzapplication AS container && Application class used as a framework for the Application Wizard.
|
||||
*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />
|
||||
|
||||
*<DefinedPropArrayMethod>
|
||||
*m: beforereadevents && Method executed before READ EVENTS is executed when ReadEvents is called.
|
||||
*m: clearevents && Clears any pending read events.
|
||||
*m: doform && Executes an SCX form.
|
||||
*m: dolabel && Executes an LBX label
|
||||
*m: domenu && Executes an MPR menu.
|
||||
*m: doprogram && Executes a PRG, APP, or EXE program.
|
||||
*m: doreport && Executes an FRX report.
|
||||
*m: filenotfoundmsgbox && Displays a File Not Found messagebox.
|
||||
*m: getcaption && Returns the caption of the application.
|
||||
*m: geticon && Returns the icon of the application.
|
||||
*m: onshutdown && Occurs when the user attempts to exit Visual FoxPro.
|
||||
*m: readevents && Starts read events mode.
|
||||
*m: refreshformscollection && Refresh forms collection arrays and counters.
|
||||
*m: release && Releases the application from memory.
|
||||
*m: releaseform && Release specifc or active form from memory.
|
||||
*m: releaseforms && Release all application forms from memory.
|
||||
*m: resetformscollection && Reset arrays and counters of forms collection.
|
||||
*m: restoreenvironment && Restores environment settings.
|
||||
*m: saveenvironment && Saves environment settings.
|
||||
*m: setcaption && Sets the caption of the application.
|
||||
*m: seticon && Sets the icon of the application.
|
||||
*m: show && Displays the application.
|
||||
*p: ccaption && Caption of the application object.
|
||||
*p: cicon && Icon of the application object.
|
||||
*p: clastcaption && Last caption setting of _screen before application object was intantiated.
|
||||
*p: clasticon && Last icon setting of _screen before application object was intantiated.
|
||||
*p: cstartupform && Form (SCX) which is executed when the application object is shown.
|
||||
*p: cstartupmenu && Menu (MPR) which is executed when the application object is shown.
|
||||
*p: lcascadeforms && Specifies whether forms are cascaded if multiple instances of the same form are opened in the same top and left positions of the desktop.
|
||||
*p: lreadevents && Enable READ EVENTS within ReadEvents method.
|
||||
*p: nformcount && Forms collection count for application object.
|
||||
*p: npixeloffset && Number of pixels which offset multiple instances of the same form.
|
||||
*a: aformnames[1,0] && Form name collection for application object.
|
||||
*a: aforms[1,0] && Forms collection for application object.
|
||||
*</DefinedPropArrayMethod>
|
||||
|
||||
PROTECTED ccaption,cicon,clastcaption,clasticon,Destroy,Init
|
||||
*<PropValue>
|
||||
BackColor = 0,0,255
|
||||
ccaption =
|
||||
cicon =
|
||||
clastcaption =
|
||||
clasticon =
|
||||
cstartupform =
|
||||
cstartupmenu =
|
||||
Height = 34
|
||||
lcascadeforms = .T.
|
||||
lreadevents = .T.
|
||||
Name = "wzapplication"
|
||||
nformcount = 0
|
||||
npixeloffset = 22
|
||||
Visible = .F.
|
||||
Width = 108
|
||||
*</PropValue>
|
||||
|
||||
PROTECTED PROCEDURE beforereadevents && Method executed before READ EVENTS is executed when ReadEvents is called.
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE clearevents && Clears any pending read events.
|
||||
CLEAR EVENTS
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROTECTED PROCEDURE Destroy
|
||||
CLEAR EVENTS
|
||||
this.RestoreEnvironment
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE doform && Executes an SCX form.
|
||||
LPARAMETERS tcFileName,tcClass,tlNoMultipleInstances,tlNoShow
|
||||
LOCAL lcFileName,lcClass,oForm,oForm2,lcName,lnCount,lnTop,lnLeft
|
||||
LOCAL lcFormName,lnFormCount
|
||||
_SCREEN.VISIBLE=.T.
|
||||
|
||||
lcFileName=ALLTRIM(tcFileName)
|
||||
IF EMPTY(lcFileName)
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
lcClass=IIF(TYPE("tcClass")=="C",LOWER(ALLTRIM(tcClass)),"")
|
||||
lcFileName=LOWER(FULLPATH(lcFileName))
|
||||
IF NOT "."$lcFileName
|
||||
lcFileName=lcFileName+IIF(EMPTY(lcClass),".scx",".vcx")
|
||||
ENDIF
|
||||
IF NOT FILE(lcFileName)
|
||||
this.FileNotFoundMsgBox(lcFileName)
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
lcFormName=IIF(EMPTY(lcClass),lcFileName,lcFileName+","+lcClass)
|
||||
IF tlNoMultipleInstances
|
||||
FOR lnCount = 1 TO this.nFormCount
|
||||
IF this.aFormNames[lnCount]==lcFormName AND ;
|
||||
TYPE("this.aForms[lnCount]")=="O" AND ;
|
||||
NOT ISNULL(this.aForms[lnCount])
|
||||
this.aForms[lnCount].Show
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
ENDFOR
|
||||
ENDIF
|
||||
this.RefreshFormsCollection
|
||||
this.nFormCount=this.nFormCount+1
|
||||
DIMENSION this.aForms[this.nFormCount],this.aFormNames[this.nFormCount]
|
||||
this.aFormNames[this.nFormCount]=lcFormName
|
||||
IF NOT EMPTY(lcClass)
|
||||
SET CLASSLIB TO (lcFileName) ADDITIVE
|
||||
this.aForms[this.nFormCount]=CREATEOBJECT(lcClass)
|
||||
IF NOT tlNoShow AND TYPE("this.aForms[this.nFormCount]")=="O" AND ;
|
||||
NOT ISNULL(this.aForms[this.nFormCount])
|
||||
this.aForms[this.nFormCount].Show
|
||||
ENDIF
|
||||
ELSE
|
||||
DO FORM (lcFileName) NAME this.aForms[this.nFormCount] LINKED NOSHOW
|
||||
ENDIF
|
||||
lnFormCount=this.nFormCount
|
||||
this.RefreshFormsCollection
|
||||
IF this.lCascadeForms AND this.nFormCount>=lnFormCount
|
||||
oForm=this.aForms[this.nFormCount]
|
||||
lnTop=oForm.Top
|
||||
lnLeft=oForm.Left
|
||||
lcName=oForm.Name
|
||||
IF WEXIST(lcName) AND oForm.WindowState#2
|
||||
FOR lnCount = 1 TO (this.nFormCount-1)
|
||||
oForm2=this.aForms[lnCount]
|
||||
IF TYPE("oForm2")#"O" OR ISNULL(oForm2)
|
||||
LOOP
|
||||
ENDIF
|
||||
IF lcName==oForm2.Name AND WLROW(lcName)=WLROW(oForm2.Name) AND ;
|
||||
WLCOL(lcName)=WLCOL(oForm2.Name)
|
||||
lnTop=lnTop+this.nPixelOffset
|
||||
lnLeft=lnLeft+this.nPixelOffset
|
||||
ENDIF
|
||||
ENDFOR
|
||||
IF oForm.Top#lnTop
|
||||
oForm.Top=lnTop
|
||||
ENDIF
|
||||
IF oForm.Left#lnLeft
|
||||
oForm.Left=lnLeft
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF NOT tlNoShow
|
||||
this.aForms[this.nFormCount].Show
|
||||
ENDIF
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE dolabel && Executes an LBX label
|
||||
LPARAMETERS tcFileName,tlPrint
|
||||
LOCAL lcFileName
|
||||
|
||||
lcFileName=ALLTRIM(tcFileName)
|
||||
IF EMPTY(lcFileName)
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
lcFileName=LOWER(FULLPATH(lcFileName))
|
||||
IF NOT "."$lcFileName
|
||||
lcFileName=lcFileName+".lbx"
|
||||
ENDIF
|
||||
IF NOT FILE(lcFileName)
|
||||
this.FileNotFoundMsgBox(lcFileName)
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
IF tlPrint
|
||||
LABEL FORM (lcFileName) TO PRINTER PROMPT
|
||||
ELSE
|
||||
LABEL FORM (lcFileName) PREVIEW
|
||||
ENDIF
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE domenu && Executes an MPR menu.
|
||||
LPARAMETERS tcFileName
|
||||
LOCAL lcFileName
|
||||
|
||||
lcFileName=ALLTRIM(tcFileName)
|
||||
IF EMPTY(lcFileName)
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
lcFileName=LOWER(FULLPATH(lcFileName))
|
||||
IF NOT "."$lcFileName
|
||||
lcFileName=lcFileName+".mpr"
|
||||
ENDIF
|
||||
*IF NOT FILE(lcFileName)
|
||||
* this.FileNotFoundMsgBox(lcFileName)
|
||||
* RETURN .F.
|
||||
*ENDIF
|
||||
*DO (lcFileName)
|
||||
do mfix2000.mpr
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE doprogram && Executes a PRG, APP, or EXE program.
|
||||
LPARAMETERS tcFileName
|
||||
LOCAL lcFileName
|
||||
|
||||
lcFileName=ALLTRIM(tcFileName)
|
||||
IF EMPTY(lcFileName)
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
lcFileName=LOWER(FULLPATH(lcFileName))
|
||||
IF NOT "."$lcFileName
|
||||
lcFileName=lcFileName+".prg"
|
||||
ENDIF
|
||||
IF NOT FILE(lcFileName)
|
||||
this.FileNotFoundMsgBox(lcFileName)
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
DO (lcFileName)
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE doreport && Executes an FRX report.
|
||||
LPARAMETERS tcFileName,tlPrint
|
||||
LOCAL lcFileName
|
||||
|
||||
lcFileName=ALLTRIM(tcFileName)
|
||||
IF EMPTY(lcFileName)
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
lcFileName=LOWER(FULLPATH(lcFileName))
|
||||
IF NOT "."$lcFileName
|
||||
lcFileName=lcFileName+".frx"
|
||||
ENDIF
|
||||
IF NOT FILE(lcFileName)
|
||||
this.FileNotFoundMsgBox(lcFileName)
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
IF tlPrint
|
||||
REPORT FORM (lcFileName) TO PRINTER PROMPT
|
||||
ELSE
|
||||
REPORT FORM (lcFileName) PREVIEW
|
||||
ENDIF
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE filenotfoundmsgbox && Displays a File Not Found messagebox.
|
||||
LPARAMETERS tcFileName
|
||||
|
||||
RETURN MESSAGEBOX([File "]+tcFileName+[" not found.],16,_screen.Caption)
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE getcaption && Returns the caption of the application.
|
||||
RETURN this.cCaption
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE geticon && Returns the icon of the application.
|
||||
RETURN this.cIcon
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROTECTED PROCEDURE Init
|
||||
this.SaveEnvironment
|
||||
this.ResetFormsCollection
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE onshutdown && Occurs when the user attempts to exit Visual FoxPro.
|
||||
*IF MESSAGEBOX("Sunteti sigur ca doriti sa iesiti din program?",36,_screen.Caption)=6
|
||||
* QUIT
|
||||
*ENDIF
|
||||
IF glQuit
|
||||
QUIT
|
||||
ENDIF
|
||||
OA=CREATEOBJ('SIGUR')
|
||||
OA.SHOW(1)
|
||||
IF BUTON=1
|
||||
QUIT
|
||||
ELSE
|
||||
DO ce_windows IN pmenu.prg
|
||||
PUBLIC op_imob
|
||||
op_imob=CREA('p_imob')
|
||||
DO alegeprogram
|
||||
DO FORM START00
|
||||
OSTART=CREATEOBJ('START00')
|
||||
PRIMADATA=.F.
|
||||
op_imob.SHOW
|
||||
ENDIF
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE readevents && Starts read events mode.
|
||||
this.BeforeReadEvents
|
||||
IF this.lReadEvents
|
||||
READ EVENTS
|
||||
ENDIF
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE refreshformscollection && Refresh forms collection arrays and counters.
|
||||
LOCAL lnCount,lnCount2
|
||||
|
||||
lnCount=1
|
||||
DO WHILE lnCount<=this.nFormCount
|
||||
IF TYPE("this.aForms[lnCount]")=="O" AND NOT ISNULL(this.aForms[lnCount])
|
||||
lnCount=lnCount+1
|
||||
LOOP
|
||||
ENDIF
|
||||
FOR lnCount2 = lnCount TO (this.nFormCount-1)
|
||||
this.aForms[lnCount2]=this.aForms[lnCount2+1]
|
||||
this.aForms[lnCount2+1]=.NULL.
|
||||
this.aFormNames[lnCount2]=this.aFormNames[lnCount2+1]
|
||||
this.aFormNames[lnCount2+1]=""
|
||||
ENDFOR
|
||||
this.nFormCount=this.nFormCount-1
|
||||
IF this.nFormCount=0
|
||||
EXIT
|
||||
ENDIF
|
||||
DIMENSION this.aForms[this.nFormCount],this.aFormNames[this.nFormCount]
|
||||
ENDDO
|
||||
IF this.nFormCount=0
|
||||
this.ResetFormsCollection
|
||||
ENDIF
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE release && Releases the application from memory.
|
||||
IF NOT this.ReleaseForms()
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
this.ClearEvents
|
||||
RELEASE this
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE releaseform && Release specifc or active form from memory.
|
||||
LPARAMETERS toForm
|
||||
|
||||
IF PARAMETERS()=0
|
||||
IF TYPE("_screen.ActiveForm")#"O" OR ISNULL(_screen.ActiveForm)
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
_screen.ActiveForm.Release
|
||||
ELSE
|
||||
IF TYPE("toForm")#"O" OR ISNULL(toForm)
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
toForm.Release
|
||||
ENDIF
|
||||
this.RefreshFormsCollection
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE releaseforms && Release all application forms from memory.
|
||||
LOCAL lnFormCount
|
||||
|
||||
this.RefreshFormsCollection
|
||||
DO WHILE this.nFormCount>0
|
||||
lnFormCount=this.nFormCount
|
||||
IF NOT this.ReleaseForm(this.aForms[lnFormCount]) OR this.nFormCount=lnFormCount
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
ENDDO
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROTECTED PROCEDURE resetformscollection && Reset arrays and counters of forms collection.
|
||||
this.nFormCount=0
|
||||
DIMENSION this.aForms[1],this.aFormNames[1]
|
||||
this.aForms=.NULL.
|
||||
this.aFormNames=""
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROTECTED PROCEDURE restoreenvironment && Restores environment settings.
|
||||
IF NOT EMPTY(this.cLastCaption) AND NOT _screen.Caption==this.cLastCaption
|
||||
_screen.Caption=this.cLastCaption
|
||||
ENDIF
|
||||
IF NOT EMPTY(this.cLastIcon) AND NOT _screen.Icon==this.cLastIcon
|
||||
_screen.Icon=this.cLastIcon
|
||||
ENDIF
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROTECTED PROCEDURE saveenvironment && Saves environment settings.
|
||||
this.cLastCaption=_screen.Caption
|
||||
this.cLastIcon=_screen.Icon
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE setcaption && Sets the caption of the application.
|
||||
LPARAMETERS tcCaption
|
||||
|
||||
IF TYPE("tcCaption")#"C"
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
this.cCaption=tcCaption
|
||||
_screen.Caption=tcCaption
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE seticon && Sets the icon of the application.
|
||||
LPARAMETERS tcIcon
|
||||
|
||||
IF TYPE("tcIcon")#"C"
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
this.cIcon=tcIcon
|
||||
_screen.Icon=tcIcon
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE show && Displays the application.
|
||||
LPARAMETERS nStyle
|
||||
|
||||
this.DoMenu(this.cStartupMenu)
|
||||
this.DoForm(this.cStartupForm)
|
||||
this.ReadEvents
|
||||
|
||||
ENDPROC
|
||||
|
||||
ENDDEFINE
|
||||
|
||||
DEFINE CLASS wzquickstartform AS form && Quick start form class used as a start up form in the framework for the Application Wizard.
|
||||
*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />
|
||||
|
||||
*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder
|
||||
*< OBJECTDATA: ObjPath="Image2" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image4" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image6" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image7" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image1" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image3" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image5" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image8" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image9" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image12" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image13" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image16" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image17" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image20" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image21" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image24" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image25" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image26" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image27" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image28" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="Image29" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="lblForms" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="lstForms" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="cmdRun" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="cmdClose" UniqueID="" Timestamp="" />
|
||||
|
||||
*<DefinedPropArrayMethod>
|
||||
*p: nfilecount && Number of files in the form file list.
|
||||
*a: acommands[1,0] && Array of commands executed for each item in the forms list.
|
||||
*</DefinedPropArrayMethod>
|
||||
|
||||
*<PropValue>
|
||||
AutoCenter = .T.
|
||||
BackColor = 192,192,192
|
||||
BorderStyle = 2
|
||||
Caption = "Quick Start"
|
||||
DataSession = 2
|
||||
DoCreate = .T.
|
||||
FontSize = 8
|
||||
Height = 576
|
||||
KeyPreview = .T.
|
||||
Name = "wzquickstartform"
|
||||
nfilecount = 0
|
||||
Width = 795
|
||||
WindowState = 2
|
||||
WindowType = 1
|
||||
*</PropValue>
|
||||
|
||||
ADD OBJECT 'cmdClose' AS commandbutton WITH ;
|
||||
Caption = "\<Close", ;
|
||||
Default = .T., ;
|
||||
FontSize = 8, ;
|
||||
Height = 27, ;
|
||||
Left = 285, ;
|
||||
Name = "cmdClose", ;
|
||||
TabIndex = 4, ;
|
||||
Top = 211, ;
|
||||
Width = 84
|
||||
*< END OBJECT: BaseClass="commandbutton" />
|
||||
|
||||
ADD OBJECT 'cmdRun' AS commandbutton WITH ;
|
||||
Caption = "\<Run", ;
|
||||
Enabled = .F., ;
|
||||
FontSize = 8, ;
|
||||
Height = 27, ;
|
||||
Left = 285, ;
|
||||
Name = "cmdRun", ;
|
||||
TabIndex = 3, ;
|
||||
Top = 181, ;
|
||||
Width = 84
|
||||
*< END OBJECT: BaseClass="commandbutton" />
|
||||
|
||||
ADD OBJECT 'Image1' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 347, ;
|
||||
Name = "Image1", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 224, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image12' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 226, ;
|
||||
Name = "Image12", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = -28, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image13' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 224, ;
|
||||
Name = "Image13", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 224, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image16' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 164, ;
|
||||
Name = "Image16", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 9, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image17' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 164, ;
|
||||
Name = "Image17", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 261, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image2' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 347, ;
|
||||
Name = "Image2", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 56, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image20' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 102, ;
|
||||
Name = "Image20", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = -28, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image21' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 102, ;
|
||||
Name = "Image21", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 224, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image24' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 38, ;
|
||||
Name = "Image24", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 8, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image25' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 38, ;
|
||||
Name = "Image25", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 260, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image26' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = -23, ;
|
||||
Name = "Image26", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 56, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image27' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = -23, ;
|
||||
Name = "Image27", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 140, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image28' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = -23, ;
|
||||
Name = "Image28", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = -28, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image29' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = -23, ;
|
||||
Name = "Image29", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 224, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image3' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 288, ;
|
||||
Name = "Image3", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 98, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image4' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 347, ;
|
||||
Name = "Image4", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 140, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image5' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 288, ;
|
||||
Name = "Image5", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 182, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image6' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 257, ;
|
||||
Name = "Image6", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 304, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image7' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 347, ;
|
||||
Name = "Image7", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = -28, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image8' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 288, ;
|
||||
Name = "Image8", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 14, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'Image9' AS image WITH ;
|
||||
BackStyle = 0, ;
|
||||
Height = 58, ;
|
||||
Left = 288, ;
|
||||
Name = "Image9", ;
|
||||
Picture = foxqstrt.bmp, ;
|
||||
Top = 266, ;
|
||||
Width = 52
|
||||
*< END OBJECT: BaseClass="image" />
|
||||
|
||||
ADD OBJECT 'lblForms' AS label WITH ;
|
||||
BackColor = 192,192,192, ;
|
||||
Caption = "\<Select a form to run.", ;
|
||||
FontSize = 8, ;
|
||||
Height = 17, ;
|
||||
Left = 10, ;
|
||||
Name = "lblForms", ;
|
||||
TabIndex = 1, ;
|
||||
Top = 10, ;
|
||||
Width = 111
|
||||
*< END OBJECT: BaseClass="label" />
|
||||
|
||||
ADD OBJECT 'lstForms' AS listbox WITH ;
|
||||
FontSize = 8, ;
|
||||
Height = 215, ;
|
||||
IntegralHeight = .T., ;
|
||||
Left = 10, ;
|
||||
Name = "lstForms", ;
|
||||
TabIndex = 2, ;
|
||||
Top = 25, ;
|
||||
Width = 266
|
||||
*< END OBJECT: BaseClass="listbox" />
|
||||
|
||||
PROCEDURE Activate
|
||||
ACTIVATE SCREEN
|
||||
SET MESSAGE TO
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE Deactivate
|
||||
ACTIVATE SCREEN
|
||||
SET MESSAGE TO
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE KeyPress
|
||||
LPARAMETERS nKeyCode, nShiftAltCtrl
|
||||
|
||||
IF nKeyCode=23 OR nKeyCode=27
|
||||
this.Release
|
||||
ENDIF
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE Load
|
||||
SET TALK OFF
|
||||
SET ESCAPE OFF
|
||||
SET COLLATE TO 'MACHINE'
|
||||
SET COMPATIBLE OFF
|
||||
SET CONFIRM ON
|
||||
SET DECIMALS TO 9
|
||||
SET EXACT OFF
|
||||
SET EXCLUSIVE OFF
|
||||
SET MEMOWIDTH TO 1024
|
||||
SET MULTILOCKS ON
|
||||
SET POINT TO '.'
|
||||
SET SAFETY OFF
|
||||
SET UDFPARMS TO VALUE
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE cmdClose.Click
|
||||
thisform.Release
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE cmdRun.Click
|
||||
LOCAL lnListIndex,lcCommand
|
||||
|
||||
lnListIndex=this.parent.lstForms.ListIndex
|
||||
IF lnListIndex<1
|
||||
RETURN
|
||||
ENDIF
|
||||
lcCommand=thisform.aCommands[lnListIndex]
|
||||
IF EMPTY(lcCommand)
|
||||
RETURN
|
||||
ENDIF
|
||||
thisform.Hide
|
||||
&lcCommand
|
||||
thisform.Release
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE cmdRun.Refresh
|
||||
LOCAL llEnabled
|
||||
|
||||
llEnabled=(this.parent.lstForms.ListIndex>0)
|
||||
IF this.Enabled#llEnabled
|
||||
this.Enabled=llEnabled
|
||||
ENDIF
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE lstForms.DblClick
|
||||
this.parent.cmdRun.Click
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE lstForms.Init
|
||||
LOCAL lcMenuFile,lcPrompt,lcCommand,lnAtPos
|
||||
|
||||
IF TYPE("goApp")#"O" OR ISNULL(goApp)
|
||||
RETURn
|
||||
ENDIF
|
||||
lcMenuFile=goApp.cStartupMenu
|
||||
IF EMPTY(lcMenuFile)
|
||||
RETURN
|
||||
ENDIF
|
||||
lcMenuFile=LOWER(FULLPATH(lcMenuFile))
|
||||
lnAtPos=AT(".",lcMenuFile)
|
||||
IF lnAtPos=0
|
||||
lcMenuFile=lcMenuFile+".mnx"
|
||||
ELSE
|
||||
lcMenuFile=ALLTRIM(LEFT(lcMenuFile,lnAtPos-1))+".mnx"
|
||||
ENDIF
|
||||
IF NOT FILE(lcMenuFile)
|
||||
RETURN
|
||||
ENDIF
|
||||
SELECT 0
|
||||
USE (lcMenuFile) AGAIN SHARED ALIAS _menu
|
||||
IF NOT USED("_menu")
|
||||
RETURN
|
||||
ENDIF
|
||||
thisform.nFileCount=0
|
||||
DIMENSION thisform.aCommands[1]
|
||||
SCAN ALL FOR LOWER(ALLTRIM(LevelName))=="forms" AND VAL(ItemNum)>0
|
||||
lcPrompt=ALLTRIM(MLINE(Prompt,1))
|
||||
lcCommand=ALLTRIM(MLINE(Command,1))
|
||||
IF EMPTY(lcPrompt) OR EMPTY(lcCommand) OR LOWER(ALLTRIM(lcPrompt))=="launcher" OR ;
|
||||
LOWER(ALLTRIM(lcPrompt))=="\<quick start"
|
||||
LOOP
|
||||
ENDIF
|
||||
this.AddItem(lcPrompt)
|
||||
thisform.nFileCount=thisform.nFileCount+1
|
||||
DIMENSION thisform.aCommands[thisform.nFileCount]
|
||||
thisform.aCommands[thisform.nFileCount]=lcCommand
|
||||
ENDSCAN
|
||||
USE IN _menu
|
||||
IF this.ListCount>0
|
||||
this.ListIndex=1
|
||||
ENDIF
|
||||
this.parent.cmdRun.Refresh
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE lstForms.InteractiveChange
|
||||
this.parent.cmdRun.Refresh
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE lstForms.MouseUp
|
||||
LPARAMETERS nButton, nShift, nXCoord, nYCoord
|
||||
|
||||
this.InteractiveChange
|
||||
|
||||
ENDPROC
|
||||
|
||||
ENDDEFINE
|
||||
Reference in New Issue
Block a user