OmagCUT :

- Aggiornamento nuova grafica parte 1.
This commit is contained in:
Emmanuele Sassi
2015-12-30 09:32:46 +00:00
parent caabc6c444
commit 800b6552f2
47 changed files with 1340 additions and 1273 deletions
+3 -3
View File
@@ -65,11 +65,11 @@
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Button Name="NewBtn" Grid.Column="0" Content="New"
<Button Name="NewBtn" Grid.Column="0" Content="Nuovo"
Style="{StaticResource OmagCut_YellowGradientYellowTextButton}"/>
<Button Name="LoadBtn" Grid.Column="1" Content="Load"
<Button Name="LoadBtn" Grid.Column="1" Content="Carica"
Style="{StaticResource OmagCut_YellowGradientYellowTextButton}"/>
<Button Name="SaveBtn" Grid.Column="2" Content="Save"
<Button Name="SaveBtn" Grid.Column="2" Content="Salva"
Style="{StaticResource OmagCut_YellowGradientYellowTextButton}"/>
<Button Name="SimulateBtn" Grid.Column="4" Style="{StaticResource OmagCut_GradientBlueTextButton}"/>
+6 -5
View File
@@ -2,7 +2,8 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280"
Initialized="CurrentProjectPage_Initialized" Loaded="CurrentProjectPage_Loaded">
@@ -57,19 +58,19 @@
<TextBlock Name="MaterialTxBl" Grid.Row="0" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
Text="Materiale"/>
<TextBox Name="MaterialTxBx" Grid.Column="1" Grid.Row="0" Width="100"
<EgtWPFLib:EgtTextBox Name="MaterialTxBx" Grid.Column="1" Grid.Row="0" Width="100"
Style="{StaticResource OmagCut_FixedTextBox}"/>
<TextBlock Name="HeightTxBl" Grid.Row="1" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
Text="Spessore"/>
<TextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="1" Width="100"
<EgtWPFLib:EgtTextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="1" Width="100"
Style="{StaticResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
<TextBlock Name="ToolTxBl" Grid.Row="2" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
Text="Utensile"/>
<TextBox Name="ToolTxBx" Grid.Column="1" Grid.Row="2" Width="100"
<EgtWPFLib:EgtTextBox Name="ToolTxBx" Grid.Column="1" Grid.Row="2" Width="100"
Style="{StaticResource OmagCut_FixedTextBox}"/>
<TextBlock Name="MachiningTxBl" Grid.Row="3" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
Text="Lavorazione"/>
<TextBox Name="MachiningTxBx" Grid.Column="1" Grid.Row="3" Width="100"
<EgtWPFLib:EgtTextBox Name="MachiningTxBx" Grid.Column="1" Grid.Row="3" Width="100"
Style="{StaticResource OmagCut_FixedTextBox}"/>
</Grid>
+134 -132
View File
@@ -1,147 +1,149 @@
<UserControl x:Class="DrawPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="DrawPage_Initialized" Loaded="DrawPage_Loaded" Unloaded="DrawPage_Unloaded">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
</UserControl.Resources>
<!-- Definizione della DrawPage -->
<Border Style="{StaticResource CustomBorder}" >
<Grid Name="LeftButtonGrid" >
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="DrawPage_Initialized" Loaded="DrawPage_Loaded" Unloaded="DrawPage_Unloaded">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
</UserControl.Resources>
<!-- Definizione della DrawPage -->
<Border Background="{StaticResource OmagCut_Gray}">
<Grid Name="LeftButtonGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="9*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Definizione della Grid Laterale -->
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="9*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Definizione della Grid Laterale -->
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Button Name="InternComponentBtn" Grid.Row="0" Grid.ColumnSpan="2" FontSize="15" />
<Label Name="Label1" Grid.Row="1" Content="Label" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<TextBox Name="TextBox1" Grid.Column="1" Grid.Row="1" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="90"
TextAlignment="Right"/>
<Label Name="Label2" Grid.Row="2" Content="Label" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<TextBox Name="TextBox2" Grid.Column="1" Grid.Row="2" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="90"
TextAlignment="Right" />
<Label Name="Label3" Grid.Row="3" Content="Label" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<TextBox Name="TextBox3" Grid.Column="1" Grid.Row="3" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="90"
TextAlignment="Right"/>
<Label Name="Label4" Grid.Row="4" Content="Label" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<TextBox Name="TextBox4" Grid.Column="1" Grid.Row="4" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="90"
TextAlignment="Right"/>
<Label Name="Label5" Grid.Row="5" Content="Label" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<TextBox Name="TextBox5" Grid.Column="1" Grid.Row="5" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="90"
TextAlignment="Right"/>
<Label Name="Label6" Grid.Row="6" Content="Label" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<TextBox Name="TextBox6" Grid.Column="1" Grid.Row="6" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="90"
TextAlignment="Right"/>
<Label Name="Label7" Grid.Row="7" Content="Label" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<TextBox Name="TextBox7" Grid.Column="1" Grid.Row="7" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="90"
TextAlignment="Right"/>
<Label Name="Label8" Grid.Row="8" Content="Label" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<TextBox Name="TextBox8" Grid.Column="1" Grid.Row="8" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="90"
TextAlignment="Right"/>
<Label Name="Label9" Grid.Row="9" Content="Label" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<TextBox Name="TextBox9" Grid.Column="1" Grid.Row="9" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="90"
TextAlignment="Right"/>
<Label Name="Label10" Grid.Row="10" Content="Label" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<TextBox Name="TextBox10" Grid.Column="1" Grid.Row="10" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="90"
TextAlignment="Right"/>
<Button Name="AddBtn" Grid.Row="12" FontSize="15" />
<Button Name="CancelBtn" Grid.Column="1" Grid.Row="12" FontSize="15" />
<TextBlock Name="MessageLabel" Grid.Row="13" Grid.ColumnSpan="2" FontSize="20" VerticalAlignment="Center"
TextWrapping="Wrap" HorizontalAlignment="Center"/>
<Button Name="BackBtn" Grid.Column="1" Grid.Row="14" FontSize="15" >
<Image Source="Resources/NumericKeyboardArrow.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Grid Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="MeasureBtn" Grid.Column="0" Style="{StaticResource OmagCut_YellowIconButton}"
Content="Misure"/>
<Button Name="InclinationBtn" Grid.Column="1" Style="{StaticResource OmagCut_YellowIconButton}"
Content="Inclinazioni"/>
<Button Name="DripstoneBtn" Grid.Column="2" Style="{StaticResource OmagCut_YellowIconButton}"
Content="Gocciolatoio"/>
</Grid>
<!-- Definizione della Grid Inferiore per i Button V e X -->
<Grid Name="LowerButtonsGrid" Grid.Column="1" Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="7*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="Label1" Grid.Row="1" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox1" Grid.Column="1" Grid.Row="1" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label2" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<EgtWPFLib:EgtTextBox Name="TextBox2" Grid.Column="1" Grid.Row="2" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label3" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<EgtWPFLib:EgtTextBox Name="TextBox3" Grid.Column="1" Grid.Row="3" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label4" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<EgtWPFLib:EgtTextBox Name="TextBox4" Grid.Column="1" Grid.Row="4" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label5" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<EgtWPFLib:EgtTextBox Name="TextBox5" Grid.Column="1" Grid.Row="5" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label6" Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<EgtWPFLib:EgtTextBox Name="TextBox6" Grid.Column="1" Grid.Row="6" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label7" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<EgtWPFLib:EgtTextBox Name="TextBox7" Grid.Column="1" Grid.Row="7" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label8" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<EgtWPFLib:EgtTextBox Name="TextBox8" Grid.Column="1" Grid.Row="8" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label9" Grid.Row="9"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox9" Grid.Column="1" Grid.Row="9" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label10" Grid.Row="10"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox10" Grid.Column="1" Grid.Row="10" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<Label Name="PartNumLbl" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20"/>
<TextBox Name="PartNumTxBx" Grid.Column="2" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="60"
TextAlignment="Right"/>
<Button Name="OkBtn" Grid.Column="3" >
<Image Source="Resources/V.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="ExitBtn" Grid.Column="4" >
<Image Source="Resources/X.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="InternComponentBtn" Grid.Row="11" Grid.ColumnSpan="2" FontSize="15" />
<Button Name="AddBtn" Grid.Row="12" FontSize="15" />
<Button Name="CancelBtn" Grid.Column="1" Grid.Row="12" FontSize="15" />
<Grid Name="MessageGrid" Grid.Row="13" Grid.ColumnSpan="2">
<TextBlock Name="MessageTxBl" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
</Grid>
</Grid>
<Button Name="BackBtn" Grid.Column="1" Grid.Row="14"
Style="{StaticResource OmagCut_YellowIconButton}">
<Image Source="Resources/NumericKeyboardArrow.png" Style="{StaticResource ButtonIcon}"/>
</Button>
</Grid>
<!-- Definizione della Grid Inferiore per i Button V e X -->
<Grid Name="LowerButtonsGrid" Grid.Column="1" Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="7*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
</Border>
<TextBlock Name="PartNumTxBl" Grid.Column="1" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
TextAlignment="Right"/>
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="2" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<Button Name="OkBtn" Grid.Column="3" Style="{StaticResource OmagCut_GradientBlueIconButton}">
<Image Source="Resources/V.png" Style="{StaticResource ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="4" Style="{StaticResource OmagCut_GradientBlueIconButton}">
<Image Source="Resources/X.png" Style="{StaticResource ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</UserControl>
+81 -63
View File
@@ -1,5 +1,6 @@
Imports EgtUILib
Imports System.Globalization
Imports System.Globalization
Imports EgtUILib
Imports EgtWPFLib
Public Class DrawPageUC
@@ -65,7 +66,7 @@ Public Class DrawPageUC
TextBox10.Tag = Label10
'Imposto i messaggi letti dal file dei messaggi
PartNumLbl.Content = EgtMsg(MSG_DRAWPAGEUC + 1) 'Part Number - Numero pezzi
PartNumTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 1) 'Part Number - Numero pezzi
End Sub
@@ -171,8 +172,8 @@ Public Class DrawPageUC
If Not bOk Then
EgtNewFile()
End If
MessageLabel.Text = sMsg
MessageLabel.Background = If(m_bDrawOk, Brushes.LightGray, Brushes.Tomato)
MessageTxBl.Text = sMsg
MessageGrid.Background = If(m_bDrawOk, Brushes.Transparent, Application.Current.FindResource("OmagCut_Red"))
DrawScene.ZoomAll()
' se componenti con buchi interni visualizzo bottoni appositi
If sCompo = "Pianocucina.lua" Or sCompo = "Pianobagno.lua" Then
@@ -201,8 +202,8 @@ Public Class DrawPageUC
' ricalcolo il disegno
Dim sMsg As String = String.Empty
MakePreview(sMsg)
MessageLabel.Text = sMsg
MessageLabel.Background = If(m_bDrawOk, Brushes.LightGray, Brushes.Tomato)
MessageTxBl.Text = sMsg
MessageGrid.Background = If(m_bDrawOk, Brushes.Transparent, Application.Current.FindResource("OmagCut_Red"))
' aggiorno visualizzazione
EgtSetView(VT.TOP, False)
EgtZoom(ZM.ALL)
@@ -247,7 +248,7 @@ Public Class DrawPageUC
Next
For i As Integer = 1 To nShow
Dim j As Integer = nHide + i
GetNameEdit(j).Content = m_CVars(i - 1).m_sName
GetNameEdit(j).Text = m_CVars(i - 1).m_sName
GetNameEdit(j).Visibility = Windows.Visibility.Visible
GetValueEdit(j).Text = m_CVars(i - 1).ToString()
GetValueEdit(j).Visibility = Windows.Visibility.Visible
@@ -339,30 +340,30 @@ Public Class DrawPageUC
Return True
End Function
Private Function GetNameEdit(ByVal nInd As Integer) As Label
Select Case nInd
Case 1
Return Label1
Case 2
Return Label2
Case 3
Return Label3
Case 4
Return Label4
Case 5
Return Label5
Case 6
Return Label6
Case 7
Return Label7
Case 8
Return Label8
Case 9
Return Label9
Case Else
Return Label10
End Select
End Function
Private Function GetNameEdit(ByVal nInd As Integer) As TextBlock
Select Case nInd
Case 1
Return Label1
Case 2
Return Label2
Case 3
Return Label3
Case 4
Return Label4
Case 5
Return Label5
Case 6
Return Label6
Case 7
Return Label7
Case 8
Return Label8
Case 9
Return Label9
Case Else
Return Label10
End Select
End Function
Private Function GetValueEdit(ByVal nInd As Integer) As TextBox
Select Case nInd
@@ -389,37 +390,49 @@ Public Class DrawPageUC
End Select
End Function
Private Sub TextBox9_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Handles TextBox9.PreviewMouseDown
' Indice variabile associata al bottone
Dim nI As Integer = GetDefinedVarCount() - (NUM_VAR - 9) - 1
' Recupero tipo della variabile associata
If m_CVars(nI).m_nType = 1 Then
If TextBox9.Text = "False" Then
TextBox9.Text = "True"
Else
TextBox9.Text = "False"
End If
e.Handled = True
Else
e.Handled = False
End If
End Sub
Private Sub TextBox9_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Handles TextBox9.PreviewMouseDown
' Indice variabile associata al bottone
Dim nI As Integer = GetDefinedVarCount() - (NUM_VAR - 9) - 1
' Recupero tipo della variabile associata
If m_CVars(nI).m_nType = 1 Then
If TextBox9.Text = "False" Then
TextBox9.Text = "True"
Else
TextBox9.Text = "False"
End If
e.Handled = True
Else
e.Handled = False
End If
UpdateView()
End Sub
Private Sub TextBox10_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Handles TextBox10.PreviewMouseDown
' Indice variabile associata al bottone
Dim nI As Integer = GetDefinedVarCount() - (NUM_VAR - 10) - 1
' Recupero tipo della variabile associata
If m_CVars(nI).m_nType = 1 Then
If TextBox10.Text = "False" Then
TextBox10.Text = "True"
Else
TextBox10.Text = "False"
End If
e.Handled = True
Else
e.Handled = False
End If
End Sub
Private Sub TextBox10_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Handles TextBox10.PreviewMouseDown
' Indice variabile associata al bottone
Dim nI As Integer = GetDefinedVarCount() - (NUM_VAR - 10) - 1
' Recupero tipo della variabile associata
If m_CVars(nI).m_nType = 1 Then
If TextBox10.Text = "False" Then
TextBox10.Text = "True"
Else
TextBox10.Text = "False"
End If
e.Handled = True
Else
e.Handled = False
End If
UpdateView()
End Sub
Private Sub EgtTextBox_EgtOpening(sender As Object, e As RoutedEventArgs) Handles TextBox9.EgtOpening, TextBox10.EgtOpening
Dim SelectedTextBox As TextBox = e.Source
Select Case SelectedTextBox.Name
Case "TextBox9"
TextBox9.ActivateCalculator = False
Case "TextBox10"
TextBox10.ActivateCalculator = False
End Select
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
' se errore esco
@@ -462,7 +475,12 @@ Public Class DrawPageUC
ResetLuaVariables()
m_sCompoName = String.Empty
End Sub
End Sub
Private Sub EgtCalculator_EgtClosed(sender As Object, e As EventArgs) Handles TextBox1.EgtClosed, TextBox2.EgtClosed, TextBox3.EgtClosed, TextBox4.EgtClosed, TextBox5.EgtClosed, TextBox6.EgtClosed, TextBox7.EgtClosed, TextBox8.EgtClosed,
TextBox9.EgtClosed, TextBox10.EgtClosed
UpdateView()
End Sub
Private Class CompoVar
+1 -1
View File
@@ -7,7 +7,7 @@
<!--Template che permette di andare a capo-->
<DataTemplate x:Key="Button_DataTemplate_Wrap">
<TextBlock TextWrapping="Wrap" Text="{Binding}" />
<TextBlock TextWrapping="Wrap" Text="{Binding}"/>
</DataTemplate>
<!--ButtonBase-->
+72 -73
View File
@@ -1,79 +1,78 @@
<UserControl x:Class="ImportPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
</UserControl.Resources>
<!-- Definizione della ImportPage -->
<Border Style="{StaticResource CustomBorder}" >
<Grid Name="ImportPageGrid" >
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
</UserControl.Resources>
<!-- Definizione della ImportPage -->
<Border>
<Grid Name="ImportPageGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Label Name="FilePathTxBl" Background="White" FontSize="15"/>
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
<!-- Definizione della Grid superiore per Button -->
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
</Grid>
<!-- Definizione della Grid inferiore per Button -->
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Label Name="FilePathTxBl" Background="White" FontSize="15"/>
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
<!-- Definizione della Grid superiore per Button -->
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
</Grid>
<!-- Definizione della Grid inferiore per Button -->
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="UseLayerBtn" Grid.Column="0" FontSize="22" />
<Button Name="UseRegionBtn" Grid.Column="1" FontSize="22" />
<Button Name="ResetBtn" Grid.Column="2" FontSize="22" />
<RadioButton Name="mmBtn" Grid.Column="4" FontSize="22"
Style="{StaticResource {x:Type ToggleButton}}" />
<RadioButton Name="inchBtn" Grid.Column="5" FontSize="22"
Style="{StaticResource {x:Type ToggleButton}}" />
<Button Name="OkBtn" Grid.Column="7" >
<Image Source="Resources/V.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="ExitBtn" Grid.Column="8" >
<Image Source="Resources/X.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
</Grid>
</Grid>
</Border>
<Button Name="UseLayerBtn" Grid.Column="0" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="UseRegionBtn" Grid.Column="1" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="ResetBtn" Grid.Column="2" Style="{StaticResource OmagCut_YellowTextButton}"/>
<RadioButton Name="mmBtn" Grid.Column="4" Style="{StaticResource OmagCut_YellowToggleButton}"/>
<RadioButton Name="inchBtn" Grid.Column="5" Style="{StaticResource OmagCut_YellowToggleButton}"/>
<Button Name="OkBtn" Grid.Column="7" Style="{StaticResource OmagCut_GradientBlueIconButton}">
<Image Source="Resources/V.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="ExitBtn" Grid.Column="8" Style="{StaticResource OmagCut_GradientBlueIconButton}">
<Image Source="Resources/X.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
</Grid>
</Grid>
</Border>
</UserControl>
+11 -12
View File
@@ -26,52 +26,51 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="MachineButton1" Grid.Column="0" >
<Image Name="ImageButton1" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
<Button Name="MachineButton1" Grid.Column="0" Style="{StaticResource OmagCut_YellowGradientYellowIconButton}">
<Image Name="ImageButton1" Style="{StaticResource ButtonIcon}"/>
</Button>
<Button Name="MachineButton2" Grid.Column="1" >
<Button Name="MachineButton2" Grid.Column="1" Style="{StaticResource OmagCut_YellowGradientYellowIconButton}">
<Image Name="ImageButton2" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="MachineButton3" Grid.Column="2" >
<Button Name="MachineButton3" Grid.Column="2" Style="{StaticResource OmagCut_YellowGradientYellowIconButton}">
<Image Name="ImageButton3" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="MachineButton4" Grid.Column="3" >
<Button Name="MachineButton4" Grid.Column="3" Style="{StaticResource OmagCut_YellowGradientYellowIconButton}">
<Image Name="ImageButton4" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="MachineButton5" Grid.Column="4" >
<Button Name="MachineButton5" Grid.Column="4" Style="{StaticResource OmagCut_YellowGradientYellowIconButton}">
<Image Name="ImageButton5" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="MachineButton6" Grid.Column="5" >
<Button Name="MachineButton6" Grid.Column="5" Style="{StaticResource OmagCut_YellowGradientYellowIconButton}">
<Image Name="ImageButton6" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="MachineButton7" Grid.Column="6" >
<Button Name="MachineButton7" Grid.Column="6" Style="{StaticResource OmagCut_YellowGradientYellowIconButton}">
<Image Name="ImageButton7" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="MachineButton8" Grid.Column="7" >
<Button Name="MachineButton8" Grid.Column="7" Style="{StaticResource OmagCut_YellowGradientYellowIconButton}">
<Image Name="ImageButton8" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="MachineButton9" Grid.Column="8" >
<Button Name="MachineButton9" Grid.Column="8" Style="{StaticResource OmagCut_YellowGradientYellowIconButton}">
<Image Name="ImageButton9" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="MachineButton10" Grid.Column="9" >
<Button Name="MachineButton10" Grid.Column="9" Style="{StaticResource OmagCut_YellowGradientYellowIconButton}">
<Image Name="ImageButton10" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
+125 -125
View File
@@ -1,131 +1,131 @@
<UserControl x:Class="MainComponentPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="256" Initialized="MainComponentPage_Initialized" Loaded="UserControl_Loaded">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="256" Initialized="MainComponentPage_Initialized" Loaded="UserControl_Loaded">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
</UserControl.Resources>
<!-- Definizione della MainComponentPage -->
<Grid Name="MainComponentPageGrid">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Attenzione! Questi Button devono avere lo stesso nome dei componenti nel file Ini -->
<Button Name="Compo1" Grid.Row="0" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo1" Grid.Column="0" />
<Label Name="LabelCompo1" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
</UserControl.Resources>
<Button Name="Compo2" Grid.Row="1" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo2" Grid.Column="0" />
<Label Name="LabelCompo2" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<!-- Definizione della MainComponentPage -->
<Grid Name="MainComponentPageGrid">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Button Name="Compo3" Grid.Row="2" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo3" Grid.Column="0" />
<Label Name="LabelCompo3" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<!-- Attenzione! Questi Button devono avere lo stesso nome dei componenti nel file Ini -->
<Button Name="Compo1" Grid.Row="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo1" Grid.Column="0" />
<Label Name="LabelCompo1" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo2" Grid.Row="1" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo2" Grid.Column="0" />
<Label Name="LabelCompo2" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo3" Grid.Row="2" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo3" Grid.Column="0" />
<Label Name="LabelCompo3" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo4" Grid.Row="3" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo4" Grid.Column="0" />
<Label Name="LabelCompo4" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo5" Grid.Row="4" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo5" Grid.Column="0" />
<Label Name="LabelCompo5" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo6" Grid.Row="5" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo6" Grid.Column="0" />
<Label Name="LabelCompo6" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo7" Grid.Row="6" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo7" Grid.Column="0" />
<Label Name="LabelCompo7" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo8" Grid.Row="7" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo8" Grid.Column="0" />
<Label Name="LabelCompo8" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo9" Grid.Row="8" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo9" Grid.Column="0" />
<Label Name="LabelCompo9" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo4" Grid.Row="3" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo4" Grid.Column="0" />
<Label Name="LabelCompo4" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
</Grid>
<Button Name="Compo5" Grid.Row="4" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo5" Grid.Column="0" />
<Label Name="LabelCompo5" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo6" Grid.Row="5" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo6" Grid.Column="0" />
<Label Name="LabelCompo6" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo7" Grid.Row="6" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo7" Grid.Column="0" />
<Label Name="LabelCompo7" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo8" Grid.Row="7" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo8" Grid.Column="0" />
<Label Name="LabelCompo8" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo9" Grid.Row="8" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo9" Grid.Column="0" />
<Label Name="LabelCompo9" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
</Grid>
</UserControl>
+3 -1
View File
@@ -50,7 +50,9 @@
<ToggleButton Name="CadCutBtn" Grid.Column="2" Style="{StaticResource OmagCut_BlueToggleButton}"/>
<ToggleButton Name="FrameCutBtn" Grid.Column="3" Style="{StaticResource OmagCut_BlueToggleButton}"/>
<ToggleButton Name="MachineBtn" Grid.Column="4" Style="{StaticResource OmagCut_BlueToggleButton}"/>
<ToggleButton Name="OptionsBtn" Grid.Column="5" Style="{StaticResource OmagCut_BlueToggleButton}"/>
<ToggleButton Name="OptionsBtn" Grid.Column="5" Style="{StaticResource OmagCut_BlueIconToggleButton}">
<Image Source="Resources/Options.png" Style="{StaticResource ButtonIcon}"/>
</ToggleButton>
</Grid>
-1
View File
@@ -283,7 +283,6 @@ Class MainWindow
CadCutBtn.Content = EgtMsg(MSG_GENERAL + 3)
FrameCutBtn.Content = EgtMsg(MSG_GENERAL + 4)
MachineBtn.Content = EgtMsg(MSG_GENERAL + 5)
OptionsBtn.Content = EgtMsg(MSG_GENERAL + 6)
End Sub
Private Sub ManageSingleIstance()
+65 -59
View File
@@ -1,73 +1,79 @@
<UserControl x:Class="ManualAxesMoveUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256" Initialized="ManualAxesMove_Initialized" Loaded="ManualAxesMove_Loaded">
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib" x:Class="ManualAxesMoveUC"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256"
Initialized="ManualAxesMove_Initialized" Loaded="ManualAxesMove_Loaded">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
</UserControl.Resources>
<!-- Definizione della Grid laterale -->
<Grid Background="LightGray">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">
<TextBlock Name="FeedTxBl" Grid.Column="0" Grid.Row="0"
Style="{StaticResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
<TextBox Name="FeedTxBx" Grid.Column="1" Grid.Row="0" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="150" TextAlignment="Center"
Style="{StaticResource NumericKeyboard}" />
<TextBlock Name="SpeedTxBl" Grid.Column="0" Grid.Row="1"
Style="{StaticResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
<TextBox Name="SpeedTxBx" Grid.Column="1" Grid.Row="1" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="150" TextAlignment="Center"
Style="{StaticResource NumericKeyboard}" />
<Button Name="L1Btn" Grid.Row="2" FontSize="22" Height="60" Width="60" />
<TextBox Name="L1TxBx" Grid.Column="1" Grid.Row="2" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" Width="150" TextAlignment="Center" Style="{StaticResource NumericKeyboard}" />
<Button Name="L2Btn" Grid.Row="3" FontSize="22" Height="60" Width="60"/>
<TextBox Name="L2TxBx" Grid.Column="1" Grid.Row="3" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" Width="150" TextAlignment="Center" Style="{StaticResource NumericKeyboard}" />
<Button Name="L3Btn" Grid.Row="4" FontSize="22" Height="60" Width="60"/>
<TextBox Name="L3TxBx" Grid.Column="1" Grid.Row="4" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" Width="150" TextAlignment="Center" Style="{StaticResource NumericKeyboard}" />
<Button Name="R1Btn" Grid.Row="5" FontSize="22" Height="60" Width="60"/>
<TextBox Name="R1TxBx" Grid.Column="1" Grid.Row="5" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" Width="150" TextAlignment="Center" Style="{StaticResource NumericKeyboard}" />
<Button Name="R2Btn" Grid.Row="6" FontSize="22" Height="60" Width="60"/>
<TextBox Name="R2TxBx" Grid.Column="1" Grid.Row="6" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" Width="150" TextAlignment="Center" Style="{StaticResource NumericKeyboard}" />
<Grid Grid.Row="7" Grid.ColumnSpan="2">
<!-- Definizione della Grid laterale -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Button Name="BackBtn" Grid.Column="1" >
<Image Source="Resources/NumericKeyboardArrow.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock x:Name="FeedTxBl" Grid.Column="0" Grid.Row="0"
Style="{StaticResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
<EgtWPFLib:EgtTextBox Name="FeedTxBx" Grid.Column="1" Width="150"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<!--<TextBox x:Name="FeedTxBx" Grid.Column="1" Grid.Row="0" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="150" TextAlignment="Center"
Style="{StaticResource NumericKeyboard}" />-->
<TextBlock x:Name="SpeedTxBl" Grid.Column="0" Grid.Row="1"
Style="{StaticResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1" Grid.Row="1" Width="150"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<Button x:Name="L1Btn" Grid.Row="2" Height="60" Width="60" Style="{StaticResource OmagCut_BlueTextButton}"/>
<EgtWPFLib:EgtTextBox Name="L1TxBx" Grid.Column="1" Grid.Row="2" Width="150"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<Button x:Name="L2Btn" Grid.Row="3" Height="60" Width="60" Style="{StaticResource OmagCut_BlueTextButton}"/>
<EgtWPFLib:EgtTextBox x:Name="L2TxBx" Grid.Column="1" Grid.Row="3" Width="150"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<Button x:Name="L3Btn" Grid.Row="4" Height="60" Width="60" Style="{StaticResource OmagCut_BlueTextButton}"/>
<EgtWPFLib:EgtTextBox x:Name="L3TxBx" Grid.Column="1" Grid.Row="4" Width="150"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<Button x:Name="R1Btn" Grid.Row="5" Height="60" Width="60" Style="{StaticResource OmagCut_BlueTextButton}"/>
<EgtWPFLib:EgtTextBox x:Name="R1TxBx" Grid.Column="1" Grid.Row="5" Width="150"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<Button x:Name="R2Btn" Grid.Row="6" Height="60" Width="60" Style="{StaticResource OmagCut_BlueTextButton}"/>
<EgtWPFLib:EgtTextBox x:Name="R2TxBx" Grid.Column="1" Grid.Row="6" Width="150"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<Grid Grid.Row="7" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="BackBtn" Grid.Column="1" Style="{StaticResource OmagCut_YellowIconButton}">
<Image Source="Resources/NumericKeyboardArrow.png" Style="{StaticResource ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Grid>
</Border>
</UserControl>
+2 -2
View File
@@ -76,7 +76,7 @@
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
<Button Name="InsertPartBtn" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="StorePartBtn" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="StorePartBtn" Style="{StaticResource OmagCut_YellowTextButton}" Padding="1"/>
</UniformGrid>
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6"
@@ -84,7 +84,7 @@
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
<Button Name="SelectAllBtn" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="DeselectAllBtn" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="DeselectAllBtn" Style="{StaticResource OmagCut_YellowTextButton}" Padding="1"/>
</UniformGrid>
</Grid>
+1 -1
View File
@@ -32,7 +32,7 @@ Public Class NestPageUC
' Imposto i messaggi letti dal file dei messaggi
InsertPartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 1) 'Insert part - Inserisci pezzo
StorePartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 2) 'Store part - Parcheggia pezzo
RemovePartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo
RemovePartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo
SelectAllBtn.Content = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
DeselectAllBtn.Content = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
End Sub
+9 -3
View File
@@ -84,6 +84,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
</Reference>
<Reference Include="EgtWPFLib">
<HintPath>..\EgtWPFLib\bin\Debug\EgtWPFLib.dll</HintPath>
</Reference>
<Reference Include="Interop.FXLib">
<HintPath>..\..\EgtProg\OmagCUT\Interop.FXLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
@@ -433,10 +436,8 @@
<Resource Include="Resources\ClockwiseRotate.png" />
<Resource Include="Resources\CounterClockwiseRotate.png" />
<Resource Include="Resources\DownArrow.png" />
<Resource Include="Resources\ExitIcon.png" />
<Resource Include="Resources\GenericView.png" />
<Resource Include="Resources\HalfTurnRotate.png" />
<Resource Include="Resources\Lama.jpg" />
<Resource Include="Resources\LeftArrow.png" />
<Resource Include="Resources\LogoOmag.jpg" />
<Resource Include="Resources\LookFromTOP.png" />
@@ -447,7 +448,6 @@
<Resource Include="Resources\UpArrow.png" />
<Resource Include="Resources\V.png" />
<Resource Include="Resources\X.png" />
<Resource Include="Resources\ZigZag.jpg" />
<Resource Include="Resources\ZoomAll.png" />
<Resource Include="Resources\ZoomIn.png" />
<Resource Include="Resources\ZoomOut.png" />
@@ -486,6 +486,12 @@
<ItemGroup>
<Resource Include="Resources\PlayStep.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Options.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtCalculator\DeleteArrow.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
+51 -4
View File
@@ -1,6 +1,7 @@
<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"
@@ -78,6 +79,7 @@
<system:Double x:Key="FontSize_LowerBarOverride">18.6</system:Double> <!--14pt-->
<system:Double x:Key="FontSize_UnitOfMeasure">13.3</system:Double> <!--10pt-->
<Thickness x:Key="Button_MarginThickness">1</Thickness>
<CornerRadius x:Key="Page_CornerRadius">9.5</CornerRadius> <!--2.5mm-->
<!-- ______________________________________________________________________________________________________________________ -->
@@ -114,7 +116,7 @@
</Style>
<Style x:Key="OmagCut_Button_Wrap" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<Setter Property="ContentTemplate" Value="{StaticResource ToggleButton_DataTemplate_Wrap}" />
<Setter Property="ContentTemplate" Value="{StaticResource Button_DataTemplate_Wrap}" />
<Setter Property="FontSize" Value="{StaticResource FontSize_LowerCaseCharacter}" />
</Style>
@@ -139,11 +141,17 @@
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
</Style>
<!--GradientBlueOmagCutButton-->
<Style x:Key="OmagCut_GradientBlueIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<Setter Property="Background" Value="{StaticResource OmagCut_GradientBlue}"/>
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
</Style>
<!--YellowIconOmagCutButton-->
<Style x:Key="OmagCut_YellowIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
</Style>
<!--YellowTextOmagCutButton-->
@@ -160,6 +168,12 @@
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
</Style>
<!--YellowOmagCutButton-->
<Style x:Key="OmagCut_YellowGradientYellowIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<Setter Property="Background" Value="{StaticResource OmagCut_GradientYellow}"/>
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
</Style>
<!--YellowOmagCutButton-->
<Style x:Key="OmagCut_TopGrayGradientYellowButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<Setter Property="Background" Value="{StaticResource OmagCut_TopGradientGray}"/>
@@ -263,6 +277,11 @@
<Setter Property="Margin" Value="6,1,0,1"/>
</Style>
<Style x:Key="OmagCut_ToolsDBTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
<Setter Property="TextWrapping" Value="NoWrap"/>
<Setter Property="Margin" Value="26,0,0,0"/>
</Style>
<Style x:Key="OmagCut_LowerBarTitleTextBlock" TargetType="{x:Type TextBlock}">
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="FontSize" Value="{StaticResource FontSize_LowerBarTitle}"/>
@@ -300,11 +319,16 @@
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style x:Key="OmagCut_CenteredLowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_UpperCaseCharacterTextBlock}">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<!-- ______________________________________________________________________________________________________________________ -->
<!--TextBox-->
<Style x:Key="OmagCut_TextBox" BasedOn="{x:Null}" TargetType="{x:Type TextBox}">
<Style x:Key="OmagCut_TextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}">
<Setter Property="Height" Value="30"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Background" Value="Transparent"/>
@@ -315,7 +339,18 @@
<Setter Property="Padding" Value="1"/>
</Style>
<Style x:Key="OmagCut_FixedTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
<Style x:Key="OmagCut_KeyboardTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
<Setter Property="Keyboard" Value="Alphanumeric"/>
<Setter Property="KeyboardDimension" Value="600"/>
</Style>
<Style x:Key="OmagCut_CalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
<Setter Property="Keyboard" Value="Calculator"/>
<Setter Property="KeyboardDimension" Value="300"/>
</Style>
<Style x:Key="OmagCut_FixedTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Gray}"/>
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="IsEnabled" Value="False"/>
@@ -349,6 +384,17 @@
</Style.Triggers>
</Style>
<Style x:Key="OmagCut_BlueIconToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton}">
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
<Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Yellow}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="OmagCut_YellowToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton}">
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
<Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
@@ -356,6 +402,7 @@
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Blue}" />
<Setter Property="ToggleButton.Foreground" Value="{StaticResource OmagCut_Yellow}"/>
</Trigger>
</Style.Triggers>
</Style>
+143 -192
View File
@@ -1,206 +1,157 @@
<UserControl x:Class="RawPartPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Loaded="RawPartPage_Loaded" Initialized="RawPartPage_Initialized" Unloaded="RawPartPage_Unloaded">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCUTDictionary.xaml"></ResourceDictionary>
</UserControl.Resources>
<!-- Definizione della RowPartPage -->
<Grid Name="RowPartPageGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Loaded="RawPartPage_Loaded" Initialized="RawPartPage_Initialized" Unloaded="RawPartPage_Unloaded">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCUTDictionary.xaml"></ResourceDictionary>
</UserControl.Resources>
<!-- Definizione della RowPartPage -->
<Grid Name="RowPartPageGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Definizione della Grid superiore -->
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
</Grid>
<!-- Definizione della Grid Laterale -->
<Grid Name="LeftButtonGrid" Grid.RowSpan="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="4*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Definizione della Grid superiore -->
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
</Grid.RowDefinitions>
<!-- Definizione della Grid per definizione grezzo -->
<Grid Grid.ColumnSpan="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
</Grid>
<!-- Definizione della Grid Laterale -->
<Grid Name="LeftButtonGrid" Grid.RowSpan="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="3.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<RadioButton Name="RectangleBtn" Style="{StaticResource OmagCut_YellowToggleButton}"
GroupName="DefinitionMethod_GrezzoUC"/>
<RadioButton Name="ByPointsBtn" Style="{StaticResource OmagCut_YellowToggleButton}"
Grid.Column="1" GroupName="DefinitionMethod_GrezzoUC"/>
<TextBlock Name="LengthTxBl" Grid.Row="1" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="LengthTxBx" Grid.Column="1" Grid.Row="1" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="WidthTxBl" Grid.Row="2" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="2" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="HeightTxBl" Grid.Row="3" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="3" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="OffsetXTxBl" Grid.Row="4" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="OffsetXTxBx" Grid.Column="1" Grid.Row="4" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="OffsetYTxBl" Grid.Row="5" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="OffsetYTxBx" Grid.Column="1" Grid.Row="5" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="KerfTxBl" Grid.Row="6" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="KerfTxBx" Grid.Column="1" Grid.Row="6" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
</Grid>
<!-- Definizione della Grid per il materiale -->
<GroupBox Name="MaterialGpBx" Grid.Row="1" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_GroupBox}">
<ComboBox Name="MaterialsCmbx" Height="38" Width="200"
Background="LightGray" >
<ComboBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding Name}" FontSize="20" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<!-- Definizione della Grid per definizione grezzo -->
<Grid Grid.ColumnSpan="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<RadioButton Name="RectangleBtn" Style="{StaticResource {x:Type ToggleButton}}"
FontSize="20" FontWeight="Bold" GroupName="DefinitionMethod_GrezzoUC"/>
<RadioButton Name="ByPointsBtn" Style="{StaticResource {x:Type ToggleButton}}"
Grid.Column="1" FontSize="20" FontWeight="Bold" GroupName="DefinitionMethod_GrezzoUC"/>
<Label Name="LengthLbl" Grid.Row="1" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" />
<TextBox Name="LengthTxBx" Grid.Column="1" Grid.Row="1" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="60" TextAlignment="Right"
Style="{StaticResource NumericKeyboard}" />
<Label Name="WidthLbl" Grid.Row="2" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<TextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="2" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="60" TextAlignment="Right"
Style="{StaticResource NumericKeyboard}" />
<Label Name="HeightLbl" Grid.Row="3" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<TextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="3" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="60" TextAlignment="Right"
Style="{StaticResource NumericKeyboard}" />
<Label Name="OffsetXLbl" Grid.Row="4" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" />
<TextBox Name="OffsetXTxBx" Grid.Column="1" Grid.Row="4" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="60" TextAlignment="Right"
Style="{StaticResource NumericKeyboard}" />
<Label Name="OffsetYLbl" Grid.Row="5" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" />
<TextBox Name="OffsetYTxBx" Grid.Column="1" Grid.Row="5" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="60" TextAlignment="Right"
Style="{StaticResource NumericKeyboard}" />
</GroupBox>
<!-- Definizione della Grid per Zona rovinata -->
<GroupBox Name="DamagedAreaGpBx" Grid.Row="3" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_GroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="NewBtn" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="DeleteBtn" Grid.Column="1" Style="{StaticResource OmagCut_YellowTextButton}"/>
</Grid>
<!-- Definizione della Grid per il Kerf -->
<Border Style="{StaticResource CustomBorder}" Grid.ColumnSpan="3"
Grid.Column="0" Grid.Row="1" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
</GroupBox>
<!-- Definizione della Grid per Punti -->
<GroupBox Name="PointsGpBx" Grid.Row="5" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_GroupBox}" >
<Label Name="KerfLbl" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" FontWeight="Bold" />
<TextBox Name="KerfTxBx" Grid.Column="1" Grid.Row="0" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="60" TextAlignment="Right"
Style="{StaticResource NumericKeyboard}" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
</Grid>
</Border>
<!-- Definizione della Grid per il materiale -->
<Border Style="{StaticResource CustomBorder}" Grid.ColumnSpan="3"
Grid.Column="0" Grid.Row="2" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<Label Name="MaterialLbl" Grid.Row="0" FontSize="20" HorizontalAlignment="Left"
VerticalAlignment="Center" Margin="8,0,0,0" FontWeight="Bold"/>
<ComboBox Name="MaterialsCmbx" Grid.Row="1" Height="38" Width="200" VerticalAlignment="Top"
Margin="0,-5,0,0" Background="LightGray" >
<ComboBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding Name}" FontSize="20" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Border>
<!-- Definizione della Grid per Zona rovinata -->
<Border Style="{StaticResource CustomBorder}" Grid.ColumnSpan="3"
Grid.Column="0" Grid.Row="4" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Label Name="DamagedAreaLbl" Grid.Row="0" FontSize="20" HorizontalAlignment="Left"
VerticalAlignment="Center" Grid.ColumnSpan="2" Margin="8,0,0,0" FontWeight="Bold"/>
<Button Name="NewBtn" Grid.Row="2" FontSize="20"/>
<Button Name="DeleteBtn" Grid.Row="2" Grid.Column="1" FontSize="20"/>
</Grid>
</Border>
<!-- Definizione della Grid per Punti -->
<Border Style="{StaticResource CustomBorder}" Grid.ColumnSpan="3"
Grid.Column="0" Grid.Row="6" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Label Name="PointsLbl" Grid.Row="0" FontSize="20" HorizontalAlignment="Left"
VerticalAlignment="Center" Grid.ColumnSpan="2" Margin="8,0,0,0" FontWeight="Bold"/>
<Button Name="AddBtn" Grid.Row="1" FontSize="20"/>
<Button Name="RemoveBtn" Grid.Row="1" Grid.Column="1" FontSize="20"/>
</Grid>
</Border>
</Grid>
<!-- Definizione della Grid Inferiore per i Button V e X -->
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="2" Click="ExitBtnUC_Click" >
<Image Source="Resources/V.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
</Grid>
</Grid>
<Button Name="AddBtn" Grid.Row="1" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="RemoveBtn" Grid.Row="1" Grid.Column="1"
Style="{StaticResource OmagCut_YellowTextButton}"/>
</Grid>
</GroupBox>
</Grid>
<!-- Definizione della Grid Inferiore per i Button V e X -->
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="2" Style="{StaticResource OmagCut_GradientBlueIconButton}" Click="ExitBtnUC_Click">
<Image Source="Resources/V.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
</Grid>
</Grid>
</UserControl>
+352 -348
View File
@@ -2,301 +2,301 @@
Imports EgtUILib
Public Class RawPartPageUC
' Riferimento alla MainWindow
Dim m_MainWindow As MainWindow = Application.Current.MainWindow
Dim WithEvents m_CurrProjPage As CurrentProjectPageUC
' Flag di pagina attiva
Private m_bActive As Boolean = False
' Dati per Drag
Private m_bDrag As Boolean = False
Private m_ptPrev As Point3d
Private m_nDragEnt As Integer = 0
' Modalità aggiornamento variabili
Friend m_bShowVar As Boolean = False
' Dimensioni grezzo rettangolare
Private m_RawLength As Double
Private m_RawWidth As Double
Private m_RawHeight As Double
Private m_RawOffsX As Double
Private m_RawOffsY As Double
Private m_RawKerf As Double
' Riferimento alla MainWindow
Dim m_MainWindow As MainWindow = Application.Current.MainWindow
Dim WithEvents m_CurrProjPage As CurrentProjectPageUC
' Flag di pagina attiva
Private m_bActive As Boolean = False
' Dati per Drag
Private m_bDrag As Boolean = False
Private m_ptPrev As Point3d
Private m_nDragEnt As Integer = 0
' Modalità aggiornamento variabili
Friend m_bShowVar As Boolean = False
' Dimensioni grezzo rettangolare
Private m_RawLength As Double
Private m_RawWidth As Double
Private m_RawHeight As Double
Private m_RawOffsX As Double
Private m_RawOffsY As Double
Private m_RawKerf As Double
' Costante minima dimensione del grezzo
Private MIN_RAW_DIM As Double = 10
' Costante minima dimensione del grezzo
Private MIN_RAW_DIM As Double = 10
Private Sub RawPartPage_Initialized(sender As Object, e As EventArgs)
Private Sub RawPartPage_Initialized(sender As Object, e As EventArgs)
'Associazione della lista materiali alla combobox
MaterialsCmbx.ItemsSource = m_MainWindow.m_MaterialsList
'Associazione della lista materiali alla combobox
MaterialsCmbx.ItemsSource = m_MainWindow.m_MaterialsList
'Associazione tag textbox e label per visualizzare nome nella calcolatrice
LengthTxBx.Tag = LengthLbl
WidthTxBx.Tag = WidthLbl
HeightTxBx.Tag = HeightLbl
OffsetXTxBx.Tag = OffsetXLbl
OffsetYTxBx.Tag = OffsetYLbl
KerfTxBx.Tag = KerfLbl
'Associazione tag textbox e label per visualizzare nome nella calcolatrice
LengthTxBx.Tag = LengthTxBl
WidthTxBx.Tag = WidthTxBl
HeightTxBx.Tag = HeightTxBl
OffsetXTxBx.Tag = OffsetXTxBl
OffsetYTxBx.Tag = OffsetYTxBl
KerfTxBx.Tag = KerfTxBl
'Imposto i messaggi letti dal file dei messaggi
RectangleBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rectangle - Rettangolo
ByPointsBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'By points - Per punti
LengthLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 3) 'Length - Lunghezza
WidthLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 4) 'Width - Larghezza
HeightLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 5) 'Height - Spessore
OffsetXLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 6) 'Offset X
OffsetYLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 7) 'Offset Y
KerfLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 8) 'Kerf
MaterialLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 9) 'Material - Materiale
DamagedAreaLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 10) 'Damaged area - Zona rovinata
NewBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 11) 'New - Nuovo
DeleteBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 12) 'Delete - Cancella
PointsLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 13) 'Points - Punti
AddBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 14) 'Add - Aggiungi
RemoveBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 15) 'Remove - Rimuovi
'Imposto i messaggi letti dal file dei messaggi
RectangleBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rectangle - Rettangolo
ByPointsBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'By points - Per punti
LengthTxBl.Text = EgtMsg(MSG_RAWPARTPAGEUC + 3) 'Length - Lunghezza
WidthTxBl.Text = EgtMsg(MSG_RAWPARTPAGEUC + 4) 'Width - Larghezza
HeightTxBl.Text = EgtMsg(MSG_RAWPARTPAGEUC + 5) 'Height - Spessore
OffsetXTxBl.Text = EgtMsg(MSG_RAWPARTPAGEUC + 6) 'Offset X
OffsetYTxBl.Text = EgtMsg(MSG_RAWPARTPAGEUC + 7) 'Offset Y
KerfTxBl.Text = EgtMsg(MSG_RAWPARTPAGEUC + 8) 'Kerf
MaterialGpBx.Header = EgtMsg(MSG_RAWPARTPAGEUC + 9) 'Material - Materiale
DamagedAreaGpBx.Header = EgtMsg(MSG_RAWPARTPAGEUC + 10) 'Damaged area - Zona rovinata
NewBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 11) 'New - Nuovo
DeleteBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 12) 'Delete - Cancella
PointsGpBx.Header = EgtMsg(MSG_RAWPARTPAGEUC + 13) 'Points - Punti
AddBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 14) 'Add - Aggiungi
RemoveBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 15) 'Remove - Rimuovi
End Sub
End Sub
Private Sub RawPartPage_Loaded(sender As Object, e As RoutedEventArgs)
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
m_bActive = True
' Nascondo eventuali pezzi in parcheggio
HideParkedParts()
' Visualizzo eventuale foto
m_MainWindow.m_CurrentProjectPageUC.ShowPhoto(True)
' Se esiste già il grezzo...
Dim ptRawMin, ptRawMax As Point3d
If GetRawBox(ptRawMin, ptRawMax) Then
' origine tavola
Dim ptOri As Point3d
EgtGetTableRef(1, ptOri)
' kerf
EgtGetInfo(EgtGetFirstRawPart(), KEY_KERF, m_RawKerf)
' aggiorno dati grezzo
m_RawLength = ptRawMax.x - ptRawMin.x - 2 * m_RawKerf
m_RawWidth = ptRawMax.y - ptRawMin.y - 2 * m_RawKerf
m_RawHeight = ptRawMax.z - ptRawMin.z
m_RawOffsX = ptRawMin.x - ptOri.x + m_RawKerf
m_RawOffsY = ptRawMin.y - ptOri.y + m_RawKerf
' aggiorno l'apparenza del grezzo
AdjustRawPartOnStart()
' Altrimenti lo definisco
Else
' Leggo da Ini gli ultimi valori
m_RawLength = GetPrivateProfileDouble(S_RAWPART, K_RAWLENGTH, 2500, m_MainWindow.GetIniFile())
m_RawWidth = GetPrivateProfileDouble(S_RAWPART, K_RAWWIDTH, 1500, m_MainWindow.GetIniFile())
m_RawHeight = GetPrivateProfileDouble(S_RAWPART, K_RAWHEIGHT, 30, m_MainWindow.GetIniFile())
m_RawOffsX = GetPrivateProfileDouble(S_RAWPART, K_RAWOFFSX, 100, m_MainWindow.GetIniFile())
m_RawOffsY = GetPrivateProfileDouble(S_RAWPART, K_RAWOFFSY, 100, m_MainWindow.GetIniFile())
m_RawKerf = GetPrivateProfileDouble(S_RAWPART, K_RAWKERF, 50, m_MainWindow.GetIniFile())
End If
' Deseleziono pezzi
EgtDeselectAll()
' Seleziono modalità rettangolo
RectangleBtn.IsChecked = True
' Assegno dati grezzo rettangolare ai textbox
m_bShowVar = True
LengthTxBx.Text = DoubleToString(m_RawLength, 2)
WidthTxBx.Text = DoubleToString(m_RawWidth, 2)
HeightTxBx.Text = DoubleToString(m_RawHeight, 2)
OffsetXTxBx.Text = DoubleToString(m_RawOffsX, 2)
OffsetYTxBx.Text = DoubleToString(m_RawOffsY, 2)
KerfTxBx.Text = DoubleToString(m_RawKerf, 2)
m_bShowVar = False
' Aggiorno grezzo
UpdateRawPart()
' Imposto il materiale corrente nella combobox
MaterialsCmbx.SelectedIndex = m_MainWindow.m_nCurrentMaterial
End Sub
Private Sub RawPartPage_Loaded(sender As Object, e As RoutedEventArgs)
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
m_bActive = True
' Nascondo eventuali pezzi in parcheggio
HideParkedParts()
' Visualizzo eventuale foto
m_MainWindow.m_CurrentProjectPageUC.ShowPhoto(True)
' Se esiste già il grezzo...
Dim ptRawMin, ptRawMax As Point3d
If GetRawBox(ptRawMin, ptRawMax) Then
' origine tavola
Dim ptOri As Point3d
EgtGetTableRef(1, ptOri)
' kerf
EgtGetInfo(EgtGetFirstRawPart(), KEY_KERF, m_RawKerf)
' aggiorno dati grezzo
m_RawLength = ptRawMax.x - ptRawMin.x - 2 * m_RawKerf
m_RawWidth = ptRawMax.y - ptRawMin.y - 2 * m_RawKerf
m_RawHeight = ptRawMax.z - ptRawMin.z
m_RawOffsX = ptRawMin.x - ptOri.x + m_RawKerf
m_RawOffsY = ptRawMin.y - ptOri.y + m_RawKerf
' aggiorno l'apparenza del grezzo
AdjustRawPartOnStart()
' Altrimenti lo definisco
Else
' Leggo da Ini gli ultimi valori
m_RawLength = GetPrivateProfileDouble(S_RAWPART, K_RAWLENGTH, 2500, m_MainWindow.GetIniFile())
m_RawWidth = GetPrivateProfileDouble(S_RAWPART, K_RAWWIDTH, 1500, m_MainWindow.GetIniFile())
m_RawHeight = GetPrivateProfileDouble(S_RAWPART, K_RAWHEIGHT, 30, m_MainWindow.GetIniFile())
m_RawOffsX = GetPrivateProfileDouble(S_RAWPART, K_RAWOFFSX, 100, m_MainWindow.GetIniFile())
m_RawOffsY = GetPrivateProfileDouble(S_RAWPART, K_RAWOFFSY, 100, m_MainWindow.GetIniFile())
m_RawKerf = GetPrivateProfileDouble(S_RAWPART, K_RAWKERF, 50, m_MainWindow.GetIniFile())
End If
' Deseleziono pezzi
EgtDeselectAll()
' Seleziono modalità rettangolo
RectangleBtn.IsChecked = True
' Assegno dati grezzo rettangolare ai textbox
m_bShowVar = True
LengthTxBx.Text = DoubleToString(m_RawLength, 2)
WidthTxBx.Text = DoubleToString(m_RawWidth, 2)
HeightTxBx.Text = DoubleToString(m_RawHeight, 2)
OffsetXTxBx.Text = DoubleToString(m_RawOffsX, 2)
OffsetYTxBx.Text = DoubleToString(m_RawOffsY, 2)
KerfTxBx.Text = DoubleToString(m_RawKerf, 2)
m_bShowVar = False
' Aggiorno grezzo
UpdateRawPart()
' Imposto il materiale corrente nella combobox
MaterialsCmbx.SelectedIndex = m_MainWindow.m_nCurrentMaterial
End Sub
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
' Verifico di essere il gestore attivo
If Not m_bActive Then
Return
End If
' Si può selezionare solo con il tasto sinistro e se stato NULL
If e.Button <> Windows.Forms.MouseButtons.Left Or
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
Return
End If
' Verifico cosa selezionato
Dim nSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
Dim nKerfId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
EgtSetObjFilterForSelect(True, True, True, True, True)
Dim nSel As Integer
EgtSelect(e.Location, 2 * Scene.DIM_SEL, 2 * Scene.DIM_SEL, nSel)
Dim nId As Integer = EgtGetFirstObjInSelWin()
While nId <> GDB_ID.NULL
If nSolidId <> GDB_ID.NULL And nId = nSolidId Then
m_bDrag = EgtUnProjectPoint(e.Location, m_ptPrev)
m_nDragEnt = 0
ElseIf nKerfId <> GDB_ID.NULL And nId = nKerfId Then
m_bDrag = EgtUnProjectPoint(e.Location, m_ptPrev)
Dim dDist, dU As Double
If Not EgtGetMinDistPointCurve(m_ptPrev.Loc(nKerfId), nKerfId, dDist, dU) Then
m_bDrag = False
End If
m_nDragEnt = Math.Ceiling(dU)
' Privilegio il kerf, pertanto esco
Exit While
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
' Verifico di essere il gestore attivo
If Not m_bActive Then
Return
End If
' Si può selezionare solo con il tasto sinistro e se stato NULL
If e.Button <> Windows.Forms.MouseButtons.Left Or
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
Return
End If
' Verifico cosa selezionato
Dim nSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
Dim nKerfId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
EgtSetObjFilterForSelect(True, True, True, True, True)
Dim nSel As Integer
EgtSelect(e.Location, 2 * Scene.DIM_SEL, 2 * Scene.DIM_SEL, nSel)
Dim nId As Integer = EgtGetFirstObjInSelWin()
While nId <> GDB_ID.NULL
If nSolidId <> GDB_ID.NULL And nId = nSolidId Then
m_bDrag = EgtUnProjectPoint(e.Location, m_ptPrev)
m_nDragEnt = 0
ElseIf nKerfId <> GDB_ID.NULL And nId = nKerfId Then
m_bDrag = EgtUnProjectPoint(e.Location, m_ptPrev)
Dim dDist, dU As Double
If Not EgtGetMinDistPointCurve(m_ptPrev.Loc(nKerfId), nKerfId, dDist, dU) Then
m_bDrag = False
End If
nId = EgtGetNextObjInSelWin()
End While
End Sub
m_nDragEnt = Math.Ceiling(dU)
' Privilegio il kerf, pertanto esco
Exit While
End If
nId = EgtGetNextObjInSelWin()
End While
End Sub
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseMoveScene
' Verifico di essere il gestore attivo
If Not m_bActive Then
Return
End If
' Verifico di essere in modalità drag
If Not m_bDrag Then
Return
End If
' Ricavo il punto corrente in coordinate mondo
Dim ptCurr As Point3d
EgtUnProjectPoint(e.Location, ptCurr)
' Se movimento del grezzo
If m_nDragEnt = 0 Then
' Ricavo il vettore di movimento
Dim vtMove As Vector3d = ptCurr - m_ptPrev
' Muovo il grezzo
EgtMoveRawPart(m_CurrProjPage.m_nRawId, vtMove)
EgtDraw()
' Aggiorno gli offset
m_RawOffsX += vtMove.x
m_RawOffsY += vtMove.y
m_bShowVar = True
OffsetXTxBx.Text = DoubleToString(m_RawOffsX, 2)
OffsetYTxBx.Text = DoubleToString(m_RawOffsY, 2)
m_bShowVar = False
' se sposto lato sotto
ElseIf m_nDragEnt = 1 Then
Dim dDelta = ptCurr.y - m_ptPrev.y
If m_RawWidth - dDelta > MIN_RAW_DIM Then
m_RawWidth -= dDelta
m_RawOffsY += dDelta
EgtModifyRawPartSize(m_CurrProjPage.m_nRawId, m_RawLength + 2 * m_RawKerf,
m_RawWidth + 2 * m_RawKerf, m_RawHeight)
UpdateRawPartKerf()
Dim vtMove As New Vector3d(0, dDelta, 0)
EgtMoveRawPart(m_CurrProjPage.m_nRawId, vtMove)
EgtDraw()
m_bShowVar = True
WidthTxBx.Text = DoubleToString(m_RawWidth, 2)
OffsetYTxBx.Text = DoubleToString(m_RawOffsY, 2)
m_bShowVar = False
End If
' se sposto lato a destra
ElseIf m_nDragEnt = 2 Then
Dim dDelta = ptCurr.x - m_ptPrev.x
If m_RawLength + dDelta > MIN_RAW_DIM Then
m_RawLength += dDelta
EgtModifyRawPartSize(m_CurrProjPage.m_nRawId, m_RawLength + 2 * m_RawKerf,
m_RawWidth + 2 * m_RawKerf, m_RawHeight)
UpdateRawPartKerf()
EgtDraw()
m_bShowVar = True
LengthTxBx.Text = DoubleToString(m_RawLength, 2)
m_bShowVar = False
End If
' se sposto lato sopra
ElseIf m_nDragEnt = 3 Then
Dim dDelta = ptCurr.y - m_ptPrev.y
If m_RawWidth + dDelta > MIN_RAW_DIM Then
m_RawWidth += dDelta
EgtModifyRawPartSize(m_CurrProjPage.m_nRawId, m_RawLength + 2 * m_RawKerf,
m_RawWidth + 2 * m_RawKerf, m_RawHeight)
UpdateRawPartKerf()
EgtDraw()
m_bShowVar = True
WidthTxBx.Text = DoubleToString(m_RawWidth, 2)
m_bShowVar = False
End If
' se sposto lato a sinistra
ElseIf m_nDragEnt = 4 Then
Dim dDelta = ptCurr.x - m_ptPrev.x
If m_RawLength - dDelta > MIN_RAW_DIM Then
m_RawLength -= dDelta
m_RawOffsX += dDelta
EgtModifyRawPartSize(m_CurrProjPage.m_nRawId, m_RawLength + 2 * m_RawKerf,
m_RawWidth + 2 * m_RawKerf, m_RawHeight)
UpdateRawPartKerf()
Dim vtMove As New Vector3d(dDelta, 0, 0)
EgtMoveRawPart(m_CurrProjPage.m_nRawId, vtMove)
EgtDraw()
m_bShowVar = True
LengthTxBx.Text = DoubleToString(m_RawLength, 2)
OffsetXTxBx.Text = DoubleToString(m_RawOffsX, 2)
m_bShowVar = False
End If
End If
' Aggiorno il punto precedente
m_ptPrev = ptCurr
End Sub
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseMoveScene
' Verifico di essere il gestore attivo
If Not m_bActive Then
Return
End If
' Verifico di essere in modalità drag
If Not m_bDrag Then
Return
End If
' Ricavo il punto corrente in coordinate mondo
Dim ptCurr As Point3d
EgtUnProjectPoint(e.Location, ptCurr)
' Se movimento del grezzo
If m_nDragEnt = 0 Then
' Ricavo il vettore di movimento
Dim vtMove As Vector3d = ptCurr - m_ptPrev
' Muovo il grezzo
EgtMoveRawPart(m_CurrProjPage.m_nRawId, vtMove)
EgtDraw()
' Aggiorno gli offset
m_RawOffsX += vtMove.x
m_RawOffsY += vtMove.y
m_bShowVar = True
OffsetXTxBx.Text = DoubleToString(m_RawOffsX, 2)
OffsetYTxBx.Text = DoubleToString(m_RawOffsY, 2)
m_bShowVar = False
' se sposto lato sotto
ElseIf m_nDragEnt = 1 Then
Dim dDelta = ptCurr.y - m_ptPrev.y
If m_RawWidth - dDelta > MIN_RAW_DIM Then
m_RawWidth -= dDelta
m_RawOffsY += dDelta
EgtModifyRawPartSize(m_CurrProjPage.m_nRawId, m_RawLength + 2 * m_RawKerf,
m_RawWidth + 2 * m_RawKerf, m_RawHeight)
UpdateRawPartKerf()
Dim vtMove As New Vector3d(0, dDelta, 0)
EgtMoveRawPart(m_CurrProjPage.m_nRawId, vtMove)
EgtDraw()
m_bShowVar = True
WidthTxBx.Text = DoubleToString(m_RawWidth, 2)
OffsetYTxBx.Text = DoubleToString(m_RawOffsY, 2)
m_bShowVar = False
End If
' se sposto lato a destra
ElseIf m_nDragEnt = 2 Then
Dim dDelta = ptCurr.x - m_ptPrev.x
If m_RawLength + dDelta > MIN_RAW_DIM Then
m_RawLength += dDelta
EgtModifyRawPartSize(m_CurrProjPage.m_nRawId, m_RawLength + 2 * m_RawKerf,
m_RawWidth + 2 * m_RawKerf, m_RawHeight)
UpdateRawPartKerf()
EgtDraw()
m_bShowVar = True
LengthTxBx.Text = DoubleToString(m_RawLength, 2)
m_bShowVar = False
End If
' se sposto lato sopra
ElseIf m_nDragEnt = 3 Then
Dim dDelta = ptCurr.y - m_ptPrev.y
If m_RawWidth + dDelta > MIN_RAW_DIM Then
m_RawWidth += dDelta
EgtModifyRawPartSize(m_CurrProjPage.m_nRawId, m_RawLength + 2 * m_RawKerf,
m_RawWidth + 2 * m_RawKerf, m_RawHeight)
UpdateRawPartKerf()
EgtDraw()
m_bShowVar = True
WidthTxBx.Text = DoubleToString(m_RawWidth, 2)
m_bShowVar = False
End If
' se sposto lato a sinistra
ElseIf m_nDragEnt = 4 Then
Dim dDelta = ptCurr.x - m_ptPrev.x
If m_RawLength - dDelta > MIN_RAW_DIM Then
m_RawLength -= dDelta
m_RawOffsX += dDelta
EgtModifyRawPartSize(m_CurrProjPage.m_nRawId, m_RawLength + 2 * m_RawKerf,
m_RawWidth + 2 * m_RawKerf, m_RawHeight)
UpdateRawPartKerf()
Dim vtMove As New Vector3d(dDelta, 0, 0)
EgtMoveRawPart(m_CurrProjPage.m_nRawId, vtMove)
EgtDraw()
m_bShowVar = True
LengthTxBx.Text = DoubleToString(m_RawLength, 2)
OffsetXTxBx.Text = DoubleToString(m_RawOffsX, 2)
m_bShowVar = False
End If
End If
' Aggiorno il punto precedente
m_ptPrev = ptCurr
End Sub
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
' Verifico di essere il gestore attivo
If Not m_bActive Then
Return
End If
' Disabilito modalità drag
m_bDrag = False
End Sub
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
' Verifico di essere il gestore attivo
If Not m_bActive Then
Return
End If
' Disabilito modalità drag
m_bDrag = False
End Sub
Private Sub MaterialsCmbx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MaterialsCmbx.SelectionChanged
m_MainWindow.m_nCurrentMaterial = MaterialsCmbx.SelectedIndex
m_CurrProjPage.MaterialTxBx.Text = m_MainWindow.m_MaterialsList(m_MainWindow.m_nCurrentMaterial).Name
End Sub
Private Sub MaterialsCmbx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MaterialsCmbx.SelectionChanged
m_MainWindow.m_nCurrentMaterial = MaterialsCmbx.SelectedIndex
m_CurrProjPage.MaterialTxBx.Text = m_MainWindow.m_MaterialsList(m_MainWindow.m_nCurrentMaterial).Name
End Sub
Private Sub ExitBtnUC_Click(sender As Object, e As RoutedEventArgs)
' Sistemo il grezzo
AdjustRawPartOnExit()
' Ripristino visualizzazione di eventuali pezzi in parcheggio
ShowParkedParts()
' Imposto spessore del grezzo
m_CurrProjPage.m_dRawHeight = GetRawHeight()
m_CurrProjPage.HeightTxBx.Text = DoubleToString(m_RawHeight, 2)
' Salvo nel file Ini le dimensioni del grezzo
WritePrivateProfileString(S_RAWPART, K_RAWLENGTH, DoubleToString(m_RawLength, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWWIDTH, DoubleToString(m_RawWidth, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWHEIGHT, DoubleToString(m_RawHeight, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWOFFSX, DoubleToString(m_RawOffsX, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWOFFSY, DoubleToString(m_RawOffsY, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWKERF, DoubleToString(m_RawKerf, 2), m_MainWindow.GetIniFile())
' Esco dalla pagina
m_bActive = False
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Remove(Me)
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Visible
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
End Sub
Private Sub ExitBtnUC_Click(sender As Object, e As RoutedEventArgs)
' Sistemo il grezzo
AdjustRawPartOnExit()
' Ripristino visualizzazione di eventuali pezzi in parcheggio
ShowParkedParts()
' Imposto spessore del grezzo
m_CurrProjPage.m_dRawHeight = GetRawHeight()
m_CurrProjPage.HeightTxBx.Text = DoubleToString(m_RawHeight, 2)
' Salvo nel file Ini le dimensioni del grezzo
WritePrivateProfileString(S_RAWPART, K_RAWLENGTH, DoubleToString(m_RawLength, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWWIDTH, DoubleToString(m_RawWidth, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWHEIGHT, DoubleToString(m_RawHeight, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWOFFSX, DoubleToString(m_RawOffsX, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWOFFSY, DoubleToString(m_RawOffsY, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWKERF, DoubleToString(m_RawKerf, 2), m_MainWindow.GetIniFile())
' Esco dalla pagina
m_bActive = False
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Remove(Me)
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Visible
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
End Sub
Private Sub RectangleBtnUC_Click(sender As Object, e As RoutedEventArgs) Handles RectangleBtn.Click
'Seleziono il bottone RectangleBtn
RectangleBtn.IsChecked = True
End Sub
Private Sub RectangleBtnUC_Click(sender As Object, e As RoutedEventArgs) Handles RectangleBtn.Click
'Seleziono il bottone RectangleBtn
RectangleBtn.IsChecked = True
End Sub
Public Function GetRawBox(ByRef ptRawMin As Point3d, ByRef ptRawMax As Point3d) As Boolean
' Recupero identificativo del grezzo e del suo solido
Dim nRawId As Integer = EgtGetFirstRawPart()
Dim nSolidRawId As Integer = EgtGetFirstNameInGroup(nRawId, NAME_RAW_SOLID)
If nSolidRawId = GDB_ID.NULL Then
Return False
End If
' Ne recupero il box
Dim nFlag As Integer = GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM
EgtGetBBoxGlob(nSolidRawId, nFlag, ptRawMin, ptRawMax)
Return True
End Function
Public Function GetRawBox(ByRef ptRawMin As Point3d, ByRef ptRawMax As Point3d) As Boolean
' Recupero identificativo del grezzo e del suo solido
Dim nRawId As Integer = EgtGetFirstRawPart()
Dim nSolidRawId As Integer = EgtGetFirstNameInGroup(nRawId, NAME_RAW_SOLID)
If nSolidRawId = GDB_ID.NULL Then
Return False
End If
' Ne recupero il box
Dim nFlag As Integer = GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM
EgtGetBBoxGlob(nSolidRawId, nFlag, ptRawMin, ptRawMax)
Return True
End Function
Public Function GetRawHeight() As Double
Dim ptRawMin, ptRawMax As Point3d
If GetRawBox(ptRawMin, ptRawMax) Then
Return (ptRawMax.z - ptRawMin.z)
Else
Return 0
End If
End Function
Public Function GetRawHeight() As Double
Dim ptRawMin, ptRawMax As Point3d
If GetRawBox(ptRawMin, ptRawMax) Then
Return (ptRawMax.z - ptRawMin.z)
Else
Return 0
End If
End Function
Friend Sub UpdateRawPart()
' Raccolgo i dati del grezzo rettangolare
@@ -374,77 +374,81 @@ Public Class RawPartPageUC
EgtZoom(ZM.ALL)
End Sub
Private Function UpdateRawPartKerf() As Boolean
' Se non c'è il grezzo, esco
If m_CurrProjPage.m_nRawId = GDB_ID.NULL Then
Return False
End If
' Recupero il vecchio valore del kerf
Dim dOldKerf As Double
If Not EgtGetInfo(m_CurrProjPage.m_nRawId, KEY_KERF, dOldKerf) Then
dOldKerf = GetPrivateProfileDouble(S_RAWPART, K_RAWKERF, 30, m_MainWindow.GetIniFile())
End If
' Cancello eventuale vecchio contorno di kerf
Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
EgtErase(nKerfId)
' box grezzo
Dim ptMin, ptMax As Point3d
GetRawBox(ptMin, ptMax)
ptMin.x += m_RawKerf
ptMin.y += m_RawKerf
ptMin.z = ptMax.z
ptMax.x -= m_RawKerf
ptMax.y -= m_RawKerf
' Creo il nuovo contorno del kerf
nKerfId = EgtCreateRectangle2P(m_CurrProjPage.m_nRawId, ptMin, ptMax, GDB_RT.GLOB)
EgtSetName(nKerfId, NAME_KERF)
Dim Col As New Color3d(255, 0, 0, 100)
GetPrivateProfileColor(S_RAWPART, K_KERFCOLOR, Col, m_MainWindow.GetIniFile())
EgtSetColor(nKerfId, Col)
' Salvo il nuovo valore
EgtSetInfo(m_CurrProjPage.m_nRawId, KEY_KERF, DoubleToString(m_RawKerf, 4))
Return True
End Function
Private Function UpdateRawPartKerf() As Boolean
' Se non c'è il grezzo, esco
If m_CurrProjPage.m_nRawId = GDB_ID.NULL Then
Return False
End If
' Recupero il vecchio valore del kerf
Dim dOldKerf As Double
If Not EgtGetInfo(m_CurrProjPage.m_nRawId, KEY_KERF, dOldKerf) Then
dOldKerf = GetPrivateProfileDouble(S_RAWPART, K_RAWKERF, 30, m_MainWindow.GetIniFile())
End If
' Cancello eventuale vecchio contorno di kerf
Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
EgtErase(nKerfId)
' box grezzo
Dim ptMin, ptMax As Point3d
GetRawBox(ptMin, ptMax)
ptMin.x += m_RawKerf
ptMin.y += m_RawKerf
ptMin.z = ptMax.z
ptMax.x -= m_RawKerf
ptMax.y -= m_RawKerf
' Creo il nuovo contorno del kerf
nKerfId = EgtCreateRectangle2P(m_CurrProjPage.m_nRawId, ptMin, ptMax, GDB_RT.GLOB)
EgtSetName(nKerfId, NAME_KERF)
Dim Col As New Color3d(255, 0, 0, 100)
GetPrivateProfileColor(S_RAWPART, K_KERFCOLOR, Col, m_MainWindow.GetIniFile())
EgtSetColor(nKerfId, Col)
' Salvo il nuovo valore
EgtSetInfo(m_CurrProjPage.m_nRawId, KEY_KERF, DoubleToString(m_RawKerf, 4))
Return True
End Function
Private Sub AdjustRawPartOnStart()
' Se non c'è la foto va già bene così
If m_CurrProjPage.GetPhoto() = GDB_ID.NULL Then
Return
End If
' Disabilito la texture sul grezzo
Dim nSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
EgtRemoveTextureData(nSolidId)
' Sistemo il colore
Dim Col As New Color3d(64, 192, 255, 40)
GetPrivateProfileColor(S_RAWPART, K_RAWCOLOR, Col, m_MainWindow.GetIniFile())
Col.A = 20
EgtSetColor(nSolidId, Col, True)
End Sub
Private Sub AdjustRawPartOnStart()
' Se non c'è la foto va già bene così
If m_CurrProjPage.GetPhoto() = GDB_ID.NULL Then
Return
End If
' Disabilito la texture sul grezzo
Dim nSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
EgtRemoveTextureData(nSolidId)
' Sistemo il colore
Dim Col As New Color3d(64, 192, 255, 40)
GetPrivateProfileColor(S_RAWPART, K_RAWCOLOR, Col, m_MainWindow.GetIniFile())
Col.A = 20
EgtSetColor(nSolidId, Col, True)
End Sub
Private Sub AdjustRawPartOnExit()
' Se non c'è il grezzo, esco
If m_CurrProjPage.m_nRawId = GDB_ID.NULL Then
Return
End If
' Se non c'è la foto va già bene così
If m_CurrProjPage.GetPhoto() = GDB_ID.NULL Then
Return
End If
' Carico la texture della foto sul grezzo
Dim nSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
EgtSetTextureName(nSolidId, PHOTO_NAME)
' Sistemo il riferimento della texture
Dim refTxr As New Frame3d
m_CurrProjPage.GetPhotoTextureRef(refTxr)
EgtSetTextureFrame(nSolidId, refTxr, GDB_RT.GLOB)
' Sistemo il colore
EgtSetColor(nSolidId, New Color3d(255, 255, 255, 100), True)
' Nascondo la foto
m_MainWindow.m_CurrentProjectPageUC.ShowPhoto(False)
m_bActive = False
End Sub
Private Sub AdjustRawPartOnExit()
' Se non c'è il grezzo, esco
If m_CurrProjPage.m_nRawId = GDB_ID.NULL Then
Return
End If
' Se non c'è la foto va già bene così
If m_CurrProjPage.GetPhoto() = GDB_ID.NULL Then
Return
End If
' Carico la texture della foto sul grezzo
Dim nSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
EgtSetTextureName(nSolidId, PHOTO_NAME)
' Sistemo il riferimento della texture
Dim refTxr As New Frame3d
m_CurrProjPage.GetPhotoTextureRef(refTxr)
EgtSetTextureFrame(nSolidId, refTxr, GDB_RT.GLOB)
' Sistemo il colore
EgtSetColor(nSolidId, New Color3d(255, 255, 255, 100), True)
' Nascondo la foto
m_MainWindow.m_CurrentProjectPageUC.ShowPhoto(False)
m_bActive = False
End Sub
Private Sub RawPartPage_Unloaded(sender As Object, e As RoutedEventArgs)
End Sub
Private Sub EgtCalculator_EgtClosed(sender As Object, e As EventArgs) Handles LengthTxBx.EgtClosed, WidthTxBx.EgtClosed, HeightTxBx.EgtClosed, OffsetXTxBx.EgtClosed, OffsetYTxBx.EgtClosed, KerfTxBx.EgtClosed
UpdateRawPart()
End Sub
Private Sub RawPartPage_Unloaded(sender As Object, e As RoutedEventArgs)
End Sub
End Class
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 898 B

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 990 B

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 957 B

After

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 932 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 652 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 939 B

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

+1 -1
View File
@@ -4,7 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="64" d:DesignWidth="455">
d:DesignHeight="85.3" d:DesignWidth="597.1">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
+16 -14
View File
@@ -34,20 +34,22 @@ Public Class SceneButtonsUC
End Sub
Private Function GetCurrScene() As EgtUILib.Scene
Select Case m_MainWindow.m_ActivePage
Case MainWindow.Pages.DirectCut
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
Case MainWindow.Pages.CadCut
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
Case MainWindow.Pages.Open
Return m_MainWindow.m_OpenPage.OpenScene
Case MainWindow.Pages.FrameCut
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
Case MainWindow.Pages.Import
Return m_MainWindow.m_ImportPageUC.ImportScene
Case Else
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
End Select
Select Case m_MainWindow.m_ActivePage
Case MainWindow.Pages.WorkInProgress
Return m_MainWindow.m_WorkInProgressPageUC.WorkInProgressScene
Case MainWindow.Pages.DirectCut
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
Case MainWindow.Pages.CadCut
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
Case MainWindow.Pages.Open
Return m_MainWindow.m_OpenPage.OpenScene
Case MainWindow.Pages.FrameCut
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
Case MainWindow.Pages.Import
Return m_MainWindow.m_ImportPageUC.ImportScene
Case Else
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
End Select
End Function
End Class
+136 -137
View File
@@ -1,144 +1,143 @@
<UserControl x:Class="SecondaryComponentPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="256" Loaded="SecondaryComponentPage_Loaded">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
</UserControl.Resources>
<!-- Definizione della SecondaryComponentPage -->
<Grid Name="SecondaryComponentPageGrid" Background="LightGray">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Attenzione! Questi Button devono avere lo stesso nome dei componenti nel file Ini -->
<Button Name="Compo1" Grid.Row="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo1" Grid.Column="0" />
<Label Name="LabelCompo1" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo2" Grid.Row="1" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo2" Grid.Column="0" />
<Label Name="LabelCompo2" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo3" Grid.Row="2" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo3" Grid.Column="0" />
<Label Name="LabelCompo3" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo4" Grid.Row="3" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo4" Grid.Column="0" />
<Label Name="LabelCompo4" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo5" Grid.Row="4" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo5" Grid.Column="0" />
<Label Name="LabelCompo5" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo6" Grid.Row="5" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo6" Grid.Column="0" />
<Label Name="LabelCompo6" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo7" Grid.Row="6" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo7" Grid.Column="0" />
<Label Name="LabelCompo7" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo8" Grid.Row="7" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo8" Grid.Column="0" />
<Label Name="LabelCompo8" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo9" Grid.Row="8" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo9" Grid.Column="0" />
<Label Name="LabelCompo9" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Grid Grid.Row="9">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="256" Loaded="SecondaryComponentPage_Loaded">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
</UserControl.Resources>
<!-- Definizione della SecondaryComponentPage -->
<Grid Name="SecondaryComponentPageGrid">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Attenzione! Questi Button devono avere lo stesso nome dei componenti nel file Ini -->
<Button Name="Compo1" Grid.Row="0" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo1" Grid.Column="0" />
<Label Name="LabelCompo1" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="BackBtn" Grid.Column="1" >
<Image Source="Resources/NumericKeyboardArrow.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="Compo2" Grid.Row="1" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo2" Grid.Column="0" />
<Label Name="LabelCompo2" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
</Grid>
<Button Name="Compo3" Grid.Row="2" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo3" Grid.Column="0" />
<Label Name="LabelCompo3" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
</Grid>
<Button Name="Compo4" Grid.Row="3" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo4" Grid.Column="0" />
<Label Name="LabelCompo4" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo5" Grid.Row="4" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo5" Grid.Column="0" />
<Label Name="LabelCompo5" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo6" Grid.Row="5" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo6" Grid.Column="0" />
<Label Name="LabelCompo6" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo7" Grid.Row="6" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo7" Grid.Column="0" />
<Label Name="LabelCompo7" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo8" Grid.Row="7" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo8" Grid.Column="0" />
<Label Name="LabelCompo8" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Button Name="Compo9" Grid.Row="8" Style="{StaticResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo9" Grid.Column="0" />
<Label Name="LabelCompo9" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
</Grid>
</Button>
<Grid Grid.Row="9">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="BackBtn" Grid.Column="1" Style="{StaticResource OmagCut_YellowIconButton}">
<Image Source="Resources/NumericKeyboardArrow.png" Style="{StaticResource ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</UserControl>
+67 -62
View File
@@ -1,72 +1,77 @@
<UserControl x:Class="SingleCutUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256" Loaded="SingleCut_Loaded" Unloaded="SingleCut_Unloaded">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256" Loaded="SingleCut_Loaded" Unloaded="SingleCut_Unloaded">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
</UserControl.Resources>
<!-- Definizione della Grid SingleCut -->
<Grid Name="SingleCutGrid" Background="LightGray" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">
<Button Name="PointBtn" Grid.Row="0" Grid.ColumnSpan="2" FontSize="22" Content="Acquisisci punto"/>
<!-- Definizione della Grid SingleCut -->
<Grid Name="SingleCutGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Button Name="PointBtn" Grid.Row="0" Grid.ColumnSpan="2" Content="Acquisisci punto"
Style="{StaticResource OmagCut_YellowTextButton}"/>
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="1"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" Text="Affondamento" />
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="1" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" Text="Lunghezza" />
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="2" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" Text="Direzione" />
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="4"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" Text="Inclinazione" />
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<CheckBox Name="LaserOnChBx" Grid.Row="5" Grid.ColumnSpan="2" Height="40" Width="220" Content="Acquisisci laser" FontSize="22"/>
<TextBlock Name="SawTipTxBl" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" Text=""/>
<Button Name="OkBtn" Grid.Column="0" Grid.Row="11" Style="{StaticResource OmagCut_GradientBlueTextButton}"
Content="Esegui"/>
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="11" Style="{StaticResource OmagCut_YellowIconButton}">
<Image Source="Resources/X.png" Style="{StaticResource ButtonIcon}"/>
</Button>
</Grid>
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="1" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" Text="Affondamento" />
<TextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="1" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="75" TextAlignment="Center" />
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="2" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" Text="Lunghezza" />
<TextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="2" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="75" TextAlignment="Center" />
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" Text="Direzione" />
<TextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="75" TextAlignment="Center" />
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="4" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" Text="Inclinazione" />
<TextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="75" TextAlignment="Center" />
<TextBlock Name="SawTipTxBl" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="2" FontSize="18" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" Text="" />
<Button Name="OkBtn" Grid.Column="0" Grid.Row="11" FontSize="20" Content="Esegui"/>
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="11">
<Image Source="Resources/X.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<CheckBox Name="LaserOnChBx" Grid.Row="5" Grid.ColumnSpan="2" Height="40" Width="200" Content="Acquisisci laser" FontSize="22"/>
</Grid>
</Border>
</UserControl>
+9 -6
View File
@@ -196,8 +196,8 @@
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Name="NameTxBl" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" FontFamily="CenturyGothic" />
<TextBlock Name="NameTxBl" Grid.Column="0" Grid.Row="0"
Style="{StaticResource OmagCut_ToolsDBTextBlock}" />
<TextBox Name="NameTxBx" Grid.Column="1" Grid.Row="0" FontSize="20"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="150" TextAlignment="Center" />
@@ -420,11 +420,14 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="NewBtn" Grid.Column="0" FontSize="22" Content="Nuovo" />
<Button Name="SaveBtn" Grid.Column="1" FontSize="22" Content="Salva" />
<Button Name="RemoveBtn" Grid.Column="2" FontSize="22" Content="Elimina" />
<Button Name="NewBtn" Grid.Column="0" Style="{StaticResource OmagCut_YellowGradientYellowIconButton}"
Content="Nuovo" />
<Button Name="SaveBtn" Grid.Column="1" Style="{StaticResource OmagCut_YellowGradientYellowIconButton}"
Content="Salva" />
<Button Name="RemoveBtn" Grid.Column="2"
Style="{StaticResource OmagCut_YellowGradientYellowIconButton}" Content="Elimina" />
<Button Name="OkBtn" Grid.Column="4" >
<Button Name="OkBtn" Grid.Column="4" Style="{StaticResource OmagCut_GradientBlueIconButton}">
<Image Source="Resources/V.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
+36 -28
View File
@@ -1,32 +1,40 @@
<UserControl x:Class="WorkInProgressPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1024"
Initialized="WorkInProgressPage_Initialized" Loaded="WorkInProgressPage_Loaded" Unloaded="WorkInProgressPage_Unloaded">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1024"
Initialized="WorkInProgressPage_Initialized" Loaded="WorkInProgressPage_Loaded" Unloaded="WorkInProgressPage_Unloaded">
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
</UserControl.Resources>
<!-- Definizione della WorkInProgressPage -->
<Grid Name="WorkInProgressPageGrid">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Name="UpperButtonsGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="8*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
</Grid>
<!-- Chiamata al Dictionary -->
<UserControl.Resources>
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
</UserControl.Resources>
<Grid Name="LowerButtonsGrid" Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="10*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
</Grid>
<!-- Definizione della WorkInProgressPage -->
<Border Style="{StaticResource CustomBorder}" >
<Grid Name="WorkInProgressPageGrid">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
</Grid>
</Border>
</Grid>
</UserControl>
+16
View File
@@ -12,6 +12,10 @@ Public Class WorkInProgressPageUC
Private m_bContinue As Boolean = True
Private m_bExecuting As Boolean = False
' Dichiarazione delle Page UserControl
Friend m_SceneButtons As SceneButtonsUC
Friend m_MachineButtons As MachineButtonsUC
' Dichiarazione Scene
Friend WithEvents WorkInProgressScene As New Scene
Private WorkInProgressSceneHost As New System.Windows.Forms.Integration.WindowsFormsHost
@@ -22,6 +26,18 @@ Public Class WorkInProgressPageUC
Private Sub WorkInProgressPage_Initialized(sender As Object, e As EventArgs)
'Creazione delle Page UserControl
m_SceneButtons = New SceneButtonsUC
m_MachineButtons = New MachineButtonsUC
'Posizionemento nella griglia dei bottoni di vista
m_SceneButtons.SetValue(Grid.ColumnProperty, 1)
m_MachineButtons.SetValue(Grid.ColumnProperty, 1)
'Assegno SceneButtons e MachineButtons alla pagina
Me.UpperButtonsGrid.Children.Add(m_SceneButtons)
Me.LowerButtonsGrid.Children.Add(m_MachineButtons)
' Assegnazione scena all'host e posizionamento nella PlacePageGrid
WorkInProgressSceneHost.Child = WorkInProgressScene
WorkInProgressSceneHost.SetValue(Grid.ColumnProperty, 0)