This commit is contained in:
2024-11-22 16:41:27 +01:00
parent 94ad2234d1
commit 101e7bf1dc
2 changed files with 734 additions and 173 deletions

View File

@@ -35,6 +35,28 @@ Partial Class frmEintragTvNew
Me.lblStandort = New System.Windows.Forms.Label() Me.lblStandort = New System.Windows.Forms.Label()
Me.dgvAVISOTV = New System.Windows.Forms.DataGridView() Me.dgvAVISOTV = New System.Windows.Forms.DataGridView()
Me.grpEingabe = New System.Windows.Forms.GroupBox() Me.grpEingabe = New System.Windows.Forms.GroupBox()
Me.btnBold3 = New System.Windows.Forms.Button()
Me.btnItalic3 = New System.Windows.Forms.Button()
Me.btnUnderline3 = New System.Windows.Forms.Button()
Me.btnTextColor3 = New System.Windows.Forms.Button()
Me.btnBackColor3 = New System.Windows.Forms.Button()
Me.btnAlignLeft3 = New System.Windows.Forms.Button()
Me.btnAlignCenter3 = New System.Windows.Forms.Button()
Me.btnAlignRight3 = New System.Windows.Forms.Button()
Me.cmbFontFamily3 = New System.Windows.Forms.ComboBox()
Me.cmbFontSize3 = New System.Windows.Forms.ComboBox()
Me.btnBold2 = New System.Windows.Forms.Button()
Me.btnItalic2 = New System.Windows.Forms.Button()
Me.btnUnderline2 = New System.Windows.Forms.Button()
Me.btnTextColor2 = New System.Windows.Forms.Button()
Me.btnBackColor2 = New System.Windows.Forms.Button()
Me.btnAlignLeft2 = New System.Windows.Forms.Button()
Me.btnAlignCenter2 = New System.Windows.Forms.Button()
Me.btnAlignRight2 = New System.Windows.Forms.Button()
Me.cmbFontFamily2 = New System.Windows.Forms.ComboBox()
Me.cmbFontSize2 = New System.Windows.Forms.ComboBox()
Me.rtbZeile3 = New System.Windows.Forms.RichTextBox()
Me.rtbZeile2 = New System.Windows.Forms.RichTextBox()
Me.lblNeueTvTextBezeichnung = New System.Windows.Forms.Label() Me.lblNeueTvTextBezeichnung = New System.Windows.Forms.Label()
Me.txtNeueTvTextBezeichnung = New System.Windows.Forms.TextBox() Me.txtNeueTvTextBezeichnung = New System.Windows.Forms.TextBox()
Me.chkIsActive = New System.Windows.Forms.CheckBox() Me.chkIsActive = New System.Windows.Forms.CheckBox()
@@ -55,9 +77,7 @@ Partial Class frmEintragTvNew
Me.lblEndDate = New System.Windows.Forms.Label() Me.lblEndDate = New System.Windows.Forms.Label()
Me.dtpStartDate = New System.Windows.Forms.DateTimePicker() Me.dtpStartDate = New System.Windows.Forms.DateTimePicker()
Me.lblStartDate = New System.Windows.Forms.Label() Me.lblStartDate = New System.Windows.Forms.Label()
Me.txtZeile3 = New System.Windows.Forms.TextBox()
Me.lblZeile3 = New System.Windows.Forms.Label() Me.lblZeile3 = New System.Windows.Forms.Label()
Me.txtZeile2 = New System.Windows.Forms.TextBox()
Me.lblZeile2 = New System.Windows.Forms.Label() Me.lblZeile2 = New System.Windows.Forms.Label()
Me.rtbZeile1 = New System.Windows.Forms.RichTextBox() Me.rtbZeile1 = New System.Windows.Forms.RichTextBox()
Me.lblZeile1 = New System.Windows.Forms.Label() Me.lblZeile1 = New System.Windows.Forms.Label()
@@ -118,6 +138,28 @@ Partial Class frmEintragTvNew
' '
'grpEingabe 'grpEingabe
' '
Me.grpEingabe.Controls.Add(Me.btnBold3)
Me.grpEingabe.Controls.Add(Me.btnItalic3)
Me.grpEingabe.Controls.Add(Me.btnUnderline3)
Me.grpEingabe.Controls.Add(Me.btnTextColor3)
Me.grpEingabe.Controls.Add(Me.btnBackColor3)
Me.grpEingabe.Controls.Add(Me.btnAlignLeft3)
Me.grpEingabe.Controls.Add(Me.btnAlignCenter3)
Me.grpEingabe.Controls.Add(Me.btnAlignRight3)
Me.grpEingabe.Controls.Add(Me.cmbFontFamily3)
Me.grpEingabe.Controls.Add(Me.cmbFontSize3)
Me.grpEingabe.Controls.Add(Me.btnBold2)
Me.grpEingabe.Controls.Add(Me.btnItalic2)
Me.grpEingabe.Controls.Add(Me.btnUnderline2)
Me.grpEingabe.Controls.Add(Me.btnTextColor2)
Me.grpEingabe.Controls.Add(Me.btnBackColor2)
Me.grpEingabe.Controls.Add(Me.btnAlignLeft2)
Me.grpEingabe.Controls.Add(Me.btnAlignCenter2)
Me.grpEingabe.Controls.Add(Me.btnAlignRight2)
Me.grpEingabe.Controls.Add(Me.cmbFontFamily2)
Me.grpEingabe.Controls.Add(Me.cmbFontSize2)
Me.grpEingabe.Controls.Add(Me.rtbZeile3)
Me.grpEingabe.Controls.Add(Me.rtbZeile2)
Me.grpEingabe.Controls.Add(Me.lblNeueTvTextBezeichnung) Me.grpEingabe.Controls.Add(Me.lblNeueTvTextBezeichnung)
Me.grpEingabe.Controls.Add(Me.txtNeueTvTextBezeichnung) Me.grpEingabe.Controls.Add(Me.txtNeueTvTextBezeichnung)
Me.grpEingabe.Controls.Add(Me.chkIsActive) Me.grpEingabe.Controls.Add(Me.chkIsActive)
@@ -131,9 +173,7 @@ Partial Class frmEintragTvNew
Me.grpEingabe.Controls.Add(Me.lblEndDate) Me.grpEingabe.Controls.Add(Me.lblEndDate)
Me.grpEingabe.Controls.Add(Me.dtpStartDate) Me.grpEingabe.Controls.Add(Me.dtpStartDate)
Me.grpEingabe.Controls.Add(Me.lblStartDate) Me.grpEingabe.Controls.Add(Me.lblStartDate)
Me.grpEingabe.Controls.Add(Me.txtZeile3)
Me.grpEingabe.Controls.Add(Me.lblZeile3) Me.grpEingabe.Controls.Add(Me.lblZeile3)
Me.grpEingabe.Controls.Add(Me.txtZeile2)
Me.grpEingabe.Controls.Add(Me.lblZeile2) Me.grpEingabe.Controls.Add(Me.lblZeile2)
Me.grpEingabe.Controls.Add(Me.rtbZeile1) Me.grpEingabe.Controls.Add(Me.rtbZeile1)
Me.grpEingabe.Controls.Add(Me.lblZeile1) Me.grpEingabe.Controls.Add(Me.lblZeile1)
@@ -153,15 +193,211 @@ Partial Class frmEintragTvNew
Me.grpEingabe.Controls.Add(Me.cmbFontSize) Me.grpEingabe.Controls.Add(Me.cmbFontSize)
Me.grpEingabe.Location = New System.Drawing.Point(15, 275) Me.grpEingabe.Location = New System.Drawing.Point(15, 275)
Me.grpEingabe.Name = "grpEingabe" Me.grpEingabe.Name = "grpEingabe"
Me.grpEingabe.Size = New System.Drawing.Size(1300, 570) Me.grpEingabe.Size = New System.Drawing.Size(1300, 716)
Me.grpEingabe.TabIndex = 3 Me.grpEingabe.TabIndex = 3
Me.grpEingabe.TabStop = False Me.grpEingabe.TabStop = False
Me.grpEingabe.Text = "Informationen eingeben" Me.grpEingabe.Text = "Informationen eingeben"
' '
'btnBold3
'
Me.btnBold3.Location = New System.Drawing.Point(100, 449)
Me.btnBold3.Name = "btnBold3"
Me.btnBold3.Size = New System.Drawing.Size(30, 30)
Me.btnBold3.TabIndex = 45
Me.btnBold3.Text = "B"
Me.btnBold3.UseVisualStyleBackColor = True
'
'btnItalic3
'
Me.btnItalic3.Location = New System.Drawing.Point(140, 449)
Me.btnItalic3.Name = "btnItalic3"
Me.btnItalic3.Size = New System.Drawing.Size(30, 30)
Me.btnItalic3.TabIndex = 46
Me.btnItalic3.Text = "I"
Me.btnItalic3.UseVisualStyleBackColor = True
'
'btnUnderline3
'
Me.btnUnderline3.Location = New System.Drawing.Point(180, 449)
Me.btnUnderline3.Name = "btnUnderline3"
Me.btnUnderline3.Size = New System.Drawing.Size(30, 30)
Me.btnUnderline3.TabIndex = 47
Me.btnUnderline3.Text = "U"
Me.btnUnderline3.UseVisualStyleBackColor = True
'
'btnTextColor3
'
Me.btnTextColor3.Location = New System.Drawing.Point(302, 449)
Me.btnTextColor3.Name = "btnTextColor3"
Me.btnTextColor3.Size = New System.Drawing.Size(30, 30)
Me.btnTextColor3.TabIndex = 48
Me.btnTextColor3.Text = "A"
Me.btnTextColor3.UseVisualStyleBackColor = True
'
'btnBackColor3
'
Me.btnBackColor3.Location = New System.Drawing.Point(342, 449)
Me.btnBackColor3.Name = "btnBackColor3"
Me.btnBackColor3.Size = New System.Drawing.Size(30, 30)
Me.btnBackColor3.TabIndex = 49
Me.btnBackColor3.Text = "BG"
Me.btnBackColor3.UseVisualStyleBackColor = True
'
'btnAlignLeft3
'
Me.btnAlignLeft3.Location = New System.Drawing.Point(471, 449)
Me.btnAlignLeft3.Name = "btnAlignLeft3"
Me.btnAlignLeft3.Size = New System.Drawing.Size(30, 30)
Me.btnAlignLeft3.TabIndex = 50
Me.btnAlignLeft3.Text = "L"
Me.btnAlignLeft3.UseVisualStyleBackColor = True
'
'btnAlignCenter3
'
Me.btnAlignCenter3.Location = New System.Drawing.Point(511, 449)
Me.btnAlignCenter3.Name = "btnAlignCenter3"
Me.btnAlignCenter3.Size = New System.Drawing.Size(30, 30)
Me.btnAlignCenter3.TabIndex = 51
Me.btnAlignCenter3.Text = "C"
Me.btnAlignCenter3.UseVisualStyleBackColor = True
'
'btnAlignRight3
'
Me.btnAlignRight3.Location = New System.Drawing.Point(551, 449)
Me.btnAlignRight3.Name = "btnAlignRight3"
Me.btnAlignRight3.Size = New System.Drawing.Size(30, 30)
Me.btnAlignRight3.TabIndex = 52
Me.btnAlignRight3.Text = "R"
Me.btnAlignRight3.UseVisualStyleBackColor = True
'
'cmbFontFamily3
'
Me.cmbFontFamily3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbFontFamily3.FormattingEnabled = True
Me.cmbFontFamily3.Location = New System.Drawing.Point(734, 449)
Me.cmbFontFamily3.Name = "cmbFontFamily3"
Me.cmbFontFamily3.Size = New System.Drawing.Size(150, 21)
Me.cmbFontFamily3.TabIndex = 53
'
'cmbFontSize3
'
Me.cmbFontSize3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbFontSize3.FormattingEnabled = True
Me.cmbFontSize3.Location = New System.Drawing.Point(911, 449)
Me.cmbFontSize3.Name = "cmbFontSize3"
Me.cmbFontSize3.Size = New System.Drawing.Size(60, 21)
Me.cmbFontSize3.TabIndex = 54
'
'btnBold2
'
Me.btnBold2.Location = New System.Drawing.Point(101, 307)
Me.btnBold2.Name = "btnBold2"
Me.btnBold2.Size = New System.Drawing.Size(30, 30)
Me.btnBold2.TabIndex = 35
Me.btnBold2.Text = "B"
Me.btnBold2.UseVisualStyleBackColor = True
'
'btnItalic2
'
Me.btnItalic2.Location = New System.Drawing.Point(141, 307)
Me.btnItalic2.Name = "btnItalic2"
Me.btnItalic2.Size = New System.Drawing.Size(30, 30)
Me.btnItalic2.TabIndex = 36
Me.btnItalic2.Text = "I"
Me.btnItalic2.UseVisualStyleBackColor = True
'
'btnUnderline2
'
Me.btnUnderline2.Location = New System.Drawing.Point(181, 307)
Me.btnUnderline2.Name = "btnUnderline2"
Me.btnUnderline2.Size = New System.Drawing.Size(30, 30)
Me.btnUnderline2.TabIndex = 37
Me.btnUnderline2.Text = "U"
Me.btnUnderline2.UseVisualStyleBackColor = True
'
'btnTextColor2
'
Me.btnTextColor2.Location = New System.Drawing.Point(303, 307)
Me.btnTextColor2.Name = "btnTextColor2"
Me.btnTextColor2.Size = New System.Drawing.Size(30, 30)
Me.btnTextColor2.TabIndex = 38
Me.btnTextColor2.Text = "A"
Me.btnTextColor2.UseVisualStyleBackColor = True
'
'btnBackColor2
'
Me.btnBackColor2.Location = New System.Drawing.Point(343, 307)
Me.btnBackColor2.Name = "btnBackColor2"
Me.btnBackColor2.Size = New System.Drawing.Size(30, 30)
Me.btnBackColor2.TabIndex = 39
Me.btnBackColor2.Text = "BG"
Me.btnBackColor2.UseVisualStyleBackColor = True
'
'btnAlignLeft2
'
Me.btnAlignLeft2.Location = New System.Drawing.Point(472, 307)
Me.btnAlignLeft2.Name = "btnAlignLeft2"
Me.btnAlignLeft2.Size = New System.Drawing.Size(30, 30)
Me.btnAlignLeft2.TabIndex = 40
Me.btnAlignLeft2.Text = "L"
Me.btnAlignLeft2.UseVisualStyleBackColor = True
'
'btnAlignCenter2
'
Me.btnAlignCenter2.Location = New System.Drawing.Point(512, 307)
Me.btnAlignCenter2.Name = "btnAlignCenter2"
Me.btnAlignCenter2.Size = New System.Drawing.Size(30, 30)
Me.btnAlignCenter2.TabIndex = 41
Me.btnAlignCenter2.Text = "C"
Me.btnAlignCenter2.UseVisualStyleBackColor = True
'
'btnAlignRight2
'
Me.btnAlignRight2.Location = New System.Drawing.Point(552, 307)
Me.btnAlignRight2.Name = "btnAlignRight2"
Me.btnAlignRight2.Size = New System.Drawing.Size(30, 30)
Me.btnAlignRight2.TabIndex = 42
Me.btnAlignRight2.Text = "R"
Me.btnAlignRight2.UseVisualStyleBackColor = True
'
'cmbFontFamily2
'
Me.cmbFontFamily2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbFontFamily2.FormattingEnabled = True
Me.cmbFontFamily2.Location = New System.Drawing.Point(735, 307)
Me.cmbFontFamily2.Name = "cmbFontFamily2"
Me.cmbFontFamily2.Size = New System.Drawing.Size(150, 21)
Me.cmbFontFamily2.TabIndex = 43
'
'cmbFontSize2
'
Me.cmbFontSize2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbFontSize2.FormattingEnabled = True
Me.cmbFontSize2.Location = New System.Drawing.Point(912, 307)
Me.cmbFontSize2.Name = "cmbFontSize2"
Me.cmbFontSize2.Size = New System.Drawing.Size(60, 21)
Me.cmbFontSize2.TabIndex = 44
'
'rtbZeile3
'
Me.rtbZeile3.Location = New System.Drawing.Point(100, 363)
Me.rtbZeile3.Name = "rtbZeile3"
Me.rtbZeile3.Size = New System.Drawing.Size(1180, 80)
Me.rtbZeile3.TabIndex = 34
Me.rtbZeile3.Text = ""
'
'rtbZeile2
'
Me.rtbZeile2.Location = New System.Drawing.Point(101, 221)
Me.rtbZeile2.Name = "rtbZeile2"
Me.rtbZeile2.Size = New System.Drawing.Size(1180, 80)
Me.rtbZeile2.TabIndex = 33
Me.rtbZeile2.Text = ""
'
'lblNeueTvTextBezeichnung 'lblNeueTvTextBezeichnung
' '
Me.lblNeueTvTextBezeichnung.AutoSize = True Me.lblNeueTvTextBezeichnung.AutoSize = True
Me.lblNeueTvTextBezeichnung.Location = New System.Drawing.Point(300, 33) Me.lblNeueTvTextBezeichnung.Location = New System.Drawing.Point(301, 39)
Me.lblNeueTvTextBezeichnung.Name = "lblNeueTvTextBezeichnung" Me.lblNeueTvTextBezeichnung.Name = "lblNeueTvTextBezeichnung"
Me.lblNeueTvTextBezeichnung.Size = New System.Drawing.Size(135, 13) Me.lblNeueTvTextBezeichnung.Size = New System.Drawing.Size(135, 13)
Me.lblNeueTvTextBezeichnung.TabIndex = 19 Me.lblNeueTvTextBezeichnung.TabIndex = 19
@@ -169,7 +405,7 @@ Partial Class frmEintragTvNew
' '
'txtNeueTvTextBezeichnung 'txtNeueTvTextBezeichnung
' '
Me.txtNeueTvTextBezeichnung.Location = New System.Drawing.Point(460, 30) Me.txtNeueTvTextBezeichnung.Location = New System.Drawing.Point(461, 36)
Me.txtNeueTvTextBezeichnung.Name = "txtNeueTvTextBezeichnung" Me.txtNeueTvTextBezeichnung.Name = "txtNeueTvTextBezeichnung"
Me.txtNeueTvTextBezeichnung.Size = New System.Drawing.Size(200, 20) Me.txtNeueTvTextBezeichnung.Size = New System.Drawing.Size(200, 20)
Me.txtNeueTvTextBezeichnung.TabIndex = 20 Me.txtNeueTvTextBezeichnung.TabIndex = 20
@@ -177,7 +413,7 @@ Partial Class frmEintragTvNew
'chkIsActive 'chkIsActive
' '
Me.chkIsActive.AutoSize = True Me.chkIsActive.AutoSize = True
Me.chkIsActive.Location = New System.Drawing.Point(670, 32) Me.chkIsActive.Location = New System.Drawing.Point(671, 38)
Me.chkIsActive.Name = "chkIsActive" Me.chkIsActive.Name = "chkIsActive"
Me.chkIsActive.Size = New System.Drawing.Size(50, 17) Me.chkIsActive.Size = New System.Drawing.Size(50, 17)
Me.chkIsActive.TabIndex = 18 Me.chkIsActive.TabIndex = 18
@@ -187,7 +423,7 @@ Partial Class frmEintragTvNew
'chkIsRecurring 'chkIsRecurring
' '
Me.chkIsRecurring.AutoSize = True Me.chkIsRecurring.AutoSize = True
Me.chkIsRecurring.Location = New System.Drawing.Point(58, 439) Me.chkIsRecurring.Location = New System.Drawing.Point(64, 627)
Me.chkIsRecurring.Name = "chkIsRecurring" Me.chkIsRecurring.Name = "chkIsRecurring"
Me.chkIsRecurring.Size = New System.Drawing.Size(86, 17) Me.chkIsRecurring.Size = New System.Drawing.Size(86, 17)
Me.chkIsRecurring.TabIndex = 10 Me.chkIsRecurring.TabIndex = 10
@@ -203,9 +439,9 @@ Partial Class frmEintragTvNew
Me.grpWochentage.Controls.Add(Me.chkWednesday) Me.grpWochentage.Controls.Add(Me.chkWednesday)
Me.grpWochentage.Controls.Add(Me.chkTuesday) Me.grpWochentage.Controls.Add(Me.chkTuesday)
Me.grpWochentage.Controls.Add(Me.chkMonday) Me.grpWochentage.Controls.Add(Me.chkMonday)
Me.grpWochentage.Location = New System.Drawing.Point(60, 494) Me.grpWochentage.Location = New System.Drawing.Point(66, 650)
Me.grpWochentage.Name = "grpWochentage" Me.grpWochentage.Name = "grpWochentage"
Me.grpWochentage.Size = New System.Drawing.Size(763, 57) Me.grpWochentage.Size = New System.Drawing.Size(776, 57)
Me.grpWochentage.TabIndex = 11 Me.grpWochentage.TabIndex = 11
Me.grpWochentage.TabStop = False Me.grpWochentage.TabStop = False
Me.grpWochentage.Text = "Wochentage" Me.grpWochentage.Text = "Wochentage"
@@ -283,7 +519,7 @@ Partial Class frmEintragTvNew
'dtpEndTime 'dtpEndTime
' '
Me.dtpEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Time Me.dtpEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Time
Me.dtpEndTime.Location = New System.Drawing.Point(597, 382) Me.dtpEndTime.Location = New System.Drawing.Point(722, 537)
Me.dtpEndTime.Name = "dtpEndTime" Me.dtpEndTime.Name = "dtpEndTime"
Me.dtpEndTime.ShowCheckBox = True Me.dtpEndTime.ShowCheckBox = True
Me.dtpEndTime.ShowUpDown = True Me.dtpEndTime.ShowUpDown = True
@@ -293,16 +529,16 @@ Partial Class frmEintragTvNew
'lblEndTime 'lblEndTime
' '
Me.lblEndTime.AutoSize = True Me.lblEndTime.AutoSize = True
Me.lblEndTime.Location = New System.Drawing.Point(542, 385) Me.lblEndTime.Location = New System.Drawing.Point(618, 543)
Me.lblEndTime.Name = "lblEndTime" Me.lblEndTime.Name = "lblEndTime"
Me.lblEndTime.Size = New System.Drawing.Size(45, 13) Me.lblEndTime.Size = New System.Drawing.Size(91, 13)
Me.lblEndTime.TabIndex = 14 Me.lblEndTime.TabIndex = 14
Me.lblEndTime.Text = "Endzeit:" Me.lblEndTime.Text = "Endzeit (optional):"
' '
'dtpStartTime 'dtpStartTime
' '
Me.dtpStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Time Me.dtpStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Time
Me.dtpStartTime.Location = New System.Drawing.Point(597, 341) Me.dtpStartTime.Location = New System.Drawing.Point(126, 538)
Me.dtpStartTime.Name = "dtpStartTime" Me.dtpStartTime.Name = "dtpStartTime"
Me.dtpStartTime.ShowCheckBox = True Me.dtpStartTime.ShowCheckBox = True
Me.dtpStartTime.ShowUpDown = True Me.dtpStartTime.ShowUpDown = True
@@ -312,7 +548,7 @@ Partial Class frmEintragTvNew
'lblStartTime 'lblStartTime
' '
Me.lblStartTime.AutoSize = True Me.lblStartTime.AutoSize = True
Me.lblStartTime.Location = New System.Drawing.Point(542, 342) Me.lblStartTime.Location = New System.Drawing.Point(61, 544)
Me.lblStartTime.Name = "lblStartTime" Me.lblStartTime.Name = "lblStartTime"
Me.lblStartTime.Size = New System.Drawing.Size(48, 13) Me.lblStartTime.Size = New System.Drawing.Size(48, 13)
Me.lblStartTime.TabIndex = 12 Me.lblStartTime.TabIndex = 12
@@ -321,7 +557,7 @@ Partial Class frmEintragTvNew
'dtpEndDate 'dtpEndDate
' '
Me.dtpEndDate.Format = System.Windows.Forms.DateTimePickerFormat.[Short] Me.dtpEndDate.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.dtpEndDate.Location = New System.Drawing.Point(170, 382) Me.dtpEndDate.Location = New System.Drawing.Point(721, 504)
Me.dtpEndDate.Name = "dtpEndDate" Me.dtpEndDate.Name = "dtpEndDate"
Me.dtpEndDate.ShowCheckBox = True Me.dtpEndDate.ShowCheckBox = True
Me.dtpEndDate.Size = New System.Drawing.Size(201, 20) Me.dtpEndDate.Size = New System.Drawing.Size(201, 20)
@@ -330,7 +566,7 @@ Partial Class frmEintragTvNew
'lblEndDate 'lblEndDate
' '
Me.lblEndDate.AutoSize = True Me.lblEndDate.AutoSize = True
Me.lblEndDate.Location = New System.Drawing.Point(55, 385) Me.lblEndDate.Location = New System.Drawing.Point(606, 507)
Me.lblEndDate.Name = "lblEndDate" Me.lblEndDate.Name = "lblEndDate"
Me.lblEndDate.Size = New System.Drawing.Size(104, 13) Me.lblEndDate.Size = New System.Drawing.Size(104, 13)
Me.lblEndDate.TabIndex = 10 Me.lblEndDate.TabIndex = 10
@@ -339,7 +575,7 @@ Partial Class frmEintragTvNew
'dtpStartDate 'dtpStartDate
' '
Me.dtpStartDate.Format = System.Windows.Forms.DateTimePickerFormat.[Short] Me.dtpStartDate.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.dtpStartDate.Location = New System.Drawing.Point(171, 342) Me.dtpStartDate.Location = New System.Drawing.Point(127, 504)
Me.dtpStartDate.Name = "dtpStartDate" Me.dtpStartDate.Name = "dtpStartDate"
Me.dtpStartDate.ShowCheckBox = True Me.dtpStartDate.ShowCheckBox = True
Me.dtpStartDate.Size = New System.Drawing.Size(200, 20) Me.dtpStartDate.Size = New System.Drawing.Size(200, 20)
@@ -348,39 +584,25 @@ Partial Class frmEintragTvNew
'lblStartDate 'lblStartDate
' '
Me.lblStartDate.AutoSize = True Me.lblStartDate.AutoSize = True
Me.lblStartDate.Location = New System.Drawing.Point(57, 342) Me.lblStartDate.Location = New System.Drawing.Point(45, 507)
Me.lblStartDate.Name = "lblStartDate" Me.lblStartDate.Name = "lblStartDate"
Me.lblStartDate.Size = New System.Drawing.Size(107, 13) Me.lblStartDate.Size = New System.Drawing.Size(64, 13)
Me.lblStartDate.TabIndex = 8 Me.lblStartDate.TabIndex = 8
Me.lblStartDate.Text = "Startdatum (optional):" Me.lblStartDate.Text = "Startdatum: "
'
'txtZeile3
'
Me.txtZeile3.Location = New System.Drawing.Point(90, 242)
Me.txtZeile3.Name = "txtZeile3"
Me.txtZeile3.Size = New System.Drawing.Size(871, 20)
Me.txtZeile3.TabIndex = 5
' '
'lblZeile3 'lblZeile3
' '
Me.lblZeile3.AutoSize = True Me.lblZeile3.AutoSize = True
Me.lblZeile3.Location = New System.Drawing.Point(42, 245) Me.lblZeile3.Location = New System.Drawing.Point(42, 388)
Me.lblZeile3.Name = "lblZeile3" Me.lblZeile3.Name = "lblZeile3"
Me.lblZeile3.Size = New System.Drawing.Size(42, 13) Me.lblZeile3.Size = New System.Drawing.Size(42, 13)
Me.lblZeile3.TabIndex = 6 Me.lblZeile3.TabIndex = 6
Me.lblZeile3.Text = "Zeile 3:" Me.lblZeile3.Text = "Zeile 3:"
' '
'txtZeile2
'
Me.txtZeile2.Location = New System.Drawing.Point(90, 182)
Me.txtZeile2.Name = "txtZeile2"
Me.txtZeile2.Size = New System.Drawing.Size(871, 20)
Me.txtZeile2.TabIndex = 4
'
'lblZeile2 'lblZeile2
' '
Me.lblZeile2.AutoSize = True Me.lblZeile2.AutoSize = True
Me.lblZeile2.Location = New System.Drawing.Point(42, 185) Me.lblZeile2.Location = New System.Drawing.Point(43, 255)
Me.lblZeile2.Name = "lblZeile2" Me.lblZeile2.Name = "lblZeile2"
Me.lblZeile2.Size = New System.Drawing.Size(42, 13) Me.lblZeile2.Size = New System.Drawing.Size(42, 13)
Me.lblZeile2.TabIndex = 4 Me.lblZeile2.TabIndex = 4
@@ -388,16 +610,16 @@ Partial Class frmEintragTvNew
' '
'rtbZeile1 'rtbZeile1
' '
Me.rtbZeile1.Location = New System.Drawing.Point(100, 66) Me.rtbZeile1.Location = New System.Drawing.Point(100, 79)
Me.rtbZeile1.Name = "rtbZeile1" Me.rtbZeile1.Name = "rtbZeile1"
Me.rtbZeile1.Size = New System.Drawing.Size(871, 80) Me.rtbZeile1.Size = New System.Drawing.Size(1180, 80)
Me.rtbZeile1.TabIndex = 3 Me.rtbZeile1.TabIndex = 3
Me.rtbZeile1.Text = "" Me.rtbZeile1.Text = ""
' '
'lblZeile1 'lblZeile1
' '
Me.lblZeile1.AutoSize = True Me.lblZeile1.AutoSize = True
Me.lblZeile1.Location = New System.Drawing.Point(42, 63) Me.lblZeile1.Location = New System.Drawing.Point(42, 109)
Me.lblZeile1.Name = "lblZeile1" Me.lblZeile1.Name = "lblZeile1"
Me.lblZeile1.Size = New System.Drawing.Size(42, 13) Me.lblZeile1.Size = New System.Drawing.Size(42, 13)
Me.lblZeile1.TabIndex = 2 Me.lblZeile1.TabIndex = 2
@@ -407,7 +629,7 @@ Partial Class frmEintragTvNew
' '
Me.cmbTvTextBezeichnungAuswahl.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cmbTvTextBezeichnungAuswahl.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbTvTextBezeichnungAuswahl.FormattingEnabled = True Me.cmbTvTextBezeichnungAuswahl.FormattingEnabled = True
Me.cmbTvTextBezeichnungAuswahl.Location = New System.Drawing.Point(100, 30) Me.cmbTvTextBezeichnungAuswahl.Location = New System.Drawing.Point(101, 36)
Me.cmbTvTextBezeichnungAuswahl.Name = "cmbTvTextBezeichnungAuswahl" Me.cmbTvTextBezeichnungAuswahl.Name = "cmbTvTextBezeichnungAuswahl"
Me.cmbTvTextBezeichnungAuswahl.Size = New System.Drawing.Size(177, 21) Me.cmbTvTextBezeichnungAuswahl.Size = New System.Drawing.Size(177, 21)
Me.cmbTvTextBezeichnungAuswahl.TabIndex = 2 Me.cmbTvTextBezeichnungAuswahl.TabIndex = 2
@@ -415,7 +637,7 @@ Partial Class frmEintragTvNew
'lblBezeichnung 'lblBezeichnung
' '
Me.lblBezeichnung.AutoSize = True Me.lblBezeichnung.AutoSize = True
Me.lblBezeichnung.Location = New System.Drawing.Point(17, 33) Me.lblBezeichnung.Location = New System.Drawing.Point(13, 39)
Me.lblBezeichnung.Name = "lblBezeichnung" Me.lblBezeichnung.Name = "lblBezeichnung"
Me.lblBezeichnung.Size = New System.Drawing.Size(72, 13) Me.lblBezeichnung.Size = New System.Drawing.Size(72, 13)
Me.lblBezeichnung.TabIndex = 0 Me.lblBezeichnung.TabIndex = 0
@@ -424,7 +646,7 @@ Partial Class frmEintragTvNew
'lblPosition 'lblPosition
' '
Me.lblPosition.AutoSize = True Me.lblPosition.AutoSize = True
Me.lblPosition.Location = New System.Drawing.Point(57, 412) Me.lblPosition.Location = New System.Drawing.Point(62, 584)
Me.lblPosition.Name = "lblPosition" Me.lblPosition.Name = "lblPosition"
Me.lblPosition.Size = New System.Drawing.Size(47, 13) Me.lblPosition.Size = New System.Drawing.Size(47, 13)
Me.lblPosition.TabIndex = 21 Me.lblPosition.TabIndex = 21
@@ -435,14 +657,14 @@ Partial Class frmEintragTvNew
Me.cmbPosition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cmbPosition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbPosition.FormattingEnabled = True Me.cmbPosition.FormattingEnabled = True
Me.cmbPosition.Items.AddRange(New Object() {"Top", "Middle", "Bottom"}) Me.cmbPosition.Items.AddRange(New Object() {"Top", "Middle", "Bottom"})
Me.cmbPosition.Location = New System.Drawing.Point(113, 409) Me.cmbPosition.Location = New System.Drawing.Point(125, 576)
Me.cmbPosition.Name = "cmbPosition" Me.cmbPosition.Name = "cmbPosition"
Me.cmbPosition.Size = New System.Drawing.Size(177, 21) Me.cmbPosition.Size = New System.Drawing.Size(177, 21)
Me.cmbPosition.TabIndex = 22 Me.cmbPosition.TabIndex = 22
' '
'btnBold 'btnBold
' '
Me.btnBold.Location = New System.Drawing.Point(60, 287) Me.btnBold.Location = New System.Drawing.Point(100, 165)
Me.btnBold.Name = "btnBold" Me.btnBold.Name = "btnBold"
Me.btnBold.Size = New System.Drawing.Size(30, 30) Me.btnBold.Size = New System.Drawing.Size(30, 30)
Me.btnBold.TabIndex = 23 Me.btnBold.TabIndex = 23
@@ -451,7 +673,7 @@ Partial Class frmEintragTvNew
' '
'btnItalic 'btnItalic
' '
Me.btnItalic.Location = New System.Drawing.Point(100, 287) Me.btnItalic.Location = New System.Drawing.Point(140, 165)
Me.btnItalic.Name = "btnItalic" Me.btnItalic.Name = "btnItalic"
Me.btnItalic.Size = New System.Drawing.Size(30, 30) Me.btnItalic.Size = New System.Drawing.Size(30, 30)
Me.btnItalic.TabIndex = 24 Me.btnItalic.TabIndex = 24
@@ -460,7 +682,7 @@ Partial Class frmEintragTvNew
' '
'btnUnderline 'btnUnderline
' '
Me.btnUnderline.Location = New System.Drawing.Point(140, 287) Me.btnUnderline.Location = New System.Drawing.Point(180, 165)
Me.btnUnderline.Name = "btnUnderline" Me.btnUnderline.Name = "btnUnderline"
Me.btnUnderline.Size = New System.Drawing.Size(30, 30) Me.btnUnderline.Size = New System.Drawing.Size(30, 30)
Me.btnUnderline.TabIndex = 25 Me.btnUnderline.TabIndex = 25
@@ -469,7 +691,7 @@ Partial Class frmEintragTvNew
' '
'btnTextColor 'btnTextColor
' '
Me.btnTextColor.Location = New System.Drawing.Point(180, 287) Me.btnTextColor.Location = New System.Drawing.Point(302, 165)
Me.btnTextColor.Name = "btnTextColor" Me.btnTextColor.Name = "btnTextColor"
Me.btnTextColor.Size = New System.Drawing.Size(30, 30) Me.btnTextColor.Size = New System.Drawing.Size(30, 30)
Me.btnTextColor.TabIndex = 26 Me.btnTextColor.TabIndex = 26
@@ -478,7 +700,7 @@ Partial Class frmEintragTvNew
' '
'btnBackColor 'btnBackColor
' '
Me.btnBackColor.Location = New System.Drawing.Point(220, 287) Me.btnBackColor.Location = New System.Drawing.Point(342, 165)
Me.btnBackColor.Name = "btnBackColor" Me.btnBackColor.Name = "btnBackColor"
Me.btnBackColor.Size = New System.Drawing.Size(30, 30) Me.btnBackColor.Size = New System.Drawing.Size(30, 30)
Me.btnBackColor.TabIndex = 27 Me.btnBackColor.TabIndex = 27
@@ -487,7 +709,7 @@ Partial Class frmEintragTvNew
' '
'btnAlignLeft 'btnAlignLeft
' '
Me.btnAlignLeft.Location = New System.Drawing.Point(260, 287) Me.btnAlignLeft.Location = New System.Drawing.Point(471, 165)
Me.btnAlignLeft.Name = "btnAlignLeft" Me.btnAlignLeft.Name = "btnAlignLeft"
Me.btnAlignLeft.Size = New System.Drawing.Size(30, 30) Me.btnAlignLeft.Size = New System.Drawing.Size(30, 30)
Me.btnAlignLeft.TabIndex = 28 Me.btnAlignLeft.TabIndex = 28
@@ -496,7 +718,7 @@ Partial Class frmEintragTvNew
' '
'btnAlignCenter 'btnAlignCenter
' '
Me.btnAlignCenter.Location = New System.Drawing.Point(300, 287) Me.btnAlignCenter.Location = New System.Drawing.Point(511, 165)
Me.btnAlignCenter.Name = "btnAlignCenter" Me.btnAlignCenter.Name = "btnAlignCenter"
Me.btnAlignCenter.Size = New System.Drawing.Size(30, 30) Me.btnAlignCenter.Size = New System.Drawing.Size(30, 30)
Me.btnAlignCenter.TabIndex = 29 Me.btnAlignCenter.TabIndex = 29
@@ -505,7 +727,7 @@ Partial Class frmEintragTvNew
' '
'btnAlignRight 'btnAlignRight
' '
Me.btnAlignRight.Location = New System.Drawing.Point(340, 287) Me.btnAlignRight.Location = New System.Drawing.Point(551, 165)
Me.btnAlignRight.Name = "btnAlignRight" Me.btnAlignRight.Name = "btnAlignRight"
Me.btnAlignRight.Size = New System.Drawing.Size(30, 30) Me.btnAlignRight.Size = New System.Drawing.Size(30, 30)
Me.btnAlignRight.TabIndex = 30 Me.btnAlignRight.TabIndex = 30
@@ -516,7 +738,7 @@ Partial Class frmEintragTvNew
' '
Me.cmbFontFamily.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cmbFontFamily.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbFontFamily.FormattingEnabled = True Me.cmbFontFamily.FormattingEnabled = True
Me.cmbFontFamily.Location = New System.Drawing.Point(380, 292) Me.cmbFontFamily.Location = New System.Drawing.Point(734, 165)
Me.cmbFontFamily.Name = "cmbFontFamily" Me.cmbFontFamily.Name = "cmbFontFamily"
Me.cmbFontFamily.Size = New System.Drawing.Size(150, 21) Me.cmbFontFamily.Size = New System.Drawing.Size(150, 21)
Me.cmbFontFamily.TabIndex = 31 Me.cmbFontFamily.TabIndex = 31
@@ -525,14 +747,14 @@ Partial Class frmEintragTvNew
' '
Me.cmbFontSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cmbFontSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbFontSize.FormattingEnabled = True Me.cmbFontSize.FormattingEnabled = True
Me.cmbFontSize.Location = New System.Drawing.Point(540, 292) Me.cmbFontSize.Location = New System.Drawing.Point(911, 165)
Me.cmbFontSize.Name = "cmbFontSize" Me.cmbFontSize.Name = "cmbFontSize"
Me.cmbFontSize.Size = New System.Drawing.Size(60, 21) Me.cmbFontSize.Size = New System.Drawing.Size(60, 21)
Me.cmbFontSize.TabIndex = 32 Me.cmbFontSize.TabIndex = 32
' '
'btnSpeichern 'btnSpeichern
' '
Me.btnSpeichern.Location = New System.Drawing.Point(1078, 862) Me.btnSpeichern.Location = New System.Drawing.Point(1078, 1010)
Me.btnSpeichern.Name = "btnSpeichern" Me.btnSpeichern.Name = "btnSpeichern"
Me.btnSpeichern.Size = New System.Drawing.Size(75, 30) Me.btnSpeichern.Size = New System.Drawing.Size(75, 30)
Me.btnSpeichern.TabIndex = 5 Me.btnSpeichern.TabIndex = 5
@@ -541,7 +763,7 @@ Partial Class frmEintragTvNew
' '
'btnLoeschen 'btnLoeschen
' '
Me.btnLoeschen.Location = New System.Drawing.Point(1159, 862) Me.btnLoeschen.Location = New System.Drawing.Point(1159, 1010)
Me.btnLoeschen.Name = "btnLoeschen" Me.btnLoeschen.Name = "btnLoeschen"
Me.btnLoeschen.Size = New System.Drawing.Size(75, 30) Me.btnLoeschen.Size = New System.Drawing.Size(75, 30)
Me.btnLoeschen.TabIndex = 6 Me.btnLoeschen.TabIndex = 6
@@ -550,7 +772,7 @@ Partial Class frmEintragTvNew
' '
'btnAbbrechen 'btnAbbrechen
' '
Me.btnAbbrechen.Location = New System.Drawing.Point(1240, 862) Me.btnAbbrechen.Location = New System.Drawing.Point(1240, 1010)
Me.btnAbbrechen.Name = "btnAbbrechen" Me.btnAbbrechen.Name = "btnAbbrechen"
Me.btnAbbrechen.Size = New System.Drawing.Size(75, 30) Me.btnAbbrechen.Size = New System.Drawing.Size(75, 30)
Me.btnAbbrechen.TabIndex = 7 Me.btnAbbrechen.TabIndex = 7
@@ -569,7 +791,7 @@ Partial Class frmEintragTvNew
' '
'frmEintragTvNew 'frmEintragTvNew
' '
Me.ClientSize = New System.Drawing.Size(1337, 972) Me.ClientSize = New System.Drawing.Size(1342, 1052)
Me.Controls.Add(Me.chkShowInactive) Me.Controls.Add(Me.chkShowInactive)
Me.Controls.Add(Me.btnAbbrechen) Me.Controls.Add(Me.btnAbbrechen)
Me.Controls.Add(Me.btnLoeschen) Me.Controls.Add(Me.btnLoeschen)
@@ -617,9 +839,7 @@ Partial Class frmEintragTvNew
Friend WithEvents lblEndDate As Label Friend WithEvents lblEndDate As Label
Friend WithEvents dtpStartDate As DateTimePicker Friend WithEvents dtpStartDate As DateTimePicker
Friend WithEvents lblStartDate As Label Friend WithEvents lblStartDate As Label
Friend WithEvents txtZeile3 As TextBox
Friend WithEvents lblZeile3 As Label Friend WithEvents lblZeile3 As Label
Friend WithEvents txtZeile2 As TextBox
Friend WithEvents lblZeile2 As Label Friend WithEvents lblZeile2 As Label
Friend WithEvents lblZeile1 As Label Friend WithEvents lblZeile1 As Label
Friend WithEvents cmbTvTextBezeichnungAuswahl As ComboBox Friend WithEvents cmbTvTextBezeichnungAuswahl As ComboBox
@@ -630,7 +850,27 @@ Partial Class frmEintragTvNew
Friend WithEvents btnLoeschen As Button Friend WithEvents btnLoeschen As Button
Friend WithEvents btnAbbrechen As Button Friend WithEvents btnAbbrechen As Button
Friend WithEvents chkShowInactive As CheckBox Friend WithEvents chkShowInactive As CheckBox
Private WithEvents rtbZeile3 As RichTextBox
Private WithEvents rtbZeile2 As RichTextBox
Private WithEvents btnBold3 As Button
Private WithEvents btnItalic3 As Button
Private WithEvents btnUnderline3 As Button
Private WithEvents btnTextColor3 As Button
Private WithEvents btnBackColor3 As Button
Private WithEvents btnAlignLeft3 As Button
Private WithEvents btnAlignCenter3 As Button
Private WithEvents btnAlignRight3 As Button
Private WithEvents cmbFontFamily3 As ComboBox
Private WithEvents cmbFontSize3 As ComboBox
Private WithEvents btnBold2 As Button
Private WithEvents btnItalic2 As Button
Private WithEvents btnUnderline2 As Button
Private WithEvents btnTextColor2 As Button
Private WithEvents btnBackColor2 As Button
Private WithEvents btnAlignLeft2 As Button
Private WithEvents btnAlignCenter2 As Button
Private WithEvents btnAlignRight2 As Button
Private WithEvents cmbFontFamily2 As ComboBox
Private WithEvents cmbFontSize2 As ComboBox
End Class End Class

View File

@@ -12,6 +12,9 @@ Public Class frmEintragTvNew
Private isInitializing As Boolean = False Private isInitializing As Boolean = False
' **Neue Klassenvariable zur Speicherung der zuletzt ausgewählten TVID**
Private lastSelectedTVID As Integer = 0
Public Sub New() Public Sub New()
InitializeComponent() InitializeComponent()
InitializeFontComboBoxes() InitializeFontComboBoxes()
@@ -89,11 +92,13 @@ Public Class frmEintragTvNew
If gefilterteListe.Count > 0 Then If gefilterteListe.Count > 0 Then
dgvAVISOTV.DataSource = gefilterteListe dgvAVISOTV.DataSource = gefilterteListe
' Anpassen der Spaltenüberschriften
dgvAVISOTV.Columns("TvTextBezeichnungID").HeaderText = "ID" dgvAVISOTV.Columns("TvTextBezeichnungID").HeaderText = "ID"
dgvAVISOTV.Columns("TvTextBezeichnung").HeaderText = "Bezeichnung" dgvAVISOTV.Columns("TvTextBezeichnung").HeaderText = "Bezeichnung"
dgvAVISOTV.Columns("FixeZeile1RTF").HeaderText = "Zeile 1" dgvAVISOTV.Columns("FixeZeile1RTF").HeaderText = "Zeile 1 (Text)"
dgvAVISOTV.Columns("FixeZeile2").HeaderText = "Zeile 2" dgvAVISOTV.Columns("FixeZeile2RTF").HeaderText = "Zeile 2 (Text)"
dgvAVISOTV.Columns("FixeZeile3").HeaderText = "Zeile 3" dgvAVISOTV.Columns("FixeZeile3RTF").HeaderText = "Zeile 3 (Text)"
dgvAVISOTV.Columns("Standort").Visible = False dgvAVISOTV.Columns("Standort").Visible = False
dgvAVISOTV.Columns("Art").Visible = False dgvAVISOTV.Columns("Art").Visible = False
dgvAVISOTV.Columns("StartDate").HeaderText = "Startdatum" dgvAVISOTV.Columns("StartDate").HeaderText = "Startdatum"
@@ -110,11 +115,30 @@ Public Class frmEintragTvNew
dgvAVISOTV.Columns("IsSaturday").Visible = False dgvAVISOTV.Columns("IsSaturday").Visible = False
dgvAVISOTV.Columns("IsSunday").Visible = False dgvAVISOTV.Columns("IsSunday").Visible = False
' Hinzufügen des CellFormatting-Handlers
AddHandler dgvAVISOTV.CellFormatting, AddressOf dgvAVISOTV_CellFormatting
dgvAVISOTV.AutoResizeColumns() dgvAVISOTV.AutoResizeColumns()
AddHandler dgvAVISOTV.SelectionChanged, AddressOf dgvAVISOTV_SelectionChanged AddHandler dgvAVISOTV.SelectionChanged, AddressOf dgvAVISOTV_SelectionChanged
If dgvAVISOTV.Rows.Count > 0 Then ' **Wiederherstellung der Auswahl basierend auf lastSelectedTVID**
If lastSelectedTVID <> 0 Then
Dim rowToSelect = dgvAVISOTV.Rows.Cast(Of DataGridViewRow)().FirstOrDefault(Function(r) CType(r.DataBoundItem, cAvisoTvNew).TvTextBezeichnungID = lastSelectedTVID)
If rowToSelect IsNot Nothing Then
rowToSelect.Selected = True
dgvAVISOTV.FirstDisplayedScrollingRowIndex = rowToSelect.Index
dgvAVISOTV.CurrentCell = rowToSelect.Cells(0)
Else
' Falls die TVID nicht gefunden wird, wähle die erste Zeile aus
If dgvAVISOTV.Rows.Count > 0 Then
dgvAVISOTV.Rows(0).Selected = True
dgvAVISOTV.CurrentCell = dgvAVISOTV.Rows(0).Cells(0)
dgvAVISOTV_SelectionChanged(Nothing, Nothing)
End If
End If
ElseIf dgvAVISOTV.Rows.Count > 0 Then
dgvAVISOTV.Rows(0).Selected = True dgvAVISOTV.Rows(0).Selected = True
dgvAVISOTV.CurrentCell = dgvAVISOTV.Rows(0).Cells(0) dgvAVISOTV.CurrentCell = dgvAVISOTV.Rows(0).Cells(0)
dgvAVISOTV_SelectionChanged(Nothing, Nothing) dgvAVISOTV_SelectionChanged(Nothing, Nothing)
@@ -133,6 +157,27 @@ Public Class frmEintragTvNew
End Try End Try
End Sub End Sub
Private Sub dgvAVISOTV_CellFormatting(sender As Object, e As DataGridViewCellFormattingEventArgs)
' Definieren Sie die Namen der RTF-Spalten
Dim rtfColumns As String() = {"FixeZeile1RTF", "FixeZeile2RTF", "FixeZeile3RTF"}
' Überprüfen Sie, ob die aktuelle Spalte eine der RTF-Spalten ist
If rtfColumns.Contains(dgvAVISOTV.Columns(e.ColumnIndex).Name) AndAlso e.Value IsNot Nothing Then
Try
' Konvertieren Sie den RTF-Text in normalen Text
Using rtb As New RichTextBox()
rtb.Rtf = e.Value.ToString()
e.Value = rtb.Text
e.FormattingApplied = True
End Using
Catch ex As Exception
' Falls das RTF ungültig ist, zeigen Sie den Originalwert an
e.Value = e.Value.ToString()
e.FormattingApplied = True
End Try
End If
End Sub
Private Sub cbxStandort_SelectedValueChanged(sender As Object, e As EventArgs) Handles cbxStandort.SelectedValueChanged Private Sub cbxStandort_SelectedValueChanged(sender As Object, e As EventArgs) Handles cbxStandort.SelectedValueChanged
If list IsNot Nothing Then list.Clear() If list IsNot Nothing Then list.Clear()
@@ -186,8 +231,6 @@ Public Class frmEintragTvNew
End Function End Function
End Class End Class
Private Sub cmbTvTextBezeichnungAuswahl_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbTvTextBezeichnungAuswahl.SelectedIndexChanged Private Sub cmbTvTextBezeichnungAuswahl_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbTvTextBezeichnungAuswahl.SelectedIndexChanged
If isInitializing Then If isInitializing Then
Return Return
@@ -218,7 +261,7 @@ Public Class frmEintragTvNew
Dim currentStandortID As Integer = AvisoTvNewDAL.GetStandortID(currentStandort) Dim currentStandortID As Integer = AvisoTvNewDAL.GetStandortID(currentStandort)
If selectedAviso IsNot Nothing Then If selectedAviso IsNot Nothing Then
Debug.WriteLine("Gefundenes Aviso: TVID = " & selectedAviso.TVID) Debug.WriteLine("Gefundenes Aviso: TVID = " & selectedAviso.TvTextBezeichnungID)
myAvisoTvNew = selectedAviso myAvisoTvNew = selectedAviso
Neuanlage = False Neuanlage = False
FillFieldsFromAviso(selectedAviso) FillFieldsFromAviso(selectedAviso)
@@ -241,12 +284,13 @@ Public Class frmEintragTvNew
End Try End Try
End Sub End Sub
Private Sub InitializeFontComboBoxes() Private Sub InitializeFontComboBoxes()
Dim fontFamilies As New List(Of String)() Dim fontFamilies As New List(Of String)()
For Each font As FontFamily In FontFamily.Families For Each font As FontFamily In FontFamily.Families
fontFamilies.Add(font.Name) fontFamilies.Add(font.Name)
Next Next
' Initialisierung für Zeile 1
cmbFontFamily.DataSource = fontFamilies cmbFontFamily.DataSource = fontFamilies
cmbFontFamily.SelectedItem = rtbZeile1.Font.FontFamily.Name cmbFontFamily.SelectedItem = rtbZeile1.Font.FontFamily.Name
@@ -257,10 +301,27 @@ Public Class frmEintragTvNew
AddHandler cmbFontFamily.SelectedIndexChanged, AddressOf cmbFontFamily_SelectedIndexChanged AddHandler cmbFontFamily.SelectedIndexChanged, AddressOf cmbFontFamily_SelectedIndexChanged
AddHandler cmbFontSize.SelectedIndexChanged, AddressOf cmbFontSize_SelectedIndexChanged AddHandler cmbFontSize.SelectedIndexChanged, AddressOf cmbFontSize_SelectedIndexChanged
' Initialisierung für Zeile 2
cmbFontFamily2.DataSource = New List(Of String)(fontFamilies)
cmbFontFamily2.SelectedItem = rtbZeile2.Font.FontFamily.Name
cmbFontSize2.DataSource = sizes.Select(Function(s) s.ToString()).ToList()
cmbFontSize2.SelectedItem = CInt(rtbZeile2.Font.Size).ToString()
AddHandler cmbFontFamily2.SelectedIndexChanged, AddressOf cmbFontFamily2_SelectedIndexChanged
AddHandler cmbFontSize2.SelectedIndexChanged, AddressOf cmbFontSize2_SelectedIndexChanged
' Initialisierung für Zeile 3
cmbFontFamily3.DataSource = New List(Of String)(fontFamilies)
cmbFontFamily3.SelectedItem = rtbZeile3.Font.FontFamily.Name
cmbFontSize3.DataSource = sizes.Select(Function(s) s.ToString()).ToList()
cmbFontSize3.SelectedItem = CInt(rtbZeile3.Font.Size).ToString()
AddHandler cmbFontFamily3.SelectedIndexChanged, AddressOf cmbFontFamily3_SelectedIndexChanged
AddHandler cmbFontSize3.SelectedIndexChanged, AddressOf cmbFontSize3_SelectedIndexChanged
End Sub End Sub
' Schriftfamilie ComboBox SelectionChanged ' Schriftfamilie ComboBox SelectionChanged
Private Sub cmbFontFamily_SelectedIndexChanged(sender As Object, e As EventArgs) Private Sub cmbFontFamily_SelectedIndexChanged(sender As Object, e As EventArgs)
UpdateFont() UpdateFont()
@@ -270,11 +331,25 @@ Public Class frmEintragTvNew
Private Sub cmbFontSize_SelectedIndexChanged(sender As Object, e As EventArgs) Private Sub cmbFontSize_SelectedIndexChanged(sender As Object, e As EventArgs)
UpdateFont() UpdateFont()
End Sub End Sub
Private Sub UpdateFont() Private Sub UpdateFont()
Dim selectedFontFamily As String = If(cmbFontFamily.SelectedItem, rtbZeile1.Font.FontFamily.Name) Dim selectedFontFamily As String = If(cmbFontFamily.SelectedItem, rtbZeile1.SelectionFont?.FontFamily.Name)
Dim selectedFontSize As Single Dim selectedFontSize As Single
If Single.TryParse(cmbFontSize.SelectedItem, selectedFontSize) Then If Single.TryParse(cmbFontSize.SelectedItem, selectedFontSize) Then
rtbZeile1.Font = New Font(selectedFontFamily, selectedFontSize, rtbZeile1.Font.Style) ' Überprüfen, ob eine Auswahl vorhanden ist
If rtbZeile1.SelectionLength > 0 Then
' Erstellen einer neuen Schriftart basierend auf der Auswahl
Dim currentFont As Font = rtbZeile1.SelectionFont
If currentFont IsNot Nothing Then
rtbZeile1.SelectionFont = New Font(selectedFontFamily, selectedFontSize, currentFont.Style)
Else
' Wenn die Auswahl unterschiedliche Schriftarten hat, eine neue Schriftart setzen
rtbZeile1.SelectionFont = New Font(selectedFontFamily, selectedFontSize)
End If
Else
' Wenn keine Auswahl vorhanden ist, setzen Sie die Standard-Schriftart der RichTextBox
rtbZeile1.Font = New Font(selectedFontFamily, selectedFontSize, rtbZeile1.Font.Style)
End If
hatAenderung = True hatAenderung = True
End If End If
End Sub End Sub
@@ -348,6 +423,208 @@ Public Class frmEintragTvNew
hatAenderung = True hatAenderung = True
End Sub End Sub
' Schriftfamilie ComboBox SelectionChanged
Private Sub cmbFontFamily2_SelectedIndexChanged(sender As Object, e As EventArgs)
UpdateFont2()
End Sub
' Schriftgröße ComboBox SelectionChanged
Private Sub cmbFontSize2_SelectedIndexChanged(sender As Object, e As EventArgs)
UpdateFont2()
End Sub
Private Sub UpdateFont2()
Dim selectedFontFamily As String = If(cmbFontFamily2.SelectedItem, rtbZeile2.SelectionFont?.FontFamily.Name)
Dim selectedFontSize As Single
If Single.TryParse(cmbFontSize2.SelectedItem, selectedFontSize) Then
' Überprüfen, ob eine Auswahl vorhanden ist
If rtbZeile2.SelectionLength > 0 Then
' Erstellen einer neuen Schriftart basierend auf der Auswahl
Dim currentFont As Font = rtbZeile2.SelectionFont
If currentFont IsNot Nothing Then
rtbZeile2.SelectionFont = New Font(selectedFontFamily, selectedFontSize, currentFont.Style)
Else
' Wenn die Auswahl unterschiedliche Schriftarten hat, eine neue Schriftart setzen
rtbZeile2.SelectionFont = New Font(selectedFontFamily, selectedFontSize)
End If
Else
' Wenn keine Auswahl vorhanden ist, setzen Sie die Standard-Schriftart der RichTextBox
rtbZeile2.Font = New Font(selectedFontFamily, selectedFontSize, rtbZeile2.Font.Style)
End If
hatAenderung = True
End If
End Sub
' Methode zum Umschalten des Schriftstils
Private Sub ToggleFontStyle2(style As FontStyle)
If rtbZeile2.SelectionFont IsNot Nothing Then
Dim currentFont As Font = rtbZeile2.SelectionFont
Dim newFontStyle As FontStyle
If rtbZeile2.SelectionFont.Style.HasFlag(style) Then
' Entferne den Stil
newFontStyle = currentFont.Style And Not style
Else
' Füge den Stil hinzu
newFontStyle = currentFont.Style Or style
End If
' Setze die neue Schriftart
rtbZeile2.SelectionFont = New Font(currentFont.FontFamily, currentFont.Size, newFontStyle)
hatAenderung = True
End If
End Sub
' Fett (Bold) Button Click
Private Sub btnBold2_Click(sender As Object, e As EventArgs) Handles btnBold2.Click
ToggleFontStyle2(FontStyle.Bold)
End Sub
' Kursiv (Italic) Button Click
Private Sub btnItalic2_Click(sender As Object, e As EventArgs) Handles btnItalic2.Click
ToggleFontStyle2(FontStyle.Italic)
End Sub
' Unterstrichen (Underline) Button Click
Private Sub btnUnderline2_Click(sender As Object, e As EventArgs) Handles btnUnderline2.Click
ToggleFontStyle2(FontStyle.Underline)
End Sub
' Textfarbe ändern Button Click
Private Sub btnTextColor2_Click(sender As Object, e As EventArgs) Handles btnTextColor2.Click
If colorDialogText.ShowDialog() = DialogResult.OK Then
rtbZeile2.SelectionColor = colorDialogText.Color
hatAenderung = True
End If
End Sub
' Hintergrundfarbe ändern Button Click
Private Sub btnBackColor2_Click(sender As Object, e As EventArgs) Handles btnBackColor2.Click
If colorDialogText.ShowDialog() = DialogResult.OK Then
rtbZeile2.SelectionBackColor = colorDialogText.Color
hatAenderung = True
End If
End Sub
' Links ausrichten Button Click
Private Sub btnAlignLeft2_Click(sender As Object, e As EventArgs) Handles btnAlignLeft2.Click
rtbZeile2.SelectionAlignment = HorizontalAlignment.Left
hatAenderung = True
End Sub
' Mitte ausrichten Button Click
Private Sub btnAlignCenter2_Click(sender As Object, e As EventArgs) Handles btnAlignCenter2.Click
rtbZeile2.SelectionAlignment = HorizontalAlignment.Center
hatAenderung = True
End Sub
' Rechts ausrichten Button Click
Private Sub btnAlignRight2_Click(sender As Object, e As EventArgs) Handles btnAlignRight2.Click
rtbZeile2.SelectionAlignment = HorizontalAlignment.Right
hatAenderung = True
End Sub
' Schriftfamilie ComboBox SelectionChanged
Private Sub cmbFontFamily3_SelectedIndexChanged(sender As Object, e As EventArgs)
UpdateFont3()
End Sub
' Schriftgröße ComboBox SelectionChanged
Private Sub cmbFontSize3_SelectedIndexChanged(sender As Object, e As EventArgs)
UpdateFont3()
End Sub
Private Sub UpdateFont3()
Dim selectedFontFamily As String = If(cmbFontFamily3.SelectedItem, rtbZeile3.SelectionFont?.FontFamily.Name)
Dim selectedFontSize As Single
If Single.TryParse(cmbFontSize3.SelectedItem, selectedFontSize) Then
' Überprüfen, ob eine Auswahl vorhanden ist
If rtbZeile3.SelectionLength > 0 Then
' Erstellen einer neuen Schriftart basierend auf der Auswahl
Dim currentFont As Font = rtbZeile3.SelectionFont
If currentFont IsNot Nothing Then
rtbZeile3.SelectionFont = New Font(selectedFontFamily, selectedFontSize, currentFont.Style)
Else
' Wenn die Auswahl unterschiedliche Schriftarten hat, eine neue Schriftart setzen
rtbZeile3.SelectionFont = New Font(selectedFontFamily, selectedFontSize)
End If
Else
' Wenn keine Auswahl vorhanden ist, setzen Sie die Standard-Schriftart der RichTextBox
rtbZeile3.Font = New Font(selectedFontFamily, selectedFontSize, rtbZeile3.Font.Style)
End If
hatAenderung = True
End If
End Sub
' Methode zum Umschalten des Schriftstils
Private Sub ToggleFontStyle3(style As FontStyle)
If rtbZeile3.SelectionFont IsNot Nothing Then
Dim currentFont As Font = rtbZeile3.SelectionFont
Dim newFontStyle As FontStyle
If rtbZeile3.SelectionFont.Style.HasFlag(style) Then
' Entferne den Stil
newFontStyle = currentFont.Style And Not style
Else
' Füge den Stil hinzu
newFontStyle = currentFont.Style Or style
End If
' Setze die neue Schriftart
rtbZeile3.SelectionFont = New Font(currentFont.FontFamily, currentFont.Size, newFontStyle)
hatAenderung = True
End If
End Sub
' Fett (Bold) Button Click
Private Sub btnBold3_Click(sender As Object, e As EventArgs) Handles btnBold3.Click
ToggleFontStyle3(FontStyle.Bold)
End Sub
' Kursiv (Italic) Button Click
Private Sub btnItalic3_Click(sender As Object, e As EventArgs) Handles btnItalic3.Click
ToggleFontStyle3(FontStyle.Italic)
End Sub
' Unterstrichen (Underline) Button Click
Private Sub btnUnderline3_Click(sender As Object, e As EventArgs) Handles btnUnderline3.Click
ToggleFontStyle3(FontStyle.Underline)
End Sub
' Textfarbe ändern Button Click
Private Sub btnTextColor3_Click(sender As Object, e As EventArgs) Handles btnTextColor3.Click
If colorDialogText.ShowDialog() = DialogResult.OK Then
rtbZeile3.SelectionColor = colorDialogText.Color
hatAenderung = True
End If
End Sub
' Hintergrundfarbe ändern Button Click
Private Sub btnBackColor3_Click(sender As Object, e As EventArgs) Handles btnBackColor3.Click
If colorDialogText.ShowDialog() = DialogResult.OK Then
rtbZeile3.SelectionBackColor = colorDialogText.Color
hatAenderung = True
End If
End Sub
' Links ausrichten Button Click
Private Sub btnAlignLeft3_Click(sender As Object, e As EventArgs) Handles btnAlignLeft3.Click
rtbZeile3.SelectionAlignment = HorizontalAlignment.Left
hatAenderung = True
End Sub
' Mitte ausrichten Button Click
Private Sub btnAlignCenter3_Click(sender As Object, e As EventArgs) Handles btnAlignCenter3.Click
rtbZeile3.SelectionAlignment = HorizontalAlignment.Center
hatAenderung = True
End Sub
' Rechts ausrichten Button Click
Private Sub btnAlignRight3_Click(sender As Object, e As EventArgs) Handles btnAlignRight3.Click
rtbZeile3.SelectionAlignment = HorizontalAlignment.Right
hatAenderung = True
End Sub
Private Sub LadeTvTextBezeichnungen() Private Sub LadeTvTextBezeichnungen()
isInitializing = True isInitializing = True
Dim bezeichnungen As New List(Of cTvTextBezeichnung)() Dim bezeichnungen As New List(Of cTvTextBezeichnung)()
@@ -407,8 +684,8 @@ Public Class frmEintragTvNew
' Hier setzt du die Textzeilen, wenn vorhanden ' Hier setzt du die Textzeilen, wenn vorhanden
rtbZeile1.Rtf = aviso.FixeZeile1RTF rtbZeile1.Rtf = aviso.FixeZeile1RTF
txtZeile2.Text = aviso.FixeZeile2 rtbZeile2.Rtf = aviso.FixeZeile2RTF
txtZeile3.Text = aviso.FixeZeile3 rtbZeile3.Rtf = aviso.FixeZeile3RTF
chkIsRecurring.Checked = aviso.IsRecurring.GetValueOrDefault(False) chkIsRecurring.Checked = aviso.IsRecurring.GetValueOrDefault(False)
@@ -454,23 +731,6 @@ Public Class frmEintragTvNew
chkIsActive.Checked = aviso.IsActive chkIsActive.Checked = aviso.IsActive
' Text-Einstellungen anwenden
cmbFontFamily.SelectedItem = aviso.FontFamily
cmbFontSize.SelectedItem = aviso.FontSize.ToString()
rtbZeile1.SelectionFont = New Font(aviso.FontFamily, aviso.FontSize, CType([Enum].Parse(GetType(FontStyle), aviso.FontStyle), FontStyle))
rtbZeile1.SelectionColor = Color.FromName(aviso.TextColor)
rtbZeile1.BackColor = Color.FromName(aviso.BackColor)
Select Case aviso.TextAlignment
Case "Left"
rtbZeile1.SelectionAlignment = HorizontalAlignment.Left
Case "Center"
rtbZeile1.SelectionAlignment = HorizontalAlignment.Center
Case "Right"
rtbZeile1.SelectionAlignment = HorizontalAlignment.Right
Case Else
rtbZeile1.SelectionAlignment = HorizontalAlignment.Left
End Select
grpWochentage.Enabled = chkIsRecurring.Checked grpWochentage.Enabled = chkIsRecurring.Checked
End Sub End Sub
@@ -483,87 +743,135 @@ Public Class frmEintragTvNew
' Initialisiere die HTML-Struktur ' Initialisiere die HTML-Struktur
sb.Append("<html><body>") sb.Append("<html><body>")
Dim currentFont As System.Drawing.Font = rtb.SelectionFont ' Teile den Text in Absätze auf
Dim currentColor As Color = rtb.SelectionColor Dim paragraphs As String() = rtb.Text.Split(New String() {vbCrLf, vbLf}, StringSplitOptions.None)
Dim currentAlignment As HorizontalAlignment = rtb.SelectionAlignment
Dim text As String = rtb.Text Dim charIndex As Integer = 0
Dim index As Integer = 0
While index < text.Length For Each paragraph As String In paragraphs
rtb.Select(index, 1) ' Wähle den aktuellen Absatz aus
Dim font As System.Drawing.Font = rtb.SelectionFont rtb.Select(charIndex, paragraph.Length)
Dim color As Color = rtb.SelectionColor
' Erhalte die Ausrichtung des aktuellen Absatzes
Dim alignment As HorizontalAlignment = rtb.SelectionAlignment Dim alignment As HorizontalAlignment = rtb.SelectionAlignment
' Beginne neue Tags, wenn sich das Format ändert ' Öffne einen Div-Tag mit der entsprechenden Textausrichtung
If font IsNot currentFont Then Select Case alignment
' Schließe vorherige Font-Tags Case HorizontalAlignment.Left
If currentFont IsNot Nothing Then sb.Append("<div style=""text-align:left;"">")
sb.Append("</span></span>") Case HorizontalAlignment.Center
End If sb.Append("<div style=""text-align:center;"">")
Case HorizontalAlignment.Right
' Öffne neue Font-Tags sb.Append("<div style=""text-align:right;"">")
sb.Append("<span style=""font-family:" & font.FontFamily.Name & "; font-size:" & font.Size.ToString() & "pt;"">")
sb.Append("<span style=""color:" & color.Name & ";"">")
currentFont = font
currentColor = color
End If
If alignment <> currentAlignment Then
' Schließe vorherige Ausrichtung
Select Case currentAlignment
Case HorizontalAlignment.Left, HorizontalAlignment.Center, HorizontalAlignment.Right
sb.Append("</div>")
End Select
' Öffne neue Ausrichtung
Select Case alignment
Case HorizontalAlignment.Left
sb.Append("<div style=""text-align:left;"">")
Case HorizontalAlignment.Center
sb.Append("<div style=""text-align:center;"">")
Case HorizontalAlignment.Right
sb.Append("<div style=""text-align:right;"">")
End Select
currentAlignment = alignment
End If
' Füge das aktuelle Zeichen hinzu (HTML-encodiert)
Dim currentChar As Char = text(index)
Select Case currentChar
Case "<"
sb.Append("&lt;")
Case ">"
sb.Append("&gt;")
Case "&"
sb.Append("&amp;")
Case Else Case Else
sb.Append(currentChar) sb.Append("<div>")
End Select End Select
index += 1 ' Setze die aktuellen Formatierungsvariablen auf Nothing/Empty, um beim ersten Zeichen zu starten
End While Dim currentFont As System.Drawing.Font = Nothing
Dim currentColor As Color = Color.Empty
Dim currentBackColor As Color = Color.Empty
Dim currentBold As Boolean = False
Dim currentItalic As Boolean = False
Dim currentUnderline As Boolean = False
' Schließe verbleibende Tags ' Iteriere durch die Zeichen im Absatz
If currentFont IsNot Nothing Then For i As Integer = 0 To paragraph.Length - 1
sb.Append("</span></span>") Dim globalIndex As Integer = charIndex + i
End If rtb.Select(globalIndex, 1)
Dim font As System.Drawing.Font = rtb.SelectionFont
Dim color As Color = rtb.SelectionColor
Dim backColor As Color = rtb.SelectionBackColor
Select Case currentAlignment ' Bestimme die Schriftstile
Case HorizontalAlignment.Left, HorizontalAlignment.Center, HorizontalAlignment.Right Dim isBold As Boolean = font IsNot Nothing AndAlso font.Bold
sb.Append("</div>") Dim isItalic As Boolean = font IsNot Nothing AndAlso font.Italic
End Select Dim isUnderline As Boolean = font IsNot Nothing AndAlso font.Underline
' Überprüfe, ob sich die Formatierung geändert hat
If font IsNot currentFont OrElse color <> currentColor OrElse backColor <> currentBackColor OrElse isBold <> currentBold OrElse isItalic <> currentItalic OrElse isUnderline <> currentUnderline Then
' Schließe vorherige Font-, Farb- und Hintergrundfarb-Tags
If currentFont IsNot Nothing OrElse color <> Color.Empty OrElse backColor <> Color.Empty OrElse currentBold OrElse currentItalic OrElse currentUnderline Then
sb.Append("</span>")
End If
' Öffne ein neues Span-Tag mit den aktuellen Stilen
Dim style As New System.Text.StringBuilder()
If font IsNot Nothing Then
style.Append($"font-family:{font.FontFamily.Name}; ")
style.Append($"font-size:{font.SizeInPoints}pt; ")
End If
If color <> Color.Empty Then
style.Append($"color:{ColorTranslator.ToHtml(color)}; ")
End If
If backColor <> Color.Empty Then
style.Append($"background-color:{ColorTranslator.ToHtml(backColor)}; ")
End If
If isBold Then
style.Append($"font-weight:bold; ")
End If
If isItalic Then
style.Append($"font-style:italic; ")
End If
If isUnderline Then
style.Append($"text-decoration:underline; ")
End If
If style.Length > 0 Then
sb.Append($"<span style=""{style.ToString().Trim()}"">")
End If
' Aktualisiere die aktuellen Formatierungsvariablen
currentFont = font
currentColor = color
currentBackColor = backColor
currentBold = isBold
currentItalic = isItalic
currentUnderline = isUnderline
End If
' Füge das aktuelle Zeichen hinzu (HTML-encodiert)
Dim currentChar As Char = paragraph(i)
Select Case currentChar
Case "<"
sb.Append("&lt;")
Case ">"
sb.Append("&gt;")
Case "&"
sb.Append("&amp;")
Case Else
sb.Append(currentChar)
End Select
Next
' Schließe verbleibende Tags im Absatz
If currentFont IsNot Nothing OrElse currentColor <> Color.Empty OrElse currentBackColor <> Color.Empty OrElse currentBold OrElse currentItalic OrElse currentUnderline Then
sb.Append("</span>")
End If
' Schließe den Div-Tag für den Absatz
sb.Append("</div>")
' Aktualisiere den charIndex für den nächsten Absatz (+2 für vbCrLf, könnte je nach Zeilenumbrüchen variieren)
' Überprüfe den tatsächlichen Zeilenumbruch und passe gegebenenfalls an
If charIndex + paragraph.Length + 2 <= rtb.Text.Length Then
charIndex += paragraph.Length + 2 ' Annahme: \r\n als Zeilenumbruch
Else
charIndex += paragraph.Length
End If
Next
sb.Append("</body></html>") sb.Append("</body></html>")
Return sb.ToString() Return sb.ToString()
End Using End Using
End Function End Function
Private Sub btnSpeichern_Click(sender As Object, e As EventArgs) Handles btnSpeichern.Click Private Sub btnSpeichern_Click(sender As Object, e As EventArgs) Handles btnSpeichern.Click
Dim verwendeteTvTextBezeichnung As String = "" Dim verwendeteTvTextBezeichnung As String = ""
Dim isNeueTvTextBezeichnung As Boolean = False Dim isNeueTvTextBezeichnung As Boolean = False
@@ -594,10 +902,21 @@ Public Class frmEintragTvNew
End If End If
Try Try
' **Speichern der TVID der aktuell ausgewählten Zeile**
If dgvAVISOTV.CurrentRow IsNot Nothing AndAlso dgvAVISOTV.CurrentRow.DataBoundItem IsNot Nothing Then
Dim selectedAviso As cAvisoTvNew = CType(dgvAVISOTV.CurrentRow.DataBoundItem, cAvisoTvNew)
If selectedAviso IsNot Nothing Then
lastSelectedTVID = selectedAviso.TvTextBezeichnungID
End If
End If
' Konvertiere RTF zu HTML ' Konvertiere RTF zu HTML
Dim rtfContent As String = rtbZeile1.Rtf Dim rtfContent As String = rtbZeile1.Rtf
Dim htmlContent As String = ConvertRtfToHtml(rtfContent) Dim htmlContent As String = ConvertRtfToHtml(rtfContent)
Dim rtfContent2 As String = rtbZeile2.Rtf
Dim htmlContent2 As String = ConvertRtfToHtml(rtfContent2)
Dim rtfContent3 As String = rtbZeile3.Rtf
Dim htmlContent3 As String = ConvertRtfToHtml(rtfContent3)
myAvisoTvNew.TvTextBezeichnung = verwendeteTvTextBezeichnung myAvisoTvNew.TvTextBezeichnung = verwendeteTvTextBezeichnung
myAvisoTvNew.StandortID = currentStandortID myAvisoTvNew.StandortID = currentStandortID
If cmbPosition.SelectedIndex >= 0 Then If cmbPosition.SelectedIndex >= 0 Then
@@ -618,8 +937,10 @@ Public Class frmEintragTvNew
' Speichere den HTML-Inhalt ' Speichere den HTML-Inhalt
myAvisoTvNew.FixeZeile1RTF = If(String.IsNullOrWhiteSpace(rtbZeile1.Text), Nothing, rtfContent) myAvisoTvNew.FixeZeile1RTF = If(String.IsNullOrWhiteSpace(rtbZeile1.Text), Nothing, rtfContent)
myAvisoTvNew.FixeZeile1HTML = If(String.IsNullOrWhiteSpace(rtbZeile1.Text), Nothing, htmlContent) myAvisoTvNew.FixeZeile1HTML = If(String.IsNullOrWhiteSpace(rtbZeile1.Text), Nothing, htmlContent)
myAvisoTvNew.FixeZeile2 = If(String.IsNullOrWhiteSpace(txtZeile2.Text), Nothing, txtZeile2.Text.Trim()) myAvisoTvNew.FixeZeile2RTF = If(String.IsNullOrWhiteSpace(rtbZeile2.Text), Nothing, rtfContent2)
myAvisoTvNew.FixeZeile3 = If(String.IsNullOrWhiteSpace(txtZeile3.Text), Nothing, txtZeile3.Text.Trim()) myAvisoTvNew.FixeZeile2HTML = If(String.IsNullOrWhiteSpace(rtbZeile2.Text), Nothing, htmlContent2)
myAvisoTvNew.FixeZeile3RTF = If(String.IsNullOrWhiteSpace(rtbZeile3.Text), Nothing, rtfContent3)
myAvisoTvNew.FixeZeile3HTML = If(String.IsNullOrWhiteSpace(rtbZeile3.Text), Nothing, htmlContent3)
myAvisoTvNew.IsRecurring = chkIsRecurring.Checked myAvisoTvNew.IsRecurring = chkIsRecurring.Checked
@@ -639,7 +960,6 @@ Public Class frmEintragTvNew
myAvisoTvNew.IsActive = chkIsActive.Checked myAvisoTvNew.IsActive = chkIsActive.Checked
If Neuanlage Then If Neuanlage Then
myAvisoTvNew.Standort = cbxStandort.SelectedItem?.ToString() myAvisoTvNew.Standort = cbxStandort.SelectedItem?.ToString()
If String.IsNullOrEmpty(myAvisoTvNew.Standort) Then If String.IsNullOrEmpty(myAvisoTvNew.Standort) Then
@@ -648,7 +968,7 @@ Public Class frmEintragTvNew
End If End If
End If End If
Debug.WriteLine($"Speichern: TVID = {myAvisoTvNew.TVID}, TvTextBezeichnungID = {myAvisoTvNew.TvTextBezeichnungID}, StandortID = {myAvisoTvNew.StandortID}") Debug.WriteLine($"Speichern: TVID = {myAvisoTvNew.TvTextBezeichnungID}, TvTextBezeichnungID = {myAvisoTvNew.TvTextBezeichnungID}, StandortID = {myAvisoTvNew.StandortID}")
' Speichern der Einstellungen ' Speichern der Einstellungen
AvisoTvNewDAL.SpeichernAvisoTvNew(myAvisoTvNew) AvisoTvNewDAL.SpeichernAvisoTvNew(myAvisoTvNew)
@@ -658,10 +978,13 @@ Public Class frmEintragTvNew
list.Clear() list.Clear()
AvisoTvNewDAL.LesenAvisoTvNew(0, "", currentStandort, list) AvisoTvNewDAL.LesenAvisoTvNew(0, "", currentStandort, list)
' **Nach dem Speichern und Neuladen der Daten**
initdgv() initdgv()
hatAenderung = False hatAenderung = False
If isNeueTvTextBezeichnung Then If isNeueTvTextBezeichnung Then
' **Setze lastSelectedTVID auf die TVID des neuen Eintrags**
lastSelectedTVID = myAvisoTvNew.TvTextBezeichnungID
MessageBox.Show("Die neue TvTextBezeichnung wurde erfolgreich gespeichert.", "Erfolg", MessageBoxButtons.OK, MessageBoxIcon.Information) MessageBox.Show("Die neue TvTextBezeichnung wurde erfolgreich gespeichert.", "Erfolg", MessageBoxButtons.OK, MessageBoxIcon.Information)
cmbTvTextBezeichnungAuswahl.SelectedValue = myAvisoTvNew.TvTextBezeichnungID cmbTvTextBezeichnungAuswahl.SelectedValue = myAvisoTvNew.TvTextBezeichnungID
txtNeueTvTextBezeichnung.Text = "" txtNeueTvTextBezeichnung.Text = ""
@@ -674,10 +997,8 @@ Public Class frmEintragTvNew
End Try End Try
End Sub End Sub
Private Sub btnLoeschen_Click(sender As Object, e As EventArgs) Handles btnLoeschen.Click Private Sub btnLoeschen_Click(sender As Object, e As EventArgs) Handles btnLoeschen.Click
If myAvisoTvNew Is Nothing OrElse myAvisoTvNew.TVID = 0 Then If myAvisoTvNew Is Nothing OrElse myAvisoTvNew.TvTextBezeichnungID = 0 Then
MessageBox.Show("Bitte wählen Sie einen Eintrag zum Deaktivieren aus.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information) MessageBox.Show("Bitte wählen Sie einen Eintrag zum Deaktivieren aus.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return Return
End If End If
@@ -685,7 +1006,7 @@ Public Class frmEintragTvNew
Dim antwort As DialogResult = MessageBox.Show("Möchten Sie den ausgewählten Eintrag wirklich deaktivieren?", "Deaktivieren bestätigen", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) Dim antwort As DialogResult = MessageBox.Show("Möchten Sie den ausgewählten Eintrag wirklich deaktivieren?", "Deaktivieren bestätigen", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
If antwort = DialogResult.Yes Then If antwort = DialogResult.Yes Then
Try Try
AvisoTvNewDAL.SetzeAufInaktiv(myAvisoTvNew.TVID) AvisoTvNewDAL.SetzeAufInaktiv(myAvisoTvNew.TvTextBezeichnungID)
list.Clear() list.Clear()
AvisoTvNewDAL.LesenAvisoTvNew(0, "", cbxStandort.SelectedItem?.ToString(), list) AvisoTvNewDAL.LesenAvisoTvNew(0, "", cbxStandort.SelectedItem?.ToString(), list)
initdgv() initdgv()
@@ -721,7 +1042,7 @@ Public Class frmEintragTvNew
Me.Close() Me.Close()
End Sub End Sub
Private Sub txt_TextChanged(sender As Object, e As EventArgs) Handles rtbZeile1.TextChanged, txtZeile2.TextChanged, txtZeile3.TextChanged, dtpStartDate.ValueChanged, dtpEndDate.ValueChanged, dtpStartTime.ValueChanged, dtpEndTime.ValueChanged, chkIsRecurring.CheckedChanged, chkMonday.CheckedChanged, chkTuesday.CheckedChanged, chkWednesday.CheckedChanged, chkThursday.CheckedChanged, chkFriday.CheckedChanged, chkSaturday.CheckedChanged, chkSunday.CheckedChanged, chkIsActive.CheckedChanged, cmbTvTextBezeichnungAuswahl.SelectedIndexChanged, txtNeueTvTextBezeichnung.TextChanged Private Sub txt_TextChanged(sender As Object, e As EventArgs) Handles rtbZeile1.TextChanged, dtpStartDate.ValueChanged, dtpEndDate.ValueChanged, dtpStartTime.ValueChanged, dtpEndTime.ValueChanged, chkIsRecurring.CheckedChanged, chkMonday.CheckedChanged, chkTuesday.CheckedChanged, chkWednesday.CheckedChanged, chkThursday.CheckedChanged, chkFriday.CheckedChanged, chkSaturday.CheckedChanged, chkSunday.CheckedChanged, chkIsActive.CheckedChanged, cmbTvTextBezeichnungAuswahl.SelectedIndexChanged, txtNeueTvTextBezeichnung.TextChanged
hatAenderung = True hatAenderung = True
End Sub End Sub
@@ -741,8 +1062,8 @@ Public Class frmEintragTvNew
cmbPosition.SelectedIndex = -1 cmbPosition.SelectedIndex = -1
txtNeueTvTextBezeichnung.Text = "" txtNeueTvTextBezeichnung.Text = ""
rtbZeile1.Text = "" rtbZeile1.Text = ""
txtZeile2.Text = "" rtbZeile2.Text = ""
txtZeile3.Text = "" rtbZeile3.Text = ""
dtpStartDate.Value = DateTime.Now dtpStartDate.Value = DateTime.Now
dtpStartDate.Checked = False dtpStartDate.Checked = False
dtpEndDate.Value = DateTime.Now dtpEndDate.Value = DateTime.Now