#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>

#Region

$Form1 = GUICreate("Infotool", 579, 456, 192, 124)
$Tab1 = GUICtrlCreateTab(8, 8, 564, 440)

$TabSheet1 = GUICtrlCreateTabItem("Produktionsrechner")
		GUICtrlSetState(-1,$GUI_SHOW)
		$Group1 = GUICtrlCreateGroup("Formnestzahl", 32, 50, 250, 60)
		$Input1 = GUICtrlCreateInput("Input1", 57, 72, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group2 = GUICtrlCreateGroup("Zykluszeit in Sek.", 32, 120, 250, 60)
		$Input2 = GUICtrlCreateInput("Input2", 57, 142, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group3 = GUICtrlCreateGroup("Tagesproduktion (24 Std.)", 32, 190, 250, 60)
		$Label1 = GUICtrlCreateLabel("Label1", 57, 212, 200, 21)
		GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
		GUICtrlSetColor(-1, 0xFF0000)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Button1 = GUICtrlCreateButton("Tagesproduktion errechnen", 32, 260, 250, 30)
$TabSheet2 = GUICtrlCreateTabItem("Produktionsrechner (erweitert)")
		$Group4 = GUICtrlCreateGroup("Formnestzahl", 32, 50, 250, 60)
		$Input3 = GUICtrlCreateInput("Input3", 57, 72, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group5 = GUICtrlCreateGroup("Zykluszeit", 292, 50, 250, 60)
		$Input4 = GUICtrlCreateInput("Input4", 317, 72, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group6 = GUICtrlCreateGroup("Wirkungsgrad", 32, 120, 250, 60)
		$Input5 = GUICtrlCreateInput("Input5", 57, 142, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group7 = GUICtrlCreateGroup("Ausschuss in %", 292, 120, 250, 60)
		$Input6 = GUICtrlCreateInput("Input6", 317, 142, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group8 = GUICtrlCreateGroup("Produktionstage", 32, 190, 250, 60)
		$Combo2 = GUICtrlCreateCombo("", 57, 212, 200, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
		GUICtrlSetData($Combo2, "|1|2|3|4|5|6|7|")
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group9 = GUICtrlCreateGroup("Abrufe pro Woche", 292, 190, 250, 60)
		$Input8 = GUICtrlCreateInput("Input8", 317, 212, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group10 = GUICtrlCreateGroup("Tagesproduktion", 32, 260, 250, 60)
		$Label2 = GUICtrlCreateLabel("Label2", 57, 282, 200, 21)
		GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
		GUICtrlSetColor(-1, 0xFF0000)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group11 = GUICtrlCreateGroup("Wochenproduktion", 292, 260, 250, 60)
		$Label3 = GUICtrlCreateLabel("Label3", 317, 282, 200, 21)
		GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
		GUICtrlSetColor(-1, 0xFF0000)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group12 = GUICtrlCreateGroup("Vorlauf pro Woche", 32, 330, 250, 60)
		$Label4 = GUICtrlCreateLabel("Label4", 57, 352, 200, 21)
		GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
		GUICtrlSetColor(-1, 0xFF0000)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group13 = GUICtrlCreateGroup("Wochenproduktionen für 2 KW Sicherheit", 292, 330, 250, 60)
		$Label5 = GUICtrlCreateLabel("Label5", 317, 352, 200, 21)
		GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
		GUICtrlSetColor(-1, 0xFF0000)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Button2 = GUICtrlCreateButton("Werte berechnen", 32, 400, 510, 30)
$TabSheet3 = GUICtrlCreateTabItem("Maschinennummern")
		$Group14 = GUICtrlCreateGroup("Maschinennummer", 32, 50, 250, 60)
		$Combo1 = GUICtrlCreateCombo("", 57, 72, 200, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
		GUICtrlSetData($Combo1, "|SGM 35|SGM 47|SGM 51|SGM 53|SGM 54|SGM 55|SGM 56|SGM 57|SGM 58|SGM 59|SGM 62|SGM 63|SGM 64|SGM 66|SGM 67|SGM 68|SGM 70|SGM 71|SGM 72|SGM 73|SGM 74|SGM 75|SGM 76|SGM 77|SGM 78|SGM 79|SGM 80|SGM 81|")
		GUICtrlSetOnEvent($Combo1, "_comboread")
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group15 = GUICtrlCreateGroup("Hersteller", 32, 120, 250, 60)
		$Label7 = GUICtrlCreateLabel("Label7", 57, 142, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group16 = GUICtrlCreateGroup("Standort", 292, 50, 250, 60)
		$Label6 = GUICtrlCreateLabel("Label6", 317, 72, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group17 = GUICtrlCreateGroup("Herstellernummer", 292, 120, 250, 60)
		$Label8 = GUICtrlCreateLabel("Label8", 317, 142, 200, 21)
		GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
		GUICtrlSetColor(-1, 0xFF0000)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group18 = GUICtrlCreateGroup("Hotline", 32, 190, 510, 150)
		$Label9 = GUICtrlCreateLabel("Arburg", 57, 212, 200, 21)
		$Label12 = GUICtrlCreateLabel("07446 / 33-0", 200, 212, 200, 21)
		$Label13 = GUICtrlCreateLabel("Krauss Maffei", 57, 243, 200, 21)
		$Label14 = GUICtrlCreateLabel("089 88 99 3152", 200, 243, 200, 21)
		$Label15 = GUICtrlCreateLabel("Ersatzteile H.Kimpfler", 57, 274, 200, 21)
		$Label16 = GUICtrlCreateLabel("07159 / 93 382-21", 200, 274, 200, 21)
		$Label17 = GUICtrlCreateLabel("Battenfeld / Wittmann", 57, 305, 200, 21)
		$Label18 = GUICtrlCreateLabel("02354 / 72 160", 200, 305, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet4 = GUICtrlCreateTabItem("Formrechner")
		$Group19 = GUICtrlCreateGroup("Länge in Millimeter", 32, 50, 250, 60)
		$Input9 = GUICtrlCreateInput("Input9", 57, 72, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group20 = GUICtrlCreateGroup("Breite in Millimeter", 32, 120, 250, 60)
		$Input10 = GUICtrlCreateInput("Input10", 57, 142, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group21 = GUICtrlCreateGroup("Höhe in Millimeter", 32, 190, 250, 60)
		$Input11 = GUICtrlCreateInput("Input11", 57, 212, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Group22 = GUICtrlCreateGroup("Errechnetes Formgewicht", 32, 260, 250, 60)
		$Label10 = GUICtrlCreateLabel("Label10", 57, 282, 200, 21)
		GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
		GUICtrlSetColor(-1, 0xFF0000)
		GUICtrlCreateGroup("", -99, -99, 1, 1)
		$Button3 = GUICtrlCreateButton("Formgewicht errechnen", 32, 330, 250, 30)
$TabSheet5 = GUICtrlCreateTabItem("Info")
		$Group23 = GUICtrlCreateGroup("Informationen", 32, 50, 250, 60)
		$Label11 = GUICtrlCreateLabel("Label11", 57, 72, 200, 21)
		GUICtrlCreateGroup("", -99, -99, 1, 1)

GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)

#EndRegion

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Combo1
			_comboread()
	EndSwitch
WEnd

Func _comboread()
	$read = GUICtrlRead($Combo1)
	If $read = "SGM 35" Then
		GUICtrlSetData($Label8, "124221")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 47" Then
		GUICtrlSetData($Label8, "47375")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Wittmann / Battenfeld")
		EndIf
	If $read = "SGM 51" Then
		GUICtrlSetData($Label8, "61010040")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Wittmann / Battenfeld")
		EndIf
	If $read = "SGM 53" Then
		GUICtrlSetData($Label8, "114601")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Krauss Maffei")
		EndIf
	If $read = "SGM 54" Then
		GUICtrlSetData($Label8, "176816")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 55" Then
		GUICtrlSetData($Label8, "254334")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Krauss Maffei")
		EndIf
	If $read = "SGM 56" Then
		GUICtrlSetData($Label8, "50517")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Krauss Maffei")
		EndIf
	If $read = "SGM 57" Then
		GUICtrlSetData($Label8, "206455")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 58" Then
		GUICtrlSetData($Label8, "212652")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 59" Then
		GUICtrlSetData($Label8, "212974")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 62" Then
		GUICtrlSetData($Label8, "215855")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 63" Then
		GUICtrlSetData($Label8, "215856")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 64" Then
		GUICtrlSetData($Label8, "219371")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 66" Then
		GUICtrlSetData($Label8, "219370")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 67" Then
		GUICtrlSetData($Label8, "219369")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 68" Then
		GUICtrlSetData($Label8, "219368")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 70" Then
		GUICtrlSetData($Label8, "220974")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 71" Then
		GUICtrlSetData($Label8, "134275")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Wittmann / Battenfeld")
		EndIf
	If $read = "SGM 72" Then
		GUICtrlSetData($Label8, "133882")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Wittmann / Battenfeld")
		EndIf
	If $read = "SGM 73" Then
		GUICtrlSetData($Label8, "226115")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 74" Then
		GUICtrlSetData($Label8, "226117")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 75" Then
		GUICtrlSetData($Label8, "226116")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 76" Then
		GUICtrlSetData($Label8, "226114")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 77" Then
		GUICtrlSetData($Label8, "226113")
		GUICtrlSetData($Label6, "Slowakei")
		EndIf
	If $read = "SGM 78" Then
		GUICtrlSetData($Label8, "226853")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 79" Then
		GUICtrlSetData($Label8, "226854")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
	If $read = "SGM 80" Then
		GUICtrlSetData($Label8, "61020271")
		GUICtrlSetData($Label6, "Slowakei")
		GUICtrlSetData($Label7, "Krauss Maffei")
		EndIf
	If $read = "SGM 81" Then
		GUICtrlSetData($Label8, "226665")
		GUICtrlSetData($Label6, "Deutschland")
		GUICtrlSetData($Label7, "Arburg")
		EndIf
EndFunc

Func _exit()
	Exit
EndFunc

