#Region "Load And Save Dgv Color"
Public Sub LoadDgvColor(ByVal DgvTabel As DataGridView)
If File.Exists(Application.StartupPath & "\AsemColor.txt") Then
Dim c1 As String = String.Empty
Dim c2 As String = String.Empty
Dim c3 As String = String.Empty
Dim c4 As String = String.Empty
Dim c5 As String = String.Empty
Dim c6 As String = String.Empty
FileOpen(1, Application.StartupPath & "\AsemColor.txt", OpenMode.Input)
Do While Not EOF(1)
Input(1, c1) : Input(1, c2) : Input(1, c3) : Input(1, c4) : Input(1, c5) : Input(1, c6)
If c1 = 255 Then
DgvTabel.DefaultCellStyle.BackColor = Color.FromArgb(c1, c2, c3)
DgvTabel.AlternatingRowsDefaultCellStyle.BackColor = Color.FromArgb(c4, c5, c6)
End If
Loop
FileClose(1)
End If
End Sub
Public Sub SaveDgvColor(ByVal Color1 As Color, ByVal Color2 As Color)
Dim c1 As String = String.Empty
Dim c2 As String = String.Empty
Dim c3 As String = String.Empty
Dim c4 As String = String.Empty
Dim c5 As String = String.Empty
Dim c6 As String = String.Empty
c1 = Color1.R
c2 = Color1.G
c3 = Color1.B
c4 = Color2.R
c5 = Color2.G
c6 = Color2.B
FileOpen(1, Application.StartupPath & "\AsemColor.txt", OpenMode.Append)
WriteLine(1, c1)
WriteLine(1, c2)
WriteLine(1, c3)
WriteLine(1, c4)
WriteLine(1, c5)
WriteLine(1, c6)
FileClose(1)
End Sub
#End Region