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:
2026-07-16 10:55:38 +03:00
commit 2f59024385
1271 changed files with 820556 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,668 @@
*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="pr_adressbook.scx" CPID="1254" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS dataenvironment AS dataenvironment
*< CLASSDATA: Baseclass="dataenvironment" Timestamp="" Scale="" Uniqueid="" ClassIcon="1" />
*<PropValue>
DataSource = .NULL.
Height = 0
Left = 0
Name = "Dataenvironment"
Top = 0
Width = 0
*</PropValue>
ENDDEFINE
DEFINE CLASS form1 AS form
*< CLASSDATA: Baseclass="form" Timestamp="" Scale="" Uniqueid="" />
*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder
*< OBJECTDATA: ObjPath="lblSearchFld" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="TxtSearch" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Grid1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Gridsort1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdOK" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdCancel" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Command1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Container1" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*m: doselectall
*m: doselectinvert
*m: dounselectall
*m: setlanguage
*m: updatesearchfld
*p: clocsearchfld
*p: crecipients
*p: csearchfield
*p: lclosetable
*p: ngridx
*p: ngridy
*p: _memberdata && XML Metadata for customizable properties
*</DefinedPropArrayMethod>
*<PropValue>
AutoCenter = .T.
Caption = "Select recipients"
clocsearchfld = Search field
Closable = .F.
crecipients =
csearchfield =
Desktop = .T.
DoCreate = .T.
Height = 422
lclosetable = .F.
Name = "Form1"
ngridx = 0
ngridy = 0
ShowTips = .T.
Width = 635
WindowType = 1
_memberdata = <VFPData>
<memberdata name="crecipients" display="cRecipients"/>
<memberdata name="updatesearchfld" display="UpdateSearchFld"/>
<memberdata name="csearchfield" display="cSearchField"/>
<memberdata name="doselectall" display="DoSelectAll"/>
<memberdata name="dounselectall" display="DoUnselectAll"/>
<memberdata name="doselectinvert" display="DoSelectInvert"/>
<memberdata name="setlanguage" display="SetLanguage"/>
<memberdata name="clocsearchfld" display="cLocSearchFld"/>
</VFPData>
*</PropValue>
ADD OBJECT 'cmdCancel' AS commandbutton WITH ;
Anchor = 12, ;
Cancel = .T., ;
Caption = "Cancel", ;
Height = 27, ;
Left = 539, ;
Name = "cmdCancel", ;
TabIndex = 5, ;
Top = 387, ;
Width = 84
*< END OBJECT: BaseClass="commandbutton" />
ADD OBJECT 'cmdOK' AS commandbutton WITH ;
Anchor = 12, ;
Caption = "Ok", ;
Height = 27, ;
Left = 443, ;
Name = "cmdOK", ;
TabIndex = 4, ;
Top = 387, ;
Width = 84
*< END OBJECT: BaseClass="commandbutton" />
ADD OBJECT 'Command1' AS commandbutton WITH ;
Caption = "", ;
Height = 22, ;
Left = 8, ;
Name = "Command1", ;
Picture = images\pr_locate.bmp, ;
SpecialEffect = 2, ;
TabStop = .F., ;
Top = -1, ;
Width = 24
*< END OBJECT: BaseClass="commandbutton" />
ADD OBJECT 'Container1' AS container WITH ;
BackStyle = 0, ;
BorderWidth = 0, ;
Height = 21, ;
Left = 7, ;
Name = "Container1", ;
Top = 0, ;
Width = 24
*< END OBJECT: BaseClass="container" />
ADD OBJECT 'Grid1' AS grid WITH ;
AllowCellSelection = .F., ;
Anchor = 15, ;
DeleteMark = .F., ;
GridLineColor = 192,192,192, ;
Height = 331, ;
HighlightBackColor = 159,159,208, ;
HighlightForeColor = 255,255,255, ;
HighlightStyle = 2, ;
Left = 8, ;
Name = "Grid1", ;
RecordMark = .F., ;
Top = 50, ;
Width = 620
*< END OBJECT: BaseClass="grid" />
ADD OBJECT 'Gridsort1' AS gridsort WITH ;
cgrideval = Thisform.Grid1, ;
csortascendinggraphic = images\pr_sortascending.bmp, ;
csortdescendinggraphic = images\pr_sortDescending.bmp, ;
Height = 17, ;
Left = 12, ;
Name = "Gridsort1", ;
Top = 396, ;
Width = 36
*< END OBJECT: ClassLib="pr_rcsgridsort.vcx" BaseClass="custom" />
ADD OBJECT 'lblSearchFld' AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "Search Field : ", ;
ForeColor = 255,0,0, ;
Height = 17, ;
Left = 37, ;
Name = "lblSearchFld", ;
Top = 3, ;
Width = 80
*< END OBJECT: BaseClass="label" />
ADD OBJECT 'TxtSearch' AS textbox WITH ;
Height = 25, ;
Left = 8, ;
Name = "TxtSearch", ;
Top = 21, ;
Width = 227
*< END OBJECT: BaseClass="textbox" />
PROCEDURE Destroy
Use In (This.Grid1.RecordSource)
If Used("CrsTemp")
Use In "CrsTemp"
Endif
ENDPROC
PROCEDURE doselectall
Local lnRec
lnRec = Recno(Thisform.Grid1.RecordSource)
Update (Thisform.Grid1.RecordSource) Set lSelected = not lSelected
Go (m.lnRec)
Thisform.Refresh()
ENDPROC
PROCEDURE doselectinvert
ENDPROC
PROCEDURE dounselectall
Local lnRec
lnRec = Recno(Thisform.Grid1.RecordSource)
Update (Thisform.Grid1.RecordSource) Set lSelected = .F.
Go (m.lnRec)
Thisform.Refresh()
ENDPROC
PROCEDURE Init
*!* Author : Soykan OZCELIK
*!* Description : email adress collector for FoxyPreviewer SendMail Form
*!* Usage : Do form GetEmailAdress with "YourCursor","YourSearchField"
*!* Important : YourCursor must contain "email" field which is filled contact emails
*!* to testing this form first create test cursor with below codes
*!* Select "s@s.com" as email,* FROM (_samples + '\data\customer') Where .T. Into Cursor Test readwrite
*!* You can create your own cursors to test this form
LPARAMETERS tcCursor,tcSearchField
IF EMPTY(tcCursor)
tcCursor = ALIAS()
ENDIF
LOCAL llError
llError = .F.
IF NOT USED(tcCursor)
TRY
USE (tcCursor) AGAIN IN 0 SHARED ALIAS C_AdressBook
* This.lCloseTable = .T.
tcCursor = "C_AdressBook"
CATCH
MESSAGEBOX("Could not load the adress book table!", 48, "Error")
llError = .T.
ENDTRY
ENDIF
IF llError
RETURN .F.
ENDIF
IF EMPTY(tcSearchField)
tcSearchField = "EMAIL" && "Contact"
ENDIF
Thisform.UpdateSearchFld(tcSearchField)
TEXT TO m.lcSQL TEXTMERGE NOSHOW
SELECT .F. AS lSelected, * FROM ;
<<m.tcCursor>> WHERE .t. ;
INTO CURSOR CrsAdresses READWRITE
ENDTEXT
EXECSCRIPT(m.lcSQL)
GO TOP
* Close the table if it was passed as a file
IF tcCursor = "C_AdressBook"
USE IN SELECT("C_AdressBook")
ENDIF
Thisform.cSearchField = m.tcSearchField
TRY
This.Icon= "pr_mail03.ico"
* This.Icon= HOME() + "Graphics\Icons\Mail\mail03.ico"
CATCH
ENDTRY
With This.Grid1 as Grid
.RecordSource=""
.RecordSource="CrsAdresses"
.ColumnCount = FCOUNT(.RecordSource)
.LockColumns = 1
LOCAL loColumn as Column
FOR EACH loColumn IN .Columns
WITH loColumn.header1
.FontBold = .T.
.FontSize = 9
.Alignment = 3
.ForeColor = RGB(255,0,0)
IF EMPTY(loColumn.ControlSource)
loColumn.Visible = .F.
ENDIF
ENDWITH
ENDFOR
Thisform.Gridsort1.BindControl()
With .Column1
LOCAL loHeader as Header
loHeader = .header1
WITH loHeader as Header
.FontName="wingdings"
.Caption = Chr(0xFC) &&"Checkbox"
.Alignment = 2
* UNBINDEVENTS(loHeader) &&, "DblClick")
BINDEVENT(loHeader, "DblClick", This, "DoSelectAll")
BINDEVENT(loHeader, "RightClick", This, "DoUnselectAll")
ENDWITH
.Alignment = 2
.Width = 20
.AddObject("Check1","CheckBox")
.Sparse = .F.
.CurrentControl = "Check1"
With .Check1
.Alignment = 2
.Caption = ""
.Name = "Check1"
.Visible = .T.
Endwith
.RemoveObject("text1")
Endwith
.AutoFit()
This.Grid1.Column1.Alignment = 2
.SetAll("DynamicForeColor", "ICASE(lSelected=.t.,RGB(255,0,0),lSelected=.f.,RGB(0,0,0))" , "Column")
.SetAll("DynamicFontBold", "lSelected=.t." , "Column")
ENDWITH
IF VARTYPE(_goFP) = "O"
This.SetLanguage()
ENDIF
ENDPROC
PROCEDURE Load
SET TALK OFF
SET CONSOLE OFF
IF VARTYPE(_goFP) <> "O"
* Creating the cursor with the adress book
SELECT CAST(LOWER(GETWORDNUM(Contact, 1, " "))+"@vfp.com" AS C(30)) As email,* From (_samples + '\data\customer') ;
Where .T. Into Cursor Test Readwrite
ENDIF
TRY
LOCAL loDummy as Image
loDummy = CREATEOBJECT("Image")
loDummy.Picture = "images\pr_locate.bmp"
CATCH
ENDTRY
ENDPROC
PROCEDURE setlanguage
LOCAL loExc as Exception
TRY
WITH This
LOCAL lcCaption
lcCaption = _goFP.GetLoc("SEARCHFLD")
.lblSearchFld.Caption = lcCaption
.cLocSearchFld = lcCaption
.CmdOk.Caption = _goFP.GetLoc("GOTOPG_OK")
.CmdCancel.Caption = _goFP.GetLoc("CANCEL")
.Caption = _goFP.GetLoc("SELECTRECI")
ENDWITH
CATCH TO loExc
SET STEP ON
ENDTRY
ENDPROC
PROCEDURE Unload
IF NOT EMPTY(Thisform.cRecipients)
RETURN Thisform.cRecipients
ENDIF
ENDPROC
PROCEDURE updatesearchfld
LPARAMETERS tcField
Thisform.cSearchField = tcField
Thisform.lblSearchFld.Caption = Thisform.cLocSearchFld + ": " + PROPER(tcField)
ENDPROC
PROCEDURE cmdCancel.Click
Thisform.Release()
ENDPROC
PROCEDURE cmdOK.Click
Select email From (Thisform.Grid1.RecordSource);
Where Lselected ;
And ;
Not Empty(email) Into Array emails
If _Tally = 0
Messagebox('No Selected e-mails...',16,_Screen.ActiveForm.Caption)
Return
Endif
If Set("Safety")='ON'
Set Safety Off
Endif
Local lcRecipentList
lcRecipentList=""
For ix=1 To Alen("emails")
lcRecipentList = lcRecipentList+Trim(emails[ix])+";"
Endfor
m.lcRecipentList = Left(m.lcRecipentList,Len(m.lcRecipentList)-1)
Thisform.cRecipients = m.lcRecipentList
Thisform.Release
ENDPROC
PROCEDURE Grid1.Click
Local lnRelCol, lnRelRow, lnWhere
Store 0 To lnWhere, lnRelRow, lnRelCol
This.GridHitTest(Thisform.ngridx, Thisform.ngridy, @lnWhere, @lnRelRow, @lnRelCol)
If lnWhere = 3 && Cell
If lnRelCol = 1 && column 1
This.Columns(lnRelCol).Check1.Value = Not This.Columns(lnRelCol).Check1.Value
Endif
Endif
ENDPROC
PROCEDURE Grid1.DblClick
Local lnRelCol, lnRelRow, lnWhere
Store 0 To lnWhere, lnRelRow, lnRelCol
This.GridHitTest(Thisform.ngridx, Thisform.ngridy, @lnWhere, @lnRelRow, @lnRelCol)
If lnWhere = 3 && Cell
* If lnRelCol = 1 && column 1
This.Columns(1).Check1.Value = Not This.Columns(1).Check1.Value
* Endif
ENDIF
Thisform.Refresh()
ENDPROC
PROCEDURE Grid1.MouseDown
Lparameters nButton, nShift, nXCoord, nYCoord
* Save mouse position to use in Grid.Click
Thisform.ngridx = nXCoord
Thisform.ngridy = nYCoord
ENDPROC
PROCEDURE Gridsort1.bindcontrol
******************************************************************
* FUNCTION NAME: Bindcontrol
*
* AUTHOR, DATE:
* Paul Mrozowski, 5/7/2007
* PROCEDURE DESCRIPTION:
* Bind us to the headers in the grid.
* INPUT PARAMETERS:
* None
* OUTPUT PARAMETERS:
* None
******************************************************************
LOCAL loGrid AS Grid, ;
loColumn AS Column, ;
loControl
TRY
loGrid = EVALUATE(This.cGridEval)
IF TYPE("loGrid") = "O"
FOR EACH loColumn IN loGrid.Columns
FOR EACH loControl IN loColumn.Controls
IF loControl.BaseClass = "Header"
BINDEVENT(loControl, "DblClick", This, "Sort")
BINDEVENT(loControl, "RightClick", This, "Search")
EXIT
ENDIF
ENDFOR
ENDFOR
IF PEMSTATUS(loGrid, "SaveSource", 5)
IF This.cAutoCleanOn = "S"
BINDEVENT(loGrid, "SaveSource", This, "Cleanup")
ENDIF
IF This.cAutoCleanOn = "R"
BINDEVENT(loGrid, "RestoreSource", This, "Cleanup")
ENDIF
ENDIF
ENDIF
CATCH
MESSAGEBOX("This.cGridEval doesn't evaluate to an object: " + This.cGridEval)
ENDTRY
ENDPROC
PROCEDURE Gridsort1.Init
******************************************************************
* FUNCTION NAME: Init
*
* AUTHOR, DATE:
* Paul Mrozowski, 5/7/2007
* PROCEDURE DESCRIPTION:
* Get things started.
* INPUT PARAMETERS:
* None
* OUTPUT PARAMETERS:
* None
******************************************************************
This.oIndex = CREATEOBJECT("Collection")
* This.BindControl()
ENDPROC
PROCEDURE Gridsort1.search
LOCAL loGrid AS Grid, ;
lcRecordSource, ;
loEx AS Exception, ;
laEvent[1], ;
loHeader AS Header, ;
loColumn AS Column, ;
lcControlSource, ;
lcIndexFile, ;
luKey, ;
lcField
TRY
lnSelect = SELECT()
loGrid = EVALUATE(This.cGridEval)
IF TYPE("loGrid") <> "O"
EXIT
ENDIF
IF EMPTY(This.cRecordSource)
lcRecordSource = ALLTRIM(loGrid.RecordSource)
ELSE
lcRecordSource = ALLTRIM(This.cRecordSource)
ENDIF
IF !EMPTY(lcRecordSource)
AEVENTS(laEvent, 0)
loHeader = laEvent[1]
loColumn = loHeader.Parent
lcControlSource = ALLTRIM(loColumn.ControlSource)
IF ("." $ lcControlSource)
lcField = GETWORDNUM(lcControlSource, 2, ".")
ELSE
lcField = lcControlSource
ENDIF
* MESSAGEBOX(lcField)
Thisform.UpdateSearchFld(lcField)
ENDIF
CATCH TO loEx
SET STEP ON
MESSAGEBOX("Error sorting: " + loEx.Message, 48, "Error")
FINALLY
SELECT (lnSelect)
ENDTRY
RETURN
IF !EMPTY(lcControlSource)
IF ("." $ lcControlSource)
lcFieldType = VARTYPE(EVALUATE(lcControlSource))
ELSE
lcFieldType = VARTYPE(EVALUATE(lcRecordSource + "." + lcControlSource))
ENDIF
lcIndexFile = FORCEEXT(ADDBS(SYS(2023)) + "_" + SYS(3), "IDX")
DO CASE
CASE lcFieldType = "T"
lcIndexExpr = "INDEX ON TTOC(" + lcControlSource + ", 3) TO " + lcIndexFile + " ADDITIVE"
CASE lcFieldType = "D"
lcIndexExpr = "INDEX ON DTOS(" + lcControlSource + ") TO " + lcIndexFile + " ADDITIVE"
CASE INLIST(lcFieldType, "N", "Y")
lcIndexExpr = "INDEX ON " + lcControlSource + " TO " + lcIndexFile + " ADDITIVE"
CASE lcFieldType = "C"
lcIndexExpr = "INDEX ON ALLTRIM(UPPER(" + lcControlSource + ")) TO " + lcIndexFile + " ADDITIVE"
CASE lcFieldType = "L"
lcIndexExpr = "INDEX ON " + lcControlSource + " TO " + lcIndexFile + " ADDITIVE"
OTHERWISE
EXIT
ENDCASE
lcNewIndexExpr = This.IndexExpressionHook(lcIndexExpr, lcControlSource)
IF VARTYPE(lcNewIndexExpr) = "C" AND !EMPTY(lcNewIndexExpr)
lcIndexExpr = lcNewIndexExpr
ENDIF
luKey = This.oIndex.GetKey(lcControlSource)
* Remove any existing header pictures, then add it to the current column
loGrid.SetAll("Picture", "")
SELECT (lcRecordSource)
IF VARTYPE(luKey) = "N" AND luKey = 0
* Index doesn't exist yet
This.oIndex.Add(lcIndexFile, lcControlSource)
&lcIndexExpr
loHeader.Picture = This.cSortAscendingGraphic
ELSE
lcIndexFile = JUSTSTEM(This.oIndex[luKey])
IF DESCENDING()
SET ORDER TO &lcIndexFile ASCENDING
loHeader.Picture = This.cSortAscendingGraphic
ELSE
SET ORDER TO &lcIndexFile DESCENDING
loHeader.Picture = This.cSortDescendingGraphic
ENDIF
ENDIF
LOCATE
loGrid.Refresh()
ENDIF
IF lnBuffering > 3
CURSORSETPROP("Buffering", lnBuffering, lcRecordSource)
ENDIF
ENDPROC
PROCEDURE TxtSearch.Valid
IF NOT EMPTY(This.Value)
Local lcSearchValue,lcSearchField,lcAlias,lnSelect
lcAlias = Thisform.Grid1.RecordSource
lcSearchField = Thisform.cSearchField
lcSearchValue = Chrtran(Trim(LOWER(This.Value)),"'","%")
lnSelect = Select(0)
TEXT TO m.lcSearchSQL TEXTMERGE noshow
SELECT RECNO() as nrec,* FROM <<m.lcAlias>> ;
WHERE LOWER(<<m.lcSearchField>>) ;
like '%' + '<<m.lcSearchValue>>' + '%';
INTO CURSOR CrsTemp
ENDTEXT
*_Cliptext = m.lcSearchSQL
Execscript(m.lcSearchSQL)
If _Tally # 0
Select (Thisform.Grid1.RecordSource)
Go (CrsTemp.nrec) In (Thisform.Grid1.RecordSource)
Thisform.Refresh()
ENDIF
ENDIF
ENDPROC
ENDDEFINE

803
utile/email/pr_htmledit.vc2 Normal file
View File

@@ -0,0 +1,803 @@
*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="pr_htmledit.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS _cbo AS combobox
*< CLASSDATA: Baseclass="combobox" Timestamp="" Scale="Pixels" Uniqueid="" />
*<DefinedPropArrayMethod>
*p: cpropertyname
*p: _memberdata
*</DefinedPropArrayMethod>
*<PropValue>
Height = 23
Name = "_cbo"
Style = 2
TabStop = .F.
Width = 100
_memberdata = <VFPData>
<memberdata name="foomethod" type="method" display="fooMethod" favorites="True"/>
<memberdata name="_cbo" type="property" display="_cbo" favorites="True"/>
<memberdata name="_memberdata" type="property" display="_MemberData" favorites="True"/>
<memberdata name="baseclass" type="property" display="BaseClasS" favorites="True"/>
<memberdata name="error" type="method" display="eRRor" favorites="True"/>
</VFPData>
*</PropValue>
ENDDEFINE
DEFINE CLASS cbutton AS commandbutton
*< CLASSDATA: Baseclass="commandbutton" Timestamp="" Scale="Pixels" Uniqueid="" />
*<DefinedPropArrayMethod>
*p: cpropertyname
*p: _memberdata && XML Metadata for customizable properties
*</DefinedPropArrayMethod>
*<PropValue>
Caption = "C"
cpropertyname =
FontName = "Wingdings"
FontSize = 10
Height = 23
Name = "cbutton"
SpecialEffect = 2
TabStop = .F.
Width = 23
_memberdata = <VFPData>
<memberdata name="cpropertyname" display="cPropertyName"/>
</VFPData>
*</PropValue>
PROCEDURE Click
IF NOT EMPTY(This.cPropertyName)
This.Parent.Toggle(This.cPropertyName)
ENDIF
ENDPROC
ENDDEFINE
DEFINE CLASS cfontname AS _cbo OF "pr_htmledit.vcx"
*< CLASSDATA: Baseclass="combobox" Timestamp="" Scale="Pixels" Uniqueid="" />
*<PropValue>
cpropertyname = FontName
Height = 23
Name = "cfontname"
Width = 177
*</PropValue>
PROCEDURE Init
This.AddProperty("aNames[1]","")
=AFONT(This.aNames)
This.RowSource = "This.aNames"
This.RowSourceType = 5
This.Value = "Arial"
ENDPROC
ENDDEFINE
DEFINE CLASS cfontsize AS _cbo OF "pr_htmledit.vcx"
*< CLASSDATA: Baseclass="combobox" Timestamp="" Scale="Pixels" Uniqueid="" />
*<DefinedPropArrayMethod>
*m: update
*</DefinedPropArrayMethod>
*<PropValue>
Alignment = 1
cpropertyname = FontSize
Name = "cfontsize"
Value = 1
Width = 45
*</PropValue>
PROCEDURE Init
This.AddItem("8")
This.AddItem("10")
This.AddItem("12")
This.AddItem("14")
This.AddItem("18")
This.AddItem("24")
This.AddItem("36")
ENDPROC
PROCEDURE update
ENDPROC
ENDDEFINE
DEFINE CLASS chtmleditor AS container
*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />
*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder
*< OBJECTDATA: ObjPath="oIE" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgBold" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgItalic" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgUnderline" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgLeft" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgCenter" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgRight" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="btnForeColor" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="btnBackColor" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmbFontName" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmbFontSize" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgIncrease" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgDecrease" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgBullet" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgNumbers" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdHyperlink" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdPicture" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgJustify" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdOpen" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdSave" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdNew" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdCut" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdCopy" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdPaste" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdUndo" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdRedo" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgLine" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="tgClean" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*m: activatecommands
*m: toggle
*m: togglestatus
*p: ltoggleupdate
*p: _memberdata && XML Metadata for customizable properties
*</DefinedPropArrayMethod>
*<PropValue>
BackStyle = 0
BorderWidth = 0
Height = 324
ltoggleupdate = .T.
Name = "chtmleditor"
Width = 633
_memberdata = <VFPData>
<memberdata name="foomethod" type="method" display="fooMethod" favorites="True"/>
<memberdata name="chtmleditor" type="property" display="chtmleditor" favorites="True"/>
<memberdata name="_memberdata" type="property" display="_MemberData" favorites="True"/>
<memberdata name="baseclass" type="property" display="BaseClasS" favorites="True"/>
<memberdata name="error" type="method" display="eRRor" favorites="True"/>
<memberdata name="ltoggleupdate" display="lToggleUpdate"/>
</VFPData>
*</PropValue>
ADD OBJECT 'btnBackColor' AS cbutton WITH ;
Caption = "", ;
ForeColor = 0,0,255, ;
Left = 341, ;
Name = "btnBackColor", ;
Picture = images\pr_fontback.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Background color", ;
Top = 24
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'btnForeColor' AS cbutton WITH ;
Caption = "", ;
ForeColor = 0,0,255, ;
Left = 317, ;
Name = "btnForeColor", ;
Picture = images\pr_textcolor.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Cor do Texto", ;
Top = 24
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'cmbFontName' AS cfontname WITH ;
Height = 23, ;
Left = 0, ;
Name = "cmbFontName", ;
ToolTipText = "Font name", ;
Top = 24, ;
Width = 127
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="combobox" />
ADD OBJECT 'cmbFontSize' AS cfontsize WITH ;
Height = 23, ;
Left = 129, ;
Name = "cmbFontSize", ;
ToolTipText = "Font size", ;
Top = 24, ;
Width = 54
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="combobox" />
ADD OBJECT 'cmdCopy' AS cbutton WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = Copy, ;
FontName = "Wingdings", ;
Left = 107, ;
Name = "cmdCopy", ;
Picture = images\pr_copy.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Copy", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'cmdCut' AS cbutton WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = Cut, ;
FontName = "Wingdings", ;
Left = 83, ;
Name = "cmdCut", ;
Picture = images\pr_cut.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Cut", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'cmdHyperlink' AS cbutton WITH ;
Caption = "", ;
Left = 451, ;
Name = "cmdHyperlink", ;
Picture = images\pr_hyperlink.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Create a hyperlink", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'cmdNew' AS cbutton WITH ;
Alignment = 0, ;
Caption = "", ;
Enabled = .T., ;
FontName = "Wingdings", ;
Left = 50, ;
Name = "cmdNew", ;
Picture = images\pr_new.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "New...", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'cmdOpen' AS cbutton WITH ;
Alignment = 0, ;
Caption = "", ;
Enabled = .T., ;
FontName = "Wingdings", ;
Left = 2, ;
Name = "cmdOpen", ;
Picture = images\pr_open.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Open HTML file...", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'cmdPaste' AS cbutton WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = Paste, ;
FontName = "Wingdings", ;
Left = 131, ;
Name = "cmdPaste", ;
Picture = images\pr_paste.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Paste", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'cmdPicture' AS cbutton WITH ;
Caption = "", ;
Left = 474, ;
Name = "cmdPicture", ;
Picture = images\pr_getimage.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Insert picture", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'cmdRedo' AS cbutton WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = Redo, ;
Left = 183, ;
Name = "cmdRedo", ;
Picture = images\pr_redo.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Redo", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'cmdSave' AS cbutton WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = SaveAs, ;
Enabled = .T., ;
FontName = "Wingdings", ;
Left = 26, ;
Name = "cmdSave", ;
Picture = images\pr_save.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Save as HTML...", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'cmdUndo' AS cbutton WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = Undo, ;
FontName = "Wingdings", ;
Left = 159, ;
Name = "cmdUndo", ;
Picture = images\pr_undo.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Undo", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Label1' AS label WITH ;
Alignment = 2, ;
AutoSize = .F., ;
BorderStyle = 1, ;
Caption = "More...", ;
Height = 19, ;
Left = 374, ;
Name = "Label1", ;
Top = 27, ;
Width = 44
*< END OBJECT: BaseClass="label" />
ADD OBJECT 'oIE' AS cie WITH ;
Height = 100, ;
Left = 0, ;
Name = "oIE", ;
Top = 48, ;
Width = 100, ;
_memberdata = <VFPData>
<memberdata name="foomethod" type="method" display="fooMethod" favorites="True"/>
<memberdata name="oIE" type="property" display="oIE" favorites="True"/>
<memberdata name="_memberdata" type="property" display="_MemberData" favorites="True"/>
<memberdata name="baseclass" type="property" display="BaseClasS" favorites="True"/>
<memberdata name="error" type="method" display="eRRor" favorites="True"/>
</VFPData>
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="olecontrol" OLEObject="c:\windows\system32\ieframe.dll" Value="0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAEAAAAgAAAAEAAAD+////AAAAAAAAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/////v////7////+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////1IAbwBvAHQAIABFAG4AdAByAHkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAUA//////////8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAk8YnBp8sBAwAAAEABAAAAAAAAAwBPAGwAZQBPAGIAagBlAGMAdABEAGEAdABhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAgEDAAAAAgAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArAAAAAAAAAADAEEAYwBjAGUAcwBzAE8AYgBqAFMAaQB0AGUARABhAHQAYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJgACAP///////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAA4AAAAAAAAAAMAQwBoAGEAbgBnAGUAZABQAHIAbwBwAHMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAIA////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAQAAAAAAAAAAwAAAP7////+////BAAAAP7///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9h+VaICjTQEalrAMBP1wWiTAAAAFYKAABWCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAAOAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAA4NBXAHM1zxGuaQgAKy4SYggAAAAAAAAATAAAAAEUAgAAAAAAwAAAAAAAAEaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFQALgAxAFwAUwB5AHMAdABlAG0AMwAyADsAQwA6AFwAVwBJAE4ATgBUAC4AMQBcAHMAeQBzAHQAZQBtADsAQwA6AFwAVwBJAE4ATgBUAC4AMQA7AEMAOgBcAFcASQBOAE4AVAAuADEAXABzAHkAcwB0AGUAbQAzADIAOwBDADoAXABXAEkATgBOAFQALgAxADsAQwA6AFwAVwBJAE4ATgBUAC4AMQBcAFMAeQBzAHQAZQBtADMAMgBcAFcAYgBlAA==" />
ADD OBJECT 'tgBold' AS ctoggle WITH ;
Alignment = 0, ;
Caption = "B", ;
cpropertyname = Bold, ;
FontBold = .T., ;
FontName = "Arial", ;
Left = 216, ;
Name = "tgBold", ;
SpecialEffect = 2, ;
ToolTipText = "Bold", ;
Top = 24
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />
ADD OBJECT 'tgBullet' AS ctoggle WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = InsertUnOrderedList, ;
Left = 317, ;
Name = "tgBullet", ;
Picture = images\pr_listdot.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Formatting bullets", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />
ADD OBJECT 'tgCenter' AS ctoggle WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = JustifyCenter, ;
Left = 240, ;
Name = "tgCenter", ;
Picture = images\pr_align_center.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Center", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />
ADD OBJECT 'tgClean' AS cbutton WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = RemoveFormat, ;
Left = 428, ;
Name = "tgClean", ;
Picture = images\pr_clean.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Remove formatting", ;
Top = 24
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'tgDecrease' AS ctoggle WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = Outdent, ;
Left = 372, ;
Name = "tgDecrease", ;
Picture = images\pr_textmoveleft.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Decrease indentation", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />
ADD OBJECT 'tgIncrease' AS ctoggle WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = Indent, ;
Left = 398, ;
Name = "tgIncrease", ;
Picture = images\pr_textmoveright.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Increase indentation", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />
ADD OBJECT 'tgItalic' AS ctoggle WITH ;
Alignment = 0, ;
Caption = "I", ;
cpropertyname = Italic, ;
FontItalic = .T., ;
FontName = "Arial", ;
Left = 240, ;
Name = "tgItalic", ;
SpecialEffect = 2, ;
ToolTipText = "Italic", ;
Top = 24
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />
ADD OBJECT 'tgJustify' AS ctoggle WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = JustifyFull, ;
Left = 288, ;
Name = "tgJustify", ;
Picture = images\pr_align_justify.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Justify", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />
ADD OBJECT 'tgLeft' AS ctoggle WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = JustifyLeft, ;
Left = 216, ;
Name = "tgLeft", ;
Picture = images\pr_align_left.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Align left", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />
ADD OBJECT 'tgLine' AS cbutton WITH ;
Alignment = 2, ;
Caption = "--", ;
cpropertyname = InsertHorizontalRule, ;
FontName = "Arial", ;
Left = 428, ;
Name = "tgLine", ;
SpecialEffect = 2, ;
ToolTipText = "Insert horizontal line", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />
ADD OBJECT 'tgNumbers' AS ctoggle WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = InsertOrderedList, ;
Left = 341, ;
Name = "tgNumbers", ;
Picture = images\pr_listnumber.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Formatting numbers", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />
ADD OBJECT 'tgRight' AS ctoggle WITH ;
Alignment = 0, ;
Caption = "", ;
cpropertyname = JustifyRight, ;
Left = 264, ;
Name = "tgRight", ;
Picture = images\pr_align_right.bmp, ;
SpecialEffect = 2, ;
ToolTipText = "Align right", ;
Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />
ADD OBJECT 'tgUnderline' AS ctoggle WITH ;
Alignment = 0, ;
Caption = "U", ;
cpropertyname = Underline, ;
FontName = "Arial", ;
FontUnderline = .T., ;
Left = 264, ;
Name = "tgUnderline", ;
SpecialEffect = 2, ;
ToolTipText = "Underline", ;
Top = 24
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />
PROCEDURE activatecommands
LOCAL oToggle
FOR EACH oToggle IN This.Objects
IF UPPER(oToggle.Class) = "CTOGGLE"
This.oIE.Document.queryCommandEnabled(oToggle.cPropertyName)
* oToggle.Refresh()
ENDIF
NEXT
ENDPROC
PROCEDURE Init
This.Resize()
ENDPROC
PROCEDURE Resize
This.width=this.parent.width
This.height=this.parent.height - 72
*!* *this.top=0
*!* *this.left=0
This.oIE.Width = This.Width - 2
This.oIE.Height = This.Height - 60
ENDPROC
PROCEDURE RightClick
MESSAGEBOX(This.oIE.Document.Body.OuterHTML)
ENDPROC
PROCEDURE toggle
LPARAMETERS tcPropertyName
IF "JUSTIFY" $ UPPER(tcPropertyName)
IF This.oIE.Document.queryCommandValue(tcPropertyName)
tcPropertyName = "JustifyNone"
ENDIF
ENDIF
This.oIE.Document.execCommand(tcPropertyName)
This.oIE.SetFocus()
ENDPROC
PROCEDURE togglestatus
IF This.lToggleUpdate
LOCAL oToggle
IF NOT EMPTY(This.oIE.LocationURL)
FOR EACH oToggle IN This.Objects
IF UPPER(oToggle.Class) = "CTOGGLE"
oToggle.Value = This.oIE.Document.QueryCommandValue(oToggle.cPropertyName)
* oToggle.Refresh()
ENDIF
IF UPPER(oToggle.ParentClass) = "_CBO"
oToggle.Value = This.oIE.Document.queryCommandValue(oToggle.cPropertyName)
ENDIF
NEXT
ENDIF
ENDIF
ENDPROC
PROCEDURE btnBackColor.Click
LOCAL lnColor, lcColor
lnColor = GETCOLOR()
IF lnColor > -1
lcColor = RIGHT(TRANSFORM(lnColor,"@0"),6)
lcColor = RIGHT(lcColor, 2)+ SUBSTR(lcColor,3,2)+ LEFT(lcColor,2)
This.Parent.oIE.Document.execCommand("BackColor",.F.,lcColor)
ENDIF
RETURN
* Not used any more
* This converted the whole document BackColor instead of the current selection
LOCAL lnColor, lcColor
lnColor = GETCOLOR()
IF lnColor > -1
lcColor = RIGHT(TRANSFORM(lnColor,"@0"),6)
lcColor = RIGHT(lcColor, 2)+ SUBSTR(lcColor,3,2)+ LEFT(lcColor,2)
This.Parent.oIE.Document.bgColor = lcColor
ENDIF
ENDPROC
PROCEDURE btnForeColor.Click
LOCAL lnColor, lcColor
lnColor = GETCOLOR()
IF lnColor > -1
lcColor = RIGHT(TRANSFORM(lnColor,"@0"),6)
lcColor = RIGHT(lcColor, 2)+ SUBSTR(lcColor,3,2)+ LEFT(lcColor,2)
This.Parent.oIE.Document.execCommand("ForeColor",.F.,lcColor)
ENDIF
ENDPROC
PROCEDURE cmbFontName.InteractiveChange
This.Parent.oIE.Document.execCommand("FontName",.F.,This.DisplayValue)
ENDPROC
PROCEDURE cmbFontSize.InteractiveChange
This.Parent.oIE.Document.execCommand("FontSize",.F.,This.Value)
ENDPROC
PROCEDURE cmdHyperlink.Click
This.Parent.oIE.Document.execCommand("CreateLink", .T.)
ENDPROC
PROCEDURE cmdNew.Click
WITH this.Parent.OiE
.navigate("about:blank")
DO WHILE (.busy) OR (.ReadyState != 4)
DOEVENTS
ENDDO
ENDWITH
this.Parent.refresh
ENDPROC
PROCEDURE cmdOpen.Click
NODEFAULT
LOCAL lcFile
lcFile=GETFILE("htm*")
IF !EMPTY(lcFile)
WITH this.Parent.oIE
.Navigate(lcFile)
DO WHILE .ReadyState != 4
DOEVENTS
ENDDO
.Document.Body.contentEditable = .T.
.Refresh()
.SetFocus()
ENDWITH
ENDIF
ENDPROC
PROCEDURE cmdPicture.Click
This.Parent.oIE.Document.execCommand("InsertImage",.T.)
ENDPROC
PROCEDURE Label1.Click
define popup pop1 shortcut
define bar 1 of pop1 prompt "Inner"
define bar 2 of pop1 prompt "Outer"
define bar 3 of pop1 prompt "Importar texto de arquivo TXT"
define bar 4 of pop1 prompt "Copiar HTML"
define bar 5 of pop1 prompt "Copiar Texto"
private oThis
oThis = This.Parent
on selection bar 1 of pop1 MESSAGEBOX(oThis.oIE.Document.Body.InnerHTML)
on selection bar 2 of pop1 MESSAGEBOX(oThis.oIE.Document.Body.OuterHTML)
on selection bar 3 of pop1 oThis.oIE.Document.Body.innerHTML = GETFILE("txt")
on selection bar 4 of pop1 _ClipText = oThis.oIE.Document.Body.innerHTML
on selection bar 5 of pop1 _ClipText = oThis.oIE.Document.Body.innerTEXT
activate popup pop1 AT MROW(),MCOL()
ENDPROC
PROCEDURE oIE.CommandStateChange
*** ActiveX Control Event ***
LPARAMETERS command, enable
This.Parent.ToggleStatus()
DODEFAULT(command, enable)
ENDPROC
PROCEDURE oIE.DownloadComplete
*** ActiveX Control Event ***
DODEFAULT()
This.Parent.Activatecommands()
ENDPROC
ENDDEFINE
DEFINE CLASS cie AS olecontrol
*< CLASSDATA: Baseclass="olecontrol" Timestamp="" Scale="Pixels" Uniqueid="" Nombre="cie" Parent="" ObjName="cie" OLEObject="C:\WINNT\System32\shdocvw.dll" Value="0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAEAAAAgAAAAEAAAD+////AAAAAAAAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/////v////7////+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////1IAbwBvAHQAIABFAG4AdAByAHkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAUA//////////8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD+grtq8ccBAwAAAEABAAAAAAAAAwBPAGwAZQBPAGIAagBlAGMAdABEAGEAdABhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAgEDAAAAAgAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArAAAAAAAAAADAEEAYwBjAGUAcwBzAE8AYgBqAFMAaQB0AGUARABhAHQAYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJgACAP///////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAA4AAAAAAAAAAMAQwBoAGEAbgBnAGUAZABQAHIAbwBwAHMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAIA////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAQAAAAAAAAAAwAAAP7////+////BAAAAP7///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9h+VaICjTQEalrAMBP1wWiTAAAAFYKAABWCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAAOAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABuACAANQAuAAEAAIAoAFMAUAAyACkACQB7ADUAOABEAEEAOABEADgARgAtADkARAA2AEEALQAxADAAMQBCAC0AQQBGAEMAMAABAAAA4NBXAHM1zxGuaQgAKy4SYggAAAAAAAAATAAAAAEUAgAAAAAAwAAAAAAAAEaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAA7AC4AOwBDADoAXABXAEkATgBOAFQALgAxAFwAUwB5AHMAdABlAG0AMwAyADsAQwA6AFwAVwBJAE4ATgBUAC4AMQBcAHMAeQBzAHQAZQBtADsAQwA6AFwAVwBJAE4ATgBUAC4AMQA7AEMAOgBcAFcASQBOAE4AVAAuADEAXABzAHkAcwB0AGUAbQAzADIAOwBDADoAXABXAEkATgBOAFQALgAxADsAQwA6AFwAVwBJAE4ATgBUAC4AMQBcAFMAeQBzAHQAZQBtADMAMgBcAFcAYgBlAA==" />
*<DefinedPropArrayMethod>
*p: lfirstrefresh
*p: _memberdata && XML Metadata for customizable properties
*</DefinedPropArrayMethod>
*<PropValue>
Height = 100
lfirstrefresh = .T.
Name = "cie"
Width = 100
_memberdata = <VFPData>
<memberdata name="foomethod" type="method" display="fooMethod" favorites="True"/>
<memberdata name="cie" type="property" display="cie" favorites="True"/>
<memberdata name="_memberdata" type="property" display="_MemberData" favorites="True"/>
<memberdata name="baseclass" type="property" display="BaseClasS" favorites="True"/>
<memberdata name="error" type="method" display="eRRor" favorites="True"/>
</VFPData>
*</PropValue>
PROCEDURE DownloadComplete
*** ActiveX Control Event ***
* Set the edit mode on
*THIS.Document.designMode = "On" && This gives a different context menu
This.Document.Body.contentEditable = .T. && This is a good context menu
ENDPROC
PROCEDURE Init
* Navigate to a blank page
*This.Navigate2("About:Blank")
* Prevent an OLE error, and wait until the object
* gets the blank page open before showing or accessing
LOCAL lnLoadTimeout
lnLoadTimeout = 3 && seconds
WITH This.OBJECT
.Navigate("about:blank")
* Wait for load completion
lnStartSeconds = SECONDS()
DO WHILE .ReadyState <> 4 ;
AND (SECONDS()-lnStartSeconds <= lnLoadTimeout )
DOEVENTS
ENDDO
ENDWITH
ENDPROC
PROCEDURE Refresh
*** ActiveX Control Method ***
IF This.lFirstRefresh
NODEFAULT
This.lFirstRefresh = .F.
This.Document.Body.contentEditable = .T.
ENDIF
ENDPROC
ENDDEFINE
DEFINE CLASS ctoggle AS checkbox
*< CLASSDATA: Baseclass="checkbox" Timestamp="" Scale="Pixels" Uniqueid="" />
*<DefinedPropArrayMethod>
*p: cpropertyname && The name of the property this command will toggle
*</DefinedPropArrayMethod>
*<PropValue>
Alignment = 0
Caption = "C"
FontName = "Wingdings"
FontSize = 12
Height = 23
Name = "ctoggle"
Style = 1
TabStop = .F.
Value = .F.
Width = 23
*</PropValue>
PROCEDURE Click
This.Parent.Toggle(This.cPropertyName)
ENDPROC
PROCEDURE DblClick
NODEFAULT
ENDPROC
PROCEDURE RightClick
NODEFAULT
ENDPROC
ENDDEFINE

229
utile/email/pr_sendmail.sc2 Normal file
View File

@@ -0,0 +1,229 @@
*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="pr_sendmail.scx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS dataenvironment AS dataenvironment
*< CLASSDATA: Baseclass="dataenvironment" Timestamp="" Scale="" Uniqueid="" ClassIcon="2" />
*<PropValue>
DataSource = .NULL.
Height = 0
Left = 0
Name = "Dataenvironment"
Top = 0
Width = 0
*</PropValue>
ENDDEFINE
DEFINE CLASS frmsendmail AS form
*< CLASSDATA: Baseclass="form" Timestamp="" Scale="" Uniqueid="" />
*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder
*< OBJECTDATA: ObjPath="cmdSend" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdCancel" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="lblTo" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="txtDestination" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="lblSubject" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="txtSubject" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="lblBody" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="edtBody" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="lblAttachment" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Image1" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*m: updatecontrol
*m: updatetable
*p: _memberdata && XML Metadata for customizable properties
*</DefinedPropArrayMethod>
*<PropValue>
AllowOutput = .F.
AlwaysOnTop = .T.
AutoCenter = .T.
BorderStyle = 2
Caption = "Send Email"
Closable = .F.
DataSession = 2
Desktop = .T.
DoCreate = .T.
Height = 400
Icon = ..\..\..\..\
MaxButton = .F.
MinButton = .F.
Name = "frmSendMail"
ShowWindow = 1
Width = 470
WindowType = 1
_memberdata = <VFPData>
<memberdata name="updatecontrol" display="UpdateControl"/>
<memberdata name="updatetable" display="UpdateTable"/>
</VFPData>
*</PropValue>
ADD OBJECT 'cmdCancel' AS commandbutton WITH ;
Cancel = .T., ;
Caption = "Cancel", ;
Height = 27, ;
Left = 372, ;
Name = "cmdCancel", ;
TabIndex = 6, ;
Top = 360, ;
Width = 84
*< END OBJECT: BaseClass="commandbutton" />
ADD OBJECT 'cmdSend' AS commandbutton WITH ;
Caption = "Send", ;
Height = 27, ;
Left = 276, ;
Name = "cmdSend", ;
TabIndex = 5, ;
Top = 360, ;
Width = 84
*< END OBJECT: BaseClass="commandbutton" />
ADD OBJECT 'edtBody' AS editbox WITH ;
Height = 240, ;
Left = 87, ;
Name = "edtBody", ;
TabIndex = 4, ;
Top = 110, ;
Width = 370
*< END OBJECT: BaseClass="editbox" />
ADD OBJECT 'Image1' AS image WITH ;
BackStyle = 0, ;
Height = 16, ;
Left = 62, ;
Name = "Image1", ;
Picture = images\pr_attach.bmp, ;
Top = 84, ;
Width = 16
*< END OBJECT: BaseClass="image" />
ADD OBJECT 'lblAttachment' AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "Attachment", ;
Height = 17, ;
Left = 85, ;
Name = "lblAttachment", ;
TabIndex = 3, ;
Top = 84, ;
Width = 63
*< END OBJECT: BaseClass="label" />
ADD OBJECT 'lblBody' AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "Body:", ;
Height = 17, ;
Left = 14, ;
Name = "lblBody", ;
TabIndex = 9, ;
Top = 110, ;
Width = 32
*< END OBJECT: BaseClass="label" />
ADD OBJECT 'lblSubject' AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "Subject:", ;
Height = 17, ;
Left = 14, ;
Name = "lblSubject", ;
TabIndex = 8, ;
Top = 52, ;
Width = 46
*< END OBJECT: BaseClass="label" />
ADD OBJECT 'lblTo' AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "To:", ;
Height = 17, ;
Left = 14, ;
Name = "lblTo", ;
TabIndex = 7, ;
Top = 16, ;
Width = 19
*< END OBJECT: BaseClass="label" />
ADD OBJECT 'txtDestination' AS textbox WITH ;
Height = 23, ;
Left = 87, ;
Name = "txtDestination", ;
TabIndex = 1, ;
Top = 16, ;
Width = 370
*< END OBJECT: BaseClass="textbox" />
ADD OBJECT 'txtSubject' AS textbox WITH ;
Height = 23, ;
Left = 87, ;
Name = "txtSubject", ;
TabIndex = 2, ;
Top = 52, ;
Width = 370
*< END OBJECT: BaseClass="textbox" />
PROCEDURE Init
LPARAMETERS tcFile
Thisform.lblAttachment.Caption = JUSTFNAME(tcFile)
Thisform.AddProperty("lCancelled", .F.)
TRY
This.Icon = _goFP.cFormIcon
CATCH
ENDTRY
TRY
WITH _goFP
This.txtDestination.Value = .cEmailTo
This.txtSubject.Value = .cEmailSubject
This.edtBody.Value = .cEmailBody
This.Caption = .GetLoc("SENDEMAIL")
This.CmdCancel.Caption = .GetLoc("CANCEL")
This.CmdSend.Caption = .GetLoc("SEND")
This.lblBody.Caption = .GetLoc("BODY")
This.lblSubject.Caption = .GetLoc("SUBJECT")
This.lblTo.Caption = .GetLoc("TO")
ENDWITH
CATCH
ENDTRY
ENDPROC
PROCEDURE Load
SET TALK OFF
SET CONSOLE OFF
ENDPROC
PROCEDURE Unload
RETURN Thisform.lCancelled
ENDPROC
PROCEDURE updatecontrol
ENDPROC
PROCEDURE updatetable
ENDPROC
PROCEDURE cmdCancel.Click
Thisform.lCancelled = .T.
Thisform.Release()
ENDPROC
PROCEDURE cmdSend.Click
WITH _goFP
.cEmailTo = ALLTRIM(Thisform.txtDestination.Value)
.cEmailSubject = ALLTRIM(Thisform.txtSubject.Value)
.cEmailBody = Thisform.edtBody.Value
ENDWITH
Thisform.Release()
ENDPROC
ENDDEFINE

View File

@@ -0,0 +1,821 @@
*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="pr_sendmail2.scx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS dataenvironment AS dataenvironment
*< CLASSDATA: Baseclass="dataenvironment" Timestamp="" Scale="" Uniqueid="" ClassIcon="1" />
*<PropValue>
DataSource = .NULL.
Height = 200
Left = 316
Name = "Dataenvironment"
Top = 188
Width = 331
*</PropValue>
ENDDEFINE
DEFINE CLASS frmsendmail2 AS form
*< CLASSDATA: Baseclass="form" Timestamp="" Scale="" Uniqueid="" />
*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder
*< OBJECTDATA: ObjPath="Chtmleditor1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="txtDestination" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="TxtSubject" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="chkPriority" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="chkReceipt" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmbAttach" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdAttachment" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="lblTo" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="lblSubject" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdSend" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdCancel" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Command1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="cmdSendFax" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*m: removeattachment
*m: setlanguage
*p: ctempfile
*p: _memberdata && XML Metadata for customizable properties
*p: _origautoyield
*p: _origsys2333
*</DefinedPropArrayMethod>
*<PropValue>
AllowOutput = .F.
AlwaysOnTop = .T.
AutoCenter = .T.
BorderStyle = 3
Caption = "Send report to email"
Closable = .F.
ctempfile =
DataSession = 1
Desktop = .T.
DoCreate = .T.
Height = 492
MaxButton = .T.
MinHeight = 250
MinWidth = 580
Name = "frmSendMail2"
ShowTips = .T.
ShowWindow = 1
Width = 690
WindowType = 1
_memberdata = <VFPData>
<memberdata name="removeattachment" display="RemoveAttachment"/>
<memberdata name="_origautoyield" display="_OrigAutoYield"/>
<memberdata name="_origsys2333" display="_OrigSYS2333"/>
</VFPData>
_origautoyield = .F.
_origsys2333 = .F.
*</PropValue>
ADD OBJECT 'chkPriority' AS checkbox WITH ;
Alignment = 0, ;
Caption = "Priority", ;
Height = 13, ;
Left = 537, ;
Name = "chkPriority", ;
TabIndex = 9, ;
Top = 108, ;
Value = .F., ;
Visible = .T., ;
Width = 148
*< END OBJECT: BaseClass="checkbox" />
ADD OBJECT 'chkReceipt' AS checkbox WITH ;
Alignment = 0, ;
Caption = "Read receipt", ;
Height = 13, ;
Left = 537, ;
Name = "chkReceipt", ;
TabIndex = 11, ;
Top = 84, ;
Value = .F., ;
Visible = .T., ;
Width = 148
*< END OBJECT: BaseClass="checkbox" />
ADD OBJECT 'Chtmleditor1' AS chtmleditor WITH ;
Anchor = 15, ;
BorderWidth = 0, ;
Height = 365, ;
Left = 1, ;
Name = "Chtmleditor1", ;
TabIndex = 3, ;
Top = 84, ;
Width = 655, ;
oIE.Height = 120, ;
oIE.Left = 0, ;
oIE.Name = "oIE", ;
oIE.TabIndex = 1, ;
oIE.Top = 48, ;
oIE.Width = 132, ;
tgBold.Alignment = 0, ;
tgBold.Name = "tgBold", ;
tgBold.TabIndex = 23, ;
tgItalic.Alignment = 0, ;
tgItalic.Name = "tgItalic", ;
tgItalic.TabIndex = 24, ;
tgUnderline.Alignment = 0, ;
tgUnderline.Name = "tgUnderline", ;
tgUnderline.TabIndex = 25, ;
tgLeft.Alignment = 0, ;
tgLeft.Name = "tgLeft", ;
tgLeft.TabIndex = 10, ;
tgCenter.Alignment = 0, ;
tgCenter.Name = "tgCenter", ;
tgCenter.TabIndex = 11, ;
tgRight.Alignment = 0, ;
tgRight.Name = "tgRight", ;
tgRight.TabIndex = 12, ;
btnForeColor.Name = "btnForeColor", ;
btnForeColor.TabIndex = 26, ;
btnBackColor.Name = "btnBackColor", ;
btnBackColor.TabIndex = 27, ;
cmbFontName.Height = 23, ;
cmbFontName.Left = 0, ;
cmbFontName.Name = "cmbFontName", ;
cmbFontName.TabIndex = 21, ;
cmbFontName.Top = 24, ;
cmbFontName.Width = 154, ;
cmbFontSize.Alignment = 2, ;
cmbFontSize.Height = 23, ;
cmbFontSize.Left = 159, ;
cmbFontSize.Name = "cmbFontSize", ;
cmbFontSize.TabIndex = 22, ;
cmbFontSize.Top = 24, ;
cmbFontSize.Width = 47, ;
tgIncrease.Alignment = 0, ;
tgIncrease.Name = "tgIncrease", ;
tgIncrease.TabIndex = 16, ;
tgDecrease.Alignment = 0, ;
tgDecrease.Name = "tgDecrease", ;
tgDecrease.TabIndex = 15, ;
tgBullet.Alignment = 0, ;
tgBullet.Name = "tgBullet", ;
tgBullet.TabIndex = 14, ;
tgNumbers.Alignment = 0, ;
tgNumbers.Name = "tgNumbers", ;
tgNumbers.TabIndex = 29, ;
cmdHyperlink.Name = "cmdHyperlink", ;
cmdHyperlink.TabIndex = 18, ;
cmdPicture.Name = "cmdPicture", ;
cmdPicture.TabIndex = 19, ;
Label1.Left = 453, ;
Label1.Name = "Label1", ;
Label1.TabIndex = 28, ;
Label1.Top = 28, ;
Label1.Visible = .F., ;
tgJustify.Alignment = 0, ;
tgJustify.Name = "tgJustify", ;
tgJustify.TabIndex = 13, ;
cmdOpen.Name = "cmdOpen", ;
cmdSave.cpropertyname = , ;
cmdSave.Name = "cmdSave", ;
cmdNew.Name = "cmdNew", ;
cmdCut.cpropertyname = Cut, ;
cmdCut.Name = "cmdCut", ;
cmdCopy.cpropertyname = Copy, ;
cmdCopy.Name = "cmdCopy", ;
cmdPaste.cpropertyname = Paste, ;
cmdPaste.Name = "cmdPaste", ;
cmdUndo.cpropertyname = Undo, ;
cmdUndo.Name = "cmdUndo", ;
cmdRedo.cpropertyname = Redo, ;
cmdRedo.Name = "cmdRedo", ;
tgLine.Alignment = 0, ;
tgLine.Name = "tgLine", ;
tgLine.TabIndex = 17, ;
tgCLean.Alignment = 0, ;
tgCLean.Left = 503, ;
tgCLean.Name = "tgCLean", ;
tgCLean.TabIndex = 20, ;
tgCLean.Top = 0
*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="container" />
ADD OBJECT 'cmbAttach' AS combobox WITH ;
ColumnCount = 2, ;
ColumnLines = .F., ;
ColumnWidths = "160,0", ;
FontSize = 8, ;
Height = 24, ;
Left = 537, ;
Name = "cmbAttach", ;
Style = 2, ;
TabIndex = 8, ;
Top = 48, ;
Width = 141
*< END OBJECT: BaseClass="combobox" />
ADD OBJECT 'cmdAttachment' AS commandbutton WITH ;
Caption = "", ;
Height = 23, ;
Left = 504, ;
Name = "cmdAttachment", ;
Picture = images\pr_attach.bmp, ;
SpecialEffect = 2, ;
TabIndex = 7, ;
Top = 48, ;
Width = 23
*< END OBJECT: BaseClass="commandbutton" />
ADD OBJECT 'cmdCancel' AS commandbutton WITH ;
Anchor = 12, ;
Cancel = .T., ;
Caption = "Cancel", ;
Height = 27, ;
Left = 592, ;
Name = "cmdCancel", ;
TabIndex = 5, ;
Top = 456, ;
Width = 84
*< END OBJECT: BaseClass="commandbutton" />
ADD OBJECT 'cmdSend' AS commandbutton WITH ;
Anchor = 12, ;
Caption = "Send", ;
Height = 27, ;
Left = 495, ;
Name = "cmdSend", ;
Picture = images\pr_sendmessage.bmp, ;
PicturePosition = 0, ;
TabIndex = 4, ;
Top = 456, ;
Width = 84
*< END OBJECT: BaseClass="commandbutton" />
ADD OBJECT 'cmdSendFax' AS commandbutton WITH ;
Anchor = 12, ;
Caption = "Fax", ;
Height = 27, ;
Left = 398, ;
Name = "cmdSendFax", ;
Picture = images\pr_fax.bmp, ;
PicturePosition = 0, ;
TabIndex = 4, ;
Top = 456, ;
Visible = .F., ;
Width = 84
*< END OBJECT: BaseClass="commandbutton" />
ADD OBJECT 'Command1' AS commandbutton WITH ;
Caption = "", ;
Height = 23, ;
Left = 5, ;
Name = "Command1", ;
Picture = images\pr_adress.bmp, ;
SpecialEffect = 2, ;
TabIndex = 6, ;
TabStop = .F., ;
Top = 12, ;
Width = 23
*< END OBJECT: BaseClass="commandbutton" />
ADD OBJECT 'lblSubject' AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "Subject:", ;
Height = 17, ;
Left = 8, ;
Name = "lblSubject", ;
TabIndex = 12, ;
Top = 50, ;
Width = 46
*< END OBJECT: BaseClass="label" />
ADD OBJECT 'lblTo' AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "To:", ;
Height = 17, ;
Left = 29, ;
Name = "lblTo", ;
TabIndex = 10, ;
Top = 14, ;
Width = 19
*< END OBJECT: BaseClass="label" />
ADD OBJECT 'txtDestination' AS textbox WITH ;
AutoComplete = 2, ;
AutoCompTable = "FoxyPreviewer_Emails", ;
Format = "K", ;
Height = 23, ;
Left = 110, ;
MaxLength = 255, ;
Name = "txtDestination", ;
TabIndex = 1, ;
Top = 12, ;
Width = 386
*< END OBJECT: BaseClass="textbox" />
ADD OBJECT 'TxtSubject' AS textbox WITH ;
Format = "K", ;
Height = 23, ;
Left = 110, ;
Name = "TxtSubject", ;
TabIndex = 2, ;
Top = 48, ;
Width = 386
*< END OBJECT: BaseClass="textbox" />
PROCEDURE Activate
IF EMPTY(This.Comment)
This.Width = This.Width + 1
This.Comment = "Started"
ENDIF
ENDPROC
PROCEDURE Init
LPARAMETERS tcFile
* Thisform.lblAttachment.Caption = JUSTFNAME(tcFile)
IF NOT EMPTY(tcFile)
WITH Thisform.CmbAttach as ComboBox
.AddItem(JUSTFNAME(tcFile))
.List(.NewIndex, 2) = tcFile
.ListIndex = 1
.Refresh()
ENDWITH
ENDIF
LOCAL lcAttach, n, lcFile
lcAttach = _goFP.cAttachments
IF NOT EMPTY(lcAttach)
lcAttach = CHRTRAN(lcAttach, ";", ",")
FOR m.n = 1 TO GETWORDCOUNT(lcAttach, ",")
lcFile = GETWORDNUM(lcAttach, m.n, ",")
IF NOT FILE(lcFile)
LOOP
ENDIF
WITH Thisform.CmbAttach as ComboBox
.AddItem(JUSTFNAME(lcFile))
.List(.NewIndex, 2) = lcFile
.ListIndex = 1
.Refresh()
ENDWITH
ENDFOR
ENDIF
Thisform.AddProperty("lCancelled", .F.)
TRY
This.Icon = _goFP.cFormIcon
CATCH
ENDTRY
TRY
WITH _goFP
This.txtDestination.Value = .cEmailTo
This.txtSubject.Value = .cEmailSubject
* This.edtBody.Value = .cEmailBody
This.chkPriority.Value = .lPriority
This.chkReceipt.Value = .lReadReceipt
This.Caption = .GetLoc("SENDEMAIL")
This.CmdCancel.Caption = .GetLoc("CANCEL")
This.CmdSend.Caption = .GetLoc("SEND")
This.lblSubject.Caption = .GetLoc("SUBJECT")
This.lblTo.Caption = .GetLoc("TO")
* Determine if the fax button will be shown
IF NOT EMPTY(.cFAXprg)
Thisform.cmdSendFax.Visible = .T.
ENDIF
TRY
IF NOT EMPTY(_goFP.cEmailBody) OR NOT EMPTY(_goFP.cEmailBodyFile)
LOCAL lcHTMLFile
IF NOT EMPTY(_goFP.cEmailBody)
lcHTMLfile = FORCEEXT(ADDBS(SYS(2023))+SYS(2015),"htm")
STRTOFILE(_goFP.cEmailBody, lcHTMLFile)
Thisform.cTempFile = lcHTMLFile
INKEY(.1)
ELSE
lcHTMLfile = _goFP.cEmailBodyFile
ENDIF
IF FILE(lcHTMLfile)
WITH Thisform.Chtmleditor1.oIE
.Navigate(lcHTMLFile)
DO WHILE .ReadyState != 4
DOEVENTS
ENDDO
.Document.Body.contentEditable = .T.
ENDWITH
IF lcHTMLfile ==_goFP.cEmailBodyFile && Whithout this the "cEmailBodyFile" will be always deleted!!... by Nick Porfyris [20101213]...
ELSE
DELETE FILE (lcHTMLFile)
ENDIF
ENDIF
ENDIF
CATCH
MESSAGEBOX("Could not load the HTML body file", 48, "Error loading HTML")
ENDTRY
ENDWITH
CATCH
ENDTRY
This.SetLanguage()
RETURN
*!* XP Style WebBrowser Control
*!* I'm sure there is more then me that been looking for a way to get the XP style in the WebBrowser Control.
*!* To enable the XP style in your web pages that you load in your WebBrowser Control put the following line in your head tags:
*!* Code:
*!* <META HTTP-EQUIV='MSThemeCompatible' CONTENT='Yes'>
*!* * Testing code
*!* TEXT TO lcHTML NOSHOW
*!* <HTML><HEAD>
*!* <STYLE></STYLE>
*!* </HEAD>
*!* <BODY bgColor=#ffffff>
*!* <FONT face=Verdana size=2>
*!* <<lcLogoImg>>
*!* To<BR></FONT>
*!* <<tcHTMLbody>>
*!* <BR>
*!* <BR>
*!* <FONT face=Verdana size=2>Sincerely</FONT>
*!* <P></P>
*!* <BR>
*!* <HR><STRONG>
*!* <FONT face=Verdana size=1>FoxyPreviewer team.</FONT></STRONG>
*!* <FONT face=Arial color=black size=1><BR>
*!* <FONT face=Verdana>1818 Super Street&nbsp; -&nbsp; Your Home<BR>05432-030 &nbsp;- &nbsp;Your City&nbsp;- &nbsp;XX</FONT><BR>
*!* <FONT face=Wingdings color=black size=2>(</FONT><STRONG> </STRONG>
*!* <FONT face=Verdana>Phone: 1 11 -&nbsp;3322.2233 <BR></FONT>
*!* <FONT face=Wingdings color=black size=2>(</FONT>
*!* <FONT face=Verdana>Fax:&nbsp;&nbsp; 2 11 - 3366.6656<BR></FONT>
*!* <FONT face=Wingdings color=black size=2>*</FONT>
*!* <A href="mailto:contact@mycompany.com"><FONT face=Verdana>contact@mycompany.com</FONT></A> </FONT>
*!* <BR>
*!* </HTML>
*!* ENDTEXT
*!* SET TEXTMERGE ON
*!* lcHTML = TEXTMERGE(lcHTML,.T.,"<<",">>")
*!*
*!* lcFile = FORCEEXT(ADDBS(SYS(2023))+SYS(2015),"htm")
*!* Thisform.cTempFile = lcFile
*!* STRTOFILE(lcHTML, lcFile)
*!* WITH Thisform.Chtmleditor1.oIE
*!* .Navigate(lcFile)
*!* DO WHILE .ReadyState != 4
*!* DOEVENTS
*!* ENDDO
*!* .Document.Body.contentEditable = .T.
*!* ENDWITH
* Article with all the EXECWB commands available
* http://delphicikk.atw.hu/listaz.php?id=1391&oldal=41
ENDPROC
PROCEDURE Load
SET TALK OFF
SET CONSOLE OFF
*!* * Adjust some properties to make sure the WebBrowser active-X will work as desired
*!* * http://www.tek-tips.com/viewthread.cfm?qid=1204873&page=168
*!* This._OrigAutoYield = _VFP.AutoYield
*!* This._OrigSYS2333 = VAL(SYS(2333, 2))
*!* _VFP.AutoYield = .F.
*!* SYS(2333, 1)
ENDPROC
PROCEDURE removeattachment
LOCAL lnOption, lcCancel, lcRemove
lnOption = 0
IF VARTYPE(_goFP) = "O"
lcCancel = _goFP.GetLoc("CANCEL")
lcRemove = _goFP.GetLoc("REMOVEFILE")
ELSE
lcCancel = "Cancel"
lcRemove = "Remove file"
ENDIF
LOCAL loList as ComboBox
loList = Thisform.CmbAttach
DEFINE POPUP MyShortCut SHORTCUT RELATIVE FROM MROW(),MCOL()
DEFINE BAR 1 OF MyShortCut PROMPT lcRemove + ": " + ;
loList.ListItem(loList.ListIndex)
DEFINE BAR 2 OF MyShortCut PROMPT lcCancel
ON SELECTION POPUP MyShortCut lnOption = BAR()
ACTIVATE POPUP MyShortCut
IF lnOption = 1 && Remove file
loList.RemoveListItem(loList.ListItemId)
loList.ListIndex = 1
ENDIF
ENDPROC
PROCEDURE setlanguage
LOCAL loExc as Exception
TRY
IF VARTYPE(_goFP) = "O"
WITH This
.lblTo.Caption = _goFP.GetLoc("TO")
.lblSubject.Caption = _goFP.GetLoc("SUBJECT")
.cmdAttachment.ToolTipText = _goFP.GetLoc("ATTACHMENT")
.cmbAttach.ToolTipText = _goFP.GetLoc("ATTACHMENT")
.chkPriority.Caption = _goFP.GetLoc("PRIORITY")
.chkReceipt.Caption = _goFP.GetLoc("RECEIPT")
.chtmleditor1.tgBold.ToolTipText = _goFP.GetLoc("BOLD")
.chtmleditor1.tgBold.Caption = LEFT(_goFP.GetLoc("BOLD"),1)
.chtmleditor1.tgItalic.ToolTipText = _goFP.GetLoc("ITALIC")
.chtmleditor1.tgItalic.Caption = LEFT(_goFP.GetLoc("ITALIC"),1)
.chtmleditor1.tgUnderline.ToolTipText = _goFP.GetLoc("UNDERLINE")
.chtmleditor1.tgUnderline.Caption = LEFT(_goFP.GetLoc("UNDERLINE"),1)
.chtmleditor1.tgLeft.ToolTipText = _goFP.GetLoc("ALIGNLEFT")
.chtmleditor1.tgCenter.ToolTipText = _goFP.GetLoc("ALIGNCENTE")
.chtmleditor1.tgRight.ToolTipText = _goFP.GetLoc("ALIGNRIGHT")
.chtmleditor1.tgJustify.ToolTipText = _goFP.GetLoc("ALIGNJUSTI")
.chtmleditor1.cmdHyperlink .ToolTipText = _goFP.GetLoc("HYPERLINK")
.chtmleditor1.cmdPicture.ToolTipText = _goFP.GetLoc("ADDPICTURE")
.chtmleditor1.tgDecrease.ToolTipText = _goFP.GetLoc("INDENTREDU")
.chtmleditor1.tgIncrease.ToolTipText = _goFP.GetLoc("INDENTINCR")
.chtmleditor1.tgLine.ToolTipText = _goFP.GetLoc("HORIZBAR")
.chtmleditor1.tgClean.ToolTipText = _goFP.GetLoc("CLEANFORMT")
.chtmleditor1.tgBullet.ToolTipText = _goFP.GetLoc("LISTBULLET")
.chtmleditor1.tgNumbers.ToolTipText = _goFP.GetLoc("LISTNUMBER")
.chtmleditor1.cmdCopy.ToolTipText = _goFP.GetLoc("COPY")
.chtmleditor1.cmdCut.ToolTipText = _goFP.GetLoc("CUT")
.chtmleditor1.cmdPaste.ToolTipText = _goFP.GetLoc("PASTE")
.chtmleditor1.cmdOpen.ToolTipText = _goFP.GetLoc("HTMLMODEL")
.chtmleditor1.cmdSave.ToolTipText = _goFP.GetLoc("SAVEASHTML")
.chtmleditor1.cmdNew.ToolTipText = _goFP.GetLoc("NEW")
.chtmleditor1.cmdUndo.ToolTipText = _goFP.GetLoc("UNDO")
.chtmleditor1.cmdRedo.ToolTipText = _goFP.GetLoc("REDO")
.chtmleditor1.cmbFontName.ToolTipText = _goFP.GetLoc("FONTNAME")
.chtmleditor1.cmbFontSize.ToolTipText = _goFP.GetLoc("FONTSIZE")
.chtmleditor1.btnForeColor.ToolTipText = _goFP.GetLoc("FONTCOLOR")
.chtmleditor1.btnBackColor.ToolTipText = _goFP.GetLoc("BACKCOLOR")
ENDWITH
ENDIF
CATCH TO loExc
SET STEP ON
ENDTRY
RETURN
ENDPROC
PROCEDURE Unload
*!* * Restore ActiveX settings
*!* _VFP.AutoYield = This._OrigAutoYield
*!* SYS(2333, This._OrigSYS2333)
IF NOT EMPTY(Thisform.cTempFile)
TRY
DELETE FILE (Thisform.cTempFile)
CATCH
ENDTRY
ENDIF
RETURN Thisform.lCancelled
ENDPROC
PROCEDURE Chtmleditor1.cmdSave.Click
LOCAL lcHTML, lcFile, lcLocText
IF VARTYPE(_goFP) = "O"
lcLocText = _goFP.GetLoc("SAVEASHTML")
lcFile = IIF(EMPTY(_goFP.cOutputPath), "", ADDBS(_goFP.cOutputPath))
lcQuestion = _goFP.GetLoc("HTMLDEFA")
ELSE
lcLocText = "Save as HTML"
lcFile = ""
lcQuestion = "Make the saved file the default email body in the next sessions?"
ENDIF
lcFile = PUTFILE(lcLocText + "...", lcFile, "Htm;Html")
IF NOT EMPTY(lcFile)
lcHTML = "<HTML>" + Thisform.Chtmleditor1.oIE.Document.Body.OuterHTML + "</HTML>"
lcHTML = STRTRAN(lcHTML, "contentEditable=true", "")
STRTOFILE(lcHTML, lcFile)
IF MESSAGEBOX(lcQuestion, 32 + 4, lcLocText) = 6 && Yes
LOCAL lcAlias
lcAlias = SYS(2015)
TRY
USE ("FoxyPreviewer_Settings.dbf") IN 0 AGAIN SHARED ALIAS (lcAlias) && FP_Settings
SELECT(lcAlias)
LOCATE FOR ALLTRIM(UPPER(property)) == "CEMAILBODYFILE"
IF EOF()
APPEND BLANK
REPLACE Property WITH "cEmailBodyFile", ;
cValue WITH lcFile ;
IN (lcAlias)
ELSE
REPLACE cValue WITH lcFile IN (lcAlias)
ENDIF
CATCH TO loExc
MESSAGEBOX("Error updating the settings file" + CHR(13) + CHR(13) + ;
TRANSFORM(loExc.ERRORNO) + " - " + loExc.MESSAGE + CHR(13) + ;
"Line: " + TRANSFORM(loExc.LINENO) + " - " + loExc.LINECONTENTS, 16, "Error")
SET STEP ON
ENDTRY
USE IN SELECT(lcAlias)
ENDIF
ENDIF
ENDPROC
PROCEDURE Chtmleditor1.Resize
This.width=this.parent.width
This.height=this.parent.height - 115 && 72
*!* *this.top=0
*!* *this.left=0
This.oIE.Width = This.Width - 2
This.oIE.Height = This.Height - 60
ENDPROC
PROCEDURE cmbAttach.RightClick
Thisform.RemoveAttachment()
ENDPROC
PROCEDURE cmdAttachment.Click
LOCAL lcFile
lcFile = GETFILE("", _goFP.GetLoc("ATTACHFILE"))
* lcFile = GETFILE('', 'Anexar arquivo:', 'Anexar', 0, 'Anexar Arquivo')
IF NOT EMPTY(lcFile)
WITH Thisform.CmbAttach as ComboBox
.AddItem(JUSTFNAME(lcFile))
.List(.NewIndex, 2) = lcFile
.Refresh()
ENDWITH
Thisform.CmbAttach.Value = JUSTFNAME(lcFile)
LOCAL n, lcTTip
lcTtip = ""
FOR m.n = 1 TO Thisform.cmbAttach.ListCount
lcTTip = lcTTip + Thisform.CmbAttach.List(m.n,1) + CHR(13)
ENDFOR
Thisform.cmbAttach.ToolTipText = lcTTip
ENDIF
RETURN
ENDPROC
PROCEDURE cmdAttachment.RightClick
Thisform.RemoveAttachment()
ENDPROC
PROCEDURE cmdCancel.Click
Thisform.lCancelled = .T.
Thisform.Release()
ENDPROC
PROCEDURE cmdSend.Click
Thisform.cHtmleditor1.lToggleUpdate = .F.
LOCAL lcHTML, lcAttach, i
IF VARTYPE(_goFP) <> "O"
MESSAGEBOX("The email can't be sent because there is no FoxyPreviewer report active!", 16, "Error")
RETURN
ENDIF
WITH _goFP
.cEmailTo = ALLTRIM(Thisform.txtDestination.Value)
.cEmailSubject = ALLTRIM(Thisform.txtSubject.Value)
lcHTML = "<HTML>" + Thisform.Chtmleditor1.oIE.Document.Body.OuterHTML + "</HTML>"
lcHTML = STRTRAN(lcHTML, "contentEditable=true", "")
.cEmailBody = lcHTML
lcAttach = ""
WITH Thisform.CmbAttach as ComboBox
FOR m.i = 1 TO .ListCount
lcAttach = lcAttach + .List(m.i, 2) + ","
ENDFOR
ENDWITH
lcAttach = LEFT(lcAttach, LEN(lcAttach) - 1)
._cAttachment = lcAttach
.lReadReceipt = Thisform.chkReceipt.Value
.lPriority = Thisform.chkPriority.Value
ENDWITH
Thisform.Release()
RETURN
ENDPROC
PROCEDURE cmdSendFax.Click
Thisform.cHtmleditor1.lToggleUpdate = .F.
LOCAL lcHTML, lcAttach, i
IF VARTYPE(_goFP) <> "O"
MESSAGEBOX("The email/fax can't be sent because there is no FoxyPreviewer report active!", 16, "Error")
RETURN
ENDIF
WITH _goFP
.cEmailTo = ALLTRIM(Thisform.txtDestination.Value)
.cEmailSubject = ALLTRIM(Thisform.txtSubject.Value)
lcHTML = "<HTML>" + Thisform.Chtmleditor1.oIE.Document.Body.OuterHTML + "</HTML>"
lcHTML = STRTRAN(lcHTML, "contentEditable=true", "")
.cEmailBody = lcHTML
lcAttach = ""
WITH Thisform.CmbAttach as ComboBox
FOR m.i = 1 TO .ListCount
lcAttach = lcAttach + .List(m.i, 2) + ","
ENDFOR
ENDWITH
lcAttach = LEFT(lcAttach, LEN(lcAttach) - 1)
._cAttachment = lcAttach
.lReadReceipt = Thisform.chkReceipt.Value
.lPriority = Thisform.chkPriority.Value
._lSendingFax = .T.
ENDWITH
Thisform.Release()
RETURN
ENDPROC
PROCEDURE Command1.Click
LOCAL lcAdress, lcOrigAdress
lcAdress = ""
TRY
IF NOT EMPTY(_goFP.cAdressTable) AND NOT EMPTY(_goFP.cAdressSearch)
DO FORM pr_AdressBook ;
WITH _goFP.cAdressTable, _goFP.cAdressSearch ;
TO lcAdress
IF NOT EMPTY(lcAdress) AND VARTYPE(lcAdress) = "C"
lcOrigAdress = ALLTRIM(Thisform.TxtDestination.Value)
IF EMPTY(lcOrigAdress)
Thisform.TxtDestination.Value = lcAdress
ELSE
Thisform.TxtDestination.Value = lcOrigAdress + ";" + lcAdress
ENDIF
Thisform.TxtDestination.SetFocus()
ELSE
This.LostFocus()
ENDIF
ENDIF
CATCH TO loExc
SET STEP ON
ENDTRY
ENDPROC
ENDDEFINE