diff --git a/FWCreateCalendar/frmMain.Designer.vb b/FWCreateCalendar/frmMain.Designer.vb index c2928bc..6404709 100644 --- a/FWCreateCalendar/frmMain.Designer.vb +++ b/FWCreateCalendar/frmMain.Designer.vb @@ -364,7 +364,7 @@ Partial Class frmMain Me.schedStorage.Appointments.Labels.CreateNewLabel(8, "Birthday", "&Birthday", System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(207, Byte), Integer), CType(CType(233, Byte), Integer))) Me.schedStorage.Appointments.Labels.CreateNewLabel(9, "Anniversary", "&Anniversary", System.Drawing.Color.FromArgb(CType(CType(141, Byte), Integer), CType(CType(233, Byte), Integer), CType(CType(223, Byte), Integer))) Me.schedStorage.Appointments.Labels.CreateNewLabel(10, "Phone Call", "Phone &Call", System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(247, Byte), Integer), CType(CType(165, Byte), Integer))) - Me.schedStorage.TimeZoneId = "E. Europe Standard Time" + Me.schedStorage.TimeZoneId = "UTC" ' 'SFD ' diff --git a/FWCreateCalendar/frmMain.vb b/FWCreateCalendar/frmMain.vb index cd0fd61..2005d99 100644 --- a/FWCreateCalendar/frmMain.vb +++ b/FWCreateCalendar/frmMain.vb @@ -65,6 +65,8 @@ Public Class frmMain .Columns(NameOf(EventEntry.IsInvalid)).OptionsColumn.AllowEdit = False .Columns(NameOf(EventEntry.RowIndex)).Visible = False .Columns(NameOf(EventEntry.RowIndex)).OptionsColumn.AllowEdit = False + .Columns(NameOf(EventEntry.TimeZoneKey)).Visible = False + .Columns(NameOf(EventEntry.TimeZoneKey)).OptionsColumn.AllowEdit = False End With grdv.FormatRules.Add(GridFunctions.CreateFormatRule(grdv, NameOf(EventEntry.Exclude), True, FormatCondition.Equal, True, backcolor:=Color.LightGray)) grdv.FormatRules.Add(GridFunctions.CreateFormatRule(grdv, NameOf(EventEntry.IsInvalid), True, FormatCondition.Equal, True, backcolor:=Color.MistyRose)) @@ -78,7 +80,7 @@ Public Class frmMain .Subject = NameOf(EventEntry.Subject) .Location = NameOf(EventEntry.Location) .Label = NameOf(EventEntry.Category) - .TimeZoneId = NameOf(EventEntry.TimeZoneKey) + '.TimeZoneId = NameOf(EventEntry.TimeZoneKey) End With .Appointments.CustomFieldMappings.Add(New AppointmentCustomFieldMapping(NameOf(EventEntry.IsInvalid), NameOf(EventEntry.IsInvalid))) .Appointments.CustomFieldMappings.Add(New AppointmentCustomFieldMapping(NameOf(EventEntry.Exclude), NameOf(EventEntry.Exclude))) @@ -177,7 +179,7 @@ Public Class frmMain ElseIf zDatum.Trim.Length = 0 Then ' Status.Add("Kein Datum angegeben") ev.IsInvalid = True - ElseIf Date.TryParse($"{zDatum} {zStart}", ev.StartDate) Then + ElseIf zStart.Trim.Length > 0 AndAlso Date.TryParse($"{zDatum} {zStart}", ev.StartDate) Then ev.EndDate = ev.StartDate.AddHours(My.Settings.EndDateCalculationHoursToAdd) ElseIf Date.TryParse($"{zDatum}", ev.StartDate) Then 'Status.Add("Keine Zeit gefunden, gehe von Ganztag aus") @@ -248,12 +250,21 @@ Public Class frmMain End Sub Private Sub btnExport_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnExport.ItemClick + GridFunctions.EndGridEdit(grdv) SFD.FileName = Path.GetFileNameWithoutExtension(OFD.FileName) & ".ics" If SFD.ShowDialog = DialogResult.OK Then 'schedStorage.TimeZoneId = General.Settings.DefaultTimezoneId Dim exporter As New iCalendarExporter(schedStorage) + exporter.ProductIdentifier = "FW-EXPORTER" + exporter.CustomPropertyIdentifier = "FWPROP" AddHandler exporter.AppointmentExporting, AddressOf Exporter_AppointmentExporting - exporter.Export(SFD.FileName) + Dim failed As Boolean + Try + exporter.Export(SFD.FileName) + Catch ex As Exception + failed = True + End Try + If failed = False Then MessageBox.Show("Export abgeschlossen", "Kalenderexport", MessageBoxButtons.OK, MessageBoxIcon.Information) End If End Sub