OmagCUT 2.1g1 :
- Aggiunta riquadro e bottone in OptionsPage per Colore testo
This commit is contained in:
@@ -112,6 +112,7 @@ Module ConstIni
|
||||
Public Const K_RESTRADIUS As String = "RestRadius"
|
||||
Public Const K_SNAPDIST As String = "SnapDist"
|
||||
Public Const K_TRFTHICKTOLERANCE As String = "TrfThickTolerance"
|
||||
Public Const K_TEXTCOLOR As String = "TextColor"
|
||||
|
||||
Public Const S_CSV As String = "Csv"
|
||||
Public Const K_FULL As String = "Full"
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.1.6.3")>
|
||||
<Assembly: AssemblyFileVersion("2.1.6.3")>
|
||||
<Assembly: AssemblyVersion("2.1.7.1")>
|
||||
<Assembly: AssemblyFileVersion("2.1.7.1")>
|
||||
|
||||
+24
-2
@@ -82,8 +82,30 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="FastGridGpBx"
|
||||
Grid.Column="2" Grid.RowSpan="2" Grid.ColumnSpan="2"
|
||||
<GroupBox Name="TextColorGpBx"
|
||||
Grid.Column="2" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||
Style="{StaticResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="TextColorBtn"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="FastGridGpBx"
|
||||
Grid.Column="3" Grid.RowSpan="2" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
+37
-10
@@ -138,22 +138,31 @@ Public Class OptionsPageUC
|
||||
End If
|
||||
Next
|
||||
|
||||
' I parametri di TextColor presenti nell'INI vengono caricati
|
||||
Dim sTextColor As String = " "
|
||||
Dim sTextColorArray() As String
|
||||
If GetPrivateProfileString(S_NEST, K_TEXTCOLOR, " ", sTextColor, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
sTextColorArray = sTextColor.Split(",")
|
||||
TextColorBtn.Background = New SolidColorBrush(Color.FromRgb(sTextColorArray(0), sTextColorArray(1), sTextColorArray(2)))
|
||||
End If
|
||||
|
||||
' 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"
|
||||
TextColorGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 13)
|
||||
SlabGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 14)
|
||||
SlabLayerMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 15)
|
||||
PartsLayerMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 16)
|
||||
ScrapLayerMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 17)
|
||||
StdThickMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 18)
|
||||
ColorToSideAngGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 19)
|
||||
CTSAboxEnableMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 20)
|
||||
ToleranceMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 21)
|
||||
TalloneMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 22)
|
||||
InclinazioneMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 23)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -773,4 +782,22 @@ Public Class OptionsPageUC
|
||||
WritePrivateProfileString(S_COLORTOSIDEANG, K_CTSA_ENABLE, 0, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TextColorBtn_Click(sender As Object, e As RoutedEventArgs) Handles TextColorBtn.Click
|
||||
' Il click sul bottone aprirà la finestra ChooseColor che permetterà la scelta del colore
|
||||
m_MainWindow.m_brCurrentColor = TextColorBtn.Background
|
||||
Dim ChooseColor As New ChooseColor(m_MainWindow)
|
||||
If ChooseColor.ShowDialog() Then
|
||||
TextColorBtn.Background = m_MainWindow.m_brCurrentColor
|
||||
Dim Rvalue As String = (TextColorBtn.Background.GetValue(SolidColorBrush.ColorProperty)).R
|
||||
Dim Gvalue As String = (TextColorBtn.Background.GetValue(SolidColorBrush.ColorProperty)).G
|
||||
Dim Bvalue As String = (TextColorBtn.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
|
||||
Dim RgbCTSA As String = If(String.IsNullOrWhiteSpace(Rvalue), "0", Rvalue) & "," &
|
||||
If(String.IsNullOrWhiteSpace(Gvalue), "0", Gvalue) & "," &
|
||||
If(String.IsNullOrWhiteSpace(Bvalue), "0", Bvalue)
|
||||
WritePrivateProfileString(S_NEST, K_TEXTCOLOR, RgbCTSA, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user