OmagCUT :
- Aggiunto gocciolatoio come interfaccia. - Aggiunta modalità per cui disattiva tutto ciò che è legato alla comunicazione con la macchina.
This commit is contained in:
@@ -131,6 +131,8 @@ Module ConstGen
|
||||
Public Const INFO_DEPTH As String = "Depth"
|
||||
' Info in entità da tagliare per angolo di lato
|
||||
Public Const INFO_SIDE_ANGLE As String = "SideAng"
|
||||
' Info in entità da tagliare per gocciolatoio
|
||||
Public Const INFO_HAVE_DRIP As String = "HaveDrip"
|
||||
' Info in entità da tagliare per direzione che varia a seconda del tipo (una via o zigzag)
|
||||
Public Const INFO_DIR As String = "Dir"
|
||||
' Info in entità da tagliare per abilitare possibilità di inversione
|
||||
|
||||
+4
-5
@@ -34,14 +34,13 @@
|
||||
|
||||
<Grid Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<!--<ColumnDefinition Width="1*"/>-->
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton Name="DimensionBtn" Grid.Column="0" Style="{StaticResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="SideAngleBtn" Grid.Column="1" Style="{StaticResource OmagCut_YellowToggleButton}"/>
|
||||
<Button Name="DripstoneBtn" Grid.Column="2" Style="{StaticResource OmagCut_YellowIconButton}"
|
||||
Content="Gocciolatoio" Visibility="Hidden"/>
|
||||
<ToggleButton Name="DimensionBtn" Grid.Column="0" Style="{StaticResource OmagCut_YellowToggleButton}" Visibility="Collapsed"/>
|
||||
<ToggleButton Name="SideAngleBtn" Grid.Column="0" Style="{StaticResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="DripBtn" Grid.Column="1" Style="{StaticResource OmagCut_YellowToggleButton}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Name="VariablesGrd" Grid.Row="1" Grid.ColumnSpan="2"/>
|
||||
|
||||
+31
-11
@@ -91,6 +91,7 @@ Public Class DrawPageUC
|
||||
PartNumTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 1) 'Part Number - Numero pezzi
|
||||
DimensionBtn.Content = EgtMsg(MSG_DRAWPAGEUC + 2)
|
||||
SideAngleBtn.Content = EgtMsg(MSG_DRAWPAGEUC + 3)
|
||||
DripBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Gocciolatoio
|
||||
TopTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 4)
|
||||
End Sub
|
||||
|
||||
@@ -722,23 +723,42 @@ Public Class DrawPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DimensionBtn_Click(sender As Object, e As RoutedEventArgs) Handles DimensionBtn.Click
|
||||
If DimensionBtn.IsChecked Then
|
||||
VariablesGrd.Children.Remove(m_SideAngle)
|
||||
VariablesGrd.Children.Add(m_CompoDimension)
|
||||
SideAngleBtn.IsChecked = False
|
||||
Else
|
||||
DimensionBtn.IsChecked = True
|
||||
End If
|
||||
End Sub
|
||||
'Private Sub DimensionBtn_Click(sender As Object, e As RoutedEventArgs) Handles DimensionBtn.Click
|
||||
' If DimensionBtn.IsChecked Then
|
||||
' VariablesGrd.Children.Remove(m_SideAngle)
|
||||
' VariablesGrd.Children.Add(m_CompoDimension)
|
||||
' SideAngleBtn.IsChecked = False
|
||||
' DripBtn.IsChecked = False
|
||||
' Else
|
||||
' DimensionBtn.IsChecked = True
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Private Sub SideAngleBtn_Click(sender As Object, e As RoutedEventArgs) Handles SideAngleBtn.Click
|
||||
If SideAngleBtn.IsChecked Then
|
||||
' Imposto modalità
|
||||
m_SideAngle.m_Mode = SideAngleUC.ModeOpt.SIDEANGLE
|
||||
VariablesGrd.Children.Remove(m_CompoDimension)
|
||||
VariablesGrd.Children.Add(m_SideAngle)
|
||||
DimensionBtn.IsChecked = False
|
||||
DripBtn.IsEnabled = False
|
||||
Else
|
||||
SideAngleBtn.IsChecked = True
|
||||
VariablesGrd.Children.Remove(m_SideAngle)
|
||||
VariablesGrd.Children.Add(m_CompoDimension)
|
||||
DripBtn.IsEnabled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DripBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripBtn.Click
|
||||
If DripBtn.IsChecked Then
|
||||
' Imposto modalità
|
||||
m_SideAngle.m_Mode = SideAngleUC.ModeOpt.DRIP
|
||||
VariablesGrd.Children.Remove(m_CompoDimension)
|
||||
VariablesGrd.Children.Add(m_SideAngle)
|
||||
SideAngleBtn.IsEnabled = False
|
||||
Else
|
||||
VariablesGrd.Children.Remove(m_SideAngle)
|
||||
VariablesGrd.Children.Add(m_CompoDimension)
|
||||
SideAngleBtn.IsEnabled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
+4
-1
@@ -24,12 +24,15 @@
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="3.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
||||
Style="{StaticResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="DripBtn" Grid.Column="1" Padding="0"
|
||||
Style="{StaticResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
+52
-3
@@ -49,7 +49,7 @@ Public Class ImportPageUC
|
||||
m_SideAngleUC = New SideAngleUC
|
||||
|
||||
'Posizionemento nella griglia degli UserControl
|
||||
m_SceneButtons.SetValue(Grid.ColumnProperty, 2)
|
||||
m_SceneButtons.SetValue(Grid.ColumnProperty, 3)
|
||||
m_SideAngleUC.SetValue(Grid.RowProperty, 2)
|
||||
UpperButtonGrid.Children.Add(m_SceneButtons)
|
||||
|
||||
@@ -66,7 +66,8 @@ Public Class ImportPageUC
|
||||
ResetBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 3) 'Reset
|
||||
mmBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 4) 'mm
|
||||
inchBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 5) 'inch
|
||||
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7)
|
||||
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7) 'Inclinazione
|
||||
DripBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Gocciolatoio
|
||||
|
||||
'Definizione del collegamento tra ItemList e ListBox1
|
||||
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
|
||||
@@ -284,6 +285,7 @@ Public Class ImportPageUC
|
||||
UseRegionBtn.IsEnabled = False
|
||||
ResetBtn.IsEnabled = False
|
||||
SideAngleBtn.IsEnabled = False
|
||||
DripBtn.IsEnabled = False
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -319,7 +321,8 @@ Public Class ImportPageUC
|
||||
ResetBtn.IsEnabled = False
|
||||
OkBtn.IsEnabled = False
|
||||
SideAngleBtn.IsEnabled = False
|
||||
' altrimenti import per cornici
|
||||
DripBtn.IsEnabled = False
|
||||
' altrimenti import per cornici
|
||||
Else
|
||||
OkBtn.IsEnabled = True
|
||||
End If
|
||||
@@ -381,6 +384,7 @@ Public Class ImportPageUC
|
||||
OkBtn.IsEnabled = True
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideAngleBtn.IsEnabled = True
|
||||
DripBtn.IsEnabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub UseClosedCurveBtn_Click(sender As Object, e As RoutedEventArgs) Handles UseClosedCurveBtn.Click
|
||||
@@ -398,6 +402,7 @@ Public Class ImportPageUC
|
||||
OkBtn.IsEnabled = True
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideAngleBtn.IsEnabled = True
|
||||
DripBtn.IsEnabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub UseRegionBtn_Click(sender As Object, e As RoutedEventArgs) Handles UseRegionBtn.Click
|
||||
@@ -415,6 +420,7 @@ Public Class ImportPageUC
|
||||
OkBtn.IsEnabled = True
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideAngleBtn.IsEnabled = True
|
||||
DripBtn.IsEnabled = True
|
||||
End Sub
|
||||
|
||||
Private Function FilterNge() As Boolean
|
||||
@@ -601,15 +607,58 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub SideAngleBtn_Click(sender As Object, e As RoutedEventArgs) Handles SideAngleBtn.Click
|
||||
If SideAngleBtn.IsChecked() Then
|
||||
' Imposto modalità sideangle
|
||||
m_SideAngleUC.m_Mode = SideAngleUC.ModeOpt.SIDEANGLE
|
||||
LeftGrid.Children.Add(m_SideAngleUC)
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Hidden
|
||||
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||
' Disabilito DripBtn e unità di misura
|
||||
DripBtn.IsEnabled = False
|
||||
mmBtn.IsEnabled = False
|
||||
inchBtn.IsEnabled = False
|
||||
' Disabilito bottone reset
|
||||
ResetBtn.IsEnabled = False
|
||||
Else
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
FileListBox.Visibility = Windows.Visibility.Visible
|
||||
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||
' Deseleziono eventuali pezzi rimasti selezionati
|
||||
EgtDeselectAll()
|
||||
' Riabilito DripBtn
|
||||
DripBtn.IsEnabled = True
|
||||
mmBtn.IsEnabled = True
|
||||
inchBtn.IsEnabled = True
|
||||
' Ricavo nome pezzo selezionato
|
||||
Dim Part1 As Integer = m_MainWindow.m_ImportPageUC.m_nSelectedPart
|
||||
EgtErase(EgtGetFirstNameInGroup(Part1, SIDE_ANGLE_LAYER))
|
||||
' Riabilito bottone reset
|
||||
ResetBtn.IsEnabled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DripBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripBtn.Click
|
||||
If DripBtn.IsChecked() Then
|
||||
' Imposto modalità drip
|
||||
m_SideAngleUC.m_Mode = SideAngleUC.ModeOpt.DRIP
|
||||
LeftGrid.Children.Add(m_SideAngleUC)
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Hidden
|
||||
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||
' Disabilito SideAngleBtn
|
||||
SideAngleBtn.IsEnabled = False
|
||||
mmBtn.IsEnabled = False
|
||||
inchBtn.IsEnabled = False
|
||||
' Disabilito bottone reset
|
||||
ResetBtn.IsEnabled = False
|
||||
Else
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
FileListBox.Visibility = Windows.Visibility.Visible
|
||||
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||
' Deseleziono eventuali pezzi rimasti selezionati
|
||||
EgtDeselectAll()
|
||||
' Riabilito SideAngleBtn
|
||||
SideAngleBtn.IsEnabled = True
|
||||
mmBtn.IsEnabled = True
|
||||
inchBtn.IsEnabled = True
|
||||
' Ricavo nome pezzo selezionato
|
||||
Dim Part1 As Integer = m_MainWindow.m_ImportPageUC.m_nSelectedPart
|
||||
EgtErase(EgtGetFirstNameInGroup(Part1, SIDE_ANGLE_LAYER))
|
||||
|
||||
@@ -111,8 +111,11 @@ Public Class InternalComponentPageUC
|
||||
Dim sCompoImage As String = String.Empty
|
||||
GetPrivateProfileCompo(CompoName, CompoName, nCompoName, sCompo, sCompoImage, m_MainWindow.GetIniFile())
|
||||
|
||||
m_MainWindow.m_DrawPageUC.DimensionBtn.IsChecked = True
|
||||
'm_MainWindow.m_DrawPageUC.DimensionBtn.IsChecked = True
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.DripBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.DripBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.BackBtn.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.PartNameGrd.Visibility = Windows.Visibility.Visible
|
||||
|
||||
@@ -44,6 +44,10 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Alarms
|
||||
|
||||
' Se controllo numerico 0 disattivo la pagina macchina
|
||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
TestingPageBtn.IsEnabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MachinePage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
@@ -126,7 +126,9 @@ Public Class MachineStatusUC
|
||||
End Sub
|
||||
|
||||
Private Sub MachineStatus_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Handles Me.PreviewMouseDown
|
||||
MachinePageClick()
|
||||
If Not GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
MachinePageClick()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub MachinePageClick()
|
||||
|
||||
@@ -182,8 +182,11 @@ Public Class MainComponentPageUC
|
||||
|
||||
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
|
||||
m_MainWindow.m_DrawPageUC.VariablesGrd.Children.Add(m_MainWindow.m_DrawPageUC.m_CompoDimension)
|
||||
m_MainWindow.m_DrawPageUC.DimensionBtn.IsChecked = True
|
||||
'm_MainWindow.m_DrawPageUC.DimensionBtn.IsChecked = True
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.DripBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.DripBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.BackBtn.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.TopGrd.Visibility =
|
||||
|
||||
+34
-24
@@ -318,30 +318,37 @@ Class MainWindow
|
||||
' Imposto tipologia di pc su cui gira il programma
|
||||
m_bIsSiemensPc = If(GetPrivateProfileInt(S_GENERAL, K_SIEMENSPC, 0, GetIniFile()) = 0, False, True)
|
||||
' Posizionamento nella griglia della MachineStatusBar
|
||||
If Not m_bIsSiemensPc Then
|
||||
m_MachineStatusUC.SetValue(Grid.RowProperty, 2)
|
||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, GetMachIniFile()) = 0 Then
|
||||
MainWindowGrid.ColumnDefinitions.RemoveAt(MainWindowGrid.ColumnDefinitions.Count - 1)
|
||||
Else
|
||||
m_MachineStatusUC.SetValue(Grid.ColumnProperty, 2)
|
||||
m_MachineStatusUC.SetValue(Grid.RowSpanProperty, 3)
|
||||
MainWindowGrid.RowDefinitions.RemoveAt(MainWindowGrid.RowDefinitions.Count - 1)
|
||||
Application.Current.Resources("FontSize_LowerCaseCharacter") = New FontSizeConverter().ConvertFrom(CStr("17"))
|
||||
Application.Current.Resources("ComboBox_Height") = New LengthConverter().ConvertFrom(CStr("35"))
|
||||
Application.Current.Resources("FontSize_GroupBoxHeader") = New LengthConverter().ConvertFrom(CStr("19"))
|
||||
Application.Current.Resources("CheckBox_Height") = New LengthConverter().ConvertFrom(CStr("35"))
|
||||
Application.Current.Resources("TextBoxInGroupBox_Margin") = New Thickness(2, 0, 9, 0)
|
||||
Application.Current.Resources("RightTextBoxInBorder_Margin") = New Thickness(1, 0, 12, 0)
|
||||
Application.Current.Resources("LeftTextBoxInBorder_Margin") = New Thickness(4, 0, 9, 0)
|
||||
Application.Current.Resources("LeftTextBoxNoBorder_Margin") = New Thickness(6, 0, 9, 0)
|
||||
Application.Current.Resources("RightComboBoxInBorder_Margin") = New Thickness(2, 0, 11, 0)
|
||||
Application.Current.Resources("MachRightTextBoxInBorder_Margin") = New Thickness(2, 0, 11, 0)
|
||||
Application.Current.Resources("MachLeftTextBoxInBorder_Margin") = New Thickness(4, 0, 9, 0)
|
||||
Application.Current.Resources("LeftComboBoxInBorder_Margin") = New Thickness(4, 0, 9, 0)
|
||||
Application.Current.Resources("MachToolLeftTextBoxNoBorder_Margin") = New Thickness(3, 0, 15, 0)
|
||||
Application.Current.Resources("ArrowImage_Height") = New LengthConverter().ConvertFrom(CStr("52"))
|
||||
Application.Current.Resources("ScaleImage_Height") = New LengthConverter().ConvertFrom(CStr("60"))
|
||||
Application.Current.Resources("MachineStatusImage_Height") = New LengthConverter().ConvertFrom(CStr("65"))
|
||||
Application.Current.Resources("SplitPageBtn_FontSize") = New LengthConverter().ConvertFrom(CStr("14"))
|
||||
WorkInProgressBtn.IsEnabled = False
|
||||
DirectCutBtn.IsEnabled = False
|
||||
Else
|
||||
If Not m_bIsSiemensPc Then
|
||||
m_MachineStatusUC.SetValue(Grid.RowProperty, 2)
|
||||
MainWindowGrid.ColumnDefinitions.RemoveAt(MainWindowGrid.ColumnDefinitions.Count - 1)
|
||||
Else
|
||||
m_MachineStatusUC.SetValue(Grid.ColumnProperty, 2)
|
||||
m_MachineStatusUC.SetValue(Grid.RowSpanProperty, 3)
|
||||
MainWindowGrid.RowDefinitions.RemoveAt(MainWindowGrid.RowDefinitions.Count - 1)
|
||||
Application.Current.Resources("FontSize_LowerCaseCharacter") = New FontSizeConverter().ConvertFrom(CStr("17"))
|
||||
Application.Current.Resources("ComboBox_Height") = New LengthConverter().ConvertFrom(CStr("35"))
|
||||
Application.Current.Resources("FontSize_GroupBoxHeader") = New LengthConverter().ConvertFrom(CStr("19"))
|
||||
Application.Current.Resources("CheckBox_Height") = New LengthConverter().ConvertFrom(CStr("35"))
|
||||
Application.Current.Resources("TextBoxInGroupBox_Margin") = New Thickness(2, 0, 9, 0)
|
||||
Application.Current.Resources("RightTextBoxInBorder_Margin") = New Thickness(1, 0, 12, 0)
|
||||
Application.Current.Resources("LeftTextBoxInBorder_Margin") = New Thickness(4, 0, 9, 0)
|
||||
Application.Current.Resources("LeftTextBoxNoBorder_Margin") = New Thickness(6, 0, 9, 0)
|
||||
Application.Current.Resources("RightComboBoxInBorder_Margin") = New Thickness(2, 0, 11, 0)
|
||||
Application.Current.Resources("MachRightTextBoxInBorder_Margin") = New Thickness(2, 0, 11, 0)
|
||||
Application.Current.Resources("MachLeftTextBoxInBorder_Margin") = New Thickness(4, 0, 9, 0)
|
||||
Application.Current.Resources("LeftComboBoxInBorder_Margin") = New Thickness(4, 0, 9, 0)
|
||||
Application.Current.Resources("MachToolLeftTextBoxNoBorder_Margin") = New Thickness(3, 0, 15, 0)
|
||||
Application.Current.Resources("ArrowImage_Height") = New LengthConverter().ConvertFrom(CStr("52"))
|
||||
Application.Current.Resources("ScaleImage_Height") = New LengthConverter().ConvertFrom(CStr("60"))
|
||||
Application.Current.Resources("MachineStatusImage_Height") = New LengthConverter().ConvertFrom(CStr("65"))
|
||||
Application.Current.Resources("SplitPageBtn_FontSize") = New LengthConverter().ConvertFrom(CStr("14"))
|
||||
End If
|
||||
End If
|
||||
' Posizionemento nella griglia delle Page UserControl
|
||||
m_WorkInProgressPageUC.SetValue(Grid.ColumnProperty, 0)
|
||||
@@ -418,9 +425,12 @@ Class MainWindow
|
||||
End Sub
|
||||
|
||||
Private Sub MainWindow_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Se il controllo numerico non è impostato a 0
|
||||
If Not GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, GetMachIniFile()) = 0 Then
|
||||
' Aggiungo la MachineStatusBar alla MainWindow
|
||||
MainWindowGrid.Children.Add(m_MachineStatusUC)
|
||||
|
||||
' Aggiungo la MachineStatusBar alla MainWindow
|
||||
MainWindowGrid.Children.Add(m_MachineStatusUC)
|
||||
End If
|
||||
|
||||
' Preparo la macchina per la lavorazione in corso
|
||||
m_WorkInProgressPageUC.Prepare()
|
||||
|
||||
@@ -215,8 +215,11 @@ Public Class SecondaryComponentPageUC
|
||||
m_MainWindow.m_DrawPageUC.SelectedComponent(sCompo)
|
||||
m_sCurrCompo = "Compo" & GetButtonNumber(CurrentBtn.Name)
|
||||
m_MainWindow.m_DrawPageUC.VariablesGrd.Children.Add(m_MainWindow.m_DrawPageUC.m_CompoDimension)
|
||||
m_MainWindow.m_DrawPageUC.DimensionBtn.IsChecked = True
|
||||
'm_MainWindow.m_DrawPageUC.DimensionBtn.IsChecked = True
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.DripBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.DripBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.BackBtn.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.PartNameGrd.Visibility = Windows.Visibility.Visible
|
||||
|
||||
+9
-3
@@ -24,7 +24,8 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -68,9 +69,14 @@
|
||||
<CheckBox Name="A10" Grid.Column="1" Grid.Row="9" Height="40" Width="40" HorizontalAlignment="Right"
|
||||
Margin="0,0,11,0"/>
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Row="10" Text="Angolo"
|
||||
<TextBlock Name="Parameter1TxBl" Grid.Row="10" Text="Angolo"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="10" Width="90"
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx" Grid.Column="1" Grid.Row="10" Width="90"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Parameter2TxBl" Grid.Row="11" Text="Accorciamento"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx" Grid.Column="1" Grid.Row="11" Width="90"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
+269
-71
@@ -2,6 +2,13 @@
|
||||
|
||||
Public Class SideAngleUC
|
||||
|
||||
Public Enum ModeOpt As Integer
|
||||
SIDEANGLE = 0
|
||||
DRIP = 1
|
||||
End Enum
|
||||
' Variabile che indica se sono in sideangle o drip
|
||||
Friend m_Mode As ModeOpt
|
||||
|
||||
' Costanti layer componenti
|
||||
Friend Const COMPO_LAYER_AUX As String = "LayAux"
|
||||
Friend Const COMPO_LAYER_QUOTATURE As String = "Quotature"
|
||||
@@ -16,8 +23,16 @@ Public Class SideAngleUC
|
||||
|
||||
' Lista di tutte le entità inclinabili presenti nel progetto
|
||||
Friend m_SideAngleEntityList As New List(Of SideAngleEntity)
|
||||
Friend m_DripEntityList As New List(Of DripEntity)
|
||||
|
||||
Private Sub SideAngleUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Imposto messaggi
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
Parameter1TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 9)
|
||||
Else
|
||||
Parameter1TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 10)
|
||||
End If
|
||||
Parameter2TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11)
|
||||
' Copio riferimento alla DrawPage
|
||||
m_DrawPage = m_MainWindow.m_DrawPageUC
|
||||
|
||||
@@ -30,29 +45,51 @@ Public Class SideAngleUC
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||
' se la lista non è vuota la leggo e metto le inclinazioni giuste
|
||||
If m_SideAngleEntityList.Count > 0 Then
|
||||
' Aggiorno indici che potrebbero essere cambiati se sono state modificate le misure
|
||||
RefreshGeomId()
|
||||
' Aggiorno testi in base alla tabella
|
||||
RefreshSideAngleText()
|
||||
' Aggiorno elenco variabili
|
||||
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
If m_SideAngleEntityList.Count > 0 Then
|
||||
' Aggiorno indici che potrebbero essere cambiati se sono state modificate le misure
|
||||
RefreshGeomId()
|
||||
' Aggiorno testi in base alla tabella
|
||||
RefreshSideAngleText()
|
||||
' Aggiorno check e valori
|
||||
RefreshCheckAndValue()
|
||||
Else
|
||||
' Inizializzo lati per angoli (ne compilo la lista e aggiungo la scritta nel disegno)
|
||||
InitSides()
|
||||
End If
|
||||
Else
|
||||
' Inizializzo lati per angoli (ne compilo la lista e aggiungo la scritta nel disegno)
|
||||
InitSideAngleLine()
|
||||
If m_DripEntityList.Count > 0 Then
|
||||
' Aggiorno indici che potrebbero essere cambiati se sono state modificate le misure
|
||||
RefreshGeomId()
|
||||
' Aggiorno testi in base alla tabella
|
||||
RefreshSideAngleText()
|
||||
Else
|
||||
' Inizializzo lati per angoli (ne compilo la lista e aggiungo la scritta nel disegno)
|
||||
InitSides()
|
||||
End If
|
||||
End If
|
||||
|
||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
||||
DeleteSideAngle()
|
||||
' Inizializzo lati per angoli (ne compilo la lista e aggiungo la scritta nel disegno)
|
||||
InitSideAngleLine()
|
||||
RefreshSideAngleText()
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
DeleteSideAngle()
|
||||
' Inizializzo lati per angoli (ne compilo la lista e aggiungo la scritta nel disegno)
|
||||
InitSides()
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
End If
|
||||
|
||||
' Gestisco Checkbox e nomi in base al numero di lati inclinabili
|
||||
TxBlChBxView()
|
||||
' Gestisco visualizzazione dei parametri
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
Parameter2TxBl.Visibility = Windows.Visibility.Hidden
|
||||
Parameter2TxBx.Visibility = Windows.Visibility.Hidden
|
||||
Else
|
||||
Parameter2TxBl.Visibility = Windows.Visibility.Visible
|
||||
Parameter2TxBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
' Ricavo nome primo pezzo
|
||||
Dim Part1 As Integer = EgtGetFirstInGroup(GDB_ID.ROOT)
|
||||
@@ -130,6 +167,7 @@ Public Class SideAngleUC
|
||||
End Function
|
||||
|
||||
Private Sub SideAngleUC_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
EgtSaveFile("C:\Temp\ProvaDrip1.nge", NGE.BIN)
|
||||
Dim Part1 As Integer
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
' Ricavo nome primo pezzo
|
||||
@@ -139,13 +177,18 @@ Public Class SideAngleUC
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(Part1, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(Part1, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||
' Svuoto layer in cui sono presenti i testi con le inclinazioni dei lati
|
||||
EgtEmptyGroup(EgtGetFirstNameInGroup(Part1, SIDE_ANGLE_LAYER))
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
EgtEmptyGroup(EgtGetFirstNameInGroup(Part1, SIDE_ANGLE_LAYER))
|
||||
Else
|
||||
EgtEmptyGroup(EgtGetFirstNameInGroup(Part1, SIDE_ANGLE_LAYER))
|
||||
End If
|
||||
|
||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||
' Ricavo nome pezzo precedentemente selezionato
|
||||
Part1 = m_MainWindow.m_ImportPageUC.m_PrevSelPart
|
||||
EgtErase(EgtGetFirstNameInGroup(Part1, SIDE_ANGLE_LAYER))
|
||||
End If
|
||||
EgtSaveFile("C:\Temp\ProvaDrip1.nge", NGE.BIN)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
@@ -185,6 +228,16 @@ Public Class SideAngleUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshCheckAndValue()
|
||||
For Each Entity In m_SideAngleEntityList
|
||||
' Creo testo con angolo di inclinazione
|
||||
If Entity.dSideAngle <> 0 Then
|
||||
|
||||
End If
|
||||
'AddTextToLine(Entity.sEntityName & " = " & DoubleToString(Entity.dSideAngle, 1) & "°", Entity.nTextId, Entity.nGeomId, 10, dBBoxRad, True)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshSideAngleText()
|
||||
Dim Part1 As Integer
|
||||
' Imposto contesto corrente
|
||||
@@ -218,17 +271,24 @@ Public Class SideAngleUC
|
||||
EgtSetName(TextLayer, SIDE_ANGLE_LAYER)
|
||||
End If
|
||||
|
||||
For Each Entity In m_SideAngleEntityList
|
||||
' Creo testo con angolo di inclinazione
|
||||
AddTextToLine(Entity.sEntityName & " = " & DoubleToString(Entity.dSideAngle, 1) & "°", Entity.nTextId, Entity.nGeomId, 10, dBBoxRad, True)
|
||||
Next
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
For Each Entity In m_SideAngleEntityList
|
||||
' Creo testo con angolo di inclinazione
|
||||
AddTextToLine(Entity.sEntityName & " = " & DoubleToString(Entity.dSideAngle, 1) & "°", Entity.nTextId, Entity.nGeomId, 10, dBBoxRad, True)
|
||||
Next
|
||||
Else
|
||||
For Each Entity In m_DripEntityList
|
||||
' Creo testo con angolo di inclinazione
|
||||
AddTextToLine(Entity.sEntityName, Entity.nTextId, Entity.nGeomId, 10, dBBoxRad, True)
|
||||
Next
|
||||
End If
|
||||
|
||||
'Aggiorno visualizzazione
|
||||
EgtZoom(ZM.ALL)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub InitSideAngleLine()
|
||||
Private Sub InitSides()
|
||||
Dim Part1 As Integer
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
' Imposto contesto corrente
|
||||
@@ -249,9 +309,12 @@ Public Class SideAngleUC
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtGetBBoxGlob(OutLoop, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
Dim dBBoxRad As Double = 0.5 * Point3d.DistXY(ptMin, ptMax)
|
||||
' Creo layer per testi
|
||||
Dim TextLayer As Integer = EgtCreateGroup(Part1)
|
||||
EgtSetName(TextLayer, SIDE_ANGLE_LAYER)
|
||||
' Creo layer per testi se non esiste già
|
||||
Dim TextLayer As Integer = EgtGetFirstNameInGroup(Part1, SIDE_ANGLE_LAYER)
|
||||
If TextLayer = GDB_ID.NULL Then
|
||||
TextLayer = EgtCreateGroup(Part1)
|
||||
EgtSetName(TextLayer, SIDE_ANGLE_LAYER)
|
||||
End If
|
||||
|
||||
Dim LastLine As Integer = EgtGetLastInGroup(OutLoop)
|
||||
Dim CurrLine As Integer = EgtGetFirstInGroup(OutLoop)
|
||||
@@ -261,8 +324,13 @@ Public Class SideAngleUC
|
||||
' Ciclo che verifica se possibile inclinare la linea corrente fino alla penultima
|
||||
While NextLine <> GDB_ID.NULL
|
||||
If VerifyIsSideAnglePossible(LastLine, CurrLine, NextLine) Then
|
||||
' Aggiungo il lato alla lista di quelli inclinabili e ne azzero l'inclinazione
|
||||
AddSideAngle(CurrLine, TextLayer, dBBoxRad, nEntityIndex)
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
' Aggiungo il lato alla lista di quelli inclinabili e ne azzero l'inclinazione
|
||||
AddSideAngle(CurrLine, TextLayer, dBBoxRad, nEntityIndex)
|
||||
Else
|
||||
' Aggiungo il lato alla lista di quelli su cui è possibile mettere il gocciolatoio
|
||||
AddDripSide(CurrLine, TextLayer, dBBoxRad, nEntityIndex)
|
||||
End If
|
||||
nEntityIndex += 1
|
||||
End If
|
||||
LastLine = CurrLine
|
||||
@@ -272,23 +340,43 @@ Public Class SideAngleUC
|
||||
' Verifico se possibile inclinare l'ultima linea
|
||||
NextLine = EgtGetFirstInGroup(OutLoop)
|
||||
If VerifyIsSideAnglePossible(LastLine, CurrLine, NextLine) Then
|
||||
AddSideAngle(CurrLine, TextLayer, dBBoxRad, nEntityIndex)
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
' Aggiungo il lato alla lista di quelli inclinabili e ne azzero l'inclinazione
|
||||
AddSideAngle(CurrLine, TextLayer, dBBoxRad, nEntityIndex)
|
||||
Else
|
||||
' Aggiungo il lato alla lista di quelli su cui è possibile mettere il gocciolatoio
|
||||
AddDripSide(CurrLine, TextLayer, dBBoxRad, nEntityIndex)
|
||||
End If
|
||||
End If
|
||||
If m_CallingPage = MainWindow.Pages.Import Then
|
||||
For Each Entity In m_SideAngleEntityList
|
||||
If Entity.dSideAngle <> 0 Then
|
||||
Dim nI As Integer = 0
|
||||
StringToInt(Entity.sEntityName.Substring(1), nI)
|
||||
CheckAngle(nI)
|
||||
End If
|
||||
Next
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
For Each Entity In m_SideAngleEntityList
|
||||
If Entity.dSideAngle <> 0 Then
|
||||
Dim nI As Integer = 0
|
||||
StringToInt(Entity.sEntityName.Substring(1), nI)
|
||||
CheckSide(nI)
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
For Each Entity In m_DripEntityList
|
||||
If Entity.bHaveDrip Then
|
||||
Dim nI As Integer = 0
|
||||
StringToInt(Entity.sEntityName.Substring(1), nI)
|
||||
CheckSide(nI)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Funzione che checka gli angoli già inclinati
|
||||
Private Sub CheckAngle(nIndex As Integer)
|
||||
' Seleziono checkbox per angoli inclinati
|
||||
GetChBxFromIndex(10 - (m_SideAngleEntityList.Count - nIndex)).IsChecked = True
|
||||
'Funzione che checka i lati
|
||||
Private Sub CheckSide(nIndex As Integer)
|
||||
' Seleziono checkbox
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
GetChBxFromIndex(10 - (m_SideAngleEntityList.Count - nIndex)).IsChecked = True
|
||||
Else
|
||||
GetChBxFromIndex(10 - (m_DripEntityList.Count - nIndex)).IsChecked = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Funzione che verifica se la linea corrente è inclinabile in base al tipo della precedente e successiva
|
||||
@@ -373,6 +461,33 @@ Public Class SideAngleUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Funzione che gestisce le operazioni sull'entità con gocciolatoio
|
||||
Private Sub AddDripSide(CurrLine As Integer, TextLayer As Integer, dBBoxRad As Double, nEntityIndex As Integer)
|
||||
' Se sono in importa
|
||||
If m_CallingPage = MainWindow.Pages.Import Then
|
||||
EgtSetName(CurrLine, "A" & nEntityIndex.ToString())
|
||||
End If
|
||||
'Ricavo angolo dell'entità
|
||||
Dim bHaveDripVal As Boolean
|
||||
If Not EgtGetInfo(CurrLine, INFO_HAVE_DRIP, bHaveDripVal) Then
|
||||
bHaveDripVal = False
|
||||
End If
|
||||
' Aggiungo entità all'elenco di quelle che possono avere il gocciolatoio
|
||||
Dim sEntityName As String = String.Empty
|
||||
EgtGetName(CurrLine, sEntityName)
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
m_DripEntityList.Add(New DripEntity(CurrLine, sEntityName, TextLayer, False))
|
||||
' Cancello gocciolatoio nell'apposito campo info
|
||||
EgtRemoveInfo(CurrLine, INFO_HAVE_DRIP)
|
||||
' Creo testo entità
|
||||
AddTextToLine(sEntityName, TextLayer, CurrLine, 10, dBBoxRad, True)
|
||||
Else
|
||||
m_DripEntityList.Add(New DripEntity(CurrLine, sEntityName, TextLayer, bHaveDripVal))
|
||||
' Creo testo con angolo di inclinazione 0
|
||||
AddTextToLine(sEntityName, TextLayer, CurrLine, 10, dBBoxRad, True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Funzione che dato un segmento e una distanza, scrive il testo centrato alla sua destra
|
||||
Friend Shared Sub AddTextToLine(sText As String, TextLayer As Integer, CurrLine As Integer, dDistance As Double, dBBoxRad As Double, bTextExt As Boolean)
|
||||
' Calcolo altezza testo
|
||||
@@ -440,22 +555,28 @@ Public Class SideAngleUC
|
||||
|
||||
Private Sub SideAng_Click(sender As Object, e As RoutedEventArgs) Handles A1.Click, A2.Click, A3.Click, A4.Click, A5.Click, A6.Click, A7.Click, A8.Click, A9.Click, A10.Click
|
||||
Dim CurrCheckBox As CheckBox = e.Source
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dSideAngle As Double
|
||||
' Se checked lo imposto al valore letto dalla TxBx
|
||||
If CurrCheckBox.IsChecked() Then
|
||||
StringToDouble(SideAngleTxBx.Text, dSideAngle)
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dSideAngle As Double
|
||||
' Se checked lo imposto al valore letto dalla TxBx
|
||||
If CurrCheckBox.IsChecked() Then
|
||||
StringToDouble(Parameter1TxBx.Text, dSideAngle)
|
||||
Else
|
||||
' altrimenti lo imposto a zero
|
||||
dSideAngle = 0
|
||||
End If
|
||||
'Converto nome checkbox in nome elemento tenendo conto dello slittamento verso il basso
|
||||
Dim nCurrSide As Integer = m_SideAngleEntityList.Count() - (10 - CInt(CurrCheckBox.Name.Substring(1)))
|
||||
Dim sCurrSide As String = "A" & nCurrSide.ToString()
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
ModifySideAngle(sCurrSide, dSideAngle)
|
||||
'Aggiorno tutti i testi
|
||||
RefreshSideAngleText()
|
||||
Else
|
||||
' altrimenti lo imposto a zero
|
||||
dSideAngle = 0
|
||||
|
||||
|
||||
|
||||
End If
|
||||
'Converto nome checkbox in nome elemento tenendo conto dello slittamento verso il basso
|
||||
Dim nCurrSide As Integer = m_SideAngleEntityList.Count() - (10 - CInt(CurrCheckBox.Name.Substring(1)))
|
||||
Dim sCurrSide As String = "A" & nCurrSide.ToString()
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
ModifySideAngle(sCurrSide, dSideAngle)
|
||||
'Aggiorno tutti i testi
|
||||
RefreshSideAngleText()
|
||||
End Sub
|
||||
|
||||
' Funzione che modifica l'inclinazione di un lato
|
||||
@@ -480,7 +601,11 @@ Public Class SideAngleUC
|
||||
|
||||
Friend Sub DeleteSideAngle()
|
||||
' Cancello lista lati inclinati
|
||||
m_SideAngleEntityList.Clear()
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
m_SideAngleEntityList.Clear()
|
||||
Else
|
||||
m_DripEntityList.Clear()
|
||||
End If
|
||||
' Annullo tutti i CheckBox
|
||||
A1.IsChecked = False
|
||||
A2.IsChecked = False
|
||||
@@ -495,27 +620,32 @@ Public Class SideAngleUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SideAngleTxBx_EgtClosed(sender As Object, e As EventArgs) Handles SideAngleTxBx.EgtClosed
|
||||
' ciclo sui checkbox calcolati sul numero di lati inclinabili presenti
|
||||
For Index As Integer = 10 - m_SideAngleEntityList.Count + 1 To 10
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dSideAngle As Double
|
||||
' Se checked lo imposto al valore letto dalla TxBx
|
||||
If GetChBxFromIndex(Index).IsChecked() Then
|
||||
StringToDouble(SideAngleTxBx.Text, dSideAngle)
|
||||
Else
|
||||
' altrimenti lo imposto a zero
|
||||
dSideAngle = 0
|
||||
End If
|
||||
'Converto nome checkbox in nome elemento tenendo conto dello slittamento verso il basso
|
||||
Dim nCurrSide As Integer = m_SideAngleEntityList.Count() - (10 - CInt(GetChBxFromIndex(Index).Name.Substring(1)))
|
||||
Dim sCurrSide As String = "A" & nCurrSide.ToString()
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
ModifySideAngle(sCurrSide, dSideAngle)
|
||||
'Aggiorno tutti i testi
|
||||
RefreshSideAngleText()
|
||||
Next
|
||||
Private Sub Parameter1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1TxBx.EgtClosed
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
' ciclo sui checkbox calcolati sul numero di lati inclinabili presenti
|
||||
For Index As Integer = 10 - m_SideAngleEntityList.Count + 1 To 10
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dSideAngle As Double
|
||||
' Se checked lo imposto al valore letto dalla TxBx
|
||||
If GetChBxFromIndex(Index).IsChecked() Then
|
||||
StringToDouble(Parameter1TxBx.Text, dSideAngle)
|
||||
Else
|
||||
' altrimenti lo imposto a zero
|
||||
dSideAngle = 0
|
||||
End If
|
||||
'Converto nome checkbox in nome elemento tenendo conto dello slittamento verso il basso
|
||||
Dim nCurrSide As Integer = m_SideAngleEntityList.Count() - (10 - CInt(GetChBxFromIndex(Index).Name.Substring(1)))
|
||||
Dim sCurrSide As String = "A" & nCurrSide.ToString()
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
ModifySideAngle(sCurrSide, dSideAngle)
|
||||
'Aggiorno tutti i testi
|
||||
RefreshSideAngleText()
|
||||
Next
|
||||
Else
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub WriteSideAngleForNest(nCtx As Integer)
|
||||
@@ -621,4 +751,72 @@ Friend Class SideAngleEntity
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Friend Class DripEntity
|
||||
|
||||
Private Shared m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private m_nGeomId As Integer
|
||||
Private m_sEntityName As String
|
||||
Private m_nTextId As Integer
|
||||
Private m_bHaveDrip As Boolean
|
||||
|
||||
Public Property nGeomId As Integer
|
||||
Get
|
||||
Return m_nGeomId
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nGeomId = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sEntityName As String
|
||||
Get
|
||||
Return m_sEntityName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nTextId As Integer
|
||||
Get
|
||||
Return m_nTextId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property bHaveDrip As Boolean
|
||||
Get
|
||||
Return m_bHaveDrip
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bHaveDrip = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, bHaveDrip As Boolean)
|
||||
m_nGeomId = nId
|
||||
m_sEntityName = sEntityName
|
||||
m_nTextId = nTextId
|
||||
m_bHaveDrip = bHaveDrip
|
||||
End Sub
|
||||
|
||||
Friend Shared Function FindEntity(sEntityName As String) As DripEntity
|
||||
Dim EntityList As List(Of DripEntity) = Nothing
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.Draw Then
|
||||
EntityList = m_MainWindow.m_DrawPageUC.m_SideAngle.m_DripEntityList
|
||||
ElseIf m_MainWindow.m_ActivePage = MainWindow.Pages.Import Then
|
||||
EntityList = m_MainWindow.m_ImportPageUC.m_SideAngleUC.m_DripEntityList
|
||||
End If
|
||||
|
||||
If IsNothing(EntityList) Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
For Each Entity In EntityList
|
||||
If Entity.m_sEntityName = sEntityName Then
|
||||
Return Entity
|
||||
End If
|
||||
Next
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user