'Kalenderfunktion benötigt foldgende Lib:
'calendar2 (version 2.02)
Sub Process_Globals
End Sub
Sub Globals
Dim Kalender As MyCalendar
Dim Button1 As Button
Dim EditText_Datum_TERMIN As EditText
Dim EditText_Uhrzeit_HEUTE As EditText
Dim EditText_Datum_HEUTE_in_Ticks As EditText
Dim EditText_Uhrzeit_HEUTE_in_Ticks As EditText
Dim EditText_Datum_TERMIN_in_Ticks As EditText
Dim EditText_ERGEBNIS As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("layout1")
Dim Kalender As MyCalendar
Kalender.Initialize
End Sub
Sub Button1_Click
DateTime.DateFormat = "dd.MM.yyyy"
DateTime.TimeFormat = "HH.mm"
Dim DIFFERENZ_Uhrzeit_HEUTE_in_Ticks, Datum_HEUTE_in_Ticks, Datum_TERMIN_in_Ticks, ERGEBNIS_1 As String
DIFFERENZ_Uhrzeit_HEUTE_in_Ticks = (DateTime.TimeParse(""&EditText_Uhrzeit_HEUTE.Text&"") - DateTime.TimeParse("00.00")) 'das Ergebnis ist die Differenz von HEUTE zu 00.00 Uhr
EditText_Uhrzeit_HEUTE_in_Ticks.Text = DIFFERENZ_Uhrzeit_HEUTE_in_Ticks
Datum_HEUTE_in_Ticks = DateTime.Now
EditText_Datum_HEUTE_in_Ticks.Text = Datum_HEUTE_in_Ticks
Datum_TERMIN_in_Ticks = DateTime.DateParse(""&EditText_Datum_TERMIN.Text&"")
EditText_Datum_TERMIN_in_Ticks.Text = Datum_TERMIN_in_Ticks
'ERGEBNIS_1 = ((""&EditText_Datum_TERMIN_in_Ticks.Text&"") + (""&EditText_Uhrzeit_HEUTE_in_Ticks.Text&""))
ERGEBNIS_1 = (Datum_TERMIN_in_Ticks) + (DIFFERENZ_Uhrzeit_HEUTE_in_Ticks)
EditText_ERGEBNIS.Text = ERGEBNIS_1
'--- Termin in den Kalender eintragen ---
'Kalender.CreateEventWithReminder(1,"TEST", "TEXT", "irgendwo", DateTime.TimeParse(""&EditText_Uhrzeit_HEUTE.Text&""), DateTime.Now +720000, 13, Null, False)
'Kalender.CreateEventWithReminder(1,"TEST", "TEXT", "irgendwo", ""&EditText_ERGEBNIS.Text&"", "ERGEBNIS_1 +3600000" , 30, Null, False)
Kalender.CreateEventWithReminder(1,"TEST", "TEXT", "irgendwo", 1374850800000, 1374850800000 +3600000 , 30, Null, False)
End Sub