#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("工作提醒工具", 279, 283, 192, 124)
$Group1 = GUICtrlCreateGroup("提醒方式", 24, 16, 233, 41)
$Radio1 = GUICtrlCreateRadio("周循环", 56, 32, 57, 17)
$Radio2 = GUICtrlCreateRadio("月循环", 168, 32, 65, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("提醒时间", 24, 72, 233, 49)
$Combo1 = GUICtrlCreateCombo("", 48, 88, 73, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
$Combo2 = GUICtrlCreateCombo("", 158, 91, 73, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("提醒内容", 24, 136, 233, 105)
$Edit1 = GUICtrlCreateEdit("", 32, 152, 217, 81)
GUICtrlSetData(-1, "")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("确定", 96, 248, 73, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Radio1
Global $zhou
GUICtrlSetData($Combo1, "")
GUICtrlSetData($Combo1, "星期一|星期二|星期三|星期四|星期五|星期六|星期日|", "星期一")
GUICtrlSetData($Combo2, "")
GUICtrlSetData($Combo2, "01:00|02:00|03:00|04:00|05:00|06:00|07:00|08:00|" & _
"09:00|10:00|11:00|12:00|13:00|14:00|15:00|16:00|" & _
"17:00|18:00|19:00|20:00|21:00|22:00|23:00|24:00|", "08:00")
duqutixingwenjian(_IsChecked())
Case $Radio2
Global $yue
GUICtrlSetData($Combo1, "")
GUICtrlSetData($Combo1, "01日|02日|03日|04日|05日|06日|07日|08日|09日|10日|" & _
"11日|12日|13日|14日|15日|16日|17日|18日|19日|20日|" & _
"21日|22日|23日|24日|25日|26日|27日|28日|29日|30日|31日|", "01日")
GUICtrlSetData($Combo2, "")
GUICtrlSetData($Combo2, "01:00|02:00|03:00|04:00|05:00|06:00|07:00|08:00|" & _
"09:00|10:00|11:00|12:00|13:00|14:00|15:00|16:00|" & _
"17:00|18:00|19:00|20:00|21:00|22:00|23:00|24:00|", "08:00")
duqutixingwenjian(_IsChecked())
Case $Combo1, $Combo2
duqutixingwenjian(_IsChecked())
Case $Button1
xierutixingwenjian()
EndSwitch
WEnd
Func duqutixingwenjian($a = "")
Switch $a
Case 1
GUICtrlSetData($Edit1, GUICtrlRead($Radio1, 1) & @CRLF)
Case 2
GUICtrlSetData($Edit1, GUICtrlRead($Radio2, 1) & @CRLF)
EndSwitch
GUICtrlSetData($Edit1, GUICtrlRead($Combo1) & @CRLF & _
GUICtrlRead($Combo2), 1)
EndFunc ;==>duqutixingwenjian
Func xierutixingwenjian()
Global $duquriqi = GUICtrlRead($Combo1)
Global $Files = @ScriptDir & "\Keep" & $duquriqi & ".txt"
If Not FileExists(@ScriptDir & "\Keep") Then DirCreate(@ScriptDir & "\Keep")
Local $txt, $temp
$temp = FileOpen($Files, 2)
$txt = GUICtrlRead($Edit1)
FileWrite($temp, $txt)
FileClose($temp)
EndFunc ;==>xierutixingwenjian
Func _IsChecked()
If BitAND(GUICtrlRead($Radio1), $GUI_CHECKED) = $GUI_CHECKED Then
Return 1
ElseIf BitAND(GUICtrlRead($Radio2), $GUI_CHECKED) = $GUI_CHECKED Then
Return 2
EndIf
EndFunc ;==>_IsChecked