save point
This commit is contained in:
parent
08ef995805
commit
40ebe8f1c3
3 changed files with 23 additions and 15 deletions
BIN
kratom.db
BIN
kratom.db
Binary file not shown.
32
kratom.pb
32
kratom.pb
|
@ -21,7 +21,7 @@ Openkrt1()
|
|||
|
||||
Procedure btn0click (EventType)
|
||||
;MessageRequester("INFO", "ADD CLICKED")
|
||||
DatabaseUpdate(0,"INSERT into kratom (name, type) Values ('"+GetGadgetText(String_0)+"', '"+GetGadgetText(String_1)+"' );")
|
||||
DatabaseUpdate(0,"INSERT into kratom (name, type) Values ('"+Trim(GetGadgetText(String_0))+"', '"+Trim(GetGadgetText(String_1))+"' );")
|
||||
updatelist()
|
||||
EndProcedure
|
||||
|
||||
|
@ -42,18 +42,26 @@ Procedure dellist(EventType)
|
|||
selectedname$ = GetGadgetItemText(ListView_0,selecteditem)
|
||||
RemoveGadgetItem(ListView_0,GetGadgetState(ListView_0)) ; removes it from view
|
||||
fldname$ = StringField(selectedname$,2," ")
|
||||
|
||||
;Debug fldname$
|
||||
;Debug DatabaseUpdate(0, "DELETE FROM kratom WHERE name = '"+fldname$+"';")
|
||||
pos1 = FindString(selectedname$,fldname$,1,#PB_String_NoCase)
|
||||
pos2 = FindString(selectedname$,"Type",1,#PB_String_NoCase) - 6
|
||||
key$ = Mid(selectedname$,pos1,pos2)
|
||||
key$ = Trim(key$)
|
||||
;Debug "POSES " + pos1 + " " + pos2
|
||||
;Debug "KEY :" + key$ + ":"
|
||||
;Debug "FLDNAME " + fldname$
|
||||
;Debug
|
||||
DatabaseUpdate(0, "DELETE FROM kratom WHERE name = '"+key$+"';")
|
||||
;Debug DatabaseError()
|
||||
;If DatabaseQuery(0, "DELETE FROM * kratom WHERE name = '"+fldname$+"';")
|
||||
;While NextDatabaseRow(0) ; Loop for each records
|
||||
;Debug GetDatabaseString(#Database, 0) ; Display the content of the first field
|
||||
; AddGadgetItem (ListView_0, -1, "Name " + GetDatabaseString(0,1) + " Type " + GetDatabaseString(0,2))
|
||||
;Wend
|
||||
;EndIf
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure burn()
|
||||
|
||||
|
||||
|
||||
EndProcedure
|
||||
|
||||
|
||||
; window init
|
||||
|
||||
updatelist()
|
||||
|
@ -78,8 +86,8 @@ Repeat
|
|||
|
||||
Until Event = #PB_Event_CloseWindow ; Quit on any window close
|
||||
; IDE Options = PureBasic 6.12 LTS (Linux - x64)
|
||||
; CursorPosition = 47
|
||||
; FirstLine = 24
|
||||
; CursorPosition = 54
|
||||
; FirstLine = 32
|
||||
; Folding = -
|
||||
; EnableXP
|
||||
; DPIAware
|
|
@ -7,16 +7,16 @@
|
|||
<section name="data">
|
||||
<explorer view="/opt/purebasic/examples/" pattern="0"/>
|
||||
<log show="1"/>
|
||||
<lastopen date="2024-09-17 23:16" user="kake26" host="kake26-20l6s42e00"/>
|
||||
<lastopen date="2024-09-18 00:19" user="kake26" host="kake26-20l6s42e00"/>
|
||||
</section>
|
||||
<section name="files">
|
||||
<file name="kratom.pb">
|
||||
<config load="0" scan="1" panel="1" warn="1" lastopen="1" sortindex="1" panelstate="+"/>
|
||||
<fingerprint md5="ab4f18ac51a4fe0d16c110460946fe9a"/>
|
||||
<fingerprint md5="c44a94d156eacc238e59494b51caf74f"/>
|
||||
</file>
|
||||
<file name="kratomfrm1.pbf">
|
||||
<config load="0" scan="1" panel="1" warn="1" lastopen="1" sortindex="2" panelstate="+"/>
|
||||
<fingerprint md5="31af23cf297f2016a8d18f51dc8faeff"/>
|
||||
<fingerprint md5="fa99faf895ea57cf32aabcb624a1769e"/>
|
||||
</file>
|
||||
</section>
|
||||
<section name="targets">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue