46 lines
1.3 KiB
VB.net
46 lines
1.3 KiB
VB.net
|
|
Public Class FrmCheckLog
|
|||
|
|
Private Sub FrmCheckLog_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|||
|
|
Text = "选择显示列"
|
|||
|
|
InitGrid()
|
|||
|
|
End Sub
|
|||
|
|
|
|||
|
|
|
|||
|
|
Public CheckRows As Dictionary(Of String, String)
|
|||
|
|
|
|||
|
|
Private Sub InitGrid()
|
|||
|
|
With Grid1
|
|||
|
|
.AutoRedraw = False
|
|||
|
|
.DisplayRowNumber = True
|
|||
|
|
|
|||
|
|
.Cols = 3
|
|||
|
|
.Rows = CheckRows.Count + 1
|
|||
|
|
.ExtendLastCol = True
|
|||
|
|
|
|||
|
|
.Column(1).CellType = FlexCell.CellTypeEnum.CheckBox
|
|||
|
|
|
|||
|
|
For i As Integer = 0 To CheckRows.Count - 1
|
|||
|
|
.Cell(i + 1, 1).Text = CheckRows.Values(i)
|
|||
|
|
.Cell(i + 1, 2).Text = CheckRows.Keys(i)
|
|||
|
|
Next
|
|||
|
|
|
|||
|
|
.AutoRedraw = True
|
|||
|
|
.Refresh()
|
|||
|
|
End With
|
|||
|
|
End Sub
|
|||
|
|
|
|||
|
|
Private Sub BtnOk_Click(sender As Object, e As EventArgs) Handles BtnOk.Click
|
|||
|
|
DialogResult = DialogResult.OK
|
|||
|
|
|
|||
|
|
For i As Integer = 1 To Grid1.Rows - 1
|
|||
|
|
If Grid1.Cell(i, 1).BooleanValue Then
|
|||
|
|
CheckRows(Grid1.Cell(i, 2).Text) = "1"
|
|||
|
|
Else
|
|||
|
|
CheckRows(Grid1.Cell(i, 2).Text) = "0"
|
|||
|
|
End If
|
|||
|
|
Next
|
|||
|
|
End Sub
|
|||
|
|
|
|||
|
|
Private Sub BtnCencel_Click(sender As Object, e As EventArgs) Handles BtnCencel.Click
|
|||
|
|
DialogResult = DialogResult.Cancel
|
|||
|
|
End Sub
|
|||
|
|
End Class
|