Hallo,
Ich hab das Gefühl ich hab bei jedem Teilprogramm nen Fehler..
Aber ich schau schon Ewigkeiten rein und blick gar nicht mehr durch...
Folgendes ist meine Idee:
[Blockierte Grafik: http://img5.fotos-hochladen.net/uploads/einstelltebvykumf3.png]
Meine dazugehörige GUI:
Spoiler anzeigen
#Region ### START Koda GUI section ### Form=c:\users\leonard\desktop\philip\einstellungen.kxf
$Form2 = GUICreate("Dameige: Klausmann", 901, 601, 252, 162)
$Label1 = GUICtrlCreateLabel("Materialien", 104, 24, 102, 30)
GUICtrlSetFont(-1, 16, 400, 0, "Calibri")
$Label2 = GUICtrlCreateLabel("Maschinen", 400, 24, 97, 30)
GUICtrlSetFont(-1, 16, 400, 0, "Calibri")
$Label3 = GUICtrlCreateLabel("Mitarbeiter", 696, 24, 101, 30)
GUICtrlSetFont(-1, 16, 400, 0, "Calibri")
$Input1 = GUICtrlCreateInput("", 24, 104, 121, 21)
$Input2 = GUICtrlCreateInput("", 160, 104, 121, 21)
$Input3 = GUICtrlCreateInput("", 320, 104, 121, 21)
$Input4 = GUICtrlCreateInput("", 456, 104, 121, 21)
$Input5 = GUICtrlCreateInput("", 616, 104, 121, 21)
$Input6 = GUICtrlCreateInput("", 752, 104, 121, 21)
$add_steam = GUICtrlCreateButton("Hinzufügen", 456, 144, 83, 25)
$Label4 = GUICtrlCreateLabel("Art des Materials", 24, 88, 82, 17)
$Label5 = GUICtrlCreateLabel("Preis pro Meter/kg", 160, 88, 92, 17)
$Label6 = GUICtrlCreateLabel("Art der Maschine", 320, 88, 84, 17)
$Label7 = GUICtrlCreateLabel("Preis pro Stunde", 456, 88, 82, 17)
$add_worker = GUICtrlCreateButton("Hinzufügen", 754, 143, 83, 25)
$add_res = GUICtrlCreateButton("Hinzufügen", 160, 144, 83, 25)
$Label8 = GUICtrlCreateLabel("Name des Mitarbeiters", 616, 88, 109, 17)
$Label9 = GUICtrlCreateLabel("Kosten pro Stunde", 752, 88, 92, 17)
global $Einstell_List1 = GUICtrlCreateList("", 24, 192, 257, 331)
global $Einstell_List2 = GUICtrlCreateList("", 320, 192, 257, 331)
global $Einstell_List3 = GUICtrlCreateList("", 616, 192, 257, 331)
$menue = GUICtrlCreateButton("Zurück zum Menü", 280, 536, 339, 25)
$StatusBar1 = _GUICtrlStatusBar_Create($Form2)
_GUICtrlStatusBar_SetMinHeight($StatusBar1, 25)
$Enf_Button1 = GUICtrlCreateButton("Entfernen", 64, 144, 83, 25)
$Enf_Button2 = GUICtrlCreateButton("Entfernen", 360, 144, 83, 25)
$Enf_Button3 = GUICtrlCreateButton("Entfernen", 656, 144, 83, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Und mein Verzwirdeltes Problem:
Spoiler anzeigen
;Erstellen der Liste
call("refresh_Einst")
While 1
$nMsg = GUIGetMsg()
Select
Case $nMsg = $GUI_EVENT_CLOSE
Call("close")
GUIDelete($Einstellung)
Exit
Case $nMsg = $add_res
_SQLite_Exec ($hDB, "INSERT INTO Einstell (Was,Art,Preis) " & _
"VALUES ( 'Material','" & GUICtrlRead($Input1) & "','" & GUICtrlRead($Input2) & "');")
call("refresh_Einst")
Case $nMsg = $add_worker
_SQLite_Exec ($hDB, "INSERT INTO Einstell (Was,Art,Preis) " & _
"VALUES ( 'Mitarbeiter','" & GUICtrlRead($Input3) & "','" & GUICtrlRead($Input4) & "');")
call("refresh_Einst")
Case $nMsg = $add_steam
_SQLite_Exec ($hDB, "INSERT INTO Einstell (Was,Art,Preis) " & _
"VALUES ( 'Mitarbeiter','" & GUICtrlRead($Input5) & "','" & GUICtrlRead($Input6) & "');")
call("refresh_Einst")
EndSelect
WEnd
EndFunc
func refresh_Einst()
Local $hQuery, $SeNa, $selcter
_SQLite_Query($hDB, "SELECT Was,Art,Preis FROM Einstell;", $hQuery) ; creating the query
While _SQLite_FetchData($hQuery, $SeNa, False, False) = $SQLITE_OK ; Read Out the next Row
;GUICtrlSetData ( $selecter, $SeNa[0] )
If StringCompare($SeNa[0], "Material") Then
GUICtrlSetData ( $Einstell_List1, ($SeNa[1] & " -> " & $SeNa[2]) )
ElseIf StringCompare($SeNa[0], "Maschinen") Then
GUICtrlSetData ( $Einstell_List2, ($SeNa[1] & " ->" & $SeNa[2]) )
ElseIf StringCompare($SeNa[0], "Mitarbeiter") Then
GUICtrlSetData ( $Einstell_List3, ($SeNa[1] & " ->" & $SeNa[2]) )
EndIf
WEnd
EndFunc
Ich versteh nicht, warum nur wenn ich bei Input_1 und 2 was eingebe die Daten in List_2 landen ..
Ich such und such aber ich blick nich wo ich mich vertan hab ..
Vllt seht ihr es ja sofort weil ihr es nicht dauernd vor der Nase habt ![]()
Danke
![]()