2b5566b214
- Aggiunta pagina Fresa per le Travi nel Db Utensili, avente i nuovi parametri Passo e Passo di Lato (gestiti con le System Notes) - Aggiunta bottoni sui parametri degli Utensili nel Db Lavorazioni per recuperare il valore corrispondente dal Db Utensili
134 lines
4.9 KiB
VB.net
134 lines
4.9 KiB
VB.net
Imports System.Globalization
|
|
Imports System.Windows.Controls.Primitives
|
|
Imports System.ComponentModel
|
|
|
|
|
|
Public Class StringParamWithButtonV
|
|
Implements INotifyPropertyChanged
|
|
|
|
Sub New()
|
|
InitializeComponent()
|
|
End Sub
|
|
|
|
Private m_ccc As String
|
|
Public Property ccc As String
|
|
Get
|
|
Return m_ccc
|
|
End Get
|
|
Set(value As String)
|
|
m_ccc = value
|
|
End Set
|
|
End Property
|
|
|
|
Public Shared ReadOnly ParamTxBlProperty As DependencyProperty =
|
|
DependencyProperty.Register("ParamTxBl", GetType(String), GetType(StringParamWithButtonV))
|
|
Public Property ParamTxBl As String
|
|
Get
|
|
Return CStr(GetValue(ParamTxBlProperty))
|
|
End Get
|
|
Set(value As String)
|
|
SetValue(ParamTxBlProperty, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Shared ReadOnly ParamTxBxProperty As DependencyProperty =
|
|
DependencyProperty.Register("ParamTxBx", GetType(String), GetType(StringParamWithButtonV), New FrameworkPropertyMetadata() With {.BindsTwoWayByDefault = True})
|
|
Public Property ParamTxBx As String
|
|
Get
|
|
Return CStr(GetValue(ParamTxBxProperty))
|
|
End Get
|
|
Set(value As String)
|
|
SetValue(ParamTxBxProperty, value)
|
|
End Set
|
|
End Property
|
|
|
|
'Private Shared Sub OnParamTxBxChangedCallback(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
|
|
' Dim StringParamV As StringParamV = DirectCast(sender, StringParamV)
|
|
' If Not IsNothing(sender) Then
|
|
' 'StringParamV.ParamValue.Text = CStr(e.NewValue)
|
|
' StringParamV.ParamTxBx = CStr(e.NewValue)
|
|
' StringParamV.NotifyPropertyChanged("ParamTxBx")
|
|
' End If
|
|
'End Sub
|
|
|
|
Public Property ParamErrorMsg() As String
|
|
Get
|
|
Return CStr(GetValue(ParamErrorMsgProperty))
|
|
End Get
|
|
Set(ByVal value As String)
|
|
SetValue(ParamErrorMsgProperty, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Shared ReadOnly ParamErrorMsgProperty As DependencyProperty =
|
|
DependencyProperty.Register("ParamErrorMsg", GetType(String), GetType(StringParamWithButtonV))
|
|
|
|
Public Property ParamVisibility() As Visibility
|
|
Get
|
|
Return CType(GetValue(ParamVisibilityProperty), Visibility)
|
|
End Get
|
|
Set(ByVal value As Visibility)
|
|
SetValue(ParamVisibilityProperty, value)
|
|
End Set
|
|
End Property
|
|
|
|
'Friend Sub ParamValue_TextChanged(sender As Object, e As TextChangedEventArgs) Handles ParamValue.TextChanged
|
|
' ParamTxBx = ParamValue.Text
|
|
'End Sub
|
|
|
|
Public Shared ReadOnly ParamVisibilityProperty As DependencyProperty =
|
|
DependencyProperty.Register("ParamVisibility", GetType(Visibility), GetType(StringParamWithButtonV))
|
|
|
|
Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged
|
|
|
|
Public Sub NotifyPropertyChanged(propName As String)
|
|
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
|
End Sub
|
|
|
|
Public Shared ReadOnly IsErrorEnabledProperty As DependencyProperty =
|
|
DependencyProperty.Register("IsErrorEnabled", GetType(Boolean), GetType(StringParamWithButtonV))
|
|
Public Property IsErrorEnabled() As Boolean
|
|
Get
|
|
Return CType(GetValue(IsErrorEnabledProperty), Boolean)
|
|
End Get
|
|
Set(ByVal value As Boolean)
|
|
SetValue(IsErrorEnabledProperty, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Shared ReadOnly ParamErrorMsgVisibilityProperty As DependencyProperty =
|
|
DependencyProperty.Register("ParamErrorMsgVisibility", GetType(Visibility), GetType(StringParamWithButtonV))
|
|
Public Property ParamErrorMsgVisibility() As Visibility
|
|
Get
|
|
Return CType(GetValue(ParamErrorMsgVisibilityProperty), Visibility)
|
|
End Get
|
|
Set(ByVal value As Visibility)
|
|
SetValue(ParamErrorMsgVisibilityProperty, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Shared AutoToolParamCheckedProperty As DependencyProperty =
|
|
DependencyProperty.Register("AutoToolParamChecked", GetType(Boolean), GetType(StringParamWithButtonV), New FrameworkPropertyMetadata() With {.BindsTwoWayByDefault = True})
|
|
Public Property AutoToolParamChecked As Boolean
|
|
Get
|
|
Return CType(GetValue(AutoToolParamCheckedProperty), Boolean)
|
|
End Get
|
|
Set(ByVal value As Boolean)
|
|
SetValue(AutoToolParamCheckedProperty, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Shared AutoToolParamEnabledProperty As DependencyProperty =
|
|
DependencyProperty.Register("AutoToolParamEnabled", GetType(Boolean), GetType(StringParamWithButtonV), New FrameworkPropertyMetadata() With {.BindsTwoWayByDefault = True})
|
|
Public Property AutoToolParamEnabled As Boolean
|
|
Get
|
|
Return CType(GetValue(AutoToolParamEnabledProperty), Boolean)
|
|
End Get
|
|
Set(ByVal value As Boolean)
|
|
SetValue(AutoToolParamEnabledProperty, value)
|
|
End Set
|
|
End Property
|
|
|
|
End Class
|
|
|