4d2d5055ce
- Aggiunti check per attivare e disattivare i ponti colla e tavole nella pagina opzioni.
70 lines
2.8 KiB
VB.net
70 lines
2.8 KiB
VB.net
Public Class SarmaxWallDictionary
|
|
Inherits ResourceDictionary
|
|
|
|
Dim m_MainWindow As MainWindow = Application.Current.MainWindow
|
|
Dim m_NumericKeyboard As NumericKeyboardWD
|
|
|
|
'Evento della TextBox con Style che permette di aprire in automatico la calcolatrice
|
|
Private Sub PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
|
m_NumericKeyboard = m_MainWindow.m_NumericKeyboardWD
|
|
m_NumericKeyboard.m_CurrentTxBx = e.Source
|
|
Dim AssocLabel As Label = m_NumericKeyboard.m_CurrentTxBx.Tag
|
|
If (Not IsNothing(AssocLabel)) Then
|
|
m_NumericKeyboard.m_CurrentLbl = AssocLabel.Content
|
|
End If
|
|
m_NumericKeyboard.Top = m_MainWindow.Top + (m_MainWindow.Height / 12)
|
|
m_NumericKeyboard.Left = m_MainWindow.Left
|
|
m_NumericKeyboard.Height = m_MainWindow.Height / 12 * 5
|
|
m_NumericKeyboard.Width = m_MainWindow.Width / 15 * 5
|
|
m_NumericKeyboard.Visibility = Visibility.Visible
|
|
End Sub
|
|
|
|
'Evento della TextBox con Style che permette di aggiornare in automatico il componente con il nuovo valore
|
|
Private Sub TextChanged(sender As Object, e As TextChangedEventArgs)
|
|
If m_MainWindow.m_ActivePage = MainWindow.Pages.Draw Then
|
|
If Not m_MainWindow.m_DrawPageUC.m_bShowVar Then
|
|
m_MainWindow.m_DrawPageUC.UpdateView()
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
End Class
|
|
|
|
Namespace ArithmeticConverterNameSpace
|
|
|
|
Public Class CheckboxConverter
|
|
Implements IMultiValueConverter
|
|
|
|
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IMultiValueConverter.Convert
|
|
If values.Length <> 2 Then
|
|
Throw New ArgumentException("There should be three values.")
|
|
End If
|
|
|
|
If String.IsNullOrEmpty(values(0).ToString) Then
|
|
values(0) = "0"
|
|
End If
|
|
|
|
If String.IsNullOrEmpty(values(1).ToString()) Then
|
|
values(2) = "0"
|
|
End If
|
|
|
|
Dim x As Double
|
|
If Not Double.TryParse(values(0).ToString(), x) Then
|
|
Throw New ArgumentException("values[0] must parse to double")
|
|
End If
|
|
|
|
Dim y As Double
|
|
If Not Double.TryParse(values(1).ToString(), y) Then
|
|
Throw New ArgumentException("values[0] must parse to double")
|
|
End If
|
|
|
|
Return (x / y) - 1
|
|
|
|
End Function
|
|
|
|
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As Globalization.CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
|
|
Throw New NotImplementedException()
|
|
End Function
|
|
End Class
|
|
|
|
End Namespace |