Move Grid Fontsizedelta to frmMain

This commit is contained in:
Jonathan Jenne
2022-04-06 12:07:50 +02:00
parent 494c90e407
commit 89dd39b081
6 changed files with 223 additions and 197 deletions

View File

@@ -26,17 +26,7 @@ Public Class frmKonfig
txtIntervall.Text = CONFIG.Config.ReminderTimer
Dim oFontSettings = New List(Of FontSetting) From {
New FontSetting With {.Title = "Kleiner", .Value = -2},
New FontSetting With {.Title = "Normal", .Value = 0},
New FontSetting With {.Title = "Größer", .Value = 2}
}
ComboBoxEdit1.Properties.Items.Clear()
ComboBoxEdit1.Properties.Items.AddRange(oFontSettings)
ComboBoxEdit1.SelectedItem = oFontSettings.
Where(Function(item) item.Value = CONFIG.Config.GridFontSizeDelta).
FirstOrDefault()
Catch ex As Exception
@@ -45,15 +35,6 @@ Public Class frmKonfig
End Try
End Sub
Public Class FontSetting
Public Property Title As String
Public Property Value As Integer
Public Overrides Function ToString() As String
Return Title
End Function
End Class
Private Sub cmbDatenbank_Click(sender As System.Object, e As System.EventArgs) Handles cmbDatenbank.Click
Try
@@ -273,12 +254,4 @@ Public Class frmKonfig
MsgBox("Error in Export: " & ex.Message)
End Try
End Sub
Private Sub ComboBoxEdit1_SelectedValueChanged(sender As Object, e As EventArgs) Handles ComboBoxEdit1.SelectedValueChanged
Try
CONFIG.Config.GridFontSizeDelta = DirectCast(ComboBoxEdit1.EditValue, FontSetting).Value
CONFIG.Save()
Catch ex As Exception
End Try
End Sub
End Class