diff --git a/FWCreateCalendar.sln b/FWCreateCalendar.sln new file mode 100644 index 0000000..fc35b35 --- /dev/null +++ b/FWCreateCalendar.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "FWCreateCalendar", "FWCreateCalendar\FWCreateCalendar.vbproj", "{48878F92-E7DC-4EAE-A468-97A7F66FDBE6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {48878F92-E7DC-4EAE-A468-97A7F66FDBE6}.Debug|x86.ActiveCfg = Debug|x86 + {48878F92-E7DC-4EAE-A468-97A7F66FDBE6}.Debug|x86.Build.0 = Debug|x86 + {48878F92-E7DC-4EAE-A468-97A7F66FDBE6}.Release|x86.ActiveCfg = Release|x86 + {48878F92-E7DC-4EAE-A468-97A7F66FDBE6}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/FWCreateCalendar/Classes/clsGlobal.vb b/FWCreateCalendar/Classes/clsGlobal.vb new file mode 100644 index 0000000..4cb3fd0 --- /dev/null +++ b/FWCreateCalendar/Classes/clsGlobal.vb @@ -0,0 +1,14 @@ +Public Class General + + Shared _settings As Settings + + Public Shared ReadOnly Property Settings As Settings + Get + If _settings Is Nothing Then + _settings = New Settings + End If + Return _settings + End Get + End Property + +End Class diff --git a/FWCreateCalendar/Classes/clsGridFunctions.vb b/FWCreateCalendar/Classes/clsGridFunctions.vb new file mode 100644 index 0000000..1fab0bd --- /dev/null +++ b/FWCreateCalendar/Classes/clsGridFunctions.vb @@ -0,0 +1,28 @@ +Imports DevExpress.XtraEditors +Imports DevExpress.XtraGrid +Imports DevExpress.XtraGrid.Views.Grid + +Public Class GridFunctions + Public Shared Function CreateFormatRule(ByRef grdv As GridView, Column As String, ApplyToRow As Boolean, Condition As DevExpress.XtraEditors.FormatCondition, value1 As Object, Optional value2 As Object = Nothing, Optional backcolor As Color = Nothing, Optional fontstyle As FontStyle = Nothing) As GridFormatRule + Dim rule As New GridFormatRule + rule.Column = grdv.Columns(Column) + rule.ApplyToRow = ApplyToRow + rule.Rule = New FormatConditionRuleValue With { + .Condition = Condition, + .Value1 = value1, + .Value2 = value2 + } + If backcolor <> Nothing Then rule.RuleCast(Of FormatConditionRuleValue).Appearance.BackColor = backcolor + If fontstyle <> Nothing Then rule.RuleCast(Of FormatConditionRuleValue).Appearance.FontStyleDelta = fontstyle + + Return rule + End Function + + Public Shared Sub EndGridEdit(grdv As DevExpress.XtraGrid.Views.Grid.GridView) + If grdv.FocusedRowHandle <> DevExpress.XtraGrid.GridControl.NewItemRowHandle Then + grdv.CloseEditor() + grdv.UpdateCurrentRow() + End If + End Sub + +End Class diff --git a/FWCreateCalendar/Classes/clsSettings.vb b/FWCreateCalendar/Classes/clsSettings.vb new file mode 100644 index 0000000..84430cd --- /dev/null +++ b/FWCreateCalendar/Classes/clsSettings.vb @@ -0,0 +1,27 @@ +Imports Newtonsoft.Json +Public Class Settings + + Public Property Categories As List(Of Category) + + Public Sub New() + Load() + End Sub + + Private Sub Load() + If My.Settings.CategoryList IsNot Nothing AndAlso My.Settings.CategoryList.Trim.Length > 0 Then + Try + Categories = JsonConvert.DeserializeObject(Of List(Of Category))(My.Settings.CategoryList) + Catch ex As Exception + Categories = New List(Of Category) + End Try + Else + Categories = New List(Of Category) + End If + End Sub + + Public Sub Save() + My.Settings.CategoryList = JsonConvert.SerializeObject(Categories) + My.Settings.Save() + End Sub + +End Class diff --git a/FWCreateCalendar/FWCreateCalendar.vbproj b/FWCreateCalendar/FWCreateCalendar.vbproj new file mode 100644 index 0000000..14a3bc5 --- /dev/null +++ b/FWCreateCalendar/FWCreateCalendar.vbproj @@ -0,0 +1,258 @@ + + + + Debug + x86 + + + 2.0 + {48878F92-E7DC-4EAE-A468-97A7F66FDBE6} + WinExe + FWCreateCalendar.My.MyApplication + FWCreateCalendar + FWCreateCalendar + 512 + WindowsForms + v4.8 + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + x86 + true + full + true + true + bin\Debug\ + FWCreateCalendar.xml + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + + + false + + + x86 + pdbonly + false + true + true + bin\Release\ + FWCreateCalendar.xml + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + + + false + + + On + + + Binary + + + Off + + + On + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + frmCategoryEdit.vb + + + Form + + + frmMain.vb + + + Form + + + + True + Application.myapp + True + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + frmCategoryEdit.vb + + + frmMain.vb + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + False + Microsoft .NET Framework 4.6.1 %28x86 und x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + + + + + + + + {2DF8D04C-5BFA-101B-BDE5-00AA0044DE52} + 2 + 8 + 0 + primary + False + True + + + {00020813-0000-0000-C000-000000000046} + 1 + 9 + 0 + primary + False + True + + + {0002E157-0000-0000-C000-000000000046} + 5 + 3 + 0 + primary + False + True + + + + + \ No newline at end of file diff --git a/FWCreateCalendar/FWCreateCalendar.vbproj.bak b/FWCreateCalendar/FWCreateCalendar.vbproj.bak new file mode 100644 index 0000000..f4ceb36 --- /dev/null +++ b/FWCreateCalendar/FWCreateCalendar.vbproj.bak @@ -0,0 +1,231 @@ + + + + Debug + x86 + + + 2.0 + {48878F92-E7DC-4EAE-A468-97A7F66FDBE6} + WinExe + FWCreateCalendar.My.MyApplication + FWCreateCalendar + FWCreateCalendar + 512 + WindowsForms + v4.8 + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + x86 + true + full + true + true + bin\Debug\ + FWCreateCalendar.xml + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + + + false + + + x86 + pdbonly + false + true + true + bin\Release\ + FWCreateCalendar.xml + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + + + false + + + On + + + Binary + + + Off + + + On + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + + + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + frmCategoryEdit.vb + + + Form + + + frmMain.vb + + + Form + + + + True + Application.myapp + True + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + frmCategoryEdit.vb + + + frmMain.vb + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + False + Microsoft .NET Framework 4.6.1 %28x86 und x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FWCreateCalendar/Feuerwehr 2019.xlsx b/FWCreateCalendar/Feuerwehr 2019.xlsx new file mode 100644 index 0000000..3db638c Binary files /dev/null and b/FWCreateCalendar/Feuerwehr 2019.xlsx differ diff --git a/FWCreateCalendar/My Project/Application.Designer.vb b/FWCreateCalendar/My Project/Application.Designer.vb new file mode 100644 index 0000000..4b971cf --- /dev/null +++ b/FWCreateCalendar/My Project/Application.Designer.vb @@ -0,0 +1,38 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + 'HINWEIS: Diese Datei wird automatisch generiert und darf nicht direkt bearbeitet werden. Wenn Sie Änderungen vornehmen möchten + ' oder in dieser Datei Buildfehler auftreten, wechseln Sie zum Projekt-Designer. + ' (Wechseln Sie dazu zu den Projekteigenschaften, oder doppelklicken Sie auf den Knoten "Mein Projekt" im + ' Projektmappen-Explorer). Nehmen Sie auf der Registerkarte "Anwendung" entsprechende Änderungen vor. + ' + Partial Friend Class MyApplication + + _ + Public Sub New() + MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) + Me.IsSingleInstance = false + Me.EnableVisualStyles = true + Me.SaveMySettingsOnExit = true + Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses + End Sub + + _ + Protected Overrides Sub OnCreateMainForm() + Me.MainForm = Global.FWCreateCalendar.frmMain + End Sub + End Class +End Namespace diff --git a/FWCreateCalendar/My Project/Application.myapp b/FWCreateCalendar/My Project/Application.myapp new file mode 100644 index 0000000..739ea6f --- /dev/null +++ b/FWCreateCalendar/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + true + frmMain + false + 0 + true + 0 + true + \ No newline at end of file diff --git a/FWCreateCalendar/My Project/AssemblyInfo.vb b/FWCreateCalendar/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..e28cd0e --- /dev/null +++ b/FWCreateCalendar/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' Allgemeine Informationen über eine Assembly werden über die folgenden +' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +' die mit einer Assembly verknüpft sind. + +' Die Werte der Assemblyattribute überprüfen + + + + + + + + + + +'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird + + +' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +' +' Hauptversion +' Nebenversion +' Buildnummer +' Revision +' +' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern +' übernehmen, indem Sie "*" eingeben: +' + + + diff --git a/FWCreateCalendar/My Project/Resources.Designer.vb b/FWCreateCalendar/My Project/Resources.Designer.vb new file mode 100644 index 0000000..4a2f982 --- /dev/null +++ b/FWCreateCalendar/My Project/Resources.Designer.vb @@ -0,0 +1,103 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + ''' + ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("FWCreateCalendar.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property exportfile() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("exportfile", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property open() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("open", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property save() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("save", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property viewsettings() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("viewsettings", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + End Module +End Namespace diff --git a/FWCreateCalendar/My Project/Resources.resx b/FWCreateCalendar/My Project/Resources.resx new file mode 100644 index 0000000..dae4449 --- /dev/null +++ b/FWCreateCalendar/My Project/Resources.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\viewsettings.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\save.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\open.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\exportfile.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + \ No newline at end of file diff --git a/FWCreateCalendar/My Project/Resources.resx.bak b/FWCreateCalendar/My Project/Resources.resx.bak new file mode 100644 index 0000000..2cc51b3 --- /dev/null +++ b/FWCreateCalendar/My Project/Resources.resx.bak @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\viewsettings.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\save.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\open.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\exportfile.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + \ No newline at end of file diff --git a/FWCreateCalendar/My Project/Settings.Designer.vb b/FWCreateCalendar/My Project/Settings.Designer.vb new file mode 100644 index 0000000..75addbb --- /dev/null +++ b/FWCreateCalendar/My Project/Settings.Designer.vb @@ -0,0 +1,97 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "Automatische My.Settings-Speicherfunktion" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + + _ + Public Property CategoryList() As String + Get + Return CType(Me("CategoryList"),String) + End Get + Set + Me("CategoryList") = value + End Set + End Property + + _ + Public Property EndDateCalculationHoursToAdd() As Integer + Get + Return CType(Me("EndDateCalculationHoursToAdd"),Integer) + End Get + Set + Me("EndDateCalculationHoursToAdd") = value + End Set + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.FWCreateCalendar.My.MySettings + Get + Return Global.FWCreateCalendar.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/FWCreateCalendar/My Project/Settings.settings b/FWCreateCalendar/My Project/Settings.settings new file mode 100644 index 0000000..b6ef0a2 --- /dev/null +++ b/FWCreateCalendar/My Project/Settings.settings @@ -0,0 +1,12 @@ + + + + + + + + + 2 + + + \ No newline at end of file diff --git a/FWCreateCalendar/My Project/licenses.licx b/FWCreateCalendar/My Project/licenses.licx new file mode 100644 index 0000000..9cb7ca0 --- /dev/null +++ b/FWCreateCalendar/My Project/licenses.licx @@ -0,0 +1,5 @@ +DevExpress.XtraScheduler.SchedulerControl, DevExpress.XtraScheduler.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraSpreadsheet.SpreadsheetControl, DevExpress.XtraSpreadsheet.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.Repository.RepositoryItemDateEdit, DevExpress.XtraEditors.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/FWCreateCalendar/My Project/licenses.licx.bak b/FWCreateCalendar/My Project/licenses.licx.bak new file mode 100644 index 0000000..c976329 --- /dev/null +++ b/FWCreateCalendar/My Project/licenses.licx.bak @@ -0,0 +1,5 @@ +DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraSpreadsheet.SpreadsheetControl, DevExpress.XtraSpreadsheet.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.Repository.RepositoryItemDateEdit, DevExpress.XtraEditors.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraScheduler.SchedulerControl, DevExpress.XtraScheduler.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/FWCreateCalendar/Objects/clsCalEvent.vb b/FWCreateCalendar/Objects/clsCalEvent.vb new file mode 100644 index 0000000..c0ebabf --- /dev/null +++ b/FWCreateCalendar/Objects/clsCalEvent.vb @@ -0,0 +1,105 @@ +Public Class CalEvent + Dim varTitle As String + Public Location As String + Public Organizer As User + Dim varStartDate, varStopDate As DateTime + Dim UID As String + Dim Busy As Boolean = True + Public Categories As New List(Of String) + Dim StartDateSet, StopDateSet, StartTimeSet, StopTimeSet As Boolean + + + + Public Sub New(creator As User) + UID = Format(DateTime.Now, "yyyyMMdd-HHmmssffff") & "@" & creator.EMail.Split(CChar("@"))(1) + setStartDate(Now.Year, Now.Month, Now.Day) + End Sub + + + Public Function getVEvent() As String + If StartTimeSet = False Then StopTimeSet = False + + If StopDateSet = False Then + setStopDate(varStartDate.Year, varStartDate.Month, varStartDate.Day) + End If + If StartTimeSet And StopTimeSet = False Then + setStopTime(DateAdd(DateInterval.Hour, 3, varStartDate)) + End If + + + + getVEvent = "BEGIN:VEVENT" & vbCrLf + getVEvent &= "UID:" & UID & vbCrLf + getVEvent &= "DTSTAMP:" & Format(DateTime.UtcNow, "yyyyMMdd""T""HHmmss") & vbCrLf + If Organizer IsNot Nothing Then getVEvent &= "ORGANIZER:" & Organizer.QualifiedName & vbCrLf + If StartTimeSet = False Then + getVEvent &= "DTSTART;VALUE=DATE:" & Format(varStartDate, "yyyyMMdd") & vbCrLf + getVEvent &= "DTEND;VALUE=DATE:" & Format(varStopDate, "yyyyMMdd") & vbCrLf + Else + getVEvent &= "DTSTART:" & Format(varStartDate, "yyyyMMdd""T""HHmmss") & vbCrLf + getVEvent &= "DTEND:" & Format(varStopDate, "yyyyMMdd""T""HHmmss") & vbCrLf + End If + getVEvent &= "SUMMARY:" & varTitle & vbCrLf + + + Dim catstring As String = Nothing + For Each itm As String In Categories + catstring &= itm & "," + Next + catstring = catstring.Remove(catstring.LastIndexOf(",")) + getVEvent &= "CATEGORIES:" & catstring & vbCrLf + getVEvent &= "END:VEVENT" + + End Function + + Public Property Title As String + Get + Return varTitle + End Get + Set(value As String) + varTitle = value.Replace("\", "\\").Replace(";", "\;").Replace(",", "\,") + End Set + End Property + + Public Sub setStartDate(year As Integer, month As Integer, day As Integer) + varStartDate = New Date(year, month, day, varStartDate.Hour, varStartDate.Minute, varStartDate.Second) + StartDateSet = True + End Sub + + Public Sub setStopDate(year As Integer, month As Integer, day As Integer) + varStopDate = New Date(year, month, day, varStopDate.Hour, varStopDate.Minute, varStopDate.Second) + StopDateSet = True + End Sub + + Public Sub setStartTime(hour As Integer, minute As Integer, second As Integer) + varStartDate = New Date(varStartDate.Year, varStartDate.Month, varStartDate.Day, hour, minute, second) + StartTimeSet = True + End Sub + + Public Sub setStopTime(hour As Integer, minute As Integer, second As Integer) + varStopDate = New Date(varStopDate.Year, varStopDate.Month, varStopDate.Day, hour, minute, second) + StopTimeSet = True + End Sub + + Public Sub setStopTime(time As Date) + varStopDate = time + StopTimeSet = True + End Sub + + +End Class + + + +Public Class User + Public Name, EMail As String + + Public Sub New(varName As String, varMail As String) + Name = varName + EMail = varMail + End Sub + + Public Function QualifiedName() As String + QualifiedName = "CN=" & Name & ":MAILTO:" & EMail + End Function +End Class diff --git a/FWCreateCalendar/Objects/clsCategory.vb b/FWCreateCalendar/Objects/clsCategory.vb new file mode 100644 index 0000000..9acba81 --- /dev/null +++ b/FWCreateCalendar/Objects/clsCategory.vb @@ -0,0 +1,19 @@ +Imports Newtonsoft.Json + +Public Class Category + + Public Property Key As String + Public Property Text As String + Public Property Color As Color + Public Property Exclude As Boolean + + Public Sub New() + End Sub + + Public Sub New(Key As String, Text As String, Color As Color) + Me.Key = Key + Me.Text = Text + Me.Color = Color + End Sub + +End Class diff --git a/FWCreateCalendar/Objects/clsEventEntry.vb b/FWCreateCalendar/Objects/clsEventEntry.vb new file mode 100644 index 0000000..376d3c1 --- /dev/null +++ b/FWCreateCalendar/Objects/clsEventEntry.vb @@ -0,0 +1,14 @@ +Public Class EventEntry + Public Property StartDate As Date = New Date(1900, 1, 1) + Public Property EndDate As Date = New Date(1900, 1, 1) + Public Property AllDay As Boolean + Public Property Category As String + Public Property Subject As String + Public Property Location As String + Public Property Status As String + Public Property IsInvalid As Boolean + Public Property Exclude As Boolean + + Public Property RowIndex As Integer + +End Class diff --git a/FWCreateCalendar/Objects/clsTableHeader.vb b/FWCreateCalendar/Objects/clsTableHeader.vb new file mode 100644 index 0000000..90286a3 --- /dev/null +++ b/FWCreateCalendar/Objects/clsTableHeader.vb @@ -0,0 +1,8 @@ +Public Class TableHeader + Public Property FieldName As String + Public Property ColumnIndex As Integer + Public Sub New(fieldname As String) + Me.FieldName = fieldname + ColumnIndex = -1 + End Sub +End Class \ No newline at end of file diff --git a/FWCreateCalendar/Resources/exportfile.svg b/FWCreateCalendar/Resources/exportfile.svg new file mode 100644 index 0000000..0576d82 --- /dev/null +++ b/FWCreateCalendar/Resources/exportfile.svg @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/FWCreateCalendar/Resources/open.svg b/FWCreateCalendar/Resources/open.svg new file mode 100644 index 0000000..2841e98 --- /dev/null +++ b/FWCreateCalendar/Resources/open.svg @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/FWCreateCalendar/Resources/save.svg b/FWCreateCalendar/Resources/save.svg new file mode 100644 index 0000000..b09d6ee --- /dev/null +++ b/FWCreateCalendar/Resources/save.svg @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file diff --git a/FWCreateCalendar/Resources/viewsettings.svg b/FWCreateCalendar/Resources/viewsettings.svg new file mode 100644 index 0000000..d7243dc --- /dev/null +++ b/FWCreateCalendar/Resources/viewsettings.svg @@ -0,0 +1,17 @@ + + + + + + + \ No newline at end of file diff --git a/FWCreateCalendar/app.config b/FWCreateCalendar/app.config new file mode 100644 index 0000000..1b22f0d --- /dev/null +++ b/FWCreateCalendar/app.config @@ -0,0 +1,38 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + diff --git a/FWCreateCalendar/frmCategoryEdit.Designer.vb b/FWCreateCalendar/frmCategoryEdit.Designer.vb new file mode 100644 index 0000000..03bdf8d --- /dev/null +++ b/FWCreateCalendar/frmCategoryEdit.Designer.vb @@ -0,0 +1,110 @@ + +Partial Class frmCategoryEdit + Inherits System.Windows.Forms.Form + + 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Wird vom Windows Form-Designer benötigt. + Private components As System.ComponentModel.IContainer + + 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. + 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. + 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. + + Private Sub InitializeComponent() + Me.rcMain = New DevExpress.XtraBars.Ribbon.RibbonControl() + Me.btnSave = New DevExpress.XtraBars.BarButtonItem() + Me.rpMain = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.rpgGeneral = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.grd = New DevExpress.XtraGrid.GridControl() + Me.grdv = New DevExpress.XtraGrid.Views.Grid.GridView() + CType(Me.rcMain, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.grd, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.grdv, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'rcMain + ' + Me.rcMain.DrawGroupCaptions = DevExpress.Utils.DefaultBoolean.[False] + Me.rcMain.ExpandCollapseItem.Id = 0 + Me.rcMain.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.rcMain.ExpandCollapseItem, Me.btnSave, Me.rcMain.SearchEditItem}) + Me.rcMain.Location = New System.Drawing.Point(0, 0) + Me.rcMain.MaxItemId = 3 + Me.rcMain.Name = "rcMain" + Me.rcMain.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.rpMain}) + Me.rcMain.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] + Me.rcMain.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages + Me.rcMain.Size = New System.Drawing.Size(800, 79) + Me.rcMain.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden + ' + 'btnSave + ' + Me.btnSave.Caption = "Speichern u. schließen" + Me.btnSave.Id = 1 + Me.btnSave.ImageOptions.SvgImage = Global.FWCreateCalendar.My.Resources.Resources.save + Me.btnSave.Name = "btnSave" + ' + 'rpMain + ' + Me.rpMain.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.rpgGeneral}) + Me.rpMain.Name = "rpMain" + Me.rpMain.Text = "Allgemein" + ' + 'rpgGeneral + ' + Me.rpgGeneral.ItemLinks.Add(Me.btnSave) + Me.rpgGeneral.Name = "rpgGeneral" + Me.rpgGeneral.Text = "Allgemein" + ' + 'grd + ' + Me.grd.Dock = System.Windows.Forms.DockStyle.Fill + Me.grd.Location = New System.Drawing.Point(0, 79) + Me.grd.MainView = Me.grdv + Me.grd.MenuManager = Me.rcMain + Me.grd.Name = "grd" + Me.grd.Size = New System.Drawing.Size(800, 371) + Me.grd.TabIndex = 1 + Me.grd.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.grdv}) + ' + 'grdv + ' + Me.grdv.GridControl = Me.grd + Me.grdv.Name = "grdv" + Me.grdv.OptionsView.ShowGroupPanel = False + Me.grdv.OptionsView.ShowIndicator = False + ' + 'frmCategoryEdit + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.grd) + Me.Controls.Add(Me.rcMain) + Me.Name = "frmCategoryEdit" + Me.Text = "Kategorien bearbeiten" + CType(Me.rcMain, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.grd, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.grdv, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents rcMain As DevExpress.XtraBars.Ribbon.RibbonControl + Friend WithEvents btnSave As DevExpress.XtraBars.BarButtonItem + Friend WithEvents rpMain As DevExpress.XtraBars.Ribbon.RibbonPage + Friend WithEvents rpgGeneral As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents grd As DevExpress.XtraGrid.GridControl + Friend WithEvents grdv As DevExpress.XtraGrid.Views.Grid.GridView +End Class diff --git a/FWCreateCalendar/frmCategoryEdit.resx b/FWCreateCalendar/frmCategoryEdit.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/FWCreateCalendar/frmCategoryEdit.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/FWCreateCalendar/frmCategoryEdit.vb b/FWCreateCalendar/frmCategoryEdit.vb new file mode 100644 index 0000000..a2b89f4 --- /dev/null +++ b/FWCreateCalendar/frmCategoryEdit.vb @@ -0,0 +1,25 @@ +Public Class frmCategoryEdit + + Private Sub frmCategoryEdit_Load(sender As Object, e As EventArgs) Handles MyBase.Load + prepare() + End Sub + + Private Sub prepare() + grd.DataSource = General.Settings.Categories + With grdv + .PopulateColumns() + .Columns(NameOf(Category.Key)).OptionsColumn.AllowEdit = False + .Columns(NameOf(Category.Key)).Caption = "Kürzel" + .Columns(NameOf(Category.Text)).Caption = "Bezeichnung" + .Columns(NameOf(Category.Color)).Caption = "Farbe" + .Columns(NameOf(Category.Exclude)).Caption = "Auf Kalender ausschließen" + End With + End Sub + + Private Sub btnSave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnSave.ItemClick + GridFunctions.EndGridEdit(grdv) + General.Settings.Save() + DialogResult = DialogResult.OK + End Sub + +End Class \ No newline at end of file diff --git a/FWCreateCalendar/frmMain.Designer.vb b/FWCreateCalendar/frmMain.Designer.vb new file mode 100644 index 0000000..330e463 --- /dev/null +++ b/FWCreateCalendar/frmMain.Designer.vb @@ -0,0 +1,520 @@ + _ +Partial Class frmMain + Inherits DevExpress.XtraBars.FluentDesignSystem.FluentDesignForm + + 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Wird vom Windows Form-Designer benötigt. + Private components As System.ComponentModel.IContainer + + 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. + 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. + 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. + _ + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Dim TimeRuler1 As DevExpress.XtraScheduler.TimeRuler = New DevExpress.XtraScheduler.TimeRuler() + Dim TimeRuler2 As DevExpress.XtraScheduler.TimeRuler = New DevExpress.XtraScheduler.TimeRuler() + Dim TimeRuler3 As DevExpress.XtraScheduler.TimeRuler = New DevExpress.XtraScheduler.TimeRuler() + Me.grd = New DevExpress.XtraGrid.GridControl() + Me.grdv = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.ridtpStartEndDate = New DevExpress.XtraEditors.Repository.RepositoryItemDateEdit() + Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() + Me.btnOpenFile = New DevExpress.XtraBars.BarButtonItem() + Me.btnCategories = New DevExpress.XtraBars.BarButtonItem() + Me.btnExport = New DevExpress.XtraBars.BarButtonItem() + Me.SwitchToDayViewItem1 = New DevExpress.XtraScheduler.UI.SwitchToDayViewItem() + Me.SwitchToWorkWeekViewItem1 = New DevExpress.XtraScheduler.UI.SwitchToWorkWeekViewItem() + Me.SwitchToWeekViewItem1 = New DevExpress.XtraScheduler.UI.SwitchToWeekViewItem() + Me.SwitchToFullWeekViewItem1 = New DevExpress.XtraScheduler.UI.SwitchToFullWeekViewItem() + Me.SwitchToMonthViewItem1 = New DevExpress.XtraScheduler.UI.SwitchToMonthViewItem() + Me.SwitchToTimelineViewItem1 = New DevExpress.XtraScheduler.UI.SwitchToTimelineViewItem() + Me.SwitchToGanttViewItem1 = New DevExpress.XtraScheduler.UI.SwitchToGanttViewItem() + Me.SwitchToAgendaViewItem1 = New DevExpress.XtraScheduler.UI.SwitchToAgendaViewItem() + Me.SwitchToYearViewItem1 = New DevExpress.XtraScheduler.UI.SwitchToYearViewItem() + Me.SwitchTimeScalesItem1 = New DevExpress.XtraScheduler.UI.SwitchTimeScalesItem() + Me.ChangeScaleWidthItem1 = New DevExpress.XtraScheduler.UI.ChangeScaleWidthItem() + Me.RepositoryItemSpinEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemSpinEdit() + Me.SwitchTimeScalesCaptionItem1 = New DevExpress.XtraScheduler.UI.SwitchTimeScalesCaptionItem() + Me.SwitchCompressWeekendItem1 = New DevExpress.XtraScheduler.UI.SwitchCompressWeekendItem() + Me.SwitchShowWorkTimeOnlyItem1 = New DevExpress.XtraScheduler.UI.SwitchShowWorkTimeOnlyItem() + Me.SwitchCellsAutoHeightItem1 = New DevExpress.XtraScheduler.UI.SwitchCellsAutoHeightItem() + Me.ChangeSnapToCellsUIItem1 = New DevExpress.XtraScheduler.UI.ChangeSnapToCellsUIItem() + Me.rpMain = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.rpgGeneral = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.ViewRibbonPage1 = New DevExpress.XtraScheduler.UI.ViewRibbonPage() + Me.ActiveViewRibbonPageGroup1 = New DevExpress.XtraScheduler.UI.ActiveViewRibbonPageGroup() + Me.TimeScaleRibbonPageGroup1 = New DevExpress.XtraScheduler.UI.TimeScaleRibbonPageGroup() + Me.LayoutRibbonPageGroup1 = New DevExpress.XtraScheduler.UI.LayoutRibbonPageGroup() + Me.OFD = New System.Windows.Forms.OpenFileDialog() + Me.tcMain = New DevExpress.XtraTab.XtraTabControl() + Me.tpGrid = New DevExpress.XtraTab.XtraTabPage() + Me.tpCalendar = New DevExpress.XtraTab.XtraTabPage() + Me.sched = New DevExpress.XtraScheduler.SchedulerControl() + Me.schedStorage = New DevExpress.XtraScheduler.SchedulerDataStorage(Me.components) + Me.SFD = New System.Windows.Forms.SaveFileDialog() + Me.splMain = New DevExpress.XtraEditors.SplitContainerControl() + Me.xlsSheet = New DevExpress.XtraSpreadsheet.SpreadsheetControl() + Me.SchedulerBarController1 = New DevExpress.XtraScheduler.UI.SchedulerBarController(Me.components) + Me.FluentDesignFormContainer1 = New DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormContainer() + Me.FluentDesignFormControl1 = New DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl() + CType(Me.grd, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.grdv, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.ridtpStartEndDate, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.ridtpStartEndDate.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.RepositoryItemSpinEdit1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.tcMain, System.ComponentModel.ISupportInitialize).BeginInit() + Me.tcMain.SuspendLayout() + Me.tpGrid.SuspendLayout() + Me.tpCalendar.SuspendLayout() + CType(Me.sched, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.schedStorage, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.splMain, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.splMain.Panel1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.splMain.Panel1.SuspendLayout() + CType(Me.splMain.Panel2, System.ComponentModel.ISupportInitialize).BeginInit() + Me.splMain.Panel2.SuspendLayout() + Me.splMain.SuspendLayout() + CType(Me.SchedulerBarController1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.FluentDesignFormControl1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'grd + ' + Me.grd.Dock = System.Windows.Forms.DockStyle.Fill + Me.grd.Location = New System.Drawing.Point(0, 0) + Me.grd.MainView = Me.grdv + Me.grd.Name = "grd" + Me.grd.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.ridtpStartEndDate}) + Me.grd.Size = New System.Drawing.Size(650, 517) + Me.grd.TabIndex = 0 + Me.grd.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.grdv}) + ' + 'grdv + ' + Me.grdv.GridControl = Me.grd + Me.grdv.Name = "grdv" + ' + 'ridtpStartEndDate + ' + Me.ridtpStartEndDate.AutoHeight = False + Me.ridtpStartEndDate.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.ridtpStartEndDate.CalendarTimeProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.ridtpStartEndDate.DisplayFormat.FormatString = "g" + Me.ridtpStartEndDate.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime + Me.ridtpStartEndDate.EditFormat.FormatString = "g" + Me.ridtpStartEndDate.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime + Me.ridtpStartEndDate.MaskSettings.Set("mask", "g") + Me.ridtpStartEndDate.Name = "ridtpStartEndDate" + ' + 'RibbonControl1 + ' + Me.RibbonControl1.ExpandCollapseItem.Id = 0 + Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.btnOpenFile, Me.btnCategories, Me.btnExport, Me.SwitchToDayViewItem1, Me.SwitchToWorkWeekViewItem1, Me.SwitchToWeekViewItem1, Me.SwitchToFullWeekViewItem1, Me.SwitchToMonthViewItem1, Me.SwitchToTimelineViewItem1, Me.SwitchToGanttViewItem1, Me.SwitchToAgendaViewItem1, Me.SwitchToYearViewItem1, Me.SwitchTimeScalesItem1, Me.ChangeScaleWidthItem1, Me.SwitchTimeScalesCaptionItem1, Me.SwitchCompressWeekendItem1, Me.SwitchShowWorkTimeOnlyItem1, Me.SwitchCellsAutoHeightItem1, Me.ChangeSnapToCellsUIItem1}) + Me.RibbonControl1.Location = New System.Drawing.Point(0, 31) + Me.RibbonControl1.MaxItemId = 20 + Me.RibbonControl1.Name = "RibbonControl1" + Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.rpMain, Me.ViewRibbonPage1}) + Me.RibbonControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemSpinEdit1}) + Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] + Me.RibbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages + Me.RibbonControl1.Size = New System.Drawing.Size(1062, 126) + Me.RibbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden + ' + 'btnOpenFile + ' + Me.btnOpenFile.Caption = "Exceldatei öffnen..." + Me.btnOpenFile.Id = 1 + Me.btnOpenFile.ImageOptions.SvgImage = Global.FWCreateCalendar.My.Resources.Resources.open + Me.btnOpenFile.Name = "btnOpenFile" + ' + 'btnCategories + ' + Me.btnCategories.Caption = "Kategorien bearbeiten..." + Me.btnCategories.Id = 2 + Me.btnCategories.ImageOptions.SvgImage = Global.FWCreateCalendar.My.Resources.Resources.viewsettings + Me.btnCategories.Name = "btnCategories" + Me.btnCategories.RibbonStyle = CType(((DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large Or DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText) _ + Or DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithoutText), DevExpress.XtraBars.Ribbon.RibbonItemStyles) + ' + 'btnExport + ' + Me.btnExport.Caption = "Exportieren..." + Me.btnExport.Id = 3 + Me.btnExport.ImageOptions.SvgImage = Global.FWCreateCalendar.My.Resources.Resources.exportfile + Me.btnExport.Name = "btnExport" + ' + 'SwitchToDayViewItem1 + ' + Me.SwitchToDayViewItem1.Id = 4 + Me.SwitchToDayViewItem1.Name = "SwitchToDayViewItem1" + ' + 'SwitchToWorkWeekViewItem1 + ' + Me.SwitchToWorkWeekViewItem1.Id = 5 + Me.SwitchToWorkWeekViewItem1.Name = "SwitchToWorkWeekViewItem1" + ' + 'SwitchToWeekViewItem1 + ' + Me.SwitchToWeekViewItem1.Id = 6 + Me.SwitchToWeekViewItem1.Name = "SwitchToWeekViewItem1" + ' + 'SwitchToFullWeekViewItem1 + ' + Me.SwitchToFullWeekViewItem1.Id = 7 + Me.SwitchToFullWeekViewItem1.Name = "SwitchToFullWeekViewItem1" + ' + 'SwitchToMonthViewItem1 + ' + Me.SwitchToMonthViewItem1.Id = 8 + Me.SwitchToMonthViewItem1.Name = "SwitchToMonthViewItem1" + ' + 'SwitchToTimelineViewItem1 + ' + Me.SwitchToTimelineViewItem1.Id = 9 + Me.SwitchToTimelineViewItem1.Name = "SwitchToTimelineViewItem1" + ' + 'SwitchToGanttViewItem1 + ' + Me.SwitchToGanttViewItem1.Id = 10 + Me.SwitchToGanttViewItem1.Name = "SwitchToGanttViewItem1" + ' + 'SwitchToAgendaViewItem1 + ' + Me.SwitchToAgendaViewItem1.Id = 11 + Me.SwitchToAgendaViewItem1.Name = "SwitchToAgendaViewItem1" + ' + 'SwitchToYearViewItem1 + ' + Me.SwitchToYearViewItem1.Id = 12 + Me.SwitchToYearViewItem1.Name = "SwitchToYearViewItem1" + ' + 'SwitchTimeScalesItem1 + ' + Me.SwitchTimeScalesItem1.Id = 13 + Me.SwitchTimeScalesItem1.Name = "SwitchTimeScalesItem1" + ' + 'ChangeScaleWidthItem1 + ' + Me.ChangeScaleWidthItem1.Edit = Me.RepositoryItemSpinEdit1 + Me.ChangeScaleWidthItem1.Id = 14 + Me.ChangeScaleWidthItem1.Name = "ChangeScaleWidthItem1" + Me.ChangeScaleWidthItem1.UseCommandCaption = True + ' + 'RepositoryItemSpinEdit1 + ' + Me.RepositoryItemSpinEdit1.AutoHeight = False + Me.RepositoryItemSpinEdit1.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.RepositoryItemSpinEdit1.EditValueChangedFiringMode = DevExpress.XtraEditors.Controls.EditValueChangedFiringMode.[Default] + Me.RepositoryItemSpinEdit1.MaxValue = New Decimal(New Integer() {200, 0, 0, 0}) + Me.RepositoryItemSpinEdit1.MinValue = New Decimal(New Integer() {10, 0, 0, 0}) + Me.RepositoryItemSpinEdit1.Name = "RepositoryItemSpinEdit1" + ' + 'SwitchTimeScalesCaptionItem1 + ' + Me.SwitchTimeScalesCaptionItem1.Id = 15 + Me.SwitchTimeScalesCaptionItem1.Name = "SwitchTimeScalesCaptionItem1" + ' + 'SwitchCompressWeekendItem1 + ' + Me.SwitchCompressWeekendItem1.Id = 16 + Me.SwitchCompressWeekendItem1.Name = "SwitchCompressWeekendItem1" + ' + 'SwitchShowWorkTimeOnlyItem1 + ' + Me.SwitchShowWorkTimeOnlyItem1.Id = 17 + Me.SwitchShowWorkTimeOnlyItem1.Name = "SwitchShowWorkTimeOnlyItem1" + ' + 'SwitchCellsAutoHeightItem1 + ' + Me.SwitchCellsAutoHeightItem1.Id = 18 + Me.SwitchCellsAutoHeightItem1.Name = "SwitchCellsAutoHeightItem1" + ' + 'ChangeSnapToCellsUIItem1 + ' + Me.ChangeSnapToCellsUIItem1.Id = 19 + Me.ChangeSnapToCellsUIItem1.Name = "ChangeSnapToCellsUIItem1" + ' + 'rpMain + ' + Me.rpMain.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.rpgGeneral}) + Me.rpMain.Name = "rpMain" + Me.rpMain.Text = "Allgemein" + ' + 'rpgGeneral + ' + Me.rpgGeneral.ItemLinks.Add(Me.btnOpenFile) + Me.rpgGeneral.ItemLinks.Add(Me.btnCategories) + Me.rpgGeneral.ItemLinks.Add(Me.btnExport) + Me.rpgGeneral.Name = "rpgGeneral" + Me.rpgGeneral.Text = "Allgemein" + ' + 'ViewRibbonPage1 + ' + Me.ViewRibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.ActiveViewRibbonPageGroup1, Me.TimeScaleRibbonPageGroup1, Me.LayoutRibbonPageGroup1}) + Me.ViewRibbonPage1.Name = "ViewRibbonPage1" + ' + 'ActiveViewRibbonPageGroup1 + ' + Me.ActiveViewRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.[False] + Me.ActiveViewRibbonPageGroup1.ItemLinks.Add(Me.SwitchToDayViewItem1) + Me.ActiveViewRibbonPageGroup1.ItemLinks.Add(Me.SwitchToWorkWeekViewItem1) + Me.ActiveViewRibbonPageGroup1.ItemLinks.Add(Me.SwitchToWeekViewItem1) + Me.ActiveViewRibbonPageGroup1.ItemLinks.Add(Me.SwitchToFullWeekViewItem1) + Me.ActiveViewRibbonPageGroup1.ItemLinks.Add(Me.SwitchToMonthViewItem1) + Me.ActiveViewRibbonPageGroup1.ItemLinks.Add(Me.SwitchToTimelineViewItem1) + Me.ActiveViewRibbonPageGroup1.ItemLinks.Add(Me.SwitchToGanttViewItem1) + Me.ActiveViewRibbonPageGroup1.ItemLinks.Add(Me.SwitchToAgendaViewItem1) + Me.ActiveViewRibbonPageGroup1.ItemLinks.Add(Me.SwitchToYearViewItem1) + Me.ActiveViewRibbonPageGroup1.Name = "ActiveViewRibbonPageGroup1" + ' + 'TimeScaleRibbonPageGroup1 + ' + Me.TimeScaleRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.[False] + Me.TimeScaleRibbonPageGroup1.ItemLinks.Add(Me.SwitchTimeScalesItem1) + Me.TimeScaleRibbonPageGroup1.ItemLinks.Add(Me.ChangeScaleWidthItem1) + Me.TimeScaleRibbonPageGroup1.ItemLinks.Add(Me.SwitchTimeScalesCaptionItem1) + Me.TimeScaleRibbonPageGroup1.Name = "TimeScaleRibbonPageGroup1" + ' + 'LayoutRibbonPageGroup1 + ' + Me.LayoutRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.[False] + Me.LayoutRibbonPageGroup1.ItemLinks.Add(Me.SwitchCompressWeekendItem1) + Me.LayoutRibbonPageGroup1.ItemLinks.Add(Me.SwitchShowWorkTimeOnlyItem1) + Me.LayoutRibbonPageGroup1.ItemLinks.Add(Me.SwitchCellsAutoHeightItem1) + Me.LayoutRibbonPageGroup1.ItemLinks.Add(Me.ChangeSnapToCellsUIItem1) + Me.LayoutRibbonPageGroup1.Name = "LayoutRibbonPageGroup1" + ' + 'OFD + ' + Me.OFD.Filter = "Excel-Dateien (*.xls, *.xlsx, *.xlsm)|*.xlsx;*.xls;*.xlsm|Alle Dateien (*.*)|*.*" + ' + 'tcMain + ' + Me.tcMain.Dock = System.Windows.Forms.DockStyle.Fill + Me.tcMain.Location = New System.Drawing.Point(0, 0) + Me.tcMain.Name = "tcMain" + Me.tcMain.SelectedTabPage = Me.tpGrid + Me.tcMain.Size = New System.Drawing.Size(652, 542) + Me.tcMain.TabIndex = 2 + Me.tcMain.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.tpGrid, Me.tpCalendar}) + ' + 'tpGrid + ' + Me.tpGrid.Controls.Add(Me.grd) + Me.tpGrid.Name = "tpGrid" + Me.tpGrid.Size = New System.Drawing.Size(650, 517) + Me.tpGrid.Text = "Tabelle" + ' + 'tpCalendar + ' + Me.tpCalendar.Controls.Add(Me.sched) + Me.tpCalendar.Name = "tpCalendar" + Me.tpCalendar.Size = New System.Drawing.Size(650, 521) + Me.tpCalendar.Text = "Kalender" + ' + 'sched + ' + Me.sched.ActiveViewType = DevExpress.XtraScheduler.SchedulerViewType.Year + Me.sched.DataStorage = Me.schedStorage + Me.sched.Dock = System.Windows.Forms.DockStyle.Fill + Me.sched.Location = New System.Drawing.Point(0, 0) + Me.sched.MenuManager = Me.RibbonControl1 + Me.sched.Name = "sched" + Me.sched.Size = New System.Drawing.Size(650, 521) + Me.sched.Start = New Date(2021, 12, 27, 0, 0, 0, 0) + Me.sched.TabIndex = 0 + Me.sched.Text = "SchedulerControl1" + Me.sched.Views.DayView.TimeRulers.Add(TimeRuler1) + Me.sched.Views.FullWeekView.Enabled = True + Me.sched.Views.FullWeekView.TimeRulers.Add(TimeRuler2) + Me.sched.Views.WeekView.Enabled = False + Me.sched.Views.WorkWeekView.TimeRulers.Add(TimeRuler3) + Me.sched.Views.YearView.UseOptimizedScrolling = False + ' + 'schedStorage + ' + ' + ' + ' + Me.schedStorage.AppointmentDependencies.AutoReload = False + ' + ' + ' + Me.schedStorage.Appointments.Labels.CreateNewLabel(0, "Keine", "&Keine", System.Drawing.SystemColors.Window) + Me.schedStorage.Appointments.Labels.CreateNewLabel(1, "Wichtig", "W&ichtig", System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(194, Byte), Integer), CType(CType(190, Byte), Integer))) + Me.schedStorage.Appointments.Labels.CreateNewLabel(2, "Geschäftlich", "&Geschäftlich", System.Drawing.Color.FromArgb(CType(CType(168, Byte), Integer), CType(CType(213, Byte), Integer), CType(CType(255, Byte), Integer))) + Me.schedStorage.Appointments.Labels.CreateNewLabel(3, "Persönliche", "&Privat", System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(244, Byte), Integer), CType(CType(156, Byte), Integer))) + Me.schedStorage.Appointments.Labels.CreateNewLabel(4, "Urlaub", "&Urlaub", System.Drawing.Color.FromArgb(CType(CType(243, Byte), Integer), CType(CType(228, Byte), Integer), CType(CType(199, Byte), Integer))) + Me.schedStorage.Appointments.Labels.CreateNewLabel(5, "Teilnahme erforderlich", "Teiln&ahme erforderlich", System.Drawing.Color.FromArgb(CType(CType(244, Byte), Integer), CType(CType(206, Byte), Integer), CType(CType(147, Byte), Integer))) + Me.schedStorage.Appointments.Labels.CreateNewLabel(6, "Anreise einplanen", "&Anreise notwendig", System.Drawing.Color.FromArgb(CType(CType(199, Byte), Integer), CType(CType(244, Byte), Integer), CType(CType(255, Byte), Integer))) + Me.schedStorage.Appointments.Labels.CreateNewLabel(7, "Vorbereitung notwendig", "Vorbereitung ¬wendig", System.Drawing.Color.FromArgb(CType(CType(207, Byte), Integer), CType(CType(219, Byte), Integer), CType(CType(152, Byte), Integer))) + Me.schedStorage.Appointments.Labels.CreateNewLabel(8, "Geburtstag", "Ge&burtstag", 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, "Jahrestag", "J&ahrestag", 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, "Telefonanruf", "&Telefonanruf", System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(247, Byte), Integer), CType(CType(165, Byte), Integer))) + ' + 'SFD + ' + Me.SFD.Filter = "iCalendar (*.ics)|*.ics|Alle Dateien (*.*)|*.*" + ' + 'splMain + ' + Me.splMain.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2 + Me.splMain.Dock = System.Windows.Forms.DockStyle.Fill + Me.splMain.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.None + Me.splMain.Location = New System.Drawing.Point(0, 157) + Me.splMain.Name = "splMain" + ' + 'splMain.Panel1 + ' + Me.splMain.Panel1.Controls.Add(Me.tcMain) + Me.splMain.Panel1.Text = "Panel1" + ' + 'splMain.Panel2 + ' + Me.splMain.Panel2.Controls.Add(Me.xlsSheet) + Me.splMain.Panel2.Text = "Panel2" + Me.splMain.Size = New System.Drawing.Size(1062, 542) + Me.splMain.SplitterPosition = 652 + Me.splMain.TabIndex = 4 + ' + 'xlsSheet + ' + Me.xlsSheet.Dock = System.Windows.Forms.DockStyle.Fill + Me.xlsSheet.Location = New System.Drawing.Point(0, 0) + Me.xlsSheet.MenuManager = Me.RibbonControl1 + Me.xlsSheet.Name = "xlsSheet" + Me.xlsSheet.ReadOnly = True + Me.xlsSheet.Size = New System.Drawing.Size(400, 542) + Me.xlsSheet.TabIndex = 0 + Me.xlsSheet.Text = "SpreadsheetControl1" + ' + 'SchedulerBarController1 + ' + Me.SchedulerBarController1.BarItems.Add(Me.SwitchToDayViewItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchToWorkWeekViewItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchToWeekViewItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchToFullWeekViewItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchToMonthViewItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchToTimelineViewItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchToGanttViewItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchToAgendaViewItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchToYearViewItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchTimeScalesItem1) + Me.SchedulerBarController1.BarItems.Add(Me.ChangeScaleWidthItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchTimeScalesCaptionItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchCompressWeekendItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchShowWorkTimeOnlyItem1) + Me.SchedulerBarController1.BarItems.Add(Me.SwitchCellsAutoHeightItem1) + Me.SchedulerBarController1.BarItems.Add(Me.ChangeSnapToCellsUIItem1) + Me.SchedulerBarController1.Control = Me.sched + ' + 'FluentDesignFormContainer1 + ' + Me.FluentDesignFormContainer1.Dock = System.Windows.Forms.DockStyle.Fill + Me.FluentDesignFormContainer1.Location = New System.Drawing.Point(0, 31) + Me.FluentDesignFormContainer1.Name = "FluentDesignFormContainer1" + Me.FluentDesignFormContainer1.Size = New System.Drawing.Size(1062, 668) + Me.FluentDesignFormContainer1.TabIndex = 6 + ' + 'FluentDesignFormControl1 + ' + Me.FluentDesignFormControl1.FluentDesignForm = Me + Me.FluentDesignFormControl1.Location = New System.Drawing.Point(0, 0) + Me.FluentDesignFormControl1.Name = "FluentDesignFormControl1" + Me.FluentDesignFormControl1.Size = New System.Drawing.Size(1062, 31) + Me.FluentDesignFormControl1.TabIndex = 8 + Me.FluentDesignFormControl1.TabStop = False + ' + 'frmMain + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(1062, 699) + Me.ControlContainer = Me.FluentDesignFormContainer1 + Me.Controls.Add(Me.splMain) + Me.Controls.Add(Me.RibbonControl1) + Me.Controls.Add(Me.FluentDesignFormContainer1) + Me.Controls.Add(Me.FluentDesignFormControl1) + Me.FluentDesignFormControl = Me.FluentDesignFormControl1 + Me.Name = "frmMain" + Me.Text = "Feuerwehrkalender erstellen" + CType(Me.grd, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.grdv, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.ridtpStartEndDate.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.ridtpStartEndDate, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.RepositoryItemSpinEdit1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.tcMain, System.ComponentModel.ISupportInitialize).EndInit() + Me.tcMain.ResumeLayout(False) + Me.tpGrid.ResumeLayout(False) + Me.tpCalendar.ResumeLayout(False) + CType(Me.sched, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.schedStorage, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.splMain.Panel1, System.ComponentModel.ISupportInitialize).EndInit() + Me.splMain.Panel1.ResumeLayout(False) + CType(Me.splMain.Panel2, System.ComponentModel.ISupportInitialize).EndInit() + Me.splMain.Panel2.ResumeLayout(False) + CType(Me.splMain, System.ComponentModel.ISupportInitialize).EndInit() + Me.splMain.ResumeLayout(False) + CType(Me.SchedulerBarController1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.FluentDesignFormControl1, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents grd As DevExpress.XtraGrid.GridControl + Friend WithEvents grdv As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl + Friend WithEvents rpMain As DevExpress.XtraBars.Ribbon.RibbonPage + Friend WithEvents rpgGeneral As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents btnOpenFile As DevExpress.XtraBars.BarButtonItem + Friend WithEvents OFD As OpenFileDialog + Friend WithEvents tcMain As DevExpress.XtraTab.XtraTabControl + Friend WithEvents tpGrid As DevExpress.XtraTab.XtraTabPage + Friend WithEvents tpCalendar As DevExpress.XtraTab.XtraTabPage + Friend WithEvents sched As DevExpress.XtraScheduler.SchedulerControl + Friend WithEvents schedStorage As DevExpress.XtraScheduler.SchedulerDataStorage + Friend WithEvents btnCategories As DevExpress.XtraBars.BarButtonItem + Friend WithEvents btnExport As DevExpress.XtraBars.BarButtonItem + Friend WithEvents SFD As SaveFileDialog + Friend WithEvents splMain As DevExpress.XtraEditors.SplitContainerControl + Friend WithEvents xlsSheet As DevExpress.XtraSpreadsheet.SpreadsheetControl + Friend WithEvents SwitchToDayViewItem1 As DevExpress.XtraScheduler.UI.SwitchToDayViewItem + Friend WithEvents SwitchToWorkWeekViewItem1 As DevExpress.XtraScheduler.UI.SwitchToWorkWeekViewItem + Friend WithEvents SwitchToWeekViewItem1 As DevExpress.XtraScheduler.UI.SwitchToWeekViewItem + Friend WithEvents SwitchToFullWeekViewItem1 As DevExpress.XtraScheduler.UI.SwitchToFullWeekViewItem + Friend WithEvents SwitchToMonthViewItem1 As DevExpress.XtraScheduler.UI.SwitchToMonthViewItem + Friend WithEvents SwitchToTimelineViewItem1 As DevExpress.XtraScheduler.UI.SwitchToTimelineViewItem + Friend WithEvents SwitchToGanttViewItem1 As DevExpress.XtraScheduler.UI.SwitchToGanttViewItem + Friend WithEvents SwitchToAgendaViewItem1 As DevExpress.XtraScheduler.UI.SwitchToAgendaViewItem + Friend WithEvents SwitchToYearViewItem1 As DevExpress.XtraScheduler.UI.SwitchToYearViewItem + Friend WithEvents SwitchTimeScalesItem1 As DevExpress.XtraScheduler.UI.SwitchTimeScalesItem + Friend WithEvents ChangeScaleWidthItem1 As DevExpress.XtraScheduler.UI.ChangeScaleWidthItem + Friend WithEvents RepositoryItemSpinEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemSpinEdit + Friend WithEvents SwitchTimeScalesCaptionItem1 As DevExpress.XtraScheduler.UI.SwitchTimeScalesCaptionItem + Friend WithEvents SwitchCompressWeekendItem1 As DevExpress.XtraScheduler.UI.SwitchCompressWeekendItem + Friend WithEvents SwitchShowWorkTimeOnlyItem1 As DevExpress.XtraScheduler.UI.SwitchShowWorkTimeOnlyItem + Friend WithEvents SwitchCellsAutoHeightItem1 As DevExpress.XtraScheduler.UI.SwitchCellsAutoHeightItem + Friend WithEvents ChangeSnapToCellsUIItem1 As DevExpress.XtraScheduler.UI.ChangeSnapToCellsUIItem + Friend WithEvents ViewRibbonPage1 As DevExpress.XtraScheduler.UI.ViewRibbonPage + Friend WithEvents ActiveViewRibbonPageGroup1 As DevExpress.XtraScheduler.UI.ActiveViewRibbonPageGroup + Friend WithEvents TimeScaleRibbonPageGroup1 As DevExpress.XtraScheduler.UI.TimeScaleRibbonPageGroup + Friend WithEvents LayoutRibbonPageGroup1 As DevExpress.XtraScheduler.UI.LayoutRibbonPageGroup + Friend WithEvents SchedulerBarController1 As DevExpress.XtraScheduler.UI.SchedulerBarController + Friend WithEvents FluentDesignFormContainer1 As DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormContainer + Friend WithEvents FluentDesignFormControl1 As DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl + Friend WithEvents ridtpStartEndDate As DevExpress.XtraEditors.Repository.RepositoryItemDateEdit +End Class diff --git a/FWCreateCalendar/frmMain.resx b/FWCreateCalendar/frmMain.resx new file mode 100644 index 0000000..664b5fb --- /dev/null +++ b/FWCreateCalendar/frmMain.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 93, 17 + + + 220, 19 + + + 293, 19 + + \ No newline at end of file diff --git a/FWCreateCalendar/frmMain.vb b/FWCreateCalendar/frmMain.vb new file mode 100644 index 0000000..23cbd18 --- /dev/null +++ b/FWCreateCalendar/frmMain.vb @@ -0,0 +1,286 @@ +Option Strict On +Imports System.IO +Imports DevExpress.Data +Imports DevExpress.Spreadsheet +Imports DevExpress.XtraEditors +Imports DevExpress.XtraGrid +Imports DevExpress.XtraGrid.Views.Base +Imports DevExpress.XtraGrid.Views.Grid +Imports DevExpress.XtraScheduler +Imports DevExpress.XtraScheduler.iCalendar +Imports Microsoft.Office.Interop +Public Class frmMain + + ' Dinge, die in My.Settings gepackt werden können: + Dim headDate As New TableHeader("Datum") + Dim headTime As New TableHeader("Start") + Dim headSubject As New TableHeader("Ausbildung") + Dim headLocation As New TableHeader("Ort") + Dim headCategory As New TableHeader("Art") + + Dim TableHeaders As New List(Of TableHeader) + + Dim ds As New List(Of EventEntry) + Dim dv As DataView + Dim dt1900 As New Date(1900, 1, 1) + + 'In diesem Form kann direkt die Excel-Datei von Jörg eingelesen werden + 'Im Idealfall das dann direkt in den Scheduler gegeben werden, der dann eine ICS ausspuckt + 'Dann muss nichtmal mehr die Excel-Datei bearbeitet werden + + Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load + prepare() + With TableHeaders + .Clear() + .AddRange({headDate, headTime, headSubject, headLocation, headCategory}) + End With + End Sub + + + Private Sub prepare() + grd.DataSource = ds + With grdv + .PopulateColumns() + .Columns(NameOf(EventEntry.StartDate)).DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime + .Columns(NameOf(EventEntry.StartDate)).DisplayFormat.FormatString = "ddd dd.MM.yy HH:mm" + .Columns(NameOf(EventEntry.StartDate)).MinWidth = 100 + .Columns(NameOf(EventEntry.StartDate)).ColumnEdit = ridtpStartEndDate + .Columns(NameOf(EventEntry.EndDate)).DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime + .Columns(NameOf(EventEntry.EndDate)).DisplayFormat.FormatString = "ddd dd.MM.yy HH:mm" + .Columns(NameOf(EventEntry.EndDate)).MinWidth = 100 + .Columns(NameOf(EventEntry.EndDate)).ColumnEdit = ridtpStartEndDate + .Columns(NameOf(EventEntry.StartDate)).Caption = "Start" + .Columns(NameOf(EventEntry.EndDate)).Caption = "Ende" + .Columns(NameOf(EventEntry.AllDay)).Caption = "Ganztag" + .Columns(NameOf(EventEntry.Category)).Caption = "Art" + .Columns(NameOf(EventEntry.Subject)).Caption = "Betreff" + .Columns(NameOf(EventEntry.Location)).Caption = "Ort" + .Columns(NameOf(EventEntry.Status)).Caption = "Hinweis" + .Columns(NameOf(EventEntry.Status)).Visible = False + .Columns(NameOf(EventEntry.Status)).OptionsColumn.AllowEdit = False + .Columns(NameOf(EventEntry.Exclude)).Caption = "Ausschließen" + .Columns(NameOf(EventEntry.IsInvalid)).Caption = "Ungültig" + .Columns(NameOf(EventEntry.IsInvalid)).Visible = False + .Columns(NameOf(EventEntry.IsInvalid)).OptionsColumn.AllowEdit = False + .Columns(NameOf(EventEntry.RowIndex)).Visible = False + .Columns(NameOf(EventEntry.RowIndex)).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)) + + With schedStorage + .Appointments.DataSource = ds + With .Appointments.Mappings + .AllDay = NameOf(EventEntry.AllDay) + .Start = NameOf(EventEntry.StartDate) + .End = NameOf(EventEntry.EndDate) + .Subject = NameOf(EventEntry.Subject) + .Location = NameOf(EventEntry.Location) + .Label = NameOf(EventEntry.Category) + End With + .Appointments.CustomFieldMappings.Add(New AppointmentCustomFieldMapping(NameOf(EventEntry.IsInvalid), NameOf(EventEntry.IsInvalid))) + .Appointments.CustomFieldMappings.Add(New AppointmentCustomFieldMapping(NameOf(EventEntry.Exclude), NameOf(EventEntry.Exclude))) + + .Labels.DataSource = General.Settings.Categories + With schedStorage.Labels.Mappings + .Color = NameOf(Category.Color) + .Id = NameOf(Category.Key) + .DisplayName = NameOf(Category.Text) + .MenuCaption = NameOf(Category.Text) + End With + + .Appointments.Filter = $"[{NameOf(EventEntry.IsInvalid)}] = FALSE AND [{NameOf(EventEntry.Exclude)}] = FALSE" + End With + + sched.GoToToday() + End Sub + + Private Sub fill(datei As String) + schedStorage.Appointments.DataSource = Nothing + + grd.BeginUpdate() + grd.DataSource = Nothing + ds = Readout(datei) + grd.DataSource = ds + grd.EndUpdate() + grdv.BestFitColumns() + + schedStorage.Appointments.DataSource = ds + sched.RefreshData() + End Sub + + + Public Function Readout(datei As String) As List(Of EventEntry) + Dim xlApp = New Excel.Application + 'Im Fall von folgendem Fehler: + 'The COM object of the type "Microsoft.Office.Interop.Excel.ApplicationClass" cannot be converted to the interface type "Microsoft.Office.Interop.Excel._Application". + ' - Office 365 App reparieren (Schnellreparatur hat das letzte mal geholfen) + ' - "32bit bevorzugen" deaktivieren in den Projekteinstellungen (ggf. bei 64bit Office?) + ' - https://stackoverflow.com/questions/28066719/unable-to-cast-com-object-of-type-microsoft-office-interop-excel-applicationcla + Dim xlMappe = xlApp.Workbooks.Open(datei) + Dim xlBlatt As Excel.Worksheet + 'xlApp = New Excel.Application() + ' xlApp.Visible = False + 'xlMappe = xlApp.Workbooks.Open(datei) + xlBlatt = CType(xlMappe.Worksheets(1), Excel.Worksheet) + Dim Events As New List(Of EventEntry) + Dim ev As EventEntry + + Dim headerfound As Boolean + Dim HeaderRow As Integer + 'Dim Headers As New List(Of TableHeader) + 'Headers.AddRange() + + If xlBlatt.UsedRange.Rows.Count > 1 Then + 'Kopfzeile suchen + For i = 1 To xlBlatt.UsedRange.Rows.Count + 'Prüfen, ob alle Header in der Row vorkommen + For Each header As TableHeader In TableHeaders + headerfound = False + For j = 1 To xlBlatt.UsedRange.Columns.Count + If CStr(CType(xlBlatt.Cells(i, j), Excel.Range).Text).Trim.ToLower = header.FieldName.Trim.ToLower Then + header.ColumnIndex = j + headerfound = True + End If + Next + If headerfound = False Then + HeaderRow = -1 + Exit For + Else + HeaderRow = i + End If + Next + If HeaderRow <> -1 Then Exit For + Next + + If HeaderRow = -1 Then + MessageBox.Show("Die Tabellenüberschriften wurden nicht gefunden. Bitte prüfen, ob die Zuordnungen vom Namen her noch stimmen", "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error) + Return Nothing + End If + + Dim zDatum, zStart As String + Dim foreColor As Color + ' Dim Status As New List(Of String) + For i = HeaderRow + 1 To xlBlatt.UsedRange.Rows.Count + ' Status.Clear() + zDatum = CStr(CType(xlBlatt.Cells(i, headDate.ColumnIndex), Excel.Range).Text) + zStart = CStr(CType(xlBlatt.Cells(i, headTime.ColumnIndex), Excel.Range).Text) + ev = New EventEntry + ev.RowIndex = i + foreColor = System.Drawing.ColorTranslator.FromOle(CInt(CType(xlBlatt.Cells(i, headDate.ColumnIndex), Excel.Range).Font.Color)) + If foreColor = Color.White Then + ' Status.Add("Datum ist versteckt") + ev.IsInvalid = True + ElseIf zDatum.Trim.Length = 0 Then + ' Status.Add("Kein Datum angegeben") + ev.IsInvalid = True + ElseIf 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") + ev.EndDate = ev.StartDate.Date.AddHours(24).AddMinutes(-1) + ev.AllDay = True + Else + 'Status.Add("Datum konnte nicht ermittelt werden") + ev.IsInvalid = True + End If + ev.Category = CStr(CType(xlBlatt.Cells(i, headCategory.ColumnIndex), Excel.Range).Text).Trim + + If ev.Category.Trim.Length > 0 AndAlso General.Settings.Categories.Exists(Function(c) c.Key = ev.Category) = False Then + General.Settings.Categories.Add(New Category(ev.Category, ev.Category, Color.Red)) + End If + + ev.Subject = CStr(CType(xlBlatt.Cells(i, headSubject.ColumnIndex), Excel.Range).Text).Trim + ev.Location = CStr(CType(xlBlatt.Cells(i, headLocation.ColumnIndex), Excel.Range).Text).Trim + ' ev.Status = String.Join(", ", Status.ToArray) + If ev.Subject.Trim.Length > 0 Then Events.Add(ev) + Next + End If + xlMappe.Close() + xlApp.Quit() + General.Settings.Save() + + RefreshEventExclusion(Events) + CheckEventValidity(Events) + + Return Events + End Function + + Private Sub RefreshEventExclusion(datasource As List(Of EventEntry)) + For Each ev As EventEntry In datasource + ev.Exclude = If(General.Settings.Categories.FirstOrDefault(Function(c) c.Key = ev.Category)?.Exclude, False) + Next + End Sub + + Private Sub CheckEventValidity(datasource As List(Of EventEntry)) + For Each ev As EventEntry In datasource + If ev.StartDate > dt1900 AndAlso ev.EndDate > dt1900 Then + ev.IsInvalid = False + End If + Next + End Sub + + + Private Shared Sub Grdv_MouseWheel(sender As Object, e As MouseEventArgs) Handles grdv.MouseWheel + TryCast(sender, GridView)?.CloseEditor() 'Klappt so auch mit BandedGridViews + End Sub + + Private Sub btnOpenFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenFile.ItemClick + If OFD.ShowDialog = DialogResult.OK Then + SFD.FileName = $"{Path.GetFileNameWithoutExtension(OFD.FileName)}.ics" + SFD.InitialDirectory = Path.GetDirectoryName(OFD.FileName) + fill(OFD.FileName) + xlsSheet.LoadDocument(OFD.FileName) + End If + End Sub + + Private Sub btnCategories_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnCategories.ItemClick + Dim frm As New frmCategoryEdit + If frm.ShowDialog = DialogResult.OK Then + RefreshEventExclusion(ds) + CheckEventValidity(ds) + grdv.RefreshData() + schedStorage.RefreshData() + End If + End Sub + + Private Sub btnExport_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnExport.ItemClick + SFD.FileName = Path.GetFileNameWithoutExtension(OFD.FileName) & ".ics" + If SFD.ShowDialog = DialogResult.OK Then + Dim exporter As New iCalendarExporter(schedStorage) + AddHandler exporter.AppointmentExporting, AddressOf Exporter_AppointmentExporting + exporter.Export(SFD.FileName) + End If + End Sub + + Private Sub Exporter_AppointmentExporting(sender As Object, e As AppointmentExportingEventArgs) + If CType(e.Appointment.GetSourceObject(schedStorage), EventEntry).Exclude OrElse CType(e.Appointment.GetSourceObject(schedStorage), EventEntry).IsInvalid Then + e.Cancel = True + End If + End Sub + + Private Sub grdv_CellValueChanged(sender As Object, e As CellValueChangedEventArgs) Handles grdv.CellValueChanged + If e.Column.FieldName = NameOf(EventEntry.StartDate) OrElse e.Column.FieldName = NameOf(EventEntry.EndDate) Then + Dim StartDate As Date = CDate(grdv.GetRowCellValue(e.RowHandle, NameOf(EventEntry.StartDate))) + Dim EndDate As Date = CDate(grdv.GetRowCellValue(e.RowHandle, NameOf(EventEntry.EndDate))) + If EndDate < StartDate Then + grdv.SetRowCellValue(e.RowHandle, NameOf(EventEntry.EndDate), StartDate) + End If + ElseIf e.Column.FieldName = NameOf(EventEntry.AllDay) Then + If CBool(e.Value) Then + Dim EndDate As Date = CDate(grdv.GetRowCellValue(e.RowHandle, NameOf(EventEntry.EndDate))) + grdv.SetRowCellValue(e.RowHandle, NameOf(EventEntry.EndDate), EndDate.Date.AddDays(1).AddSeconds(-1)) + End If + End If + CheckEventValidity(ds) + grdv.RefreshData() + schedStorage.RefreshData() + End Sub + + Private Sub grdv_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles grdv.SelectionChanged + Dim workbook As IWorkbook = xlsSheet.Document + Dim activeSheet As Worksheet = workbook.Worksheets.ActiveWorksheet + xlsSheet.SelectedCell = activeSheet.Cells($"A{grdv.GetFocusedRowCellValue("RowIndex")}") + activeSheet.ScrollTo(activeSheet.SelectedCell) + End Sub +End Class \ No newline at end of file diff --git a/FWCreateCalendar/packages.config b/FWCreateCalendar/packages.config new file mode 100644 index 0000000..bc2a97e --- /dev/null +++ b/FWCreateCalendar/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file