Files
OmagCUT/OptionsPageUC.xaml.vb
T
Renzo Lanza e22ad91318 OmagCUT:
- Aggiunta lettura Key ImportSlabDxf oltre al controllo su chiave per l'abilitazione del box SlabDxf
- Allungato il box Unità di misura
- Gestione 6° elemento (Enable) nella lettura dei vari CTSA nell'INI: se non c'è viene posto di default a 1
- Commenti
2019-06-12 10:39:03 +00:00

777 lines
44 KiB
VB.net

Imports EgtUILib
Public Class OptionsPageUC
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private UnitsList() As String = {"inch", "mm"}
Private Sub OptionsPageUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Associazione della lista linguaggi alla combobox
LanguageCmBx.ItemsSource = m_MainWindow.m_LanguagesList
' Associazione della lista unità di misura alla combobox
UnitsOfMeasureCmBx.ItemsSource = UnitsList
' Imposto la lingua corrente
LanguageCmBx.SelectedItem = m_MainWindow.m_CurrLanguage
' Imposto l'unità di misura corrente
UnitsOfMeasureCmBx.SelectedIndex = If(EgtUiUnitsAreMM(), 1, 0)
' Leggo se la modalità FastGrid è abilitata, e controllo bit su chiave
If GetPrivateProfileInt(S_FASTGRID, K_FG_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
FastGridGpBx.Visibility = Windows.Visibility.Visible
' Leggo se la modalità FastGrid è attiva
Dim bFgOn As Boolean = GetPrivateProfileInt(S_FASTGRID, K_FG_ACTIVE, 0, m_MainWindow.GetIniFile()) <> 0
EnableFastGridBtn.IsChecked = bFgOn
' Abilitazione importazione Dxf e pezzi parametrici
m_MainWindow.m_CadCutPageUC.DrawBtn.IsEnabled = Not bFgOn
m_MainWindow.m_CadCutPageUC.ImportBtn.IsEnabled = Not bFgOn
' Abilitazione Csv, Vein Matching e Registrazione
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.CSVBtn.IsEnabled = Not bFgOn
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.VeinMatchingBtn.IsEnabled = Not bFgOn
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.RegisterBtn.IsEnabled = Not bFgOn
Else
FastGridGpBx.Visibility = Windows.Visibility.Collapsed
' Attivo importazione Dxf e pezzi parametrici
m_MainWindow.m_CadCutPageUC.DrawBtn.IsEnabled = True
m_MainWindow.m_CadCutPageUC.ImportBtn.IsEnabled = True
' Attivo Csv, Vein Matching e Registrazione
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.CSVBtn.IsEnabled = True
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.VeinMatchingBtn.IsEnabled = True
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.RegisterBtn.IsEnabled = True
End If
' Leggo se il box SlabDxf è abilitato tramite:
' - controllo bit su chiave
' - lettura Key ImportSlabDxf nell'INI
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.IMPORT_SLABDXF) And
GetPrivateProfileInt(S_SLABDXF, K_IMPORTSLABDXF, 0, m_MainWindow.GetIniFile()) <> 0 Then
SlabGpBx.Visibility = Windows.Visibility.Visible
' Leggo parametri SlabDxf
Dim sVal As String = " "
GetPrivateProfileString(S_SLABDXF, K_SLABLAYER, " ", sVal, m_MainWindow.GetIniFile())
SlabLayerMsgTxBx.Text = sVal
GetPrivateProfileString(S_SLABDXF, K_PARTSLAYER, " ", sVal, m_MainWindow.GetIniFile())
PartsLayerMsgTxBx.Text = sVal
GetPrivateProfileString(S_SLABDXF, K_SCRAPLAYER, " ", sVal, m_MainWindow.GetIniFile())
ScrapLayerMsgTxBx.Text = sVal
GetPrivateProfileString(S_SLABDXF, K_STDTHICK, " ", sVal, m_MainWindow.GetIniFile())
StdThickMsgTxBx.Text = sVal
Else
SlabGpBx.Visibility = Windows.Visibility.Collapsed
End If
' Leggo se la modalità ColorToSideAng è abilitata
If GetPrivateProfileInt(S_COLORTOSIDEANG, K_CTSA_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
CTSAboxEnableChBx.IsChecked = True
Else
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_MainWindow.GetIniFile())
ToleranceMsgTxBx.Text = 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_MainWindow.GetIniFile()) <> 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
CTSA1EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
CTSA1Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
CTSA1InclinazioneTxBx.Text = sArray(3)
CTSA1TalloneTxBx.Text = sArray(4)
Case 2
CTSA2EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
CTSA2Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
CTSA2InclinazioneTxBx.Text = sArray(3)
CTSA2TalloneTxBx.Text = sArray(4)
Case 3
CTSA3EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
CTSA3Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
CTSA3InclinazioneTxBx.Text = sArray(3)
CTSA3TalloneTxBx.Text = sArray(4)
Case 4
CTSA4EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
CTSA4Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
CTSA4InclinazioneTxBx.Text = sArray(3)
CTSA4TalloneTxBx.Text = sArray(4)
Case 5
CTSA5EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
CTSA5Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
CTSA5InclinazioneTxBx.Text = sArray(3)
CTSA5TalloneTxBx.Text = sArray(4)
Case 6
CTSA6EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
CTSA6Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
CTSA6InclinazioneTxBx.Text = sArray(3)
CTSA6TalloneTxBx.Text = sArray(4)
Case 7
CTSA7EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
CTSA7Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
CTSA7InclinazioneTxBx.Text = sArray(3)
CTSA7TalloneTxBx.Text = sArray(4)
Case 8
CTSA8EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
CTSA8Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
CTSA8InclinazioneTxBx.Text = sArray(3)
CTSA8TalloneTxBx.Text = sArray(4)
Case 9
CTSA9EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
CTSA9Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
CTSA9InclinazioneTxBx.Text = sArray(3)
CTSA9TalloneTxBx.Text = sArray(4)
Case 10
CTSA10EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5).Equals("1"), True)
CTSA10Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
CTSA10InclinazioneTxBx.Text = sArray(3)
CTSA10TalloneTxBx.Text = sArray(4)
End Select
End If
Next
' Messaggi
LanguageGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 1)
LanguageMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 2)
UnitsOfMeasureGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 3)
FastGridGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 11)
FastGridTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 12)
SlabGpBx.Header = "Slab Dxf"
SlabLayerMsgTxBl.Text = "Slab Layer"
PartsLayerMsgTxBl.Text = "Parts Layer"
ScrapLayerMsgTxBl.Text = "Scrap Layer"
StdThickMsgTxBl.Text = "Std Thick"
ColorToSideAngGpBx.Header = "ColorToSideAng"
CTSAboxEnableMsgTxBl.Text = "Enable"
ToleranceMsgTxBl.Text = "Tolerance"
TalloneMsgTxBl.Text = "Tallone"
InclinazioneMsgTxBl.Text = "Inclinazione"
End Sub
Private Sub LanguageCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles LanguageCmBx.SelectionChanged
m_MainWindow.m_CurrLanguage = LanguageCmBx.SelectedItem
WritePrivateProfileString(S_GENERAL, K_MESSAGES, m_MainWindow.m_CurrLanguage.LanguageName, m_MainWindow.GetIniFile())
End Sub
Private Sub UnitsOfMeasureCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles UnitsOfMeasureCmBx.SelectionChanged
Dim bMM As Boolean = (UnitsOfMeasureCmBx.SelectedIndex <> 0)
EgtSetUiUnits(bMM)
m_MainWindow.m_CurrentProjectPageUC.UpdateHeightTxBx()
WritePrivateProfileString(S_GENERAL, K_MMUNITS, If(bMM, "1", "0"), m_MainWindow.GetIniFile())
End Sub
Private Sub EnableFastGridBtn_Checked(sender As Object, e As RoutedEventArgs) Handles EnableFastGridBtn.Checked
WritePrivateProfileString(S_FASTGRID, K_FG_ACTIVE, 1, m_MainWindow.GetIniFile())
' Disattivo importazione Dxf e pezzi parametrici
m_MainWindow.m_CadCutPageUC.DrawBtn.IsEnabled = False
m_MainWindow.m_CadCutPageUC.ImportBtn.IsEnabled = False
' Disattivo Csv, Vein Matching e Registrazione
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.CSVBtn.IsEnabled = False
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.VeinMatchingBtn.IsEnabled = False
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.RegisterBtn.IsEnabled = False
End Sub
Private Sub EnableFastGridBtn_Unchecked(sender As Object, e As RoutedEventArgs) Handles EnableFastGridBtn.Unchecked
WritePrivateProfileString(S_FASTGRID, K_FG_ACTIVE, 0, m_MainWindow.GetIniFile())
' Attivo importazione Dxf e pezzi parametrici
m_MainWindow.m_CadCutPageUC.DrawBtn.IsEnabled = True
m_MainWindow.m_CadCutPageUC.ImportBtn.IsEnabled = True
' Attivo Csv, Vein Matching e Registrazione
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.CSVBtn.IsEnabled = True
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.VeinMatchingBtn.IsEnabled = True
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.RegisterBtn.IsEnabled = True
End Sub
Private Sub CTSA1Btn_Click(sender As Object, e As RoutedEventArgs) Handles CTSA1Btn.Click
' Il click sul bottone aprirà la finestra ChooseColor che permetterà la scelta del colore
m_MainWindow.m_brCurrentColor = CTSA1Btn.Background
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA1Btn.Background = m_MainWindow.m_brCurrentColor
Dim Rvalue As String = (CTSA1Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA1Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (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(CTSA1InclinazioneTxBx.Text), "0", CTSA1InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA1TalloneTxBx.Text), "0", CTSA1TalloneTxBx.Text) & "," &
If(CTSA1EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "1", RgbCTSA, m_MainWindow.GetIniFile())
End If
End Sub
Private Sub CTSA2Btn_Click(sender As Object, e As RoutedEventArgs) Handles CTSA2Btn.Click
m_MainWindow.m_brCurrentColor = CTSA2Btn.Background
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA2Btn.Background = m_MainWindow.m_brCurrentColor
Dim Rvalue As String = (CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA2InclinazioneTxBx.Text), "0", CTSA2InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA2TalloneTxBx.Text), "0", CTSA2TalloneTxBx.Text) & "," &
If(CTSA2EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "2", RgbCTSA, m_MainWindow.GetIniFile())
End If
End Sub
Private Sub CTSA3Btn_Click(sender As Object, e As RoutedEventArgs) Handles CTSA3Btn.Click
m_MainWindow.m_brCurrentColor = CTSA3Btn.Background
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA3Btn.Background = m_MainWindow.m_brCurrentColor
Dim Rvalue As String = (CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA3InclinazioneTxBx.Text), "0", CTSA3InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA3TalloneTxBx.Text), "0", CTSA3TalloneTxBx.Text) & "," &
If(CTSA3EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "3", RgbCTSA, m_MainWindow.GetIniFile())
End If
End Sub
Private Sub CTSA4Btn_Click(sender As Object, e As RoutedEventArgs) Handles CTSA4Btn.Click
m_MainWindow.m_brCurrentColor = CTSA4Btn.Background
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA4Btn.Background = m_MainWindow.m_brCurrentColor
Dim Rvalue As String = (CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA4InclinazioneTxBx.Text), "0", CTSA4InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA4TalloneTxBx.Text), "0", CTSA4TalloneTxBx.Text) & "," &
If(CTSA4EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "4", RgbCTSA, m_MainWindow.GetIniFile())
End If
End Sub
Private Sub CTSA5Btn_Click(sender As Object, e As RoutedEventArgs) Handles CTSA5Btn.Click
m_MainWindow.m_brCurrentColor = CTSA5Btn.Background
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA5Btn.Background = m_MainWindow.m_brCurrentColor
Dim Rvalue As String = (CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA5InclinazioneTxBx.Text), "0", CTSA5InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA5TalloneTxBx.Text), "0", CTSA5TalloneTxBx.Text) & "," &
If(CTSA5EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "5", RgbCTSA, m_MainWindow.GetIniFile())
End If
End Sub
Private Sub CTSA6Btn_Click(sender As Object, e As RoutedEventArgs) Handles CTSA6Btn.Click
m_MainWindow.m_brCurrentColor = CTSA6Btn.Background
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA6Btn.Background = m_MainWindow.m_brCurrentColor
Dim Rvalue As String = (CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA6InclinazioneTxBx.Text), "0", CTSA6InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA6TalloneTxBx.Text), "0", CTSA6TalloneTxBx.Text) & "," &
If(CTSA6EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "6", RgbCTSA, m_MainWindow.GetIniFile())
End If
End Sub
Private Sub CTSA7Btn_Click(sender As Object, e As RoutedEventArgs) Handles CTSA7Btn.Click
m_MainWindow.m_brCurrentColor = CTSA7Btn.Background
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA7Btn.Background = m_MainWindow.m_brCurrentColor
Dim Rvalue As String = (CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA7InclinazioneTxBx.Text), "0", CTSA7InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA7TalloneTxBx.Text), "0", CTSA7TalloneTxBx.Text) & "," &
If(CTSA7EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "7", RgbCTSA, m_MainWindow.GetIniFile())
End If
End Sub
Private Sub CTSA8Btn_Click(sender As Object, e As RoutedEventArgs) Handles CTSA8Btn.Click
m_MainWindow.m_brCurrentColor = CTSA8Btn.Background
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA8Btn.Background = m_MainWindow.m_brCurrentColor
Dim Rvalue As String = (CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA8InclinazioneTxBx.Text), "0", CTSA8InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA8TalloneTxBx.Text), "0", CTSA8TalloneTxBx.Text) & "," &
If(CTSA8EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "8", RgbCTSA, m_MainWindow.GetIniFile())
End If
End Sub
Private Sub CTSA9Btn_Click(sender As Object, e As RoutedEventArgs) Handles CTSA9Btn.Click
m_MainWindow.m_brCurrentColor = CTSA9Btn.Background
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA9Btn.Background = m_MainWindow.m_brCurrentColor
Dim Rvalue As String = (CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA9InclinazioneTxBx.Text), "0", CTSA9InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA9TalloneTxBx.Text), "0", CTSA9TalloneTxBx.Text) & "," &
If(CTSA9EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "9", RgbCTSA, m_MainWindow.GetIniFile())
End If
End Sub
Private Sub CTSA10Btn_Click(sender As Object, e As RoutedEventArgs) Handles CTSA10Btn.Click
m_MainWindow.m_brCurrentColor = CTSA10Btn.Background
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA10Btn.Background = m_MainWindow.m_brCurrentColor
Dim Rvalue As String = (CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA10InclinazioneTxBx.Text), "0", CTSA10InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA10TalloneTxBx.Text), "0", CTSA10TalloneTxBx.Text) & "," &
If(CTSA10EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "10", RgbCTSA, m_MainWindow.GetIniFile())
End If
End Sub
Private Sub CTSA1EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA1EnableChBx.Click
Dim Rvalue As String = (CTSA1Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA1Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (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(CTSA1InclinazioneTxBx.Text), "0", CTSA1InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA1TalloneTxBx.Text), "0", CTSA1TalloneTxBx.Text) & "," &
If(CTSA1EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "1", RgbCTSA, m_MainWindow.GetIniFile())
End Sub
Private Sub CTSA2EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA2EnableChBx.Click
Dim Rvalue As String = (CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA2Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA2InclinazioneTxBx.Text), "0", CTSA2InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA2TalloneTxBx.Text), "0", CTSA2TalloneTxBx.Text) & "," &
If(CTSA2EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "2", RgbCTSA, m_MainWindow.GetIniFile())
End Sub
Private Sub CTSA3EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA3EnableChBx.Click
Dim Rvalue As String = (CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA3Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA3InclinazioneTxBx.Text), "0", CTSA3InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA3TalloneTxBx.Text), "0", CTSA3TalloneTxBx.Text) & "," &
If(CTSA3EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "3", RgbCTSA, m_MainWindow.GetIniFile())
End Sub
Private Sub CTSA4EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA4EnableChBx.Click
Dim Rvalue As String = (CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA4Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA4InclinazioneTxBx.Text), "0", CTSA4InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA4TalloneTxBx.Text), "0", CTSA4TalloneTxBx.Text) & "," &
If(CTSA4EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "4", RgbCTSA, m_MainWindow.GetIniFile())
End Sub
Private Sub CTSA5EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA5EnableChBx.Click
Dim Rvalue As String = (CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA5Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA5InclinazioneTxBx.Text), "0", CTSA5InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA5TalloneTxBx.Text), "0", CTSA5TalloneTxBx.Text) & "," &
If(CTSA5EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "5", RgbCTSA, m_MainWindow.GetIniFile())
End Sub
Private Sub CTSA6EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA6EnableChBx.Click
Dim Rvalue As String = (CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA6Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA6InclinazioneTxBx.Text), "0", CTSA6InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA6TalloneTxBx.Text), "0", CTSA6TalloneTxBx.Text) & "," &
If(CTSA6EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "6", RgbCTSA, m_MainWindow.GetIniFile())
End Sub
Private Sub CTSA7EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA7EnableChBx.Click
Dim Rvalue As String = (CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA7Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA7InclinazioneTxBx.Text), "0", CTSA7InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA7TalloneTxBx.Text), "0", CTSA7TalloneTxBx.Text) & "," &
If(CTSA7EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "7", RgbCTSA, m_MainWindow.GetIniFile())
End Sub
Private Sub CTSA8EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA8EnableChBx.Click
Dim Rvalue As String = (CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA8Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA8InclinazioneTxBx.Text), "0", CTSA8InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA8TalloneTxBx.Text), "0", CTSA8TalloneTxBx.Text) & "," &
If(CTSA8EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "8", RgbCTSA, m_MainWindow.GetIniFile())
End Sub
Private Sub CTSA9EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA9EnableChBx.Click
Dim Rvalue As String = (CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA9Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA9InclinazioneTxBx.Text), "0", CTSA9InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA9TalloneTxBx.Text), "0", CTSA9TalloneTxBx.Text) & "," &
If(CTSA9EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "9", RgbCTSA, m_MainWindow.GetIniFile())
End Sub
Private Sub CTSA10EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA10EnableChBx.Click
Dim Rvalue As String = (CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (CTSA10Btn.Background.GetValue(SolidColorBrush.ColorProperty)).B
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(CTSA10InclinazioneTxBx.Text), "0", CTSA10InclinazioneTxBx.Text) & "," &
If(String.IsNullOrWhiteSpace(CTSA10TalloneTxBx.Text), "0", CTSA10TalloneTxBx.Text) & "," &
If(CTSA10EnableChBx.IsChecked, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & "10", RgbCTSA, m_MainWindow.GetIniFile())
End Sub
Dim i As Integer = 0
Private Sub CTSA1TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA1TalloneTxBx.TextChanged
Try
If (CTSA1TalloneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA1TalloneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA1TalloneTxBx.Text = ""
End Try
CTSA1EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA2TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA2TalloneTxBx.TextChanged
Try
If (CTSA2TalloneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA1TalloneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA2TalloneTxBx.Text = ""
End Try
CTSA2EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA3TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA3TalloneTxBx.TextChanged
Try
If (CTSA3TalloneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA3TalloneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA3TalloneTxBx.Text = ""
End Try
CTSA3EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA4TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA4TalloneTxBx.TextChanged
Try
If (CTSA4TalloneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA4TalloneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA4TalloneTxBx.Text = ""
End Try
CTSA4EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA5TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA5TalloneTxBx.TextChanged
Try
If (CTSA5TalloneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA5TalloneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA5TalloneTxBx.Text = ""
End Try
CTSA5EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA6TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA6TalloneTxBx.TextChanged
Try
If (CTSA6TalloneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA6TalloneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA6TalloneTxBx.Text = ""
End Try
CTSA6EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA7TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA7TalloneTxBx.TextChanged
Try
If (CTSA7TalloneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA7TalloneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA7TalloneTxBx.Text = ""
End Try
CTSA7EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA8TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA8TalloneTxBx.TextChanged
Try
If (CTSA8TalloneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA8TalloneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA8TalloneTxBx.Text = ""
End Try
CTSA8EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA9TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA9TalloneTxBx.TextChanged
Try
If (CTSA9TalloneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA9TalloneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA9TalloneTxBx.Text = ""
End Try
CTSA9EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA10TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA10TalloneTxBx.TextChanged
Try
If (CTSA10TalloneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA10TalloneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA10TalloneTxBx.Text = ""
End Try
CTSA10EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA1InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA1InclinazioneTxBx.TextChanged
Try
If (CTSA1InclinazioneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA1InclinazioneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA1InclinazioneTxBx.Text = ""
End Try
CTSA1EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA2InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA2InclinazioneTxBx.TextChanged
Try
If (CTSA2InclinazioneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA1InclinazioneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA2InclinazioneTxBx.Text = ""
End Try
CTSA2EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA3InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA3InclinazioneTxBx.TextChanged
Try
If (CTSA3InclinazioneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA3InclinazioneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA3InclinazioneTxBx.Text = ""
End Try
CTSA3EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA4InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA4InclinazioneTxBx.TextChanged
Try
If (CTSA4InclinazioneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA4InclinazioneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA4InclinazioneTxBx.Text = ""
End Try
CTSA4EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA5InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA5InclinazioneTxBx.TextChanged
Try
If (CTSA5InclinazioneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA5InclinazioneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA5InclinazioneTxBx.Text = ""
End Try
CTSA5EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA6InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA6InclinazioneTxBx.TextChanged
Try
If (CTSA6InclinazioneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA6InclinazioneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA6InclinazioneTxBx.Text = ""
End Try
CTSA6EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA7InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA7InclinazioneTxBx.TextChanged
Try
If (CTSA7InclinazioneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA7InclinazioneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA7InclinazioneTxBx.Text = ""
End Try
CTSA7EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA8InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA8InclinazioneTxBx.TextChanged
Try
If (CTSA8InclinazioneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA8InclinazioneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA8InclinazioneTxBx.Text = ""
End Try
CTSA8EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA9InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA9InclinazioneTxBx.TextChanged
Try
If (CTSA9InclinazioneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA9InclinazioneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA9InclinazioneTxBx.Text = ""
End Try
CTSA9EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA10InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA10InclinazioneTxBx.TextChanged
Try
If (CTSA10InclinazioneTxBx.Text <> "-") Then
i = Integer.Parse(CTSA10InclinazioneTxBx.Text, Globalization.NumberStyles.Any)
End If
Catch ex As Exception
CTSA10InclinazioneTxBx.Text = ""
End Try
CTSA10EnableChBx_Click(sender, e)
End Sub
Private Sub ToleranceMsgTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles ToleranceMsgTxBx.TextChanged
Try
i = Integer.Parse(ToleranceMsgTxBx.Text, Globalization.NumberStyles.Any)
Catch ex As Exception
ToleranceMsgTxBx.Text = ""
End Try
WritePrivateProfileString(
S_COLORTOSIDEANG,
K_CTSA_TOLERANCE,
If(String.IsNullOrWhiteSpace(ToleranceMsgTxBx.Text), "0", ToleranceMsgTxBx.Text),
m_MainWindow.GetIniFile())
End Sub
Private Sub SlabLayerMsgTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles SlabLayerMsgTxBx.TextChanged
WritePrivateProfileString(S_SLABDXF, K_SLABLAYER, SlabLayerMsgTxBx.Text, m_MainWindow.GetIniFile())
End Sub
Private Sub PartsLayerMsgTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles PartsLayerMsgTxBx.TextChanged
WritePrivateProfileString(S_SLABDXF, K_PARTSLAYER, PartsLayerMsgTxBx.Text, m_MainWindow.GetIniFile())
End Sub
Private Sub ScrapLayerMsgTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles ScrapLayerMsgTxBx.TextChanged
WritePrivateProfileString(S_SLABDXF, K_SCRAPLAYER, ScrapLayerMsgTxBx.Text, m_MainWindow.GetIniFile())
End Sub
Private Sub StdThickMsgTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles StdThickMsgTxBx.TextChanged
Try
i = Integer.Parse(StdThickMsgTxBx.Text, Globalization.NumberStyles.Any)
Catch ex As Exception
StdThickMsgTxBx.Text = ""
End Try
WritePrivateProfileString(
S_SLABDXF,
K_STDTHICK,
If(String.IsNullOrWhiteSpace(StdThickMsgTxBx.Text), "0", StdThickMsgTxBx.Text),
m_MainWindow.GetIniFile())
End Sub
Private Sub CTSAboxEnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSAboxEnableChBx.Click
If CTSAboxEnableChBx.IsChecked = True Then
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA_ENABLE, 1, m_MainWindow.GetIniFile())
ElseIf CTSAboxEnableChBx.IsChecked = False Then
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA_ENABLE, 0, m_MainWindow.GetIniFile())
End If
End Sub
End Class