mirror of
https://github.com/FellippeHeitor/InForm.git
synced 2025-01-15 03:49:56 +00:00
Properly reset exchange data when a form is created or open.
This commit is contained in:
parent
876c57a435
commit
5c86170281
2 changed files with 968 additions and 970 deletions
|
@ -429,9 +429,12 @@ SUB __UI_Click (id AS LONG)
|
|||
END IF
|
||||
END IF
|
||||
|
||||
SendSignal -5
|
||||
__UI_Focus = 0
|
||||
Edited = False
|
||||
LastFormData$ = ""
|
||||
Stream$ = ""
|
||||
FormDataReceived = False
|
||||
SendSignal -5
|
||||
CASE FileMenuSaveFrm
|
||||
SaveForm True, True
|
||||
CASE FileMenuSave
|
||||
|
@ -574,6 +577,10 @@ SUB __UI_Click (id AS LONG)
|
|||
OpenDialogOpen = False
|
||||
Caption(StatusBar) = "Ready."
|
||||
__UI_Focus = 0
|
||||
Edited = False
|
||||
LastFormData$ = ""
|
||||
Stream$ = ""
|
||||
FormDataReceived = False
|
||||
ELSE
|
||||
Answer = MessageBox("File not found.", "", MsgBox_OkOnly + MsgBox_Critical)
|
||||
Control(FileList).Value = 0
|
||||
|
@ -864,7 +871,7 @@ SUB __UI_BeforeUpdateDisplay
|
|||
DIM b$, c$, PreviewChanged AS _BYTE, UiEditorFile AS INTEGER
|
||||
DIM PreviewHasMenuActive AS INTEGER, i AS LONG, j AS LONG, Answer AS _BYTE
|
||||
STATIC OriginalImageWidth AS INTEGER, OriginalImageHeight AS INTEGER
|
||||
STATIC MidRead AS _BYTE, PrevFirstSelected AS LONG
|
||||
STATIC PrevFirstSelected AS LONG
|
||||
STATIC CheckUpdateDone AS _BYTE
|
||||
STATIC UndoPointer AS INTEGER, TotalUndoImages AS INTEGER
|
||||
|
||||
|
@ -961,8 +968,6 @@ SUB __UI_BeforeUpdateDisplay
|
|||
|
||||
CheckPreview
|
||||
|
||||
IF NOT MidRead THEN
|
||||
MidRead = True
|
||||
DIM incomingData$, Signal$
|
||||
|
||||
GET #Client, , incomingData$
|
||||
|
@ -1055,7 +1060,11 @@ SUB __UI_BeforeUpdateDisplay
|
|||
CASE "FORMDATA"
|
||||
LastFormData$ = thisData$
|
||||
LoadPreview
|
||||
IF NOT FormDataReceived THEN
|
||||
FormDataReceived = True
|
||||
ELSE
|
||||
Signal$ = Signal$ + MKI$(-1)
|
||||
END IF
|
||||
CASE "UNDOPOINTER"
|
||||
UndoPointer = CVI(thisData$)
|
||||
CASE "TOTALUNDOIMAGES"
|
||||
|
@ -1960,11 +1969,6 @@ SUB __UI_BeforeUpdateDisplay
|
|||
PrevColorPropertiesListValue = Control(ColorPropertiesList).Value
|
||||
UpdateColorPreview Control(ColorPropertiesList).Value, ThisColor, ThisBackColor
|
||||
END IF
|
||||
|
||||
MidRead = False
|
||||
'CLOSE #UiEditorFile
|
||||
END IF
|
||||
|
||||
END SUB
|
||||
|
||||
SUB __UI_BeforeUnload
|
||||
|
|
|
@ -29,6 +29,7 @@ REDIM SHARED UndoImage(100) AS STRING
|
|||
DIM SHARED IsCreating AS _BYTE
|
||||
DIM SHARED Host AS LONG, HostPort AS STRING
|
||||
DIM SHARED Stream$, RestoreCrashData$
|
||||
DIM SHARED LastPreviewDataSent$
|
||||
|
||||
REDIM SHARED QB64KEYWORDS(0) AS STRING
|
||||
READ_KEYWORDS
|
||||
|
@ -103,7 +104,6 @@ $END IF
|
|||
|
||||
'Event procedures: ---------------------------------------------------------------
|
||||
SUB __UI_Click (id AS LONG)
|
||||
SendSignal -1
|
||||
END SUB
|
||||
|
||||
SUB __UI_MouseEnter (id AS LONG)
|
||||
|
@ -437,6 +437,7 @@ SUB __UI_BeforeUpdateDisplay
|
|||
LoadPreview InDisk
|
||||
LoadDefaultFonts
|
||||
|
||||
LastPreviewDataSent$ = ""
|
||||
UndoPointer = 0
|
||||
TotalUndoImages = 0
|
||||
_ICON
|
||||
|
@ -2357,7 +2358,6 @@ SUB SavePreview (Destination AS _BYTE)
|
|||
DIM BinFileNum AS INTEGER, TxtFileNum AS INTEGER
|
||||
DIM Clip$, Disk AS _BYTE, TCP AS _BYTE, UndoBuffer AS _BYTE
|
||||
DIM PreviewData$
|
||||
STATIC LastPreviewDataSent$
|
||||
|
||||
CONST Debug = False
|
||||
|
||||
|
@ -2709,14 +2709,8 @@ END SUB
|
|||
|
||||
SUB SendSignal (Value AS INTEGER)
|
||||
DIM b$
|
||||
'DIM FileNum AS INTEGER, b$
|
||||
'FileNum = FREEFILE
|
||||
'OPEN "InForm/UiEditor.dat" FOR BINARY AS #FileNum
|
||||
|
||||
'b$ = MKI$(Value): PUT #FileNum, OffsetNewDataFromPreview, b$
|
||||
b$ = "SIGNAL>" + MKI$(Value) + "<END>"
|
||||
PUT #Host, , b$
|
||||
'CLOSE #FileNum
|
||||
END SUB
|
||||
|
||||
FUNCTION AdaptName$ (tName$, TargetID AS LONG)
|
||||
|
|
Loading…
Reference in a new issue