OmagCUT 2.1h1 :

- Aggiunti Dizionari per i temi e ComboBox in OptionsPageUC per il cambio dei temi. Questa versione di OmagCUT funziona esattamente come la precedente, come se non ci fossero i temi, perché la scelta dei temi è nascosta (ThemesGpBx.Visibility = Windows.Visibility.Collapsed in OptionsPageUC.xaml.vb)
This commit is contained in:
Renzo Lanza
2019-08-01 08:44:35 +00:00
parent 5ea20f2db5
commit bfd3f21e25
11 changed files with 3112 additions and 113 deletions
+15 -3
View File
@@ -3,8 +3,20 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml" ShutdownMode="OnMainWindowClose" >
<Application.Resources>
<ResourceDictionary Source="OmagCUTDictionary.xaml"/>
</Application.Resources>
<Application.Resources>
<!--<ResourceDictionary Source="OmagCUTDictionary.xaml"/>-->
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary x:Name="ThemeDictionary">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="OmagCUTTestDictionary.xaml"/>
<ResourceDictionary Source="OmagCUTAlternativeDictionary.xaml"/>
<ResourceDictionary Source="OmagCUTDictionary.xaml"/>
<!--<ResourceDictionary Source="OmagCUTClassicDictionary.xaml"/>-->
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
+18 -2
View File
@@ -2,8 +2,8 @@
Class Application
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
'Protected Overrides Sub OnStartup(e As StartupEventArgs)
' MyBase.OnStartup(e)
@@ -44,4 +44,20 @@ Class Application
' thisDpiHeightFactor = m.M22
'End Sub
Public Property ThemeDictionary As ResourceDictionary
' You could probably get it via its name with some query logic as well.
Get
Return Resources.MergedDictionaries(0)
End Get
Set(value As ResourceDictionary)
End Set
End Property
Public Sub ChangeTheme(uri As Uri)
ThemeDictionary.MergedDictionaries.Clear()
Dim rd As ResourceDictionary = New ResourceDictionary()
rd.Source = uri
ThemeDictionary.MergedDictionaries.Add(rd) ' New ResourceDictionary()) ' Source:=uri))
End Sub
End Class
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.1.7.4")>
<Assembly: AssemblyFileVersion("2.1.7.4")>
<Assembly: AssemblyVersion("2.1.8.1")>
<Assembly: AssemblyFileVersion("2.1.8.1")>
+15
View File
@@ -226,6 +226,9 @@
<Compile Include="FrameMachiningUC.xaml.vb">
<DependentUpon>FrameMachiningUC.xaml</DependentUpon>
</Compile>
<Compile Include="OmagCUTAlternativeDictionary.xaml.vb">
<DependentUpon>OmagCUTAlternativeDictionary.xaml</DependentUpon>
</Compile>
<Compile Include="SideAngle.vb" />
<Compile Include="UnderDrillUC.xaml.vb">
<DependentUpon>UnderDrillUC.xaml</DependentUpon>
@@ -420,6 +423,18 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OmagCUTAlternativeDictionary.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OmagCUTClassicDictionary.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="OmagCUTTestDictionary.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UnderDrillUC.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
File diff suppressed because it is too large Load Diff
+310
View File
@@ -0,0 +1,310 @@
Imports System.Collections.ObjectModel
Imports System.ComponentModel
Partial Class OmagCUTAlternativeDictionary
Inherits ResourceDictionary
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
' Evento della TextBox con Style che permette di aprire in automatico la calcolatrice
'Friend Sub NumericKeyboard_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
' ' Recupero dati da sorgente
' Dim sTitle As String = String.Empty
' Dim sText As String = String.Empty
' Dim TxBx As TextBox = CType(e.Source, TextBox)
' If Not IsNothing(TxBx) Then
' sText = TxBx.Text
' Dim AssocLabel As Label = TxBx.Tag
' If Not IsNothing(AssocLabel) Then
' sTitle = AssocLabel.Content
' End If
' End If
' ' Creo calcolatrice
' Dim NumericKeyboardWD As New NumericKeyboardWD(sTitle, sText, e.Source)
' ' La visualizzo
' NumericKeyboardWD.ShowDialog()
'End Sub
' Evento della TextBox con Style che permette di aggiornare in automatico il componente con il nuovo valore
'Private Sub NumericKeyboard_TextChanged(sender As Object, e As TextChangedEventArgs)
' Select Case m_MainWindow.m_ActivePage
' Case MainWindow.Pages.Draw
' If Not m_MainWindow.m_DrawPageUC.m_bShowVar Then
' m_MainWindow.m_DrawPageUC.UpdateView()
' End If
' Case MainWindow.Pages.RawPart
' If Not m_MainWindow.m_RawPartPage.m_bShowVar Then
' m_MainWindow.m_RawPartPage.UpdateRawPart()
' End If
' End Select
'End Sub
End Class
Namespace TreeViewItem
Public Class AlternativeCathegoryItem
Inherits AlternativeTreeViewItemBase
'Private m_sTitle As String
Private m_sPictureString As String
Private m_nFType As Integer
Private m_Items As ObservableCollection(Of CustomItem)
'Public Property Name As String
' Get
' Return m_sTitle
' End Get
' Set(value As String)
' m_sTitle = value
' End Set
'End Property
Public ReadOnly Property PictureString As String
Get
Return "/Resources/ToolsTreeViewImages/Folder.png"
End Get
End Property
Public ReadOnly Property nFType As Integer
Get
Return m_nFType
End Get
End Property
Public Property Items As ObservableCollection(Of CustomItem)
Get
Return m_Items
End Get
Set(value As ObservableCollection(Of CustomItem))
m_Items = value
End Set
End Property
Sub New(sName As String, nType As Integer)
Name = sName
m_nFType = nType
Me.Items = New ObservableCollection(Of CustomItem)
End Sub
End Class
Public Class ALternativeCustomItem
Inherits AlternativeTreeViewItemBase
'Private m_sTitle As String
Private m_nType As Integer
'Public Property Name As String
' Get
' Return m_sTitle
' End Get
' Set(value As String)
' m_sTitle = value
' End Set
'End Property
Public ReadOnly Property nType As Integer
Get
Return m_nType
End Get
End Property
Sub New(Title As String, nType As Integer)
Me.Name = Title
m_nType = nType
End Sub
End Class
Public Class AlternativePartCathegoryItem
Inherits AlternativeTreeViewItemBase
Private m_nFType As Integer
Private m_Items As ObservableCollection(Of PartCustomItem)
Public ReadOnly Property PictureString As String
Get
Return "/Resources/ToolsTreeViewImages/Folder.png"
End Get
End Property
Public ReadOnly Property nFType As Integer
Get
Return m_nFType
End Get
End Property
Public Property Items As ObservableCollection(Of PartCustomItem)
Get
Return m_Items
End Get
Set(value As ObservableCollection(Of PartCustomItem))
m_Items = value
End Set
End Property
Sub New(sName As String, nType As Integer)
Name = sName
m_nFType = nType
Me.Items = New ObservableCollection(Of PartCustomItem)
End Sub
End Class
Public Class AlternativePartCustomItem
Inherits AlternativeTreeViewItemBase
Private m_nType As Integer
Private m_bIsActive As Boolean
Private m_sText1 As String
Private m_sText2 As String
Public Property sText1 As String
Get
Return m_sText1
End Get
Set(value As String)
m_sText1 = value
NotifyPropertyChanged("sText1")
End Set
End Property
Public Property sText2 As String
Get
Return m_sText2
End Get
Set(value As String)
m_sText2 = value
NotifyPropertyChanged("sText2")
End Set
End Property
Public ReadOnly Property nType As Integer
Get
Return m_nType
End Get
End Property
Public Property bIsActive As Boolean
Get
Return m_bIsActive
End Get
Set(value As Boolean)
If value <> m_bIsActive Then
m_bIsActive = value
NotifyPropertyChanged("bIsActive")
End If
End Set
End Property
Sub New(Title As String, nType As Integer, sText1 As String, sText2 As String)
Me.Name = Title
m_nType = nType
m_sText1 = sText1
m_sText2 = sText2
m_bIsActive = True
End Sub
Sub New(Title As String, nType As Integer, sText1 As String, sText2 As String, bIsActive As Boolean)
Me.Name = Title
m_nType = nType
m_sText1 = sText1
m_sText2 = sText2
m_bIsActive = bIsActive
End Sub
End Class
Public Class AlternativeTreeViewItemBase
Implements INotifyPropertyChanged
Private m_Name As String
Public Property Name As String
Get
Return m_Name
End Get
Set(value As String)
If (value <> m_Name) Then
m_Name = value
NotifyPropertyChanged("Name")
End If
End Set
End Property
Private m_isSelected As Boolean
Public Property IsSelected As Boolean
Get
Return m_isSelected
End Get
Set(value As Boolean)
If (value <> m_isSelected) Then
m_isSelected = value
NotifyPropertyChanged("IsSelected")
End If
End Set
End Property
Private m_isExpanded As Boolean
Public Property IsExpanded As Boolean
Get
Return m_isExpanded
End Get
Set(value As Boolean)
If (value <> m_isExpanded) Then
m_isExpanded = value
NotifyPropertyChanged("IsExpanded")
End If
End Set
End Property
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
Public Sub NotifyPropertyChanged(propName As String)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
End Sub
End Class
End Namespace
Namespace ArithmeticConverterNameSpace
Public Class AlternativeCheckboxConverter
Implements IMultiValueConverter
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IMultiValueConverter.Convert
If values.Length <> 2 Then
Throw New ArgumentException("There should be three values.")
End If
If String.IsNullOrEmpty(values(0).ToString) Then
values(0) = "0"
End If
If String.IsNullOrEmpty(values(1).ToString()) Then
values(2) = "0"
End If
Dim x As Double
If Not Double.TryParse(values(0).ToString(), x) Then
Throw New ArgumentException("values[0] must parse to double")
End If
Dim y As Double
If Not Double.TryParse(values(1).ToString(), y) Then
Throw New ArgumentException("values[0] must parse to double")
End If
Return (x / y) - 1
End Function
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As Globalization.CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
End Namespace
+22
View File
@@ -0,0 +1,22 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:project="clr-namespace:OmagCUT"
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
xmlns:local="clr-namespace:OmagCUT.ArithmeticConverterNameSpace"
x:Class="OmagCUTClassicDictionary">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="OmagCUTDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
<!--Button generico-->
<Style x:Key="OmagCut_Button2" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<!--<Setter Property="Background" Value="ForestGreen"/>-->
</Style>
</ResourceDictionary>
+1 -1
View File
@@ -563,7 +563,7 @@
<!--GroupBox-->
<DataTemplate x:Key="GroupBoxHeaderTemplate">
<TextBlock Text="{Binding}" FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
<TextBlock Text="{Binding}" FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
</DataTemplate>
<Style x:Key="OmagCut_GroupBox" TargetType="{x:Type GroupBox}" BasedOn="{StaticResource {x:Type GroupBox}}">
+54
View File
@@ -0,0 +1,54 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:project="clr-namespace:OmagCUT"
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
xmlns:local="clr-namespace:OmagCUT.ArithmeticConverterNameSpace"
x:Class="OmagCUTTestDictionary">
<!--Importo EgtDictionary--><!--
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="EgtDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>-->
<!--Importo EgtDictionary-->
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="OmagCUTDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
<system:Double x:Key="Button_CornerRadius">9.5</system:Double>
<!--2.5mm-->
<Thickness x:Key="BorderThickness">3.3</Thickness>
<SolidColorBrush x:Key="OmagCut_Gray" Color="Azure" />
<!--Button generico-->
<Style x:Key="OmagCut_Button2" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<!--<Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
<Setter Property="ControlExtensions:ToggleButtonExtensions.CornerRadius" Value="{StaticResource Button_CornerRadius}"/>-->
<!--<Setter Property="BorderBrush" Value="Yellow" />-->
<!--<Setter Property="Background" Value="#4A4F55"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#145994"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#E1B957"/>
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="True">
<Setter Property="Background" Value="#656975"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#3C3F48"/>
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
</Trigger>
</Style.Triggers>-->
</Style>
</ResourceDictionary>
+35 -6
View File
@@ -353,6 +353,35 @@
</GroupBox>
<GroupBox Name="ThemesGpBx"
Grid.Column="1"
Grid.Row="5"
Grid.ColumnSpan="2"
Style="{StaticResource OmagCut_GroupBox}">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
</Grid.RowDefinitions>
<ComboBox Name="ThemesCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</GroupBox>
<GroupBox Name="FeedbackGpBx"
Grid.Column="4" Grid.RowSpan="3" Grid.ColumnSpan="1"
Style="{StaticResource OmagCut_GroupBox}">
@@ -362,13 +391,13 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.25*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<Button Name="FeedbackBtn"
<Button Name="FeedbackBtn"
Grid.Row="1" Grid.Column="1"
Style="{StaticResource OmagCut_YellowIconButton}">
<Image Source="Resources/Send.png" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
+116 -99
View File
@@ -7,6 +7,7 @@ Public Class OptionsPageUC
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private UnitsList() As String = {"inch", "mm"}
Private ThemesList() As String = {"OmagCUT Classic", "OmagCUT Alternative", "OmagCUT Test"}
Private Sub OptionsPageUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
@@ -14,6 +15,8 @@ Public Class OptionsPageUC
LanguageCmBx.ItemsSource = m_MainWindow.m_LanguagesList
' Associazione della lista unità di misura alla combobox
UnitsOfMeasureCmBx.ItemsSource = UnitsList
' Associazione della lista temi alla combobox
ThemesCmBx.ItemsSource = ThemesList
' Imposto la lingua corrente
LanguageCmBx.SelectedItem = m_MainWindow.m_CurrLanguage
@@ -21,6 +24,12 @@ Public Class OptionsPageUC
' Imposto l'unità di misura corrente
UnitsOfMeasureCmBx.SelectedIndex = If(EgtUiUnitsAreMM(), 1, 0)
' Imposto il tema corrente
ThemesCmBx.SelectedIndex = 0
' Rendo invisibile il GroupBox dei Temi la versione corrente
ThemesGpBx.Visibility = Windows.Visibility.Collapsed
' 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
@@ -82,6 +91,7 @@ Public Class OptionsPageUC
TalloneMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 22)
InclinazioneMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 23)
FeedbackGpBx.Header = "Feedback"
ThemesGpBx.Header = "Temi"
End Sub
@@ -97,13 +107,13 @@ Public Class OptionsPageUC
GetPrivateProfileString(S_SLABDXF, K_SCRAPLAYER, " ", sVal, m_MainWindow.GetIniFile())
ScrapLayerMsgTxBx.Text = sVal
GetPrivateProfileString(S_SLABDXF, K_STDTHICK, " ", sVal, m_MainWindow.GetIniFile())
Dim dThick As Double : If Not StringToDouble( sVal, dThick) Then dThick = 0
StdThickMsgTxBx.Text = LenToString( dThick, 4)
Dim dThick As Double : If Not StringToDouble(sVal, dThick) Then dThick = 0
StdThickMsgTxBx.Text = LenToString(dThick, 4)
End Sub
Private Sub UpdateAllCSTA()
Private Sub UpdateAllCSTA()
' Leggo se la modalità ColorToSideAng è abilitata
CTSAboxEnableChBx.IsChecked = ( GetPrivateProfileInt( S_COLORTOSIDEANG, K_CTSA_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0)
CTSAboxEnableChBx.IsChecked = (GetPrivateProfileInt(S_COLORTOSIDEANG, K_CTSA_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0)
' I parametri di ColorSideToAng presenti nell'INI vengono caricati a prescindere dall'abilitazione
Dim nTol As Integer = GetPrivateProfileInt(S_COLORTOSIDEANG, K_CTSA_TOLERANCE, 0, m_MainWindow.GetIniFile())
@@ -120,62 +130,62 @@ Public Class OptionsPageUC
CTSA1EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5) = "1", True)
CTSA1Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
CTSA1InclinazioneTxBx.Text = sArray(3)
Dim dHeel As Double : If Not StringToDouble( sArray(4), dHeel) Then dHeel = 0
CTSA1TalloneTxBx.Text = LenToString( dHeel, 4)
Dim dHeel As Double : If Not StringToDouble(sArray(4), dHeel) Then dHeel = 0
CTSA1TalloneTxBx.Text = LenToString(dHeel, 4)
Case 2
CTSA2EnableChBx.IsChecked = If(sArray.Length > 5, sArray(5) = "1", True)
CTSA2Btn.Background = New SolidColorBrush(Color.FromArgb(255, sArray(0), sArray(1), sArray(2)))
CTSA2InclinazioneTxBx.Text = sArray(3)
Dim dHeel As Double : If Not StringToDouble( sArray(4), dHeel) Then dHeel = 0
CTSA2TalloneTxBx.Text = LenToString( dHeel, 4)
Dim dHeel As Double : If Not StringToDouble(sArray(4), dHeel) Then dHeel = 0
CTSA2TalloneTxBx.Text = LenToString(dHeel, 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)
Dim dHeel As Double : If Not StringToDouble( sArray(4), dHeel) Then dHeel = 0
CTSA3TalloneTxBx.Text = LenToString( dHeel, 4)
Dim dHeel As Double : If Not StringToDouble(sArray(4), dHeel) Then dHeel = 0
CTSA3TalloneTxBx.Text = LenToString(dHeel, 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)
Dim dHeel As Double : If Not StringToDouble( sArray(4), dHeel) Then dHeel = 0
CTSA4TalloneTxBx.Text = LenToString( dHeel, 4)
Dim dHeel As Double : If Not StringToDouble(sArray(4), dHeel) Then dHeel = 0
CTSA4TalloneTxBx.Text = LenToString(dHeel, 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)
Dim dHeel As Double : If Not StringToDouble( sArray(4), dHeel) Then dHeel = 0
CTSA5TalloneTxBx.Text = LenToString( dHeel, 4)
Dim dHeel As Double : If Not StringToDouble(sArray(4), dHeel) Then dHeel = 0
CTSA5TalloneTxBx.Text = LenToString(dHeel, 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)
Dim dHeel As Double : If Not StringToDouble( sArray(4), dHeel) Then dHeel = 0
CTSA6TalloneTxBx.Text = LenToString( dHeel, 4)
Dim dHeel As Double : If Not StringToDouble(sArray(4), dHeel) Then dHeel = 0
CTSA6TalloneTxBx.Text = LenToString(dHeel, 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)
Dim dHeel As Double : If Not StringToDouble( sArray(4), dHeel) Then dHeel = 0
CTSA7TalloneTxBx.Text = LenToString( dHeel, 4)
Dim dHeel As Double : If Not StringToDouble(sArray(4), dHeel) Then dHeel = 0
CTSA7TalloneTxBx.Text = LenToString(dHeel, 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)
Dim dHeel As Double : If Not StringToDouble( sArray(4), dHeel) Then dHeel = 0
CTSA8TalloneTxBx.Text = LenToString( dHeel, 4)
Dim dHeel As Double : If Not StringToDouble(sArray(4), dHeel) Then dHeel = 0
CTSA8TalloneTxBx.Text = LenToString(dHeel, 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)
Dim dHeel As Double : If Not StringToDouble( sArray(4), dHeel) Then dHeel = 0
CTSA9TalloneTxBx.Text = LenToString( dHeel, 4)
Dim dHeel As Double : If Not StringToDouble(sArray(4), dHeel) Then dHeel = 0
CTSA9TalloneTxBx.Text = LenToString(dHeel, 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)
Dim dHeel As Double : If Not StringToDouble( sArray(4), dHeel) Then dHeel = 0
CTSA10TalloneTxBx.Text = LenToString( dHeel, 4)
Dim dHeel As Double : If Not StringToDouble(sArray(4), dHeel) Then dHeel = 0
CTSA10TalloneTxBx.Text = LenToString(dHeel, 4)
End Select
End If
Next
@@ -196,6 +206,13 @@ Public Class OptionsPageUC
UpdateAllCSTA()
End Sub
Private Sub ThemesCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ThemesCmBx.SelectionChanged
Dim app As Application = Application.Current
If (ThemesCmBx.SelectedIndex = 0) Then app.ChangeTheme(New Uri("/OmagCUT;component/OmagCUTClassicDictionary.xaml", UriKind.Relative))
If (ThemesCmBx.SelectedIndex = 1) Then app.ChangeTheme(New Uri("/OmagCUT;component/OmagCUTAlternativeDictionary.xaml", UriKind.Relative))
If (ThemesCmBx.SelectedIndex = 2) Then app.ChangeTheme(New Uri("/OmagCUT;component/OmagCUTTestDictionary.xaml", UriKind.Relative))
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
@@ -218,21 +235,21 @@ Public Class OptionsPageUC
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.RegisterBtn.IsEnabled = True
End Sub
Private Sub WriteCTSA( BtnCol As Button, sInc As String, sTall As String, bCheck As Boolean, nInd As Integer)
Private Sub WriteCTSA(BtnCol As Button, sInc As String, sTall As String, bCheck As Boolean, nInd As Integer)
Dim Rvalue As String = (BtnCol.Background.GetValue(SolidColorBrush.ColorProperty)).R
Dim Gvalue As String = (BtnCol.Background.GetValue(SolidColorBrush.ColorProperty)).G
Dim Bvalue As String = (BtnCol.Background.GetValue(SolidColorBrush.ColorProperty)).B
Dim dAng As Double : If Not StringToDouble( sInc, dAng) Then dAng = 0
Dim dHeel As Double : If Not StringToLen( sTall, dHeel) Then dHeel = 0
Dim dAng As Double : If Not StringToDouble(sInc, dAng) Then dAng = 0
Dim dHeel As Double : If Not StringToLen(sTall, dHeel) Then dHeel = 0
' 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) & "," &
DoubleToString( dAng, 1) & "," &
DoubleToString( dHeel, 4) & "," &
If( bCheck, "1", "0")
WritePrivateProfileString( S_COLORTOSIDEANG, K_CTSA & nInd.ToString(), RgbCTSA, m_MainWindow.GetIniFile())
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue) & "," &
DoubleToString(dAng, 1) & "," &
DoubleToString(dHeel, 4) & "," &
If(bCheck, "1", "0")
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA & nInd.ToString(), RgbCTSA, m_MainWindow.GetIniFile())
End Sub
Private Sub CTSA1Btn_Click(sender As Object, e As RoutedEventArgs) Handles CTSA1Btn.Click
@@ -241,7 +258,7 @@ Public Class OptionsPageUC
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA1Btn.Background = m_MainWindow.m_brCurrentColor
WriteCTSA( CTSA1Btn, CTSA1InclinazioneTxBx.Text, CTSA1TalloneTxBx.Text, CTSA1EnableChBx.IsChecked, 1)
WriteCTSA(CTSA1Btn, CTSA1InclinazioneTxBx.Text, CTSA1TalloneTxBx.Text, CTSA1EnableChBx.IsChecked, 1)
End If
End Sub
@@ -250,7 +267,7 @@ Public Class OptionsPageUC
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA2Btn.Background = m_MainWindow.m_brCurrentColor
WriteCTSA( CTSA2Btn, CTSA2InclinazioneTxBx.Text, CTSA2TalloneTxBx.Text, CTSA2EnableChBx.IsChecked, 2)
WriteCTSA(CTSA2Btn, CTSA2InclinazioneTxBx.Text, CTSA2TalloneTxBx.Text, CTSA2EnableChBx.IsChecked, 2)
End If
End Sub
@@ -259,7 +276,7 @@ Public Class OptionsPageUC
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA3Btn.Background = m_MainWindow.m_brCurrentColor
WriteCTSA( CTSA3Btn, CTSA3InclinazioneTxBx.Text, CTSA3TalloneTxBx.Text, CTSA3EnableChBx.IsChecked, 3)
WriteCTSA(CTSA3Btn, CTSA3InclinazioneTxBx.Text, CTSA3TalloneTxBx.Text, CTSA3EnableChBx.IsChecked, 3)
End If
End Sub
@@ -268,7 +285,7 @@ Public Class OptionsPageUC
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA4Btn.Background = m_MainWindow.m_brCurrentColor
WriteCTSA( CTSA4Btn, CTSA4InclinazioneTxBx.Text, CTSA4TalloneTxBx.Text, CTSA4EnableChBx.IsChecked, 4)
WriteCTSA(CTSA4Btn, CTSA4InclinazioneTxBx.Text, CTSA4TalloneTxBx.Text, CTSA4EnableChBx.IsChecked, 4)
End If
End Sub
@@ -277,7 +294,7 @@ Public Class OptionsPageUC
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA5Btn.Background = m_MainWindow.m_brCurrentColor
WriteCTSA( CTSA5Btn, CTSA5InclinazioneTxBx.Text, CTSA5TalloneTxBx.Text, CTSA5EnableChBx.IsChecked, 5)
WriteCTSA(CTSA5Btn, CTSA5InclinazioneTxBx.Text, CTSA5TalloneTxBx.Text, CTSA5EnableChBx.IsChecked, 5)
End If
End Sub
@@ -286,7 +303,7 @@ Public Class OptionsPageUC
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA6Btn.Background = m_MainWindow.m_brCurrentColor
WriteCTSA( CTSA6Btn, CTSA6InclinazioneTxBx.Text, CTSA6TalloneTxBx.Text, CTSA6EnableChBx.IsChecked, 6)
WriteCTSA(CTSA6Btn, CTSA6InclinazioneTxBx.Text, CTSA6TalloneTxBx.Text, CTSA6EnableChBx.IsChecked, 6)
End If
End Sub
@@ -295,7 +312,7 @@ Public Class OptionsPageUC
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA7Btn.Background = m_MainWindow.m_brCurrentColor
WriteCTSA( CTSA7Btn, CTSA7InclinazioneTxBx.Text, CTSA7TalloneTxBx.Text, CTSA7EnableChBx.IsChecked, 7)
WriteCTSA(CTSA7Btn, CTSA7InclinazioneTxBx.Text, CTSA7TalloneTxBx.Text, CTSA7EnableChBx.IsChecked, 7)
End If
End Sub
@@ -304,7 +321,7 @@ Public Class OptionsPageUC
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA8Btn.Background = m_MainWindow.m_brCurrentColor
WriteCTSA( CTSA8Btn, CTSA8InclinazioneTxBx.Text, CTSA8TalloneTxBx.Text, CTSA8EnableChBx.IsChecked, 8)
WriteCTSA(CTSA8Btn, CTSA8InclinazioneTxBx.Text, CTSA8TalloneTxBx.Text, CTSA8EnableChBx.IsChecked, 8)
End If
End Sub
@@ -313,7 +330,7 @@ Public Class OptionsPageUC
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA9Btn.Background = m_MainWindow.m_brCurrentColor
WriteCTSA( CTSA9Btn, CTSA9InclinazioneTxBx.Text, CTSA9TalloneTxBx.Text, CTSA9EnableChBx.IsChecked, 9)
WriteCTSA(CTSA9Btn, CTSA9InclinazioneTxBx.Text, CTSA9TalloneTxBx.Text, CTSA9EnableChBx.IsChecked, 9)
End If
End Sub
@@ -322,227 +339,227 @@ Public Class OptionsPageUC
Dim ChooseColor As New ChooseColor(m_MainWindow)
If ChooseColor.ShowDialog() Then
CTSA10Btn.Background = m_MainWindow.m_brCurrentColor
WriteCTSA( CTSA10Btn, CTSA10InclinazioneTxBx.Text, CTSA10TalloneTxBx.Text, CTSA10EnableChBx.IsChecked, 10)
WriteCTSA(CTSA10Btn, CTSA10InclinazioneTxBx.Text, CTSA10TalloneTxBx.Text, CTSA10EnableChBx.IsChecked, 10)
End If
End Sub
Private Sub CTSA1EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA1EnableChBx.Click
WriteCTSA( CTSA1Btn, CTSA1InclinazioneTxBx.Text, CTSA1TalloneTxBx.Text, CTSA1EnableChBx.IsChecked, 1)
WriteCTSA(CTSA1Btn, CTSA1InclinazioneTxBx.Text, CTSA1TalloneTxBx.Text, CTSA1EnableChBx.IsChecked, 1)
End Sub
Private Sub CTSA2EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA2EnableChBx.Click
WriteCTSA( CTSA2Btn, CTSA2InclinazioneTxBx.Text, CTSA2TalloneTxBx.Text, CTSA2EnableChBx.IsChecked, 2)
WriteCTSA(CTSA2Btn, CTSA2InclinazioneTxBx.Text, CTSA2TalloneTxBx.Text, CTSA2EnableChBx.IsChecked, 2)
End Sub
Private Sub CTSA3EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA3EnableChBx.Click
WriteCTSA( CTSA3Btn, CTSA3InclinazioneTxBx.Text, CTSA3TalloneTxBx.Text, CTSA3EnableChBx.IsChecked, 3)
WriteCTSA(CTSA3Btn, CTSA3InclinazioneTxBx.Text, CTSA3TalloneTxBx.Text, CTSA3EnableChBx.IsChecked, 3)
End Sub
Private Sub CTSA4EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA4EnableChBx.Click
WriteCTSA( CTSA4Btn, CTSA4InclinazioneTxBx.Text, CTSA4TalloneTxBx.Text, CTSA4EnableChBx.IsChecked, 4)
WriteCTSA(CTSA4Btn, CTSA4InclinazioneTxBx.Text, CTSA4TalloneTxBx.Text, CTSA4EnableChBx.IsChecked, 4)
End Sub
Private Sub CTSA5EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA5EnableChBx.Click
WriteCTSA( CTSA5Btn, CTSA5InclinazioneTxBx.Text, CTSA5TalloneTxBx.Text, CTSA5EnableChBx.IsChecked, 5)
WriteCTSA(CTSA5Btn, CTSA5InclinazioneTxBx.Text, CTSA5TalloneTxBx.Text, CTSA5EnableChBx.IsChecked, 5)
End Sub
Private Sub CTSA6EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA6EnableChBx.Click
WriteCTSA( CTSA6Btn, CTSA6InclinazioneTxBx.Text, CTSA6TalloneTxBx.Text, CTSA6EnableChBx.IsChecked, 6)
WriteCTSA(CTSA6Btn, CTSA6InclinazioneTxBx.Text, CTSA6TalloneTxBx.Text, CTSA6EnableChBx.IsChecked, 6)
End Sub
Private Sub CTSA7EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA7EnableChBx.Click
WriteCTSA( CTSA7Btn, CTSA7InclinazioneTxBx.Text, CTSA7TalloneTxBx.Text, CTSA7EnableChBx.IsChecked, 7)
WriteCTSA(CTSA7Btn, CTSA7InclinazioneTxBx.Text, CTSA7TalloneTxBx.Text, CTSA7EnableChBx.IsChecked, 7)
End Sub
Private Sub CTSA8EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA8EnableChBx.Click
WriteCTSA( CTSA8Btn, CTSA8InclinazioneTxBx.Text, CTSA8TalloneTxBx.Text, CTSA8EnableChBx.IsChecked, 8)
WriteCTSA(CTSA8Btn, CTSA8InclinazioneTxBx.Text, CTSA8TalloneTxBx.Text, CTSA8EnableChBx.IsChecked, 8)
End Sub
Private Sub CTSA9EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA9EnableChBx.Click
WriteCTSA( CTSA9Btn, CTSA9InclinazioneTxBx.Text, CTSA9TalloneTxBx.Text, CTSA9EnableChBx.IsChecked, 9)
WriteCTSA(CTSA9Btn, CTSA9InclinazioneTxBx.Text, CTSA9TalloneTxBx.Text, CTSA9EnableChBx.IsChecked, 9)
End Sub
Private Sub CTSA10EnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSA10EnableChBx.Click
WriteCTSA( CTSA10Btn, CTSA10InclinazioneTxBx.Text, CTSA10TalloneTxBx.Text, CTSA10EnableChBx.IsChecked, 10)
WriteCTSA(CTSA10Btn, CTSA10InclinazioneTxBx.Text, CTSA10TalloneTxBx.Text, CTSA10EnableChBx.IsChecked, 10)
End Sub
Private Sub CTSA1TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA1TalloneTxBx.TextChanged
Dim dHeel As Double
If Not StringToLen( CTSA1TalloneTxBx.Text, dHeel) Then
CTSA1TalloneTxBx.Text = ""
If Not StringToLen(CTSA1TalloneTxBx.Text, dHeel) Then
CTSA1TalloneTxBx.Text = ""
ElseIf dHeel < 0 Then
CTSA1TalloneTxBx.Text = LenToString( Math.Abs( dHeel), 4)
CTSA1TalloneTxBx.Text = LenToString(Math.Abs(dHeel), 4)
End If
CTSA1EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA2TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA2TalloneTxBx.TextChanged
Dim dHeel As Double
If Not StringToLen( CTSA2TalloneTxBx.Text, dHeel) Then
CTSA2TalloneTxBx.Text = ""
If Not StringToLen(CTSA2TalloneTxBx.Text, dHeel) Then
CTSA2TalloneTxBx.Text = ""
ElseIf dHeel < 0 Then
CTSA2TalloneTxBx.Text = LenToString( Math.Abs( dHeel), 4)
CTSA2TalloneTxBx.Text = LenToString(Math.Abs(dHeel), 4)
End If
CTSA2EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA3TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA3TalloneTxBx.TextChanged
Dim dHeel As Double
If Not StringToLen( CTSA3TalloneTxBx.Text, dHeel) Then
CTSA3TalloneTxBx.Text = ""
If Not StringToLen(CTSA3TalloneTxBx.Text, dHeel) Then
CTSA3TalloneTxBx.Text = ""
ElseIf dHeel < 0 Then
CTSA3TalloneTxBx.Text = LenToString( Math.Abs( dHeel), 4)
CTSA3TalloneTxBx.Text = LenToString(Math.Abs(dHeel), 4)
End If
CTSA3EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA4TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA4TalloneTxBx.TextChanged
Dim dHeel As Double
If Not StringToLen( CTSA4TalloneTxBx.Text, dHeel) Then
CTSA4TalloneTxBx.Text = ""
If Not StringToLen(CTSA4TalloneTxBx.Text, dHeel) Then
CTSA4TalloneTxBx.Text = ""
ElseIf dHeel < 0 Then
CTSA4TalloneTxBx.Text = LenToString( Math.Abs( dHeel), 4)
CTSA4TalloneTxBx.Text = LenToString(Math.Abs(dHeel), 4)
End If
CTSA4EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA5TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA5TalloneTxBx.TextChanged
Dim dHeel As Double
If Not StringToLen( CTSA5TalloneTxBx.Text, dHeel) Then
CTSA5TalloneTxBx.Text = ""
If Not StringToLen(CTSA5TalloneTxBx.Text, dHeel) Then
CTSA5TalloneTxBx.Text = ""
ElseIf dHeel < 0 Then
CTSA5TalloneTxBx.Text = LenToString( Math.Abs( dHeel), 4)
CTSA5TalloneTxBx.Text = LenToString(Math.Abs(dHeel), 4)
End If
CTSA5EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA6TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA6TalloneTxBx.TextChanged
Dim dHeel As Double
If Not StringToLen( CTSA6TalloneTxBx.Text, dHeel) Then
CTSA6TalloneTxBx.Text = ""
If Not StringToLen(CTSA6TalloneTxBx.Text, dHeel) Then
CTSA6TalloneTxBx.Text = ""
ElseIf dHeel < 0 Then
CTSA6TalloneTxBx.Text = LenToString( Math.Abs( dHeel), 4)
CTSA6TalloneTxBx.Text = LenToString(Math.Abs(dHeel), 4)
End If
CTSA6EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA7TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA7TalloneTxBx.TextChanged
Dim dHeel As Double
If Not StringToLen( CTSA7TalloneTxBx.Text, dHeel) Then
CTSA7TalloneTxBx.Text = ""
If Not StringToLen(CTSA7TalloneTxBx.Text, dHeel) Then
CTSA7TalloneTxBx.Text = ""
ElseIf dHeel < 0 Then
CTSA7TalloneTxBx.Text = LenToString( Math.Abs( dHeel), 4)
CTSA7TalloneTxBx.Text = LenToString(Math.Abs(dHeel), 4)
End If
CTSA7EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA8TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA8TalloneTxBx.TextChanged
Dim dHeel As Double
If Not StringToLen( CTSA8TalloneTxBx.Text, dHeel) Then
CTSA8TalloneTxBx.Text = ""
If Not StringToLen(CTSA8TalloneTxBx.Text, dHeel) Then
CTSA8TalloneTxBx.Text = ""
ElseIf dHeel < 0 Then
CTSA8TalloneTxBx.Text = LenToString( Math.Abs( dHeel), 4)
CTSA8TalloneTxBx.Text = LenToString(Math.Abs(dHeel), 4)
End If
CTSA8EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA9TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA9TalloneTxBx.TextChanged
Dim dHeel As Double
If Not StringToLen( CTSA9TalloneTxBx.Text, dHeel) Then
CTSA9TalloneTxBx.Text = ""
If Not StringToLen(CTSA9TalloneTxBx.Text, dHeel) Then
CTSA9TalloneTxBx.Text = ""
ElseIf dHeel < 0 Then
CTSA9TalloneTxBx.Text = LenToString( Math.Abs( dHeel), 4)
CTSA9TalloneTxBx.Text = LenToString(Math.Abs(dHeel), 4)
End If
CTSA9EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA10TalloneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA10TalloneTxBx.TextChanged
Dim dHeel As Double
If Not StringToLen( CTSA10TalloneTxBx.Text, dHeel) Then
CTSA10TalloneTxBx.Text = ""
If Not StringToLen(CTSA10TalloneTxBx.Text, dHeel) Then
CTSA10TalloneTxBx.Text = ""
ElseIf dHeel < 0 Then
CTSA10TalloneTxBx.Text = LenToString( Math.Abs( dHeel), 4)
CTSA10TalloneTxBx.Text = LenToString(Math.Abs(dHeel), 4)
End If
CTSA10EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA1InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA1InclinazioneTxBx.TextChanged
If CTSA1InclinazioneTxBx.Text <> "-" Then
Dim dAng As Double : If Not StringToLen( CTSA1InclinazioneTxBx.Text, dAng) Then CTSA1InclinazioneTxBx.Text = ""
Dim dAng As Double : If Not StringToLen(CTSA1InclinazioneTxBx.Text, dAng) Then CTSA1InclinazioneTxBx.Text = ""
End If
CTSA1EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA2InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA2InclinazioneTxBx.TextChanged
If CTSA2InclinazioneTxBx.Text <> "-" Then
Dim dAng As Double : If Not StringToLen( CTSA2InclinazioneTxBx.Text, dAng) Then CTSA2InclinazioneTxBx.Text = ""
Dim dAng As Double : If Not StringToLen(CTSA2InclinazioneTxBx.Text, dAng) Then CTSA2InclinazioneTxBx.Text = ""
End If
CTSA2EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA3InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA3InclinazioneTxBx.TextChanged
If CTSA3InclinazioneTxBx.Text <> "-" Then
Dim dAng As Double : If Not StringToLen( CTSA3InclinazioneTxBx.Text, dAng) Then CTSA3InclinazioneTxBx.Text = ""
Dim dAng As Double : If Not StringToLen(CTSA3InclinazioneTxBx.Text, dAng) Then CTSA3InclinazioneTxBx.Text = ""
End If
CTSA3EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA4InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA4InclinazioneTxBx.TextChanged
If CTSA4InclinazioneTxBx.Text <> "-" Then
Dim dAng As Double : If Not StringToLen( CTSA4InclinazioneTxBx.Text, dAng) Then CTSA4InclinazioneTxBx.Text = ""
Dim dAng As Double : If Not StringToLen(CTSA4InclinazioneTxBx.Text, dAng) Then CTSA4InclinazioneTxBx.Text = ""
End If
CTSA4EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA5InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA5InclinazioneTxBx.TextChanged
If CTSA5InclinazioneTxBx.Text <> "-" Then
Dim dAng As Double : If Not StringToLen( CTSA5InclinazioneTxBx.Text, dAng) Then CTSA5InclinazioneTxBx.Text = ""
Dim dAng As Double : If Not StringToLen(CTSA5InclinazioneTxBx.Text, dAng) Then CTSA5InclinazioneTxBx.Text = ""
End If
CTSA5EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA6InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA6InclinazioneTxBx.TextChanged
If CTSA6InclinazioneTxBx.Text <> "-" Then
Dim dAng As Double : If Not StringToLen( CTSA6InclinazioneTxBx.Text, dAng) Then CTSA6InclinazioneTxBx.Text = ""
Dim dAng As Double : If Not StringToLen(CTSA6InclinazioneTxBx.Text, dAng) Then CTSA6InclinazioneTxBx.Text = ""
End If
CTSA6EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA7InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA7InclinazioneTxBx.TextChanged
If CTSA7InclinazioneTxBx.Text <> "-" Then
Dim dAng As Double : If Not StringToLen( CTSA7InclinazioneTxBx.Text, dAng) Then CTSA7InclinazioneTxBx.Text = ""
Dim dAng As Double : If Not StringToLen(CTSA7InclinazioneTxBx.Text, dAng) Then CTSA7InclinazioneTxBx.Text = ""
End If
CTSA7EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA8InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA8InclinazioneTxBx.TextChanged
If CTSA8InclinazioneTxBx.Text <> "-" Then
Dim dAng As Double : If Not StringToLen( CTSA8InclinazioneTxBx.Text, dAng) Then CTSA8InclinazioneTxBx.Text = ""
Dim dAng As Double : If Not StringToLen(CTSA8InclinazioneTxBx.Text, dAng) Then CTSA8InclinazioneTxBx.Text = ""
End If
CTSA8EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA9InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA9InclinazioneTxBx.TextChanged
If CTSA9InclinazioneTxBx.Text <> "-" Then
Dim dAng As Double : If Not StringToLen( CTSA9InclinazioneTxBx.Text, dAng) Then CTSA9InclinazioneTxBx.Text = ""
Dim dAng As Double : If Not StringToLen(CTSA9InclinazioneTxBx.Text, dAng) Then CTSA9InclinazioneTxBx.Text = ""
End If
CTSA9EnableChBx_Click(sender, e)
End Sub
Private Sub CTSA10InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA10InclinazioneTxBx.TextChanged
If CTSA10InclinazioneTxBx.Text <> "-" Then
Dim dAng As Double : If Not StringToLen( CTSA10InclinazioneTxBx.Text, dAng) Then CTSA10InclinazioneTxBx.Text = ""
Dim dAng As Double : If Not StringToLen(CTSA10InclinazioneTxBx.Text, dAng) Then CTSA10InclinazioneTxBx.Text = ""
End If
CTSA10EnableChBx_Click(sender, e)
End Sub
Private Sub ToleranceMsgTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles ToleranceMsgTxBx.TextChanged
Dim nToler As Integer
if Not StringToInt( ToleranceMsgTxBx.Text, nToler) Then
If Not StringToInt(ToleranceMsgTxBx.Text, nToler) Then
nToler = 25
ToleranceMsgTxBx.Text = nToler.ToString()
End If
WritePrivateProfileString( S_COLORTOSIDEANG, K_CTSA_TOLERANCE, nToler.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA_TOLERANCE, nToler.ToString(), m_MainWindow.GetIniFile())
End Sub
Private Sub SlabLayerMsgTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles SlabLayerMsgTxBx.TextChanged
@@ -559,11 +576,11 @@ Public Class OptionsPageUC
Private Sub StdThickMsgTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles StdThickMsgTxBx.TextChanged
Dim dThick As Double
if Not StringToLen( StdThickMsgTxBx.Text, dThick) Then
If Not StringToLen(StdThickMsgTxBx.Text, dThick) Then
dThick = 25.4
StdThickMsgTxBx.Text = LenToString( dThick,3)
StdThickMsgTxBx.Text = LenToString(dThick, 3)
End If
WritePrivateProfileString( S_SLABDXF, K_STDTHICK, DoubleToString( dThick, 3), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_SLABDXF, K_STDTHICK, DoubleToString(dThick, 3), m_MainWindow.GetIniFile())
End Sub
Private Sub CTSAboxEnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles CTSAboxEnableChBx.Click