Messagebox bei erfolgreichem Export, EndGridEdit hinzugefügt
This commit is contained in:
parent
3fca229f52
commit
508a3fb483
2
FWCreateCalendar/frmMain.Designer.vb
generated
2
FWCreateCalendar/frmMain.Designer.vb
generated
@ -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
|
||||
'
|
||||
|
||||
@ -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
|
||||
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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user