初始化
This commit is contained in:
46
BLV_Studio/Test/GeisControl/gridControl.vb
Normal file
46
BLV_Studio/Test/GeisControl/gridControl.vb
Normal file
@@ -0,0 +1,46 @@
|
||||
Imports System.Threading
|
||||
|
||||
Public Class gridControl
|
||||
''' <summary>测试器句柄,全局唯一</summary>
|
||||
Private Shared _object As gridControl
|
||||
Private Shared _Grid As FlexCell.Grid
|
||||
''' <summary>初始化测试器线程锁</summary>
|
||||
Private Shared ReadOnly InitLock As New Object()
|
||||
|
||||
''' <summary>
|
||||
''' 创建类单例对象
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Shared Function CreateObject(Grid As FlexCell.Grid) As gridControl
|
||||
If _object Is Nothing Then
|
||||
SyncLock InitLock
|
||||
'内存护栏
|
||||
Thread.MemoryBarrier()
|
||||
If _object Is Nothing Then
|
||||
_object = New gridControl(Grid)
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
Return _object
|
||||
End Function
|
||||
Private Sub New(Grid As FlexCell.Grid)
|
||||
_Grid = Grid
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "表格事件" '表格事件
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "表格样式"
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "表格控制" '初始化 增删行列,设置数据
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user