我正在尝试在UNIT_NUMBER短路时禁用按钮吗?字段达到值5。不确定如何执行此操作。
我有一个表单,可以根据我的Sub New自动递增UNIT_NUMBER字段。可以很好地增加
Public Sub New(ByVal Record As Feature, ByVal previousRecord As Till_NonTillStation, ByVal SurficialType As enumTillTypes)
MyBase.New(Record, Constants.COL_TILL_CREATED_BY, Constants.COL_TILL_CREATION_DATE, Constants.COL_TILL_EDITED_BY, Constants.COL_TILL_EDIT_DATE, DirectCast(previousRecord.Geometry, Esri.ArcGISRuntime.Geometry.MapPoint))
Try
_incrementStationCount = False
_surficialObsType = SurficialType
'Values carried over on both forms
Me.SITE_ID = previousRecord.SITE_ID
Me.EXPOSURE_TYPE = previousRecord.EXPOSURE_TYPE
Me.EXPOSURE_HEIGHT = previousRecord.EXPOSURE_HEIGHT
If previousRecord.UNIT_NUMBER Is Nothing Then
Me.UNIT_NUMBER = 1S
Else
Me.UNIT_NUMBER = previousRecord.UNIT_NUMBER + 1S
End If
If Me.OBSERVATION_TYPE = enumTillTypes.Non_Till Then
'FIRST_LITHOFACIES_INTERVAL = 0
SECOND_LITHOFACIES_INTERVAL = 0
THIRD_LITHOFACIES_INTERVAL = 0
FOURTH_LITHOFACIES_INTERVAL = 0
End If
If Me.OBSERVATION_TYPE = enumTillTypes.Till Then
FIRST_LITHOFACIES_INTERVAL = 0
SECOND_LITHOFACIES_INTERVAL = 0
THIRD_LITHOFACIES_INTERVAL = 0
FOURTH_LITHOFACIES_INTERVAL = 0
End If
Catch ex As Exception
Constants.WriteToErrorLog(System.Reflection.MethodBase.GetCurrentMethod.DeclaringType.Name,
System.Reflection.MethodInfo.GetCurrentMethod.Name,
ex)
End Try
End Sub
按钮控件:
答案 0 :(得分:0)
if UNIT_NUMBER = 5 then button1.enable = false