This commit is contained in:
2024-12-12 10:44:14 +01:00
parent 43b091c40f
commit 9adffd7397
4 changed files with 102 additions and 47 deletions

View File

@@ -43,8 +43,8 @@ Partial Class frmEintragTvNew
Friend WithEvents lblZeile1 As Label
Friend WithEvents cmbTvTextBezeichnungAuswahl As ComboBox
Friend WithEvents lblBezeichnung As Label
Friend WithEvents lblPosition As Label
Friend WithEvents cmbPosition As ComboBox
Friend WithEvents nudPrioritaet As NumericUpDown
Friend WithEvents btnSpeichern As Button
Friend WithEvents btnLoeschen As Button
Friend WithEvents btnAbbrechen As Button
@@ -112,8 +112,7 @@ Partial Class frmEintragTvNew
Me.lblZeile1 = New System.Windows.Forms.Label()
Me.cmbTvTextBezeichnungAuswahl = New System.Windows.Forms.ComboBox()
Me.lblBezeichnung = New System.Windows.Forms.Label()
Me.lblPosition = New System.Windows.Forms.Label()
Me.cmbPosition = New System.Windows.Forms.ComboBox()
Me.nudPrioritaet = New System.Windows.Forms.NumericUpDown()
Me.btnBold = New System.Windows.Forms.Button()
Me.btnItalic = New System.Windows.Forms.Button()
Me.btnUnderline = New System.Windows.Forms.Button()
@@ -129,6 +128,7 @@ Partial Class frmEintragTvNew
Me.btnAbbrechen = New System.Windows.Forms.Button()
Me.chkShowInactive = New System.Windows.Forms.CheckBox()
Me.colorDialogText = New System.Windows.Forms.ColorDialog()
Me.Label1 = New System.Windows.Forms.Label()
CType(Me.dgvAVISOTV, System.ComponentModel.ISupportInitialize).BeginInit()
Me.grpEingabe.SuspendLayout()
Me.tabControlZeilen.SuspendLayout()
@@ -136,16 +136,17 @@ Partial Class frmEintragTvNew
Me.tabPageZeile2.SuspendLayout()
Me.tabPageZeile3.SuspendLayout()
Me.grpWochentage.SuspendLayout()
CType(Me.nudPrioritaet, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'btnOpenSettings
'
Me.btnOpenSettings.Location = New System.Drawing.Point(15, 1010)
Me.btnOpenSettings.Name = "btnOpenSettings"
Me.btnOpenSettings.Size = New System.Drawing.Size(150, 30)
Me.btnOpenSettings.TabIndex = 8
Me.btnOpenSettings.Text = "TV Einstellungen"
Me.btnOpenSettings.UseVisualStyleBackColor = True
'
'cbxStandort
'
@@ -180,6 +181,7 @@ Partial Class frmEintragTvNew
'
'grpEingabe
'
Me.grpEingabe.Controls.Add(Me.Label1)
Me.grpEingabe.Controls.Add(Me.tabControlZeilen)
Me.grpEingabe.Controls.Add(Me.lblNeueTvTextBezeichnung)
Me.grpEingabe.Controls.Add(Me.txtNeueTvTextBezeichnung)
@@ -197,8 +199,7 @@ Partial Class frmEintragTvNew
Me.grpEingabe.Controls.Add(Me.lblZeile1)
Me.grpEingabe.Controls.Add(Me.cmbTvTextBezeichnungAuswahl)
Me.grpEingabe.Controls.Add(Me.lblBezeichnung)
Me.grpEingabe.Controls.Add(Me.lblPosition)
Me.grpEingabe.Controls.Add(Me.cmbPosition)
Me.grpEingabe.Controls.Add(Me.nudPrioritaet)
Me.grpEingabe.Controls.Add(Me.btnBold)
Me.grpEingabe.Controls.Add(Me.btnItalic)
Me.grpEingabe.Controls.Add(Me.btnUnderline)
@@ -510,24 +511,12 @@ Partial Class frmEintragTvNew
Me.lblBezeichnung.TabIndex = 0
Me.lblBezeichnung.Text = "Bezeichnung:"
'
'lblPosition
'nudPrioritaet
'
Me.lblPosition.AutoSize = True
Me.lblPosition.Location = New System.Drawing.Point(62, 584)
Me.lblPosition.Name = "lblPosition"
Me.lblPosition.Size = New System.Drawing.Size(47, 13)
Me.lblPosition.TabIndex = 21
Me.lblPosition.Text = "Position:"
'
'cmbPosition
'
Me.cmbPosition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbPosition.FormattingEnabled = True
Me.cmbPosition.Items.AddRange(New Object() {"Top", "Middle", "Bottom"})
Me.cmbPosition.Location = New System.Drawing.Point(125, 576)
Me.cmbPosition.Name = "cmbPosition"
Me.cmbPosition.Size = New System.Drawing.Size(177, 21)
Me.cmbPosition.TabIndex = 22
Me.nudPrioritaet.Location = New System.Drawing.Point(126, 582)
Me.nudPrioritaet.Name = "nudPrioritaet"
Me.nudPrioritaet.Size = New System.Drawing.Size(60, 20)
Me.nudPrioritaet.TabIndex = 36
'
'btnBold
'
@@ -656,6 +645,15 @@ Partial Class frmEintragTvNew
Me.chkShowInactive.Text = "Inaktive anzeigen"
Me.chkShowInactive.UseVisualStyleBackColor = True
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(61, 589)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(45, 13)
Me.Label1.TabIndex = 37
Me.Label1.Text = "Priorität:"
'
'frmEintragTvNew
'
Me.ClientSize = New System.Drawing.Size(1342, 1052)
@@ -682,8 +680,11 @@ Partial Class frmEintragTvNew
Me.tabPageZeile3.ResumeLayout(False)
Me.grpWochentage.ResumeLayout(False)
Me.grpWochentage.PerformLayout()
CType(Me.nudPrioritaet, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Label1 As Label
End Class

View File

@@ -646,7 +646,6 @@ Public Class frmEintragTvNew
cmbTvTextBezeichnungAuswahl.ValueMember = "ID"
cmbTvTextBezeichnungAuswahl.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
cmbTvTextBezeichnungAuswahl.SelectedIndex = -1
cmbPosition.SelectedIndex = -1
isInitializing = False
@@ -669,11 +668,7 @@ Public Class frmEintragTvNew
Private Sub FillFieldsFromAviso(ByVal aviso As cAvisoTvNew)
cmbTvTextBezeichnungAuswahl.SelectedValue = aviso.TvTextBezeichnungID
If Not String.IsNullOrEmpty(aviso.Position) Then
cmbPosition.SelectedItem = aviso.Position
Else
cmbPosition.SelectedIndex = -1
End If
txtNeueTvTextBezeichnung.Text = ""
@@ -723,7 +718,7 @@ Public Class frmEintragTvNew
chkFriday.Checked = aviso.IsFriday.GetValueOrDefault(False)
chkSaturday.Checked = aviso.IsSaturday.GetValueOrDefault(False)
chkSunday.Checked = aviso.IsSunday.GetValueOrDefault(False)
nudPrioritaet.Value = Convert.ToDecimal(aviso.Art)
chkIsActive.Checked = aviso.IsActive
grpWochentage.Enabled = chkIsRecurring.Checked
@@ -885,11 +880,7 @@ Public Class frmEintragTvNew
Dim htmlContent3 As String = ConvertRtfToHtml(rtfContent3)
myAvisoTvNew.TvTextBezeichnung = verwendeteTvTextBezeichnung
myAvisoTvNew.StandortID = currentStandortID
If cmbPosition.SelectedIndex >= 0 Then
myAvisoTvNew.Position = cmbPosition.SelectedItem.ToString()
Else
myAvisoTvNew.Position = Nothing
End If
If isNeueTvTextBezeichnung Then
If AvisoTvNewDAL.IstTvTextBezeichnungVorhanden(myAvisoTvNew.TvTextBezeichnung) Then
MessageBox.Show("Die TvTextBezeichnung ist vorhanden. Bitte wählen Sie eine eindeutige TvTextBezeichnung.", "Eingabefehler", MessageBoxButtons.OK, MessageBoxIcon.Warning)
@@ -925,6 +916,7 @@ Public Class frmEintragTvNew
myAvisoTvNew.IsSunday = chkSunday.Checked
myAvisoTvNew.IsActive = chkIsActive.Checked
myAvisoTvNew.Art = Convert.ToInt32(nudPrioritaet.Value)
If Neuanlage Then
myAvisoTvNew.Standort = cbxStandort.SelectedItem?.ToString()
@@ -975,7 +967,7 @@ Public Class frmEintragTvNew
AvisoTvNewDAL.SetzeAufInaktiv(myAvisoTvNew.TvTextBezeichnungID)
list.Clear()
AvisoTvNewDAL.LesenAvisoTvNew(0, "", cbxStandort.SelectedItem?.ToString(), list)
initdgv() ' Verwende jetzt die parameterlose Methode
initdgv()
ClearFields()
myAvisoTvNew = Nothing
Neuanlage = False
@@ -1041,11 +1033,11 @@ Public Class frmEintragTvNew
Private Sub ClearFields()
cmbTvTextBezeichnungAuswahl.SelectedIndex = -1
cmbPosition.SelectedIndex = -1
txtNeueTvTextBezeichnung.Text = ""
rtbZeile1.Text = ""
rtbZeile2.Text = ""
rtbZeile3.Text = ""
nudPrioritaet.Value = Convert.ToDecimal(0)
dtpStartDate.Value = DateTime.Now
dtpStartDate.Checked = False
dtpEndDate.Value = DateTime.Now

View File

@@ -56,6 +56,10 @@ Partial Class frmTvSettings
Me.btnSave = New System.Windows.Forms.Button()
Me.numKachelRowGapInPercent = New System.Windows.Forms.NumericUpDown()
Me.Label1 = New System.Windows.Forms.Label()
Me.numTextFLaggeLeft = New System.Windows.Forms.NumericUpDown()
Me.numTextFlaggeBottom = New System.Windows.Forms.NumericUpDown()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
CType(Me.numTileWidth, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.numTileHeight, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.numFontSizeLkwNummer, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -63,6 +67,8 @@ Partial Class frmTvSettings
CType(Me.numSeitenwechsel, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.numTextBalkenHeight, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.numKachelRowGapInPercent, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.numTextFLaggeLeft, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.numTextFlaggeBottom, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'lblTileWidth
@@ -128,7 +134,7 @@ Partial Class frmTvSettings
'lblLogoSelection
'
Me.lblLogoSelection.AutoSize = True
Me.lblLogoSelection.Location = New System.Drawing.Point(21, 313)
Me.lblLogoSelection.Location = New System.Drawing.Point(24, 389)
Me.lblLogoSelection.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0)
Me.lblLogoSelection.Name = "lblLogoSelection"
Me.lblLogoSelection.Size = New System.Drawing.Size(85, 13)
@@ -186,7 +192,7 @@ Partial Class frmTvSettings
Me.numSeitenwechsel.Maximum = New Decimal(New Integer() {3600, 0, 0, 0})
Me.numSeitenwechsel.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
Me.numSeitenwechsel.Name = "numSeitenwechsel"
Me.numSeitenwechsel.Size = New System.Drawing.Size(90, 20)
Me.numSeitenwechsel.Size = New System.Drawing.Size(92, 20)
Me.numSeitenwechsel.TabIndex = 10
Me.numSeitenwechsel.Value = New Decimal(New Integer() {30, 0, 0, 0})
'
@@ -196,7 +202,7 @@ Partial Class frmTvSettings
Me.numTextBalkenHeight.Location = New System.Drawing.Point(164, 271)
Me.numTextBalkenHeight.Margin = New System.Windows.Forms.Padding(2)
Me.numTextBalkenHeight.Name = "numTextBalkenHeight"
Me.numTextBalkenHeight.Size = New System.Drawing.Size(90, 20)
Me.numTextBalkenHeight.Size = New System.Drawing.Size(92, 20)
Me.numTextBalkenHeight.TabIndex = 11
Me.numTextBalkenHeight.Value = New Decimal(New Integer() {30, 0, 0, 0})
'
@@ -204,7 +210,7 @@ Partial Class frmTvSettings
'
Me.cmbLogoSelection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbLogoSelection.FormattingEnabled = True
Me.cmbLogoSelection.Location = New System.Drawing.Point(164, 311)
Me.cmbLogoSelection.Location = New System.Drawing.Point(167, 387)
Me.cmbLogoSelection.Margin = New System.Windows.Forms.Padding(2)
Me.cmbLogoSelection.Name = "cmbLogoSelection"
Me.cmbLogoSelection.Size = New System.Drawing.Size(91, 21)
@@ -212,7 +218,7 @@ Partial Class frmTvSettings
'
'btnSave
'
Me.btnSave.Location = New System.Drawing.Point(164, 346)
Me.btnSave.Location = New System.Drawing.Point(167, 422)
Me.btnSave.Margin = New System.Windows.Forms.Padding(2)
Me.btnSave.Name = "btnSave"
Me.btnSave.Size = New System.Drawing.Size(90, 24)
@@ -241,11 +247,55 @@ Partial Class frmTvSettings
Me.Label1.TabIndex = 16
Me.Label1.Text = "Abstand Kachel Text (%)"
'
'numTextFLaggeLeft
'
Me.numTextFLaggeLeft.DecimalPlaces = 2
Me.numTextFLaggeLeft.Location = New System.Drawing.Point(165, 312)
Me.numTextFLaggeLeft.Margin = New System.Windows.Forms.Padding(2)
Me.numTextFLaggeLeft.Name = "numTextFLaggeLeft"
Me.numTextFLaggeLeft.Size = New System.Drawing.Size(92, 20)
Me.numTextFLaggeLeft.TabIndex = 18
Me.numTextFLaggeLeft.Value = New Decimal(New Integer() {30, 0, 0, 0})
'
'numTextFlaggeBottom
'
Me.numTextFlaggeBottom.DecimalPlaces = 2
Me.numTextFlaggeBottom.Location = New System.Drawing.Point(165, 348)
Me.numTextFlaggeBottom.Margin = New System.Windows.Forms.Padding(2)
Me.numTextFlaggeBottom.Name = "numTextFlaggeBottom"
Me.numTextFlaggeBottom.Size = New System.Drawing.Size(92, 20)
Me.numTextFlaggeBottom.TabIndex = 19
Me.numTextFlaggeBottom.Value = New Decimal(New Integer() {30, 0, 0, 0})
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(22, 314)
Me.Label2.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(77, 13)
Me.Label2.TabIndex = 20
Me.Label2.Text = "Flagge Left (%)"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(22, 350)
Me.Label3.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(92, 13)
Me.Label3.TabIndex = 21
Me.Label3.Text = "Flagge Bottom (%)"
'
'frmTvSettings
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(306, 409)
Me.ClientSize = New System.Drawing.Size(291, 506)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.numTextFlaggeBottom)
Me.Controls.Add(Me.numTextFLaggeLeft)
Me.Controls.Add(Me.numKachelRowGapInPercent)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.btnSave)
@@ -276,6 +326,8 @@ Partial Class frmTvSettings
CType(Me.numSeitenwechsel, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.numTextBalkenHeight, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.numKachelRowGapInPercent, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.numTextFLaggeLeft, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.numTextFlaggeBottom, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -283,4 +335,8 @@ Partial Class frmTvSettings
Private WithEvents numKachelRowGapInPercent As NumericUpDown
Private WithEvents Label1 As Label
Private WithEvents numTextFLaggeLeft As NumericUpDown
Private WithEvents numTextFlaggeBottom As NumericUpDown
Private WithEvents Label2 As Label
Private WithEvents Label3 As Label
End Class

View File

@@ -32,6 +32,8 @@ Partial Class frmTvSettings
numSeitenwechsel.Value = If(settings.SeitenwechselInSek >= numSeitenwechsel.Minimum AndAlso settings.SeitenwechselInSek <= numSeitenwechsel.Maximum, CDec(settings.SeitenwechselInSek), 30)
numTextBalkenHeight.Value = If(settings.TextBalkenHeightInPercent >= numTextBalkenHeight.Minimum AndAlso settings.TextBalkenHeightInPercent <= numTextBalkenHeight.Maximum, CDec(settings.TextBalkenHeightInPercent), 30)
numKachelRowGapInPercent.Value = If(settings.KachelRowGapInPercent >= numKachelRowGapInPercent.Minimum AndAlso settings.KachelRowGapInPercent <= numKachelRowGapInPercent.Maximum, CDec(settings.KachelRowGapInPercent), 15)
numTextFlaggeBottom.Value = If(settings.TextFlaggeBottom >= numTextFlaggeBottom.Minimum AndAlso settings.TextFlaggeBottom <= numTextFlaggeBottom.Maximum, CDec(settings.TextFlaggeBottom), 15)
numTextFLaggeLeft.Value = If(settings.TextFlaggeLeft >= numTextFLaggeLeft.Minimum AndAlso settings.TextFlaggeLeft <= numTextFLaggeLeft.Maximum, CDec(settings.TextFlaggeLeft), 15)
' Logo-Auswahl setzen
cmbLogoSelection.SelectedValue = settings.SelectedLogoValue
@@ -100,6 +102,8 @@ Partial Class frmTvSettings
numSeitenwechsel.Value = 30
numTextBalkenHeight.Value = 30
numKachelRowGapInPercent.Value = 15
numTextFlaggeBottom.Value = 15
numTextFLaggeLeft.Value = 15
' Sicherstellen, dass die ComboBox initialisiert ist
If cmbLogoSelection.Items.Count > 0 Then
@@ -123,7 +127,9 @@ Partial Class frmTvSettings
.SeitenwechselInSek = CDbl(numSeitenwechsel.Value),
.TextBalkenHeightInPercent = CDbl(numTextBalkenHeight.Value),
.KachelRowGapInPercent = CDbl(numKachelRowGapInPercent.Value),
.SelectedLogoValue = selectedValue ' Stellen Sie sicher, dass diese Eigenschaft in cTvSettings existiert
.TextFlaggeBottom = CDbl(numTextFlaggeBottom.Value),
.TextFlaggeLeft = CDbl(numTextFLaggeLeft.Value),
.SelectedLogoValue = selectedValue
}
' Einstellungen in der Datenbank speichern