2f96ee2208
- Aggiunta tabellina dei colori CTSA (come quella di OmagCUT) in OptionWindow - Sistemato il bottone di scelta del Colore Testo in OptionWindow in modo che il colore dello stesso rifletta il Colore Testo corrente
1624 lines
75 KiB
VB.net
1624 lines
75 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports System.Windows.Forms
|
|
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class OptionWindowVM
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
Private m_LanguageList As New List(Of Language)
|
|
Public ReadOnly Property LanguageList As List(Of Language)
|
|
Get
|
|
Return m_LanguageList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_SelLanguage As Language
|
|
Public Property SelLanguage As Language
|
|
Get
|
|
Return m_SelLanguage
|
|
End Get
|
|
Set(value As Language)
|
|
If value IsNot m_SelLanguage Then
|
|
m_SelLanguage = value
|
|
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelLanguage.Name)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_MeasureUnitList As New List(Of String)({"inch", "mm"})
|
|
Public ReadOnly Property MeasureUnitList As List(Of String)
|
|
Get
|
|
Return m_MeasureUnitList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_SideModeList As List(Of String)
|
|
Public ReadOnly Property SideModeList As List(Of String)
|
|
Get
|
|
Return m_SideModeList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_SelSideModeIndex As Integer
|
|
Public Property SelSideModeIndex As Integer
|
|
Get
|
|
Return m_SelSideModeIndex
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> m_SelSideModeIndex Then
|
|
m_SelSideModeIndex = value
|
|
WriteMainPrivateProfileString(S_COMPO, K_SIDEMODE, m_SelSideModeIndex.ToString())
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SelMeasureUnit As Integer
|
|
Get
|
|
Return If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH)
|
|
End Get
|
|
Set(value As Integer)
|
|
' salvo unità di misura precedente
|
|
Dim PrevMeasureUnit As MeasureUnitOpt = If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH)
|
|
If value <> PrevMeasureUnit Then
|
|
' cambio unità di misura
|
|
EgtSetUiUnits(DirectCast(value, MeasureUnitOpt) = MeasureUnitOpt.MM)
|
|
OmagOFFICEMap.refStatusBarVM.SetMeasureUnit(value)
|
|
WriteMainPrivateProfileString(S_GENERAL, K_MMUNITS, value.ToString())
|
|
' aggiorno le unità di misura nelle Tab
|
|
OmagOFFICEMap.refRawPartTabVM.Refresh(PrevMeasureUnit)
|
|
OmagOFFICEMap.refNestingTabVM.Refresh(PrevMeasureUnit)
|
|
OmagOFFICEMap.refMoveRawModeVM.Refresh(PrevMeasureUnit)
|
|
OmagOFFICEMap.refSimulTabVM.Refresh(PrevMeasureUnit)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DIGeneral As Boolean
|
|
Get
|
|
Return (GetMainPrivateProfileInt(S_NEST, K_DIRECT, 0) <> 0)
|
|
End Get
|
|
Set(value As Boolean)
|
|
WriteMainPrivateProfileString(S_NEST, K_DIRECT, If(value, "1", "0"))
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DICsv As Boolean
|
|
Get
|
|
Return GetMainPrivateProfileInt(S_CSV, K_CSVDIRECT, 1) <> 0
|
|
End Get
|
|
Set(value As Boolean)
|
|
WriteMainPrivateProfileString(S_CSV, K_CSVDIRECT, If(value, "1", "0"))
|
|
End Set
|
|
End Property
|
|
|
|
#Region "Messages"
|
|
|
|
Public ReadOnly Property Title As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 1)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property CurrentLanguageMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 1)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property LanguageAdvertMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 2)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property MeasureUnitMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 3)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property TextColorMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 13)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ColorToSideAngMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 19)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property CTSAboxEnableMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 20)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ToleranceMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 21)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property TalloneMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 22)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property InclinazioneMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 23)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property SideAngleHdr As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 5)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DirectInsertHdr As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 8)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DIGeneralMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 9)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DICsvMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 10)
|
|
End Get
|
|
End Property
|
|
|
|
'Definizione comandi
|
|
Private m_cmdChangeColor As ICommand
|
|
Private m_cmdChangeCTSA1Color As ICommand
|
|
Private m_cmdCTSA1Enable As ICommand
|
|
Private m_cmdChangeCTSA2Color As ICommand
|
|
Private m_cmdCTSA2Enable As ICommand
|
|
Private m_cmdChangeCTSA3Color As ICommand
|
|
Private m_cmdCTSA3Enable As ICommand
|
|
Private m_cmdChangeCTSA4Color As ICommand
|
|
Private m_cmdCTSA4Enable As ICommand
|
|
Private m_cmdChangeCTSA5Color As ICommand
|
|
Private m_cmdCTSA5Enable As ICommand
|
|
Private m_cmdChangeCTSA6Color As ICommand
|
|
Private m_cmdCTSA6Enable As ICommand
|
|
Private m_cmdChangeCTSA7Color As ICommand
|
|
Private m_cmdCTSA7Enable As ICommand
|
|
Private m_cmdChangeCTSA8Color As ICommand
|
|
Private m_cmdCTSA8Enable As ICommand
|
|
Private m_cmdChangeCTSA9Color As ICommand
|
|
Private m_cmdCTSA9Enable As ICommand
|
|
Private m_cmdChangeCTSA10Color As ICommand
|
|
Private m_cmdCTSA10Enable As ICommand
|
|
Private m_cmdCTSAboxEnable As ICommand
|
|
|
|
#End Region
|
|
|
|
#End Region ' FIELDS & PROPERTIES
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New()
|
|
' Leggo nome lingua corrente
|
|
Dim sLanguage As String = String.Empty
|
|
GetMainPrivateProfileString(S_GENERAL, K_MESSAGES, "", sLanguage)
|
|
' Leggo elenco lingue disponibili da file ini e imposto lingua corrente
|
|
Dim nIndex As Integer = 1
|
|
While True
|
|
Dim ReadLanguage As Language = GetMainPrivateProfileLanguage(S_LANGUAGES, K_LANGUAGE & nIndex)
|
|
If IsNothing(ReadLanguage) Then Exit While
|
|
m_LanguageList.Add(ReadLanguage)
|
|
If String.Compare(ReadLanguage.Name, sLanguage, True) = 0 Then
|
|
m_SelLanguage = ReadLanguage
|
|
End If
|
|
nIndex += 1
|
|
End While
|
|
' Carico messaggi per lista tipologie di definizione angolo d'inclinazione
|
|
m_SideModeList = New List(Of String)({EgtMsg(MSG_OPTIONSPAGEUC + 6), EgtMsg(MSG_OPTIONSPAGEUC + 7)})
|
|
' Carico valore da file ini
|
|
m_SelSideModeIndex = GetMainPrivateProfileInt(S_COMPO, K_SIDEMODE, 0)
|
|
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
|
|
' I parametri di TextColor presenti nell'INI vengono caricati
|
|
Dim sTextColor As String = " "
|
|
If GetPrivateProfileString(S_NEST, K_TEXTCOLOR, " ", sTextColor, m_sIniFile) <> 0 Then
|
|
Dim sTextColorArray() As String = sTextColor.Split(",")
|
|
m_OptionWindowV.TextColorBtn.Background = New SolidColorBrush(Color.FromRgb(sTextColorArray(0), sTextColorArray(1), sTextColorArray(2)))
|
|
End If
|
|
|
|
' Leggo se la modalità ColorToSideAng è abilitata
|
|
If GetPrivateProfileInt(S_COLORTOSIDEANG, K_CTSA_ENABLE, 0, m_sIniFile) <> 0 Then
|
|
m_OptionWindowV.CTSAboxEnableChBx.IsChecked = True
|
|
Else
|
|
m_OptionWindowV.CTSAboxEnableChBx.IsChecked = False
|
|
End If
|
|
|
|
' I parametri di ColorSideToAng presenti nell'INI vengono caricati a prescindere dall'abilitazione
|
|
Dim nVal As Integer
|
|
nVal = GetPrivateProfileInt(S_COLORTOSIDEANG, K_CTSA_TOLERANCE, nVal, m_sIniFile)
|
|
m_sToleranceTxBx = nVal
|
|
' Nel caso dei colori singoli viene verificata la presenza della Key corrispondente a ciascuno dei
|
|
' 10 singoli colori (CTSAindex) e il Valore associato viene splittato in un array di stringhe
|
|
For index As Integer = 1 To 10
|
|
Dim sColor As String = " "
|
|
Dim sArray() As String
|
|
If GetPrivateProfileString(S_COLORTOSIDEANG, K_CTSA & index, " ", sColor, m_sIniFile) <> 0 Then
|
|
sArray = sColor.Split(",")
|
|
Select Case index
|
|
Case 1
|
|
' Controllo se l'array abbia più di 5 elementi, in caso contrario l'Enable (che
|
|
' corrisponderebbe al 6° elemento) viene posto di default a True
|
|
m_OptionWindowV.CTSA1EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
|
|
m_OptionWindowV.CTSA1Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
|
|
m_sCTSA1InclinazioneText = sArray(3)
|
|
m_sCTSA1TalloneText = sArray(4)
|
|
Case 2
|
|
m_OptionWindowV.CTSA2EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
|
|
m_OptionWindowV.CTSA2Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
|
|
m_sCTSA2InclinazioneText = sArray(3)
|
|
m_sCTSA2TalloneText = sArray(4)
|
|
Case 3
|
|
m_OptionWindowV.CTSA3EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
|
|
m_OptionWindowV.CTSA3Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
|
|
m_sCTSA3InclinazioneText = sArray(3)
|
|
m_sCTSA3TalloneText = sArray(4)
|
|
Case 4
|
|
m_OptionWindowV.CTSA4EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
|
|
m_OptionWindowV.CTSA4Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
|
|
m_sCTSA4InclinazioneText = sArray(3)
|
|
m_sCTSA4TalloneText = sArray(4)
|
|
Case 5
|
|
m_OptionWindowV.CTSA5EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
|
|
m_OptionWindowV.CTSA5Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
|
|
m_sCTSA5InclinazioneText = sArray(3)
|
|
m_sCTSA5TalloneText = sArray(4)
|
|
Case 6
|
|
m_OptionWindowV.CTSA6EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
|
|
m_OptionWindowV.CTSA6Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
|
|
m_sCTSA6InclinazioneText = sArray(3)
|
|
m_sCTSA6TalloneText = sArray(4)
|
|
Case 7
|
|
m_OptionWindowV.CTSA7EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
|
|
m_OptionWindowV.CTSA7Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
|
|
m_sCTSA7InclinazioneText = sArray(3)
|
|
m_sCTSA7TalloneText = sArray(4)
|
|
Case 8
|
|
m_OptionWindowV.CTSA8EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
|
|
m_OptionWindowV.CTSA8Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
|
|
m_sCTSA8InclinazioneText = sArray(3)
|
|
m_sCTSA8TalloneText = sArray(4)
|
|
Case 9
|
|
m_OptionWindowV.CTSA9EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
|
|
m_OptionWindowV.CTSA9Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
|
|
m_sCTSA9InclinazioneText = sArray(3)
|
|
m_sCTSA9TalloneText = sArray(4)
|
|
Case 10
|
|
m_OptionWindowV.CTSA10EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
|
|
m_OptionWindowV.CTSA10Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
|
|
m_sCTSA10InclinazioneText = sArray(3)
|
|
m_sCTSA10TalloneText = sArray(4)
|
|
End Select
|
|
End If
|
|
Next
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "ChangeColorCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ChangeColor.
|
|
''' </summary>
|
|
Public ReadOnly Property ChangeColorCommand As ICommand
|
|
Get
|
|
If m_cmdChangeColor Is Nothing Then
|
|
m_cmdChangeColor = New Command(AddressOf ChangeColor)
|
|
End If
|
|
Return m_cmdChangeColor
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ChangeColor. This method is invoked by the ChangeColorCommand.
|
|
''' </summary>
|
|
Public Sub ChangeColor(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
' Recupero colore da Ini
|
|
Dim TextColor As New Color3d(192, 192, 192)
|
|
Dim NewCol As New Color3d(192, 192, 192)
|
|
GetPrivateProfileColor(S_NEST, K_TEXTCOLOR, TextColor, m_sIniFile)
|
|
' Creo dialogo colori
|
|
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
|
ColorDlg.FullOpen = True
|
|
ColorDlg.Color = TextColor.ToColor()
|
|
' Visualizzo dialogo
|
|
ColorDlg.ShowDialog()
|
|
NewCol.FromColor(ColorDlg.Color)
|
|
' Salvo eventuali modifiche al colore scelto
|
|
Dim sColor As String = NewCol.R & "," & NewCol.G & "," & NewCol.B
|
|
WritePrivateProfileString(S_NEST, K_TEXTCOLOR, sColor, m_sIniFile)
|
|
' Imposto il colore scelto sul pulsante
|
|
m_OptionWindowV.TextColorBtn.Background = New SolidColorBrush(Color.FromRgb(NewCol.R, NewCol.G, NewCol.B))
|
|
End Sub
|
|
|
|
#End Region ' ChangeColorCommand
|
|
|
|
#Region "CTSA1 Parameters Commands"
|
|
|
|
Public ReadOnly Property ChangeCTSA1ColorCommand As ICommand
|
|
Get
|
|
If m_cmdChangeCTSA1Color Is Nothing Then
|
|
m_cmdChangeCTSA1Color = New Command(AddressOf CTSA1Btn_Click)
|
|
End If
|
|
Return m_cmdChangeCTSA1Color
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub CTSA1Btn_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
' Recupero colore da Ini
|
|
Dim NewCol As New Color3d(192, 192, 192)
|
|
Dim CurrentColor As New Color3d(m_OptionWindowV.CTSA1Btn.Background.GetValue(SolidColorBrush.ColorProperty).R,
|
|
m_OptionWindowV.CTSA1Btn.Background.GetValue(SolidColorBrush.ColorProperty).G,
|
|
m_OptionWindowV.CTSA1Btn.Background.GetValue(SolidColorBrush.ColorProperty).B,
|
|
m_OptionWindowV.CTSA1Btn.Background.GetValue(SolidColorBrush.ColorProperty).A)
|
|
' Creo dialogo colori
|
|
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
|
ColorDlg.FullOpen = True
|
|
ColorDlg.Color = CurrentColor.ToColor()
|
|
' Visualizzo dialogo
|
|
ColorDlg.ShowDialog()
|
|
NewCol.FromColor(ColorDlg.Color)
|
|
Dim Rvalue As String = NewCol.R
|
|
Dim Gvalue As String = NewCol.G
|
|
Dim Bvalue As String = NewCol.B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA1InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA1InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA1TalloneTxBx.Text), "0", m_OptionWindowV.CTSA1TalloneTxBx.Text) & "," &
|
|
If(m_OptionWindowV.CTSA1EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "1", RgbCTSA, m_sIniFile)
|
|
' Imposto il colore scelto sul pulsante
|
|
m_OptionWindowV.CTSA1Btn.Background = New SolidColorBrush(Color.FromRgb(NewCol.R, NewCol.G, NewCol.B))
|
|
End Sub
|
|
|
|
Public ReadOnly Property CTSA1EnableCommand As ICommand
|
|
Get
|
|
If m_cmdCTSA1Enable Is Nothing Then
|
|
m_cmdCTSA1Enable = New Command(AddressOf CTSA1EnableChBx_Click)
|
|
End If
|
|
Return m_cmdCTSA1Enable
|
|
End Get
|
|
End Property
|
|
|
|
Private Sub CTSA1EnableChBx_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim Rvalue As String = (m_OptionWindowV.CTSA1Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
|
|
Dim Gvalue As String = (m_OptionWindowV.CTSA1Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
|
|
Dim Bvalue As String = (m_OptionWindowV.CTSA1Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA1InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA1InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_sCTSA1TalloneText) OrElse m_sCTSA1TalloneText.Equals("-"), "0", m_sCTSA1TalloneText) & "," &
|
|
If(m_OptionWindowV.CTSA1EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "1", RgbCTSA, m_sIniFile)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA1TalloneText As String
|
|
Public Property sCTSA1TalloneText As String
|
|
Get
|
|
Return m_sCTSA1TalloneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA1TalloneText Then
|
|
m_sCTSA1TalloneText = value
|
|
CTSA1TalloneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA1TalloneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA1TalloneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA1TalloneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA1TalloneText = ""
|
|
End Try
|
|
CTSA1EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA1InclinazioneText As String
|
|
Public Property sCTSA1InclinazioneText As String
|
|
Get
|
|
Return m_sCTSA1InclinazioneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA1InclinazioneText Then
|
|
m_sCTSA1InclinazioneText = value
|
|
CTSA1InclinazioneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA1InclinazioneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA1InclinazioneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA1InclinazioneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA1InclinazioneText = ""
|
|
End Try
|
|
CTSA1EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
#End Region ' CTSA1 Parameters Commands
|
|
|
|
#Region "CTSA2 Parameters Commands"
|
|
|
|
Public ReadOnly Property ChangeCTSA2ColorCommand As ICommand
|
|
Get
|
|
If m_cmdChangeCTSA2Color Is Nothing Then
|
|
m_cmdChangeCTSA2Color = New Command(AddressOf CTSA2Btn_Click)
|
|
End If
|
|
Return m_cmdChangeCTSA2Color
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub CTSA2Btn_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
' Recupero colore da Ini
|
|
Dim NewCol As New Color3d(192, 192, 192)
|
|
Dim CurrentColor As New Color3d(m_OptionWindowV.CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty).R,
|
|
m_OptionWindowV.CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty).G,
|
|
m_OptionWindowV.CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty).B,
|
|
m_OptionWindowV.CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty).A)
|
|
' Creo dialogo colori
|
|
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
|
ColorDlg.FullOpen = True
|
|
ColorDlg.Color = CurrentColor.ToColor()
|
|
' Visualizzo dialogo
|
|
ColorDlg.ShowDialog()
|
|
NewCol.FromColor(ColorDlg.Color)
|
|
Dim Rvalue As String = NewCol.R
|
|
Dim Gvalue As String = NewCol.G
|
|
Dim Bvalue As String = NewCol.B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA2InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA2InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA2TalloneTxBx.Text), "0", m_OptionWindowV.CTSA2TalloneTxBx.Text) & "," &
|
|
If(m_OptionWindowV.CTSA2EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "2", RgbCTSA, m_sIniFile)
|
|
' Imposto il colore scelto sul pulsante
|
|
m_OptionWindowV.CTSA2Btn.Background = New SolidColorBrush(Color.FromRgb(NewCol.R, NewCol.G, NewCol.B))
|
|
End Sub
|
|
|
|
Public ReadOnly Property CTSA2EnableCommand As ICommand
|
|
Get
|
|
If m_cmdCTSA2Enable Is Nothing Then
|
|
m_cmdCTSA2Enable = New Command(AddressOf CTSA2EnableChBx_Click)
|
|
End If
|
|
Return m_cmdCTSA2Enable
|
|
End Get
|
|
End Property
|
|
|
|
Private Sub CTSA2EnableChBx_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim Rvalue As String = (m_OptionWindowV.CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
|
|
Dim Gvalue As String = (m_OptionWindowV.CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
|
|
Dim Bvalue As String = (m_OptionWindowV.CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA2InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA2InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_sCTSA2TalloneText) OrElse m_sCTSA2TalloneText.Equals("-"), "0", m_sCTSA2TalloneText) & "," &
|
|
If(m_OptionWindowV.CTSA2EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "2", RgbCTSA, m_sIniFile)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA2TalloneText As String
|
|
Public Property sCTSA2TalloneText As String
|
|
Get
|
|
Return m_sCTSA2TalloneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA2TalloneText Then
|
|
m_sCTSA2TalloneText = value
|
|
CTSA2TalloneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA2TalloneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA2TalloneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA2TalloneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA2TalloneText = ""
|
|
End Try
|
|
CTSA2EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA2InclinazioneText As String
|
|
Public Property sCTSA2InclinazioneText As String
|
|
Get
|
|
Return m_sCTSA2InclinazioneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA2InclinazioneText Then
|
|
m_sCTSA2InclinazioneText = value
|
|
CTSA2InclinazioneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA2InclinazioneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA2InclinazioneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA2InclinazioneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA2InclinazioneText = ""
|
|
End Try
|
|
CTSA2EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
#End Region ' CTSA2 Parameters Commands
|
|
|
|
#Region "CTSA3 Parameters Commands"
|
|
|
|
Public ReadOnly Property ChangeCTSA3ColorCommand As ICommand
|
|
Get
|
|
If m_cmdChangeCTSA3Color Is Nothing Then
|
|
m_cmdChangeCTSA3Color = New Command(AddressOf CTSA3Btn_Click)
|
|
End If
|
|
Return m_cmdChangeCTSA3Color
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub CTSA3Btn_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
' Recupero colore da Ini
|
|
Dim NewCol As New Color3d(192, 192, 192)
|
|
Dim CurrentColor As New Color3d(m_OptionWindowV.CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty).R,
|
|
m_OptionWindowV.CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty).G,
|
|
m_OptionWindowV.CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty).B,
|
|
m_OptionWindowV.CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty).A)
|
|
' Creo dialogo colori
|
|
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
|
ColorDlg.FullOpen = True
|
|
ColorDlg.Color = CurrentColor.ToColor()
|
|
' Visualizzo dialogo
|
|
ColorDlg.ShowDialog()
|
|
NewCol.FromColor(ColorDlg.Color)
|
|
Dim Rvalue As String = NewCol.R
|
|
Dim Gvalue As String = NewCol.G
|
|
Dim Bvalue As String = NewCol.B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA3InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA3InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA3TalloneTxBx.Text), "0", m_OptionWindowV.CTSA3TalloneTxBx.Text) & "," &
|
|
If(m_OptionWindowV.CTSA3EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "3", RgbCTSA, m_sIniFile)
|
|
' Imposto il colore scelto sul pulsante
|
|
m_OptionWindowV.CTSA3Btn.Background = New SolidColorBrush(Color.FromRgb(NewCol.R, NewCol.G, NewCol.B))
|
|
End Sub
|
|
|
|
Public ReadOnly Property CTSA3EnableCommand As ICommand
|
|
Get
|
|
If m_cmdCTSA3Enable Is Nothing Then
|
|
m_cmdCTSA3Enable = New Command(AddressOf CTSA3EnableChBx_Click)
|
|
End If
|
|
Return m_cmdCTSA3Enable
|
|
End Get
|
|
End Property
|
|
|
|
Private Sub CTSA3EnableChBx_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim Rvalue As String = (m_OptionWindowV.CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
|
|
Dim Gvalue As String = (m_OptionWindowV.CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
|
|
Dim Bvalue As String = (m_OptionWindowV.CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA3InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA3InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_sCTSA3TalloneText) OrElse m_sCTSA3TalloneText.Equals("-"), "0", m_sCTSA3TalloneText) & "," &
|
|
If(m_OptionWindowV.CTSA3EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "3", RgbCTSA, m_sIniFile)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA3TalloneText As String
|
|
Public Property sCTSA3TalloneText As String
|
|
Get
|
|
Return m_sCTSA3TalloneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA3TalloneText Then
|
|
m_sCTSA3TalloneText = value
|
|
CTSA3TalloneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA3TalloneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA3TalloneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA3TalloneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA3TalloneText = ""
|
|
End Try
|
|
CTSA3EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA3InclinazioneText As String
|
|
Public Property sCTSA3InclinazioneText As String
|
|
Get
|
|
Return m_sCTSA3InclinazioneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA3InclinazioneText Then
|
|
m_sCTSA3InclinazioneText = value
|
|
CTSA3InclinazioneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA3InclinazioneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA3InclinazioneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA3InclinazioneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA3InclinazioneText = ""
|
|
End Try
|
|
CTSA3EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
#End Region ' CTSA3 Parameters Commands
|
|
|
|
#Region "CTSA4 Parameters Commands"
|
|
|
|
Public ReadOnly Property ChangeCTSA4ColorCommand As ICommand
|
|
Get
|
|
If m_cmdChangeCTSA4Color Is Nothing Then
|
|
m_cmdChangeCTSA4Color = New Command(AddressOf CTSA4Btn_Click)
|
|
End If
|
|
Return m_cmdChangeCTSA4Color
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub CTSA4Btn_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
' Recupero colore da Ini
|
|
Dim NewCol As New Color3d(192, 192, 192)
|
|
Dim CurrentColor As New Color3d(m_OptionWindowV.CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty).R,
|
|
m_OptionWindowV.CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty).G,
|
|
m_OptionWindowV.CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty).B,
|
|
m_OptionWindowV.CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty).A)
|
|
' Creo dialogo colori
|
|
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
|
ColorDlg.FullOpen = True
|
|
ColorDlg.Color = CurrentColor.ToColor()
|
|
' Visualizzo dialogo
|
|
ColorDlg.ShowDialog()
|
|
NewCol.FromColor(ColorDlg.Color)
|
|
Dim Rvalue As String = NewCol.R
|
|
Dim Gvalue As String = NewCol.G
|
|
Dim Bvalue As String = NewCol.B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA4InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA4InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA4TalloneTxBx.Text), "0", m_OptionWindowV.CTSA4TalloneTxBx.Text) & "," &
|
|
If(m_OptionWindowV.CTSA4EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "4", RgbCTSA, m_sIniFile)
|
|
' Imposto il colore scelto sul pulsante
|
|
m_OptionWindowV.CTSA4Btn.Background = New SolidColorBrush(Color.FromRgb(NewCol.R, NewCol.G, NewCol.B))
|
|
End Sub
|
|
|
|
Public ReadOnly Property CTSA4EnableCommand As ICommand
|
|
Get
|
|
If m_cmdCTSA4Enable Is Nothing Then
|
|
m_cmdCTSA4Enable = New Command(AddressOf CTSA4EnableChBx_Click)
|
|
End If
|
|
Return m_cmdCTSA4Enable
|
|
End Get
|
|
End Property
|
|
|
|
Private Sub CTSA4EnableChBx_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim Rvalue As String = (m_OptionWindowV.CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
|
|
Dim Gvalue As String = (m_OptionWindowV.CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
|
|
Dim Bvalue As String = (m_OptionWindowV.CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA4InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA4InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_sCTSA4TalloneText) OrElse m_sCTSA4TalloneText.Equals("-"), "0", m_sCTSA4TalloneText) & "," &
|
|
If(m_OptionWindowV.CTSA4EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "4", RgbCTSA, m_sIniFile)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA4TalloneText As String
|
|
Public Property sCTSA4TalloneText As String
|
|
Get
|
|
Return m_sCTSA4TalloneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA4TalloneText Then
|
|
m_sCTSA4TalloneText = value
|
|
CTSA4TalloneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA4TalloneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA4TalloneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA4TalloneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA4TalloneText = ""
|
|
End Try
|
|
CTSA4EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA4InclinazioneText As String
|
|
Public Property sCTSA4InclinazioneText As String
|
|
Get
|
|
Return m_sCTSA4InclinazioneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA4InclinazioneText Then
|
|
m_sCTSA4InclinazioneText = value
|
|
CTSA4InclinazioneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA4InclinazioneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA4InclinazioneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA4InclinazioneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA4InclinazioneText = ""
|
|
End Try
|
|
CTSA4EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
#End Region ' CTSA4 Parameters Commands
|
|
|
|
#Region "CTSA5 Parameters Commands"
|
|
|
|
Public ReadOnly Property ChangeCTSA5ColorCommand As ICommand
|
|
Get
|
|
If m_cmdChangeCTSA5Color Is Nothing Then
|
|
m_cmdChangeCTSA5Color = New Command(AddressOf CTSA5Btn_Click)
|
|
End If
|
|
Return m_cmdChangeCTSA5Color
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub CTSA5Btn_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
' Recupero colore da Ini
|
|
Dim NewCol As New Color3d(192, 192, 192)
|
|
Dim CurrentColor As New Color3d(m_OptionWindowV.CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty).R,
|
|
m_OptionWindowV.CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty).G,
|
|
m_OptionWindowV.CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty).B,
|
|
m_OptionWindowV.CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty).A)
|
|
' Creo dialogo colori
|
|
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
|
ColorDlg.FullOpen = True
|
|
ColorDlg.Color = CurrentColor.ToColor()
|
|
' Visualizzo dialogo
|
|
ColorDlg.ShowDialog()
|
|
NewCol.FromColor(ColorDlg.Color)
|
|
Dim Rvalue As String = NewCol.R
|
|
Dim Gvalue As String = NewCol.G
|
|
Dim Bvalue As String = NewCol.B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA5InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA5InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA5TalloneTxBx.Text), "0", m_OptionWindowV.CTSA5TalloneTxBx.Text) & "," &
|
|
If(m_OptionWindowV.CTSA5EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "5", RgbCTSA, m_sIniFile)
|
|
' Imposto il colore scelto sul pulsante
|
|
m_OptionWindowV.CTSA5Btn.Background = New SolidColorBrush(Color.FromRgb(NewCol.R, NewCol.G, NewCol.B))
|
|
End Sub
|
|
|
|
Public ReadOnly Property CTSA5EnableCommand As ICommand
|
|
Get
|
|
If m_cmdCTSA5Enable Is Nothing Then
|
|
m_cmdCTSA5Enable = New Command(AddressOf CTSA5EnableChBx_Click)
|
|
End If
|
|
Return m_cmdCTSA5Enable
|
|
End Get
|
|
End Property
|
|
|
|
Private Sub CTSA5EnableChBx_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim Rvalue As String = (m_OptionWindowV.CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
|
|
Dim Gvalue As String = (m_OptionWindowV.CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
|
|
Dim Bvalue As String = (m_OptionWindowV.CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA5InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA5InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_sCTSA5TalloneText) OrElse m_sCTSA5TalloneText.Equals("-"), "0", m_sCTSA5TalloneText) & "," &
|
|
If(m_OptionWindowV.CTSA5EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "5", RgbCTSA, m_sIniFile)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA5TalloneText As String
|
|
Public Property sCTSA5TalloneText As String
|
|
Get
|
|
Return m_sCTSA5TalloneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA5TalloneText Then
|
|
m_sCTSA5TalloneText = value
|
|
CTSA5TalloneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA5TalloneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA5TalloneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA5TalloneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA5TalloneText = ""
|
|
End Try
|
|
CTSA5EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA5InclinazioneText As String
|
|
Public Property sCTSA5InclinazioneText As String
|
|
Get
|
|
Return m_sCTSA5InclinazioneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA5InclinazioneText Then
|
|
m_sCTSA5InclinazioneText = value
|
|
CTSA5InclinazioneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA5InclinazioneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA5InclinazioneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA5InclinazioneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA5InclinazioneText = ""
|
|
End Try
|
|
CTSA5EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
#End Region ' CTSA5 Parameters Commands
|
|
|
|
#Region "CTSA6 Parameters Commands"
|
|
|
|
Public ReadOnly Property ChangeCTSA6ColorCommand As ICommand
|
|
Get
|
|
If m_cmdChangeCTSA6Color Is Nothing Then
|
|
m_cmdChangeCTSA6Color = New Command(AddressOf CTSA6Btn_Click)
|
|
End If
|
|
Return m_cmdChangeCTSA6Color
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub CTSA6Btn_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
' Recupero colore da Ini
|
|
Dim NewCol As New Color3d(192, 192, 192)
|
|
Dim CurrentColor As New Color3d(m_OptionWindowV.CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty).R,
|
|
m_OptionWindowV.CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty).G,
|
|
m_OptionWindowV.CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty).B,
|
|
m_OptionWindowV.CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty).A)
|
|
' Creo dialogo colori
|
|
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
|
ColorDlg.FullOpen = True
|
|
ColorDlg.Color = CurrentColor.ToColor()
|
|
' Visualizzo dialogo
|
|
ColorDlg.ShowDialog()
|
|
NewCol.FromColor(ColorDlg.Color)
|
|
Dim Rvalue As String = NewCol.R
|
|
Dim Gvalue As String = NewCol.G
|
|
Dim Bvalue As String = NewCol.B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA6InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA6InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA6TalloneTxBx.Text), "0", m_OptionWindowV.CTSA6TalloneTxBx.Text) & "," &
|
|
If(m_OptionWindowV.CTSA6EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "6", RgbCTSA, m_sIniFile)
|
|
' Imposto il colore scelto sul pulsante
|
|
m_OptionWindowV.CTSA6Btn.Background = New SolidColorBrush(Color.FromRgb(NewCol.R, NewCol.G, NewCol.B))
|
|
End Sub
|
|
|
|
Public ReadOnly Property CTSA6EnableCommand As ICommand
|
|
Get
|
|
If m_cmdCTSA6Enable Is Nothing Then
|
|
m_cmdCTSA6Enable = New Command(AddressOf CTSA6EnableChBx_Click)
|
|
End If
|
|
Return m_cmdCTSA6Enable
|
|
End Get
|
|
End Property
|
|
|
|
Private Sub CTSA6EnableChBx_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim Rvalue As String = (m_OptionWindowV.CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
|
|
Dim Gvalue As String = (m_OptionWindowV.CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
|
|
Dim Bvalue As String = (m_OptionWindowV.CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA6InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA6InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_sCTSA6TalloneText) OrElse m_sCTSA6TalloneText.Equals("-"), "0", m_sCTSA6TalloneText) & "," &
|
|
If(m_OptionWindowV.CTSA6EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "6", RgbCTSA, m_sIniFile)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA6TalloneText As String
|
|
Public Property sCTSA6TalloneText As String
|
|
Get
|
|
Return m_sCTSA6TalloneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA6TalloneText Then
|
|
m_sCTSA6TalloneText = value
|
|
CTSA6TalloneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA6TalloneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA6TalloneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA6TalloneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA6TalloneText = ""
|
|
End Try
|
|
CTSA6EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA6InclinazioneText As String
|
|
Public Property sCTSA6InclinazioneText As String
|
|
Get
|
|
Return m_sCTSA6InclinazioneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA6InclinazioneText Then
|
|
m_sCTSA6InclinazioneText = value
|
|
CTSA6InclinazioneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA6InclinazioneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA6InclinazioneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA6InclinazioneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA6InclinazioneText = ""
|
|
End Try
|
|
CTSA6EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
#End Region ' CTSA6 Parameters Commands
|
|
|
|
#Region "CTSA7 Parameters Commands"
|
|
|
|
Public ReadOnly Property ChangeCTSA7ColorCommand As ICommand
|
|
Get
|
|
If m_cmdChangeCTSA7Color Is Nothing Then
|
|
m_cmdChangeCTSA7Color = New Command(AddressOf CTSA7Btn_Click)
|
|
End If
|
|
Return m_cmdChangeCTSA7Color
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub CTSA7Btn_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
' Recupero colore da Ini
|
|
Dim NewCol As New Color3d(192, 192, 192)
|
|
Dim CurrentColor As New Color3d(m_OptionWindowV.CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty).R,
|
|
m_OptionWindowV.CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty).G,
|
|
m_OptionWindowV.CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty).B,
|
|
m_OptionWindowV.CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty).A)
|
|
' Creo dialogo colori
|
|
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
|
ColorDlg.FullOpen = True
|
|
ColorDlg.Color = CurrentColor.ToColor()
|
|
' Visualizzo dialogo
|
|
ColorDlg.ShowDialog()
|
|
NewCol.FromColor(ColorDlg.Color)
|
|
Dim Rvalue As String = NewCol.R
|
|
Dim Gvalue As String = NewCol.G
|
|
Dim Bvalue As String = NewCol.B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA7InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA7InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA7TalloneTxBx.Text), "0", m_OptionWindowV.CTSA7TalloneTxBx.Text) & "," &
|
|
If(m_OptionWindowV.CTSA7EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "7", RgbCTSA, m_sIniFile)
|
|
' Imposto il colore scelto sul pulsante
|
|
m_OptionWindowV.CTSA7Btn.Background = New SolidColorBrush(Color.FromRgb(NewCol.R, NewCol.G, NewCol.B))
|
|
End Sub
|
|
|
|
Public ReadOnly Property CTSA7EnableCommand As ICommand
|
|
Get
|
|
If m_cmdCTSA7Enable Is Nothing Then
|
|
m_cmdCTSA7Enable = New Command(AddressOf CTSA7EnableChBx_Click)
|
|
End If
|
|
Return m_cmdCTSA7Enable
|
|
End Get
|
|
End Property
|
|
|
|
Private Sub CTSA7EnableChBx_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim Rvalue As String = (m_OptionWindowV.CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
|
|
Dim Gvalue As String = (m_OptionWindowV.CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
|
|
Dim Bvalue As String = (m_OptionWindowV.CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA7InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA7InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_sCTSA7TalloneText) OrElse m_sCTSA7TalloneText.Equals("-"), "0", m_sCTSA7TalloneText) & "," &
|
|
If(m_OptionWindowV.CTSA7EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "7", RgbCTSA, m_sIniFile)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA7TalloneText As String
|
|
Public Property sCTSA7TalloneText As String
|
|
Get
|
|
Return m_sCTSA7TalloneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA7TalloneText Then
|
|
m_sCTSA7TalloneText = value
|
|
CTSA7TalloneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA7TalloneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA7TalloneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA7TalloneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA7TalloneText = ""
|
|
End Try
|
|
CTSA7EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA7InclinazioneText As String
|
|
Public Property sCTSA7InclinazioneText As String
|
|
Get
|
|
Return m_sCTSA7InclinazioneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA7InclinazioneText Then
|
|
m_sCTSA7InclinazioneText = value
|
|
CTSA7InclinazioneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA7InclinazioneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA7InclinazioneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA7InclinazioneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA7InclinazioneText = ""
|
|
End Try
|
|
CTSA7EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
#End Region ' CTSA7 Parameters Commands
|
|
|
|
#Region "CTSA8 Parameters Commands"
|
|
|
|
Public ReadOnly Property ChangeCTSA8ColorCommand As ICommand
|
|
Get
|
|
If m_cmdChangeCTSA8Color Is Nothing Then
|
|
m_cmdChangeCTSA8Color = New Command(AddressOf CTSA8Btn_Click)
|
|
End If
|
|
Return m_cmdChangeCTSA8Color
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub CTSA8Btn_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
' Recupero colore da Ini
|
|
Dim NewCol As New Color3d(192, 192, 192)
|
|
Dim CurrentColor As New Color3d(m_OptionWindowV.CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty).R,
|
|
m_OptionWindowV.CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty).G,
|
|
m_OptionWindowV.CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty).B,
|
|
m_OptionWindowV.CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty).A)
|
|
' Creo dialogo colori
|
|
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
|
ColorDlg.FullOpen = True
|
|
ColorDlg.Color = CurrentColor.ToColor()
|
|
' Visualizzo dialogo
|
|
ColorDlg.ShowDialog()
|
|
NewCol.FromColor(ColorDlg.Color)
|
|
Dim Rvalue As String = NewCol.R
|
|
Dim Gvalue As String = NewCol.G
|
|
Dim Bvalue As String = NewCol.B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA8InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA8InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA8TalloneTxBx.Text), "0", m_OptionWindowV.CTSA8TalloneTxBx.Text) & "," &
|
|
If(m_OptionWindowV.CTSA8EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "8", RgbCTSA, m_sIniFile)
|
|
' Imposto il colore scelto sul pulsante
|
|
m_OptionWindowV.CTSA8Btn.Background = New SolidColorBrush(Color.FromRgb(NewCol.R, NewCol.G, NewCol.B))
|
|
End Sub
|
|
|
|
Public ReadOnly Property CTSA8EnableCommand As ICommand
|
|
Get
|
|
If m_cmdCTSA8Enable Is Nothing Then
|
|
m_cmdCTSA8Enable = New Command(AddressOf CTSA8EnableChBx_Click)
|
|
End If
|
|
Return m_cmdCTSA8Enable
|
|
End Get
|
|
End Property
|
|
|
|
Private Sub CTSA8EnableChBx_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim Rvalue As String = (m_OptionWindowV.CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
|
|
Dim Gvalue As String = (m_OptionWindowV.CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
|
|
Dim Bvalue As String = (m_OptionWindowV.CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA8InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA8InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_sCTSA8TalloneText) OrElse m_sCTSA8TalloneText.Equals("-"), "0", m_sCTSA8TalloneText) & "," &
|
|
If(m_OptionWindowV.CTSA8EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "8", RgbCTSA, m_sIniFile)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA8TalloneText As String
|
|
Public Property sCTSA8TalloneText As String
|
|
Get
|
|
Return m_sCTSA8TalloneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA8TalloneText Then
|
|
m_sCTSA8TalloneText = value
|
|
CTSA8TalloneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA8TalloneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA8TalloneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA8TalloneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA8TalloneText = ""
|
|
End Try
|
|
CTSA8EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA8InclinazioneText As String
|
|
Public Property sCTSA8InclinazioneText As String
|
|
Get
|
|
Return m_sCTSA8InclinazioneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA8InclinazioneText Then
|
|
m_sCTSA8InclinazioneText = value
|
|
CTSA8InclinazioneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA8InclinazioneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA8InclinazioneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA8InclinazioneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA8InclinazioneText = ""
|
|
End Try
|
|
CTSA8EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
#End Region ' CTSA8 Parameters Commands
|
|
|
|
#Region "CTSA9 Parameters Commands"
|
|
|
|
Public ReadOnly Property ChangeCTSA9ColorCommand As ICommand
|
|
Get
|
|
If m_cmdChangeCTSA9Color Is Nothing Then
|
|
m_cmdChangeCTSA9Color = New Command(AddressOf CTSA9Btn_Click)
|
|
End If
|
|
Return m_cmdChangeCTSA9Color
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub CTSA9Btn_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
' Recupero colore da Ini
|
|
Dim NewCol As New Color3d(192, 192, 192)
|
|
Dim CurrentColor As New Color3d(m_OptionWindowV.CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty).R,
|
|
m_OptionWindowV.CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty).G,
|
|
m_OptionWindowV.CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty).B,
|
|
m_OptionWindowV.CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty).A)
|
|
' Creo dialogo colori
|
|
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
|
ColorDlg.FullOpen = True
|
|
ColorDlg.Color = CurrentColor.ToColor()
|
|
' Visualizzo dialogo
|
|
ColorDlg.ShowDialog()
|
|
NewCol.FromColor(ColorDlg.Color)
|
|
Dim Rvalue As String = NewCol.R
|
|
Dim Gvalue As String = NewCol.G
|
|
Dim Bvalue As String = NewCol.B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA9InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA9InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA9TalloneTxBx.Text), "0", m_OptionWindowV.CTSA9TalloneTxBx.Text) & "," &
|
|
If(m_OptionWindowV.CTSA9EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "9", RgbCTSA, m_sIniFile)
|
|
' Imposto il colore scelto sul pulsante
|
|
m_OptionWindowV.CTSA9Btn.Background = New SolidColorBrush(Color.FromRgb(NewCol.R, NewCol.G, NewCol.B))
|
|
End Sub
|
|
|
|
Public ReadOnly Property CTSA9EnableCommand As ICommand
|
|
Get
|
|
If m_cmdCTSA9Enable Is Nothing Then
|
|
m_cmdCTSA9Enable = New Command(AddressOf CTSA9EnableChBx_Click)
|
|
End If
|
|
Return m_cmdCTSA9Enable
|
|
End Get
|
|
End Property
|
|
|
|
Private Sub CTSA9EnableChBx_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim Rvalue As String = (m_OptionWindowV.CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
|
|
Dim Gvalue As String = (m_OptionWindowV.CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
|
|
Dim Bvalue As String = (m_OptionWindowV.CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA9InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA9InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_sCTSA9TalloneText) OrElse m_sCTSA9TalloneText.Equals("-"), "0", m_sCTSA9TalloneText) & "," &
|
|
If(m_OptionWindowV.CTSA9EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "9", RgbCTSA, m_sIniFile)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA9TalloneText As String
|
|
Public Property sCTSA9TalloneText As String
|
|
Get
|
|
Return m_sCTSA9TalloneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA9TalloneText Then
|
|
m_sCTSA9TalloneText = value
|
|
CTSA9TalloneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA9TalloneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA9TalloneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA9TalloneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA9TalloneText = ""
|
|
End Try
|
|
CTSA9EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA9InclinazioneText As String
|
|
Public Property sCTSA9InclinazioneText As String
|
|
Get
|
|
Return m_sCTSA9InclinazioneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA9InclinazioneText Then
|
|
m_sCTSA9InclinazioneText = value
|
|
CTSA9InclinazioneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA9InclinazioneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA9InclinazioneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA9InclinazioneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA9InclinazioneText = ""
|
|
End Try
|
|
CTSA9EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
#End Region ' CTSA9 Parameters Commands
|
|
|
|
#Region "CTSA10 Parameters Commands"
|
|
|
|
Public ReadOnly Property ChangeCTSA10ColorCommand As ICommand
|
|
Get
|
|
If m_cmdChangeCTSA10Color Is Nothing Then
|
|
m_cmdChangeCTSA10Color = New Command(AddressOf CTSA10Btn_Click)
|
|
End If
|
|
Return m_cmdChangeCTSA10Color
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub CTSA10Btn_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
' Recupero colore da Ini
|
|
Dim NewCol As New Color3d(192, 192, 192)
|
|
Dim CurrentColor As New Color3d(m_OptionWindowV.CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty).R,
|
|
m_OptionWindowV.CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty).G,
|
|
m_OptionWindowV.CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty).B,
|
|
m_OptionWindowV.CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty).A)
|
|
' Creo dialogo colori
|
|
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
|
ColorDlg.FullOpen = True
|
|
ColorDlg.Color = CurrentColor.ToColor()
|
|
' Visualizzo dialogo
|
|
ColorDlg.ShowDialog()
|
|
NewCol.FromColor(ColorDlg.Color)
|
|
Dim Rvalue As String = NewCol.R
|
|
Dim Gvalue As String = NewCol.G
|
|
Dim Bvalue As String = NewCol.B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA10InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA10InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA10TalloneTxBx.Text), "0", m_OptionWindowV.CTSA10TalloneTxBx.Text) & "," &
|
|
If(m_OptionWindowV.CTSA10EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "10", RgbCTSA, m_sIniFile)
|
|
' Imposto il colore scelto sul pulsante
|
|
m_OptionWindowV.CTSA10Btn.Background = New SolidColorBrush(Color.FromRgb(NewCol.R, NewCol.G, NewCol.B))
|
|
End Sub
|
|
|
|
Public ReadOnly Property CTSA10EnableCommand As ICommand
|
|
Get
|
|
If m_cmdCTSA10Enable Is Nothing Then
|
|
m_cmdCTSA10Enable = New Command(AddressOf CTSA10EnableChBx_Click)
|
|
End If
|
|
Return m_cmdCTSA10Enable
|
|
End Get
|
|
End Property
|
|
|
|
Private Sub CTSA10EnableChBx_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim Rvalue As String = (m_OptionWindowV.CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
|
|
Dim Gvalue As String = (m_OptionWindowV.CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
|
|
Dim Bvalue As String = (m_OptionWindowV.CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
|
|
' Costruisco la string RgbCTSA che corrisponderà al valore da scrivere nell'INI;
|
|
' in caso di valore null o " " verrà scritto nella stringa il valore 0 (o 1 nel caso dell'Enable)
|
|
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_OptionWindowV.CTSA10InclinazioneTxBx.Text), "0", m_OptionWindowV.CTSA10InclinazioneTxBx.Text) & "," &
|
|
If(String.IsNullOrWhiteSpace(m_sCTSA10TalloneText) OrElse m_sCTSA10TalloneText.Equals("-"), "0", m_sCTSA10TalloneText) & "," &
|
|
If(m_OptionWindowV.CTSA10EnableChBx.IsChecked, "1", "0")
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "10", RgbCTSA, m_sIniFile)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA10TalloneText As String
|
|
Public Property sCTSA10TalloneText As String
|
|
Get
|
|
Return m_sCTSA10TalloneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA10TalloneText Then
|
|
m_sCTSA10TalloneText = value
|
|
CTSA10TalloneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA10TalloneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA10TalloneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA10TalloneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA10TalloneText = ""
|
|
End Try
|
|
CTSA10EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
Private Property m_sCTSA10InclinazioneText As String
|
|
Public Property sCTSA10InclinazioneText As String
|
|
Get
|
|
Return m_sCTSA10InclinazioneText
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sCTSA10InclinazioneText Then
|
|
m_sCTSA10InclinazioneText = value
|
|
CTSA10InclinazioneTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub CTSA10InclinazioneTxBx_TextChanged(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
If (m_sCTSA10InclinazioneText <> "-") Then
|
|
i = Integer.Parse(m_sCTSA10InclinazioneText, Globalization.NumberStyles.Any)
|
|
End If
|
|
Catch ex As Exception
|
|
m_sCTSA10InclinazioneText = ""
|
|
End Try
|
|
CTSA10EnableChBx_Click(param)
|
|
End Sub
|
|
|
|
#End Region ' CTSA10 Parameters Commands
|
|
|
|
#Region "CTSAbox Enable"
|
|
|
|
Public ReadOnly Property CTSAboxEnableCommand As ICommand
|
|
Get
|
|
If m_cmdCTSAboxEnable Is Nothing Then
|
|
m_cmdCTSAboxEnable = New Command(AddressOf CTSAboxEnableChBx_Click)
|
|
End If
|
|
Return m_cmdCTSAboxEnable
|
|
End Get
|
|
End Property
|
|
|
|
Private Sub CTSAboxEnableChBx_Click(ByVal param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
If m_OptionWindowV.CTSAboxEnableChBx.IsChecked = True Then
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA_ENABLE, 1, m_sIniFile)
|
|
ElseIf m_OptionWindowV.CTSAboxEnableChBx.IsChecked = False Then
|
|
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA_ENABLE, 0, m_sIniFile)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' CTSAbox Enable
|
|
|
|
#Region "CTSAbox Tolerance"
|
|
|
|
Private Property m_sToleranceTxBx As String
|
|
Public Property sToleranceTxBx As String
|
|
Get
|
|
Return m_sToleranceTxBx
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sToleranceTxBx Then
|
|
m_sToleranceTxBx = value
|
|
ToleranceTxBx_TextChanged(value)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private Sub ToleranceTxBx_TextChanged(ByRef param As Object)
|
|
Dim m_OptionWindowV As OptionWindowV = DirectCast(Application.Current.Windows.OfType(Of OptionWindowV)().SingleOrDefault(), OptionWindowV)
|
|
Dim i As Integer = 0
|
|
Try
|
|
i = Integer.Parse(m_sToleranceTxBx, Globalization.NumberStyles.Any)
|
|
Catch ex As Exception
|
|
m_sToleranceTxBx = ""
|
|
End Try
|
|
WritePrivateProfileString(S_COLORTOSIDEANG,
|
|
K_CTSA_TOLERANCE,
|
|
If(String.IsNullOrWhiteSpace(m_sToleranceTxBx) OrElse m_sToleranceTxBx.Equals("-"), "0", m_sToleranceTxBx),
|
|
m_sIniFile)
|
|
End Sub
|
|
|
|
#End Region ' CTSAbox Tolerance
|
|
|
|
#End Region ' COMMANDS"
|
|
End Class
|