Setup aus dem Main aufrufbar

master
Bernhard Linz 2017-09-17 19:41:06 +02:00
parent 8c00a7f840
commit ecc323d688
2 changed files with 51 additions and 10 deletions

View File

@ -13,6 +13,7 @@
<property name="Font.Name" vt="String">Arial Narrow</property>
<property name="Font.Style" vt="Set"/>
<property name="OldCreateOrder" vt="False">False</property>
<property name="Position" vt="Ident">poDesktopCenter</property>
<property name="Visible" vt="True">True</property>
<property name="OnClose" vt="String">FormMainClose</property>
<property name="Style" vt="Int32">-1798438912</property>
@ -69,7 +70,7 @@
<property name="Font.Name" vt="String">Arial Narrow</property>
<property name="Font.Style" vt="Set"/>
<property name="ParentFont" vt="False">False</property>
<property name="TabOrder" vt="Int8">3</property>
<property name="TabOrder" vt="Int8">2</property>
<property name="OnClick" vt="String">FormMainButtonMaintenanceSetClick</property>
<property name="Color" vt="Ident">clBtnFace</property>
<property name="CtrlStyle" vt="Int32">1342373888</property>
@ -106,7 +107,7 @@
<property name="Font.Style" vt="Set"/>
<property name="ItemHeight" vt="Int8">20</property>
<property name="ParentFont" vt="False">False</property>
<property name="TabOrder" vt="Int8">2</property>
<property name="TabOrder" vt="Int8">1</property>
<property name="Text" vt="String">FormMainComboTimes</property>
<property name="CtrlStyle" vt="Int32">1342374466</property>
<property name="CtrlExStyle" vt="Int8">0</property>
@ -130,7 +131,7 @@
<property name="Font.Style" vt="Set"/>
<property name="ParentColor" vt="False">False</property>
<property name="ParentFont" vt="False">False</property>
<property name="TabOrder" vt="Int8">1</property>
<property name="TabOrder" vt="Int8">0</property>
<property name="HaveVariable" vt="False">False</property>
<property name="CtrlStyle" vt="Int32">1342309121</property>
<property name="CtrlExStyle" vt="Int8">0</property>

View File

@ -26,6 +26,9 @@ Opt("GUIOnEventMode", 1)
; ### ## ## ## ## #### ## ## ######## ######## ######## ## ##
;~ ####################################################################################
; Für die FormMain
Global $FormMain, $FormMainPicStatus, $FormMainListViewTriggers, $FormMainLabelStatus, $FormMainComboTimes, $FormMainButtonMaintenanceSet
Global $FormMainButtonMaintenanceDelete, $FormMainButtonAcknowledge, $FormMainButtonSetup
; Für die FormSetup
@ -78,6 +81,23 @@ Func FormMainRestore()
EndFunc
; #############################################################################################################################################################
Func FormMainButtonMaintenanceSetClick()
EndFunc
; #############################################################################################################################################################
Func FormMainButtonMaintenanceDeleteClick()
EndFunc
; #############################################################################################################################################################
Func FormMainButtonAcknowledgeClick()
EndFunc
; #############################################################################################################################################################
Func FormMainButtonSetupClick()
GUISetState(@SW_SHOW, $FormSetup)
GUISetState(@SW_HIDE, $FormMain)
EndFunc
; #############################################################################################################################################################
Func FormSetupAPIButtonReadDataZabbixAgentClick()
EndFunc
@ -88,7 +108,8 @@ EndFunc
; #############################################################################################################################################################
Func FormSetupButtonCancelClick()
Exit
GUISetState(@SW_HIDE, $FormSetup)
GUISetState(@SW_SHOW, $FormMain)
EndFunc
; #############################################################################################################################################################
@ -99,7 +120,8 @@ EndFunc
; Alle Einstellungen in der Registry speichern
Func FormSetupButtonOKClick()
_SettingsWrite()
Exit
GUISetState(@SW_HIDE, $FormSetup)
GUISetState(@SW_SHOW, $FormMain)
EndFunc
; #############################################################################################################################################################
@ -362,17 +384,34 @@ EndFunc
Global $FormMain, $FormMainPicStatus, $FormMainListViewTriggers
#Region ### START Koda GUI section ### Form=C:\_AutoIt\ZabbixEasyTool\FormMain.kxf
$FormMain = GUICreate("ZabbixEasyTool", 405, 293, 611, 232, BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX,$WS_THICKFRAME), BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
$FormMain = GUICreate("ZabbixEasyTool", 405, 299, -1, -1, BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX,$WS_THICKFRAME), BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
GUISetFont(10, 400, 0, "Arial Narrow")
GUISetOnEvent($GUI_EVENT_CLOSE, "FormMainClose")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "FormMainMinimize")
GUISetOnEvent($GUI_EVENT_RESTORE, "FormMainRestore")
$FormMainPicStatus = GUICtrlCreatePic("", 0, 0, 404, 84)
$FormMainListViewTriggers = GUICtrlCreateListView("", 0, 120, 402, 134)
$FormMainLabelStatus = GUICtrlCreateLabel("No Maintenance", 0, 0, 404, 89, BitOR($SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetFont(-1, 28, 400, 0, "Arial Narrow")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x008000)
$FormMainComboTimes = GUICtrlCreateCombo("FormMainComboTimes", 48, 90, 99, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetFont(-1, 12, 400, 0, "Arial Narrow")
$FormMainButtonMaintenanceSet = GUICtrlCreateButton("Set", 152, 89, 99, 30)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Narrow")
GUICtrlSetOnEvent(-1, "FormMainButtonMaintenanceSetClick")
$FormMainListViewTriggers = GUICtrlCreateListView("", 0, 120, 404, 142)
$FormMainButtonMaintenanceDelete = GUICtrlCreateButton("Delete all", 256, 89, 99, 30)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Narrow")
GUICtrlSetOnEvent(-1, "FormMainButtonMaintenanceDeleteClick")
$FormMainButtonAcknowledge = GUICtrlCreateButton("Acknowledge", 48, 265, 99, 30)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Narrow")
GUICtrlSetOnEvent(-1, "FormMainButtonAcknowledgeClick")
$FormMainButtonSetup = GUICtrlCreateButton("Setup", 256, 265, 99, 30)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Narrow")
GUICtrlSetOnEvent(-1, "FormMainButtonSetupClick")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUISetState(@SW_HIDE, $FormMain)
;~ GUISetState(@SW_HIDE, $FormMain)
@ -619,6 +658,7 @@ GUICtrlSetColor($FormSetupInfoEditGPOisActive, 0xFFFF00)
GUICtrlSetBkColor($FormSetupInfoEditGPOisActive, 0xFF0000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUISetState(@SW_HIDE, $FormSetup)
GUICtrlSetState($FormSetupTabSheetZabbixAPI, $GUI_SHOW)
GUICtrlSetState($FormSetupInfoEditGPOisActive, $GUI_HIDE)