#Region "GridView cell重载"
Public Class GridViewCustomCellAIJ02412001
Inherits DataGridViewTextBoxCell
Private lisSigTopLine As Boolean = False
Private lisSigButtomLine As Boolean = False
Private lisSigLeftLine As Boolean = False
Private lisSigRightLine As Boolean = False
Public Sub New(ByVal isSigTopLine_In As Boolean, ByVal isSigButtomLine_In As Boolean, Optional ByVal lisSigLeftLine_In As Boolean = False, Optional ByVal lisSigRightLine_In As Boolean = False)
lisSigTopLine = isSigTopLine_In
lisSigButtomLine = isSigButtomLine_In
lisSigLeftLine = lisSigLeftLine_In
lisSigRightLine = lisSigRightLine_In
End Sub
Public Overrides Function AdjustCellBorderStyle( _
ByVal borderStyleInput_In As DataGridViewAdvancedBorderStyle, _
ByVal borderStylePlaceHolder_In As DataGridViewAdvancedBorderStyle, _
ByVal verticalBorderAdded_In As Boolean, _
ByVal horizontalBorderAdded_In As Boolean, _
ByVal firstVisibleColumn_In As Boolean, _
ByVal firstVisibleRow_In As Boolean _
) As DataGridViewAdvancedBorderStyle
If lisSigLeftLine = True Then
borderStylePlaceHolder_In.Left = borderStylePlaceHolder_In.Left
Else
borderStylePlaceHolder_In.Left = DataGridViewAdvancedCellBorderStyle.None
End If
If lisSigRightLine = True Then
borderStylePlaceHolder_In.Right = DataGridViewAdvancedCellBorderStyle.None
Else
borderStylePlaceHolder_In.Right = borderStyleInput_In.Right
End If
If lisSigTopLine = True Then
borderStylePlaceHolder_In.Top = borderStyleInput_In.Top
Else
borderStylePlaceHolder_In.Top = DataGridViewAdvancedCellBorderStyle.None
End If
If lisSigButtomLine = True Then
borderStylePlaceHolder_In.Bottom = borderStyleInput_In.Bottom
Else
borderStylePlaceHolder_In.Bottom = DataGridViewAdvancedCellBorderStyle.None
End If
Return borderStylePlaceHolder_In
End Function
End Class