Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 34fa0909ab | |||
| a662d1dca2 | |||
| e5a32f9c21 | |||
| 5e53f20fec | |||
| 44e919c134 | |||
| 52c4b2c424 | |||
| 53fb9b3416 | |||
| 0c7718d91d | |||
| 0fed5c356f | |||
| 2b6e4c36df | |||
| cdc9caf4ee | |||
| 5970a97c15 | |||
| bfc4af4c1e | |||
| 07f51ed6cd | |||
| 5490884eb4 | |||
| 62803684c4 | |||
| 11316a5a5c | |||
| 99333a0bbe | |||
| 3446cbd3c9 | |||
| c5fe1bc7b9 | |||
| a1569b4cd8 | |||
| 5f669acc74 | |||
| e0b69567e3 |
@@ -1,5 +1,7 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports System.ComponentModel
|
Imports System.ComponentModel
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
|
||||||
' Classe che definisce un elemento di base del TreeView
|
' Classe che definisce un elemento di base del TreeView
|
||||||
Public Class TreeViewItemBase
|
Public Class TreeViewItemBase
|
||||||
@@ -31,7 +33,7 @@ Public Class TreeViewItemBase
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_isExpanded As Boolean
|
Friend m_isExpanded As Boolean
|
||||||
Public Property IsExpanded As Boolean
|
Public Property IsExpanded As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_isExpanded
|
Return m_isExpanded
|
||||||
@@ -39,6 +41,25 @@ Public Class TreeViewItemBase
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If (value <> m_isExpanded) Then
|
If (value <> m_isExpanded) Then
|
||||||
m_isExpanded = value
|
m_isExpanded = value
|
||||||
|
If Not Map.refProjectVM.bSelObjOnScene Then
|
||||||
|
Dim m_onldObjTreeOldId As Integer = Map.refManageLayerExpanderVM.m_nObjTreeOldId
|
||||||
|
If Not m_isExpanded Then
|
||||||
|
Else
|
||||||
|
For Each Item As LayerTreeViewItem In Map.refManageLayerExpanderVM.LayerList
|
||||||
|
For Each LayerItem As LayerTreeViewItem In Item.Items
|
||||||
|
If m_isExpanded = LayerItem.m_isExpanded Then
|
||||||
|
If m_onldObjTreeOldId = LayerItem.Id Then
|
||||||
|
Map.refProjectVM.SetLastInteger(LayerItem.Id)
|
||||||
|
Map.refProjectVM.ExecuteCommand(Controller.CMD.DESELECTPARTLAYEROBJ)
|
||||||
|
Else
|
||||||
|
Map.refManageLayerExpanderVM.SelectIdInObjTree(LayerItem.Id)
|
||||||
|
'Map.refProjectVM.ExecuteCommand(Controller.CMD.SETCURRPARTLAYER)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
NotifyPropertyChanged("IsExpanded")
|
NotifyPropertyChanged("IsExpanded")
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -92,6 +113,7 @@ Public Class InheritableTreeViewItem
|
|||||||
Implements INotifyPropertyChanged
|
Implements INotifyPropertyChanged
|
||||||
|
|
||||||
Friend m_Name As String
|
Friend m_Name As String
|
||||||
|
|
||||||
Public Property Name As String
|
Public Property Name As String
|
||||||
Get
|
Get
|
||||||
Return m_Name
|
Return m_Name
|
||||||
@@ -195,7 +217,6 @@ Public Class ParentItem
|
|||||||
Inherits TreeViewItemBase
|
Inherits TreeViewItemBase
|
||||||
|
|
||||||
Private m_sPictureString As String
|
Private m_sPictureString As String
|
||||||
Private m_Items As ObservableCollection(Of ChildItem)
|
|
||||||
|
|
||||||
Public Property PictureString As String
|
Public Property PictureString As String
|
||||||
Get
|
Get
|
||||||
@@ -209,6 +230,7 @@ Public Class ParentItem
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_Items As ObservableCollection(Of ChildItem)
|
||||||
Public Property Items As ObservableCollection(Of ChildItem)
|
Public Property Items As ObservableCollection(Of ChildItem)
|
||||||
Get
|
Get
|
||||||
Return m_Items
|
Return m_Items
|
||||||
@@ -255,4 +277,4 @@ Public Class ChildItem
|
|||||||
MyBase.New(Name, IsSelected, IsExpanded, IsActive)
|
MyBase.New(Name, IsSelected, IsExpanded, IsActive)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -69,6 +69,7 @@ Module ConstIni
|
|||||||
Public Const K_SHOWGFRAME As String = "ShowGFrame"
|
Public Const K_SHOWGFRAME As String = "ShowGFrame"
|
||||||
Public Const K_LINEWIDTH As String = "LineWidth"
|
Public Const K_LINEWIDTH As String = "LineWidth"
|
||||||
Public Const K_MARK As String = "Mark"
|
Public Const K_MARK As String = "Mark"
|
||||||
|
Public Const K_MARK2 As String = "Mark2"
|
||||||
Public Const K_SELSURF As String = "SelSurf"
|
Public Const K_SELSURF As String = "SelSurf"
|
||||||
Public Const K_SHOWMODE As String = "ShowMode"
|
Public Const K_SHOWMODE As String = "ShowMode"
|
||||||
Public Const K_CURVEDIR As String = "CurveDir"
|
Public Const K_CURVEDIR As String = "CurveDir"
|
||||||
@@ -183,6 +184,7 @@ Module ConstIni
|
|||||||
Public Const K_SELGEOMSURFFINISHING As String = "SelGeomSurfFinishing"
|
Public Const K_SELGEOMSURFFINISHING As String = "SelGeomSurfFinishing"
|
||||||
Public Const K_SELGEOMSURFROUGHING As String = "SelGeomSurfRoughing"
|
Public Const K_SELGEOMSURFROUGHING As String = "SelGeomSurfRoughing"
|
||||||
Public Const K_SELGEOMFIVEAXMILLING As String = "SelGeomFiveAxMilling"
|
Public Const K_SELGEOMFIVEAXMILLING As String = "SelGeomFiveAxMilling"
|
||||||
|
Public Const K_SELVMILLQUALITY As String = "VMillQuality"
|
||||||
Public Const K_MACHININGGROUP As String = "MachiningGroup"
|
Public Const K_MACHININGGROUP As String = "MachiningGroup"
|
||||||
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
|
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
|
||||||
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
|
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
|
||||||
|
|||||||
@@ -385,8 +385,8 @@ Public Class MainWindowVM
|
|||||||
EgtSetLockId(sLockId)
|
EgtSetLockId(sLockId)
|
||||||
End If
|
End If
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2607, 1, IniFile.m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2609, 1, IniFile.m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(3279, 2607, 1, IniFile.m_nKeyOptions)
|
EgtGetKeyOptions(3279, 2609, 1, IniFile.m_nKeyOptions)
|
||||||
' Leggo e imposto livello utilizzatore
|
' Leggo e imposto livello utilizzatore
|
||||||
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
||||||
' Imposto abilitazione lavorazioni avanzate
|
' Imposto abilitazione lavorazioni avanzate
|
||||||
@@ -597,8 +597,11 @@ Public Class MainWindowVM
|
|||||||
' pulisco output
|
' pulisco output
|
||||||
Map.refStatusBarVM.NotifyStatusOutput("")
|
Map.refStatusBarVM.NotifyStatusOutput("")
|
||||||
Map.refInputExpanderVM.ResetInputBox()
|
Map.refInputExpanderVM.ResetInputBox()
|
||||||
ElseIf e.Key = Key.Left OrElse e.Key = Key.Right OrElse e.Key = Key.Up OrElse e.Key = Key.Down AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
|
ElseIf e.Key = Key.Left OrElse e.Key = Key.Right OrElse e.Key = Key.Up OrElse e.Key = Key.Down AndAlso
|
||||||
|
Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
|
||||||
Map.refMachiningParameterExpanderVM.FocusSlider()
|
Map.refMachiningParameterExpanderVM.FocusSlider()
|
||||||
|
Dim nStep As Integer = If( e.Key = Key.Right OrElse e.Key = Key.Up, 1, -1)
|
||||||
|
Map.refMachiningParameterExpanderVM.SetSliderValue(nStep)
|
||||||
e.Handled = True
|
e.Handled = True
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -70,6 +70,6 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.6.7.6")>
|
<Assembly: AssemblyVersion("2.6.9.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.6.7.6")>
|
<Assembly: AssemblyFileVersion("2.6.9.1")>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
<Expander IsExpanded="{Binding IsEnabled}" IsEnabled="{Binding IsEnabled}"
|
<Expander IsExpanded="{Binding IsEnabled}" IsEnabled="{Binding IsEnabled}"
|
||||||
Style="{StaticResource ExpanderStyle}">
|
Style="{StaticResource ExpanderStyle}">
|
||||||
<Expander.Header>
|
<Expander.Header>
|
||||||
<TextBlock Text="{Binding PropertiesMsg}"/>
|
<TextBlock Text="{Binding PropertiesMsg}"/>
|
||||||
</Expander.Header>
|
</Expander.Header>
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
<UserControl x:Class="InputExpanderV"
|
<UserControl x:Class="InputExpanderV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||||
|
|
||||||
<Expander Header="{Binding Title}" IsExpanded="{Binding IsExpanded}" IsEnabled="{Binding IsEnabled}"
|
<Expander Header="{Binding Title}" IsExpanded="{Binding IsExpanded}" IsEnabled="{Binding IsEnabled}"
|
||||||
Style="{StaticResource ExpanderStyle}">
|
Style="{StaticResource ExpanderStyle}">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<StackPanel.Style>
|
<StackPanel.Style>
|
||||||
<Style TargetType="{x:Type StackPanel}">
|
<Style TargetType="{x:Type StackPanel}">
|
||||||
@@ -16,26 +18,75 @@
|
|||||||
</StackPanel.Style>
|
</StackPanel.Style>
|
||||||
<TextBlock Text="{Binding TextBlock}"
|
<TextBlock Text="{Binding TextBlock}"
|
||||||
Visibility="{Binding TextVisibility}" Margin="5,5,0,5"/>
|
Visibility="{Binding TextVisibility}" Margin="5,5,0,5"/>
|
||||||
<TextBox Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}"
|
<Grid>
|
||||||
Visibility="{Binding TextVisibility}" Margin="5,0,5,5">
|
<Grid.ColumnDefinitions>
|
||||||
<TextBox.InputBindings>
|
<ColumnDefinition Width="1*"/>
|
||||||
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/>
|
</Grid.ColumnDefinitions>
|
||||||
</TextBox.InputBindings>
|
<TextBox x:Name="Txt" Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}"
|
||||||
</TextBox>
|
PreviewKeyDown="TextBox_PreviewKeyDown" Height="Auto"
|
||||||
|
Visibility="{Binding TextVisibility}" Margin="5,0,5,5" >
|
||||||
|
<TextBox.InputBindings>
|
||||||
|
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
|
||||||
|
<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/>
|
||||||
|
</TextBox.InputBindings>
|
||||||
|
</TextBox>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Content="+"
|
||||||
|
Command="{Binding ShowInfoItemCommand}"
|
||||||
|
Visibility="Collapsed"
|
||||||
|
Width="20"
|
||||||
|
Height="20"
|
||||||
|
Margin="5,-1,5,0"
|
||||||
|
VerticalAlignment="Top"/>
|
||||||
|
<!--Visibility="{Binding ShowInfoItemVisibility}"-->
|
||||||
|
</Grid>
|
||||||
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
|
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
|
||||||
Visibility="{Binding CheckVisibility}" Margin="5,0,5,5"/>
|
Visibility="{Binding CheckVisibility}" Margin="5,0,5,5"/>
|
||||||
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
|
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
|
||||||
Visibility="{Binding ComboVisibility}" Margin="5,0,5,5"/>
|
Visibility="{Binding ComboVisibility}" Margin="5,5,5,5"/>
|
||||||
|
|
||||||
|
<ItemsControl ItemsSource="{Binding InfoList}"
|
||||||
|
Visibility="{Binding InfoVisibility}"
|
||||||
|
Margin="5,5,0,10">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding Key}"
|
||||||
|
Width="70"
|
||||||
|
Margin="0,6,-15,0"/>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Text="{Binding Valour, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,5,5,10">
|
||||||
|
<TextBox.InputBindings>
|
||||||
|
<KeyBinding Key="Enter" Command="{Binding DoneInfoCommand}"/>
|
||||||
|
</TextBox.InputBindings>
|
||||||
|
</TextBox>
|
||||||
|
<Button Grid.Column="2"
|
||||||
|
Content="-"
|
||||||
|
Command="{Binding RemoveInfoItemCommand}"
|
||||||
|
Width="20"
|
||||||
|
Height="20"
|
||||||
|
Margin="5,-2,5,5"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
|
||||||
<Grid Margin="5,0,5,5">
|
<Grid Margin="5,0,5,5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Command="{Binding ShowCommand}" Visibility="{Binding ShowBtnVisibility}"
|
<Button Command="{Binding ShowCommand}" Visibility="{Binding ShowBtnVisibility}"
|
||||||
Content="{Binding ShowMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
|
Content="{Binding ShowMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
|
||||||
<Button Command="{Binding DoneCommand}" Grid.Column="1"
|
<Button Command="{Binding DoneCommand}" Grid.Column="1"
|
||||||
Content="{Binding OkMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
|
Content="{Binding OkMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Expander>
|
</Expander>
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
Public Class InputExpanderV
|
Public Class InputExpanderV
|
||||||
|
|
||||||
|
Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||||
|
If e.Key = Key.Enter And Keyboard.Modifiers = ModifierKeys.Shift Then
|
||||||
|
Txt.AcceptsReturn = True
|
||||||
|
Txt.TextWrapping = TextWrapping.Wrap
|
||||||
|
Txt.AppendText(Environment.NewLine)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,11 +1,29 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports MS.Internal
|
||||||
|
|
||||||
Public Class InputExpanderVM
|
Public Class InputExpanderVM
|
||||||
Inherits ViewModelBase
|
Inherits ViewModelBase
|
||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
' Variabile temporanea per salvare bShow
|
||||||
|
Private m_tmpbShow As Boolean
|
||||||
|
|
||||||
|
Private m_tmpInfoList As New ObservableCollection(Of InfoItem)
|
||||||
|
''' <summary>
|
||||||
|
''' Lista temporanea delle info
|
||||||
|
''' </summary>
|
||||||
|
Private Property tmpInfoList As ObservableCollection(Of InfoItem)
|
||||||
|
Get
|
||||||
|
Return m_tmpInfoList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of InfoItem))
|
||||||
|
m_tmpInfoList = value
|
||||||
|
OnPropertyChanged("tmpInfoList")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
' Expander fields
|
' Expander fields
|
||||||
Private m_IsExpanded As Boolean
|
Private m_IsExpanded As Boolean
|
||||||
Public Property IsExpanded As Boolean
|
Public Property IsExpanded As Boolean
|
||||||
@@ -140,15 +158,47 @@ Public Class InputExpanderVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_InfoList As New ObservableCollection(Of InfoItem)
|
||||||
|
''' <summary>
|
||||||
|
''' Lista delle info modificate
|
||||||
|
''' </summary>
|
||||||
|
Public Property InfoList As ObservableCollection(Of InfoItem)
|
||||||
|
Get
|
||||||
|
Return m_InfoList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of InfoItem))
|
||||||
|
m_InfoList = value
|
||||||
|
OnPropertyChanged("InfoList")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_ComboSelectedIndex As Integer
|
Private m_ComboSelectedIndex As Integer
|
||||||
Public Property ComboSelectedIndex As Integer
|
Public Property ComboSelectedIndex As Integer
|
||||||
Get
|
Get
|
||||||
Return m_ComboSelectedIndex
|
Return m_ComboSelectedIndex
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
Map.refProjectVM.SetLastInteger(value)
|
If m_tmpbShow Then Map.refProjectVM.SetLastInteger(value)
|
||||||
m_ComboSelectedIndex = value
|
m_ComboSelectedIndex = value
|
||||||
|
' Assegno l'indice selezionato ad una variabile temporanea per utilizzarlo quando rimuovo l'info dalla lista
|
||||||
|
Dim tmpComboSelectedIndex As Integer = ComboSelectedIndex
|
||||||
|
' Controllo se l'indice è maggiore o uguale a zero e la lista tmp contiene valori
|
||||||
|
If m_ComboSelectedIndex >= 0 AndAlso tmpInfoList.Count > 0 Then
|
||||||
|
' Controllo se la info è contenuta nella lista ComboItemsList
|
||||||
|
If ComboItemsList.Contains(tmpInfoList(m_ComboSelectedIndex).sKey) Then
|
||||||
|
' Aggiungo la info alla lista per visualizzarla
|
||||||
|
InfoList.Add(New InfoItem(tmpInfoList(m_ComboSelectedIndex).nId, tmpInfoList(m_ComboSelectedIndex).sKey, m_tmpInfoList(m_ComboSelectedIndex).sValour))
|
||||||
|
' Nascondo la combobox
|
||||||
|
ComboVisibility = Visibility.Collapsed
|
||||||
|
' Rimuovo la info dalla ComboItemsList
|
||||||
|
ComboItemsList.Remove(tmpInfoList(m_ComboSelectedIndex).sKey)
|
||||||
|
End If
|
||||||
|
' Rimuovo la info dalla tmpInfoList
|
||||||
|
tmpInfoList.Remove(tmpInfoList(tmpComboSelectedIndex))
|
||||||
|
End If
|
||||||
OnPropertyChanged("ComboSelectedIndex")
|
OnPropertyChanged("ComboSelectedIndex")
|
||||||
|
OnPropertyChanged("ComboItemsList")
|
||||||
|
OnPropertyChanged("InfoList")
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -177,9 +227,43 @@ Public Class InputExpanderVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_ShowInfoItemVisibility As Visibility
|
||||||
|
''' <summary>
|
||||||
|
''' Propietà visibilità bottone +
|
||||||
|
''' </summary>
|
||||||
|
Public Property ShowInfoItemVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_ShowInfoItemVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
If value <> m_ShowInfoItemVisibility Then
|
||||||
|
m_ShowInfoItemVisibility = value
|
||||||
|
OnPropertyChanged("ShowInfoItemVisibility")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_InfoVisibility As Visibility
|
||||||
|
''' <summary>
|
||||||
|
''' Propietà visibilità lista info modificate
|
||||||
|
''' </summary>
|
||||||
|
Public Property InfoVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_InfoVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
If value <> m_InfoVisibility Then
|
||||||
|
m_InfoVisibility = value
|
||||||
|
OnPropertyChanged("InfoVisibility")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
' Commands definition
|
' Commands definition
|
||||||
Private m_cmdShow As ICommand
|
Private m_cmdShow As ICommand
|
||||||
Private m_cmdDone As ICommand
|
Private m_cmdDone As ICommand
|
||||||
|
Private m_cmdShowInfoItem As ICommand
|
||||||
|
Private m_cmdRemoveInfoItem As ICommand
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
@@ -257,6 +341,15 @@ Public Class InputExpanderVM
|
|||||||
''' Execute the Point. This method is invoked by the PointCommand.
|
''' Execute the Point. This method is invoked by the PointCommand.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub Done(ByVal param As Object)
|
Public Sub Done(ByVal param As Object)
|
||||||
|
' Controllo se la lista contenente la info modificata sia presente
|
||||||
|
If InfoList.Count > 0 Then
|
||||||
|
' Ciclo sulla lista
|
||||||
|
For Each Item As InfoItem In InfoList
|
||||||
|
Map.refProjectVM.NotifyInputText((Item.Key & "=" & Item.Valour).Trim())
|
||||||
|
' Assegno a m_TextBox la info modificata
|
||||||
|
m_TextBox &= vbCrLf & (Item.Key & "=" & Item.Valour).Trim() & vbCrLf
|
||||||
|
Next
|
||||||
|
End If
|
||||||
Map.refProjectVM.Done(m_TextBox)
|
Map.refProjectVM.Done(m_TextBox)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -269,6 +362,30 @@ Public Class InputExpanderVM
|
|||||||
|
|
||||||
#End Region ' DoneCommand
|
#End Region ' DoneCommand
|
||||||
|
|
||||||
|
#Region "ShowInfoItemCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Comando per la visualizzazione della combobox
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property ShowInfoItemCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdShowInfoItem Is Nothing Then
|
||||||
|
m_cmdShowInfoItem = New Command(AddressOf ShowInfoItem)
|
||||||
|
End If
|
||||||
|
Return m_cmdShowInfoItem
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione per la visualizzazione della combobox
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="param"></param>
|
||||||
|
Public Sub ShowInfoItem(ByVal param As Object)
|
||||||
|
ComboVisibility = Visibility.Visible
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ShowInfoItemCommand
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
@@ -279,13 +396,37 @@ Public Class InputExpanderVM
|
|||||||
TextBlock = PrepareInputBoxParam.sLabel
|
TextBlock = PrepareInputBoxParam.sLabel
|
||||||
TextBox = ""
|
TextBox = ""
|
||||||
TextVisibility = Visibility.Visible
|
TextVisibility = Visibility.Visible
|
||||||
|
' Controllo se il titolo è uguale a INFO se si
|
||||||
|
If Title = EgtMsg(5359).ToUpper() Then
|
||||||
|
' Metto tmpbShow a false
|
||||||
|
m_tmpbShow = False
|
||||||
|
' Rendo visibile il pulsante che mostra la lista delle info
|
||||||
|
ShowInfoItemVisibility = Visibility.Visible
|
||||||
|
' Rendo visibile la lista delle info selezionate
|
||||||
|
InfoVisibility = Visibility.Visible
|
||||||
|
' Pulisco la lista tmpInfoList
|
||||||
|
tmpInfoList.Clear()
|
||||||
|
' Pulisco la lista InfoList
|
||||||
|
InfoList.Clear()
|
||||||
|
' Pulisco la lista ComboItemsList
|
||||||
|
ComboItemsList.Clear()
|
||||||
|
' Popolo la lista ComboItemsList
|
||||||
|
ComboInfo()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
If PrepareInputBoxParam.sCheckLabel <> "" Then
|
If PrepareInputBoxParam.sCheckLabel <> "" Then
|
||||||
CheckBoxText = PrepareInputBoxParam.sCheckLabel
|
CheckBoxText = PrepareInputBoxParam.sCheckLabel
|
||||||
CheckVisibility = Visibility.Visible
|
CheckVisibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
If PrepareInputBoxParam.bShowCombo Then
|
If PrepareInputBoxParam.bShowCombo Then
|
||||||
|
' Assegno a tmpbShow PrepareInputBoxParam.bShowCombo
|
||||||
|
m_tmpbShow = PrepareInputBoxParam.bShowCombo
|
||||||
|
' Pulisco la lista ComboItemsList
|
||||||
ComboItemsList.Clear()
|
ComboItemsList.Clear()
|
||||||
|
' Pulisco la lista tmpInfoList
|
||||||
|
tmpInfoList.Clear()
|
||||||
|
' Pulisco la lista InfoList
|
||||||
|
InfoList.Clear()
|
||||||
ComboVisibility = Visibility.Visible
|
ComboVisibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
If PrepareInputBoxParam.bShowBtn Then
|
If PrepareInputBoxParam.bShowBtn Then
|
||||||
@@ -302,6 +443,8 @@ Public Class InputExpanderVM
|
|||||||
CheckVisibility = Visibility.Collapsed
|
CheckVisibility = Visibility.Collapsed
|
||||||
ComboVisibility = Visibility.Collapsed
|
ComboVisibility = Visibility.Collapsed
|
||||||
ShowBtnVisibility = Visibility.Collapsed
|
ShowBtnVisibility = Visibility.Collapsed
|
||||||
|
ShowInfoItemVisibility = Visibility.Collapsed
|
||||||
|
InfoVisibility = Visibility.Collapsed
|
||||||
IsExpanded = False
|
IsExpanded = False
|
||||||
IsEnabled = False
|
IsEnabled = False
|
||||||
End Sub
|
End Sub
|
||||||
@@ -329,12 +472,44 @@ Public Class InputExpanderVM
|
|||||||
|
|
||||||
Private Function AddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) As Boolean
|
Private Function AddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) As Boolean
|
||||||
ComboItemsList.Add(sText)
|
ComboItemsList.Add(sText)
|
||||||
|
|
||||||
If bSelected Then
|
If bSelected Then
|
||||||
ComboSelectedIndex = ComboItemsList.Count - 1
|
ComboSelectedIndex = ComboItemsList.Count - 1
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Rimovi nota da info lista
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="InfoItem">Informazione da eliminare</param>
|
||||||
|
Friend Sub RemoveItemInfo(InfoItem As InfoItem)
|
||||||
|
' Rimuovo info da lista modifica
|
||||||
|
InfoList.Remove(InfoItem)
|
||||||
|
' Riaggiungo la info eliminata
|
||||||
|
ComboItemsList.Add(InfoItem.sKey)
|
||||||
|
' Riaggiungo la info eliminata
|
||||||
|
tmpInfoList.Add(InfoItem)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che popola la lista ComboItemsList
|
||||||
|
''' </summary>
|
||||||
|
Private Sub ComboInfo()
|
||||||
|
'''''''''''''''''''''''''''''' Recuperare funzione egtgetallinfo quando sarà pronta
|
||||||
|
Dim val As Integer
|
||||||
|
If Not m_tmpbShow Then
|
||||||
|
For Ind As Integer = 0 To 6
|
||||||
|
val += Ind
|
||||||
|
tmpInfoList.Add(New InfoItem(Ind, "A" & +Ind, val.ToString()))
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each InfoItem As InfoItem In tmpInfoList
|
||||||
|
ComboItemsList.Add(InfoItem.sKey)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Methods
|
#End Region ' Methods
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ Public Class LayerTreeViewItem
|
|||||||
Return m_bOnOff
|
Return m_bOnOff
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If Map.refProjectVM.GetController().GetStep() <> 0 Then Return
|
'If Map.refProjectVM.GetController().GetStep() <> 0 Then Return
|
||||||
If m_bOnOff <> value Then
|
If m_bOnOff <> value Then
|
||||||
m_bOnOff = value
|
m_bOnOff = value
|
||||||
' se abilitato, eseguo operazione
|
' se abilitato, eseguo operazione
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<UserControl x:Class="ManageLayerExpanderV"
|
<UserControl x:Class="ManageLayerExpanderV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
xmlns:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
|
xmlns:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
|
||||||
xmlns:local="clr-namespace:EgtCAM5">
|
xmlns:local="clr-namespace:EgtCAM5">
|
||||||
|
|
||||||
<Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}">
|
<Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}">
|
||||||
<Expander.Header>
|
<Expander.Header>
|
||||||
@@ -20,11 +20,11 @@
|
|||||||
<Button Content="{Binding NewLayerMsg}" Command="{Binding NewLayerCommand}" Height="30"/>
|
<Button Content="{Binding NewLayerMsg}" Command="{Binding NewLayerCommand}" Height="30"/>
|
||||||
<Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/>
|
<Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
<TreeView Name="LayerTreeView" MinHeight="150" MaxHeight="250"
|
<TreeView x:Name="LayerTreeView" MinHeight="150" MaxHeight="250"
|
||||||
ItemsSource="{Binding Path=LayerList}"
|
ItemsSource="{Binding Path=LayerList}"
|
||||||
VirtualizingStackPanel.IsVirtualizing = "True"
|
VirtualizingStackPanel.IsVirtualizing = "True"
|
||||||
VirtualizingStackPanel.VirtualizationMode = "Recycling">
|
VirtualizingStackPanel.VirtualizationMode = "Recycling">
|
||||||
<interactivity:Interaction.Triggers>
|
<interactivity:Interaction.Triggers>
|
||||||
<interactivity:EventTrigger EventName="MouseDoubleClick">
|
<interactivity:EventTrigger EventName="MouseDoubleClick">
|
||||||
<interactivity:InvokeCommandAction Command="{Binding TreeViewDoubleClickCommand}"/>
|
<interactivity:InvokeCommandAction Command="{Binding TreeViewDoubleClickCommand}"/>
|
||||||
@@ -50,8 +50,8 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="0"
|
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="0"
|
||||||
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="False" Height="15" Width="15" Margin="0,0,5,0"/>
|
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>
|
||||||
<Image Grid.Column="1" Source="{Binding PictureString}" Height="15" Margin="0,0,5,0"/>
|
<Image Grid.Column="1" Source="{Binding PictureString}" Height="15" Margin="0,0,5,0"/>
|
||||||
<TextBlock Grid.Column="2" Text="{Binding Name}" Margin="0,0,5,0"/>
|
<TextBlock Grid.Column="2" Text="{Binding Name}" Margin="0,0,5,0"/>
|
||||||
<Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" />
|
<Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" />
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
</TreeView.Resources>
|
</TreeView.Resources>
|
||||||
|
|
||||||
<!--Style dei nodi CathegoryItem che li riquadra di azzurro quando clicckati ed elimina l'ombra grigia
|
<!--Style dei nodi CathegoryItem che li riquadra di azzurro quando clicckati ed elimina l'ombra grigia
|
||||||
che si presenta quando la categoria rimane vuota (ombra causata dal multibinding).-->
|
che si presenta quando la categoria rimane vuota (ombra causata dal multibinding).-->
|
||||||
<TreeView.ItemContainerStyle>
|
<TreeView.ItemContainerStyle>
|
||||||
<Style TargetType="{x:Type TreeViewItem}">
|
<Style TargetType="{x:Type TreeViewItem}">
|
||||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
|||||||
@@ -528,7 +528,7 @@ Public Class ManageLayerExpanderVM
|
|||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
Private WithEvents ObjTreeTimer As New System.Windows.Threading.DispatcherTimer
|
Private WithEvents ObjTreeTimer As New System.Windows.Threading.DispatcherTimer
|
||||||
Private m_nObjTreeOldId As Integer = GDB_ID.NULL
|
Friend m_nObjTreeOldId As Integer = GDB_ID.NULL
|
||||||
Private m_nObjTreeMenuId As Integer = GDB_ID.NULL
|
Private m_nObjTreeMenuId As Integer = GDB_ID.NULL
|
||||||
Private m_bEnableUpdateObjInObjTree As Boolean = True
|
Private m_bEnableUpdateObjInObjTree As Boolean = True
|
||||||
|
|
||||||
|
|||||||
@@ -177,12 +177,17 @@ Public Class EstimationsExpanderVM
|
|||||||
If Not bOk Then Return False
|
If Not bOk Then Return False
|
||||||
' Calcolo della stima
|
' Calcolo della stima
|
||||||
If Not EgtEstimate(sEstFile, sInfo) Then
|
If Not EgtEstimate(sEstFile, sInfo) Then
|
||||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
|
||||||
|
If nErr = 1000 Then
|
||||||
|
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr = 1001 Then
|
||||||
|
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr <> 0 Then
|
||||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||||
sErr = sErr.Replace("Cnc", "Est")
|
sErr = sErr.Replace("Cnc", "Est")
|
||||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||||
Else
|
Else
|
||||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 17), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(EgtMsg(5317), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
End If
|
End If
|
||||||
bOk = False
|
bOk = False
|
||||||
End If
|
End If
|
||||||
|
|||||||
+10
@@ -126,6 +126,16 @@ Public Class MachiningParameterExpanderVM
|
|||||||
m_SliderValue = 1
|
m_SliderValue = 1
|
||||||
NotifyPropertyChanged(NameOf(SliderValue))
|
NotifyPropertyChanged(NameOf(SliderValue))
|
||||||
End Sub
|
End Sub
|
||||||
|
Friend Sub SetSliderValue(value As Integer)
|
||||||
|
Dim nOldSliderValue As Integer = m_SliderValue
|
||||||
|
m_SliderValue = Math.Min( Math.Max( m_SliderValue + value, 1), m_SliderScale)
|
||||||
|
Dim nStep As Integer = m_SliderValue - nOldSliderValue
|
||||||
|
If nStep = 0 Then Return
|
||||||
|
Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, nStep)
|
||||||
|
If nId <> GDB_ID.NULL Then m_nPtEntId = nId
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged(NameOf(SliderValue))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Dim WoodDrillParamExpanderV As WoodDrillingParameterExpanderV
|
Dim WoodDrillParamExpanderV As WoodDrillingParameterExpanderV
|
||||||
Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV
|
Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV
|
||||||
|
|||||||
+10
-4
@@ -106,26 +106,32 @@ Public Class OperationListBoxItem
|
|||||||
Dim EntityIndex As Integer = 0
|
Dim EntityIndex As Integer = 0
|
||||||
Dim SubEntityIndex As Integer = 0
|
Dim SubEntityIndex As Integer = 0
|
||||||
While EgtGetMachiningGeometry(CountIndex, EntityIndex, SubEntityIndex)
|
While EgtGetMachiningGeometry(CountIndex, EntityIndex, SubEntityIndex)
|
||||||
EgtSelectObj( EntityIndex)
|
EgtSelectObj(EntityIndex)
|
||||||
If EgtGetType( EntityIndex) = GDB_TY.SRF_MESH Or EgtGetType( EntityIndex) = GDB_TY.SRF_FRGN Then
|
If EgtGetType(EntityIndex) = GDB_TY.SRF_MESH Or EgtGetType(EntityIndex) = GDB_TY.SRF_FRGN Then
|
||||||
SelData.AddIdSub(EntityIndex, SubEntityIndex)
|
SelData.AddIdSub(EntityIndex, SubEntityIndex)
|
||||||
End If
|
End If
|
||||||
CountIndex += 1
|
CountIndex += 1
|
||||||
End While
|
End While
|
||||||
End If
|
End If
|
||||||
' Notifico al contentcontrol OperationParameter di aggiornarsi
|
' Notifico al contentcontrol OperationParameter di aggiornarsi
|
||||||
If Not IsNothing( Map.refOperationParametersExpanderVM) Then
|
If Not IsNothing(Map.refOperationParametersExpanderVM) Then
|
||||||
Map.refOperationParametersExpanderVM.OnPropertyChanged("OperationParameters")
|
Map.refOperationParametersExpanderVM.OnPropertyChanged("OperationParameters")
|
||||||
End If
|
End If
|
||||||
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveUp_IsEnabled")
|
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveUp_IsEnabled")
|
||||||
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
|
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
|
||||||
' Notifico l'operazione selezionata all'expander con l'albero delle lavorazioni aggiungibili
|
' Notifico l'operazione selezionata all'expander con l'albero delle lavorazioni aggiungibili
|
||||||
If Not IsNothing( Map.refMachiningTreeExpanderVM) Then
|
If Not IsNothing(Map.refMachiningTreeExpanderVM) Then
|
||||||
Map.refMachiningTreeExpanderVM.nSelectedOperationId = Me.Id
|
Map.refMachiningTreeExpanderVM.nSelectedOperationId = Me.Id
|
||||||
End If
|
End If
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
|
' Resetto valori slider
|
||||||
|
If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
|
||||||
|
Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount())
|
||||||
|
Map.refMachiningParameterExpanderVM.ResetSliderValue()
|
||||||
|
End If
|
||||||
|
|
||||||
'OnPropertyChanged("ToolExpanderHeader")
|
'OnPropertyChanged("ToolExpanderHeader")
|
||||||
Map.refOperationsListExpanderVM.OnPropertyChanged("DuplicateCmd_IsEnabled")
|
Map.refOperationsListExpanderVM.OnPropertyChanged("DuplicateCmd_IsEnabled")
|
||||||
Map.refOperationsListExpanderVM.OnPropertyChanged("MachToDb_IsEnabled")
|
Map.refOperationsListExpanderVM.OnPropertyChanged("MachToDb_IsEnabled")
|
||||||
|
|||||||
@@ -101,9 +101,11 @@ Public Class SimulationExpanderVM
|
|||||||
If Not GetCncFileName(True, sCncFile, sInfo) Then Return
|
If Not GetCncFileName(True, sCncFile, sInfo) Then Return
|
||||||
' Eseguo
|
' Eseguo
|
||||||
If Not EgtGenerate(sCncFile, sInfo) Then
|
If Not EgtGenerate(sCncFile, sInfo) Then
|
||||||
Dim nErr = EgtGetLastMachMgrErrorId()
|
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
|
||||||
If nErr = 1000 Then
|
If nErr = 1000 Then
|
||||||
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr = 1001 Then
|
||||||
|
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
ElseIf nErr <> 0 Then
|
ElseIf nErr <> 0 Then
|
||||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||||
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||||
@@ -225,11 +227,16 @@ Public Class SimulationExpanderVM
|
|||||||
UpdateUI()
|
UpdateUI()
|
||||||
' Messaggio in caso di errore
|
' Messaggio in caso di errore
|
||||||
If Not bOk Then
|
If Not bOk Then
|
||||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
|
||||||
|
If nErr = 1000 Then
|
||||||
|
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr = 1001 Then
|
||||||
|
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr <> 0 Then
|
||||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||||
Else
|
Else
|
||||||
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
MessageBox.Show(EgtMsg(15010), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Imposto stato corrente
|
' Imposto stato corrente
|
||||||
@@ -267,11 +274,16 @@ Public Class SimulationExpanderVM
|
|||||||
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
|
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
|
||||||
m_bStopOnNextCollision = True
|
m_bStopOnNextCollision = True
|
||||||
If Not EgtSimStart(False) Then
|
If Not EgtSimStart(False) Then
|
||||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
|
||||||
|
If nErr = 1000 Then
|
||||||
|
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr = 1001 Then
|
||||||
|
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr <> 0 Then
|
||||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||||
Else
|
Else
|
||||||
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
MessageBox.Show(EgtMsg(15010), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
||||||
End If
|
End If
|
||||||
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
|
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ Friend Module OptionModule
|
|||||||
Friend m_SelGeomSurfRoughing As SceneSelModeOpt
|
Friend m_SelGeomSurfRoughing As SceneSelModeOpt
|
||||||
Friend m_SelGeomWaterJetting As SceneSelModeOpt
|
Friend m_SelGeomWaterJetting As SceneSelModeOpt
|
||||||
Friend m_SelGeomFiveAxMilling As SceneSelModeOpt
|
Friend m_SelGeomFiveAxMilling As SceneSelModeOpt
|
||||||
|
Friend m_SelVMillQuality As VMillSelTypeOpt
|
||||||
' Flag per aggiungere una nuova lavorazione alla fine della fase o subito dopo la lavorazione selezionata
|
' Flag per aggiungere una nuova lavorazione alla fine della fase o subito dopo la lavorazione selezionata
|
||||||
Friend m_bNewMachiningIsLastOne As Boolean
|
Friend m_bNewMachiningIsLastOne As Boolean
|
||||||
' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione
|
' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione
|
||||||
@@ -147,6 +148,8 @@ Friend Module OptionModule
|
|||||||
m_SelGeomSurfRoughing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
m_SelGeomSurfRoughing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
||||||
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMFIVEAXMILLING, -1)
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMFIVEAXMILLING, -1)
|
||||||
m_SelGeomFiveAxMilling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
m_SelGeomFiveAxMilling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
||||||
|
Temp = GetPrivateProfileInt(S_MACH, K_SELVMILLQUALITY, 0)
|
||||||
|
m_SelVMillQuality = If(Temp < -2 Or Temp > 2, VMillSelTypeOpt.HIGHER, DirectCast(Temp, VMillSelTypeOpt))
|
||||||
m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES
|
m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES
|
||||||
' Inizializzo variabile che indica posizione nuova operazione di lavorazione
|
' Inizializzo variabile che indica posizione nuova operazione di lavorazione
|
||||||
m_bNewMachiningIsLastOne = (GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0)
|
m_bNewMachiningIsLastOne = (GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0)
|
||||||
|
|||||||
@@ -9,11 +9,12 @@
|
|||||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||||
MinWidth="400" MinHeight="382"
|
MinWidth="400" MinHeight="382"
|
||||||
Width="400" Height="520"
|
Width="400" Height="575"
|
||||||
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
||||||
|
|
||||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||||
<local:GeomTypeConverter x:Key="GeomTypeConverter"/>
|
<local:GeomTypeConverter x:Key="GeomTypeConverter"/>
|
||||||
|
<local:VMillTypeConverter x:Key="VMillTypeConverter"/>
|
||||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||||
|
|
||||||
<TabControl Margin="5,5,5,5">
|
<TabControl Margin="5,5,5,5">
|
||||||
@@ -316,30 +317,41 @@
|
|||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<Grid Margin="5,5,5,0">
|
<Grid Margin="10,5,10,0">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<UniformGrid Columns="2" Grid.ColumnSpan="2" Margin="0,5,0,0">
|
||||||
<RowDefinition Height="1*"/>
|
<TextBlock Text="{Binding VMillQualityMsg}" VerticalAlignment="Center"/>
|
||||||
<RowDefinition Height="1*"/>
|
<ComboBox ItemsSource="{Binding VMillTypeList, Mode=OneWay}"
|
||||||
</Grid.RowDefinitions>
|
SelectedItem="{Binding SelectedVMillTypeType}" Height="25">
|
||||||
<TextBlock Text="{Binding NewMachiningPosMsg}" VerticalAlignment="Center"
|
<ComboBox.ItemTemplate>
|
||||||
Grid.Row="0" Margin="0,0,0,5"/>
|
<DataTemplate>
|
||||||
<CheckBox IsChecked="{Binding NewMachiningIsLastOne}"
|
<TextBlock Text="{Binding Converter={StaticResource VMillTypeConverter}}"/>
|
||||||
Grid.Column="1" Grid.Row="0" Margin="4,0,0,0" VerticalAlignment="Center"/>
|
</DataTemplate>
|
||||||
<TextBlock Text="{Binding UseDispositionScriptMsg}" VerticalAlignment="Center"
|
</ComboBox.ItemTemplate>
|
||||||
Grid.Row="1" Margin="0,0,0,5"/>
|
</ComboBox>
|
||||||
<CheckBox IsChecked="{Binding UseDispositionScript}"
|
</UniformGrid>
|
||||||
Grid.Column="1" Grid.Row="1" Margin="4,0,0,0" VerticalAlignment="Center"/>
|
<TextBlock Grid.Row="1" Text="{Binding NewMachiningPosMsg}" VerticalAlignment="Center"
|
||||||
</Grid>
|
Margin="0,8,0,5"/>
|
||||||
<Grid Margin="5,5,5,0">
|
<CheckBox Grid.Row="1" Grid.Column="1" IsChecked="{Binding NewMachiningIsLastOne}"
|
||||||
<Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,1"/>
|
Margin="4,8,0,0" VerticalAlignment="Center"/>
|
||||||
</Grid>
|
<TextBlock Grid.Row="2" Text="{Binding UseDispositionScriptMsg}"
|
||||||
<Grid Margin="5,5,5,0">
|
VerticalAlignment="Center" Margin="0,5,0,5"/>
|
||||||
<Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/>
|
<CheckBox Grid.Row="2" Grid.Column="1" IsChecked="{Binding UseDispositionScript}"
|
||||||
|
Margin="4,5,0,0" VerticalAlignment="Center"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
<UniformGrid Rows="2">
|
||||||
|
<Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,10,100,5"/>
|
||||||
|
<Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/>
|
||||||
|
</UniformGrid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
|
|||||||
+164
-113
@@ -2,6 +2,7 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports System.Globalization
|
||||||
|
|
||||||
Public Class OptionWindowVM
|
Public Class OptionWindowVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
@@ -19,6 +20,13 @@ Public Class OptionWindowVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_VMillTypeList As ObservableCollection(Of VMillSelTypeOpt) = New ObservableCollection(Of VMillSelTypeOpt)({VMillSelTypeOpt.LOWER, VMillSelTypeOpt.LOW, VMillSelTypeOpt.STANDARD, VMillSelTypeOpt.HIGH, VMillSelTypeOpt.HIGHER})
|
||||||
|
Public ReadOnly Property VMillTypeList As ObservableCollection(Of VMillSelTypeOpt)
|
||||||
|
Get
|
||||||
|
Return m_VMillTypeList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_UnitMeasureList As List(Of String) = New List(Of String)({"mm", "inch", EgtMsg(MSG_OPTIONPAGE + 45)})
|
Private m_UnitMeasureList As List(Of String) = New List(Of String)({"mm", "inch", EgtMsg(MSG_OPTIONPAGE + 45)})
|
||||||
Public ReadOnly Property UnitMeasureList As List(Of String)
|
Public ReadOnly Property UnitMeasureList As List(Of String)
|
||||||
Get
|
Get
|
||||||
@@ -192,6 +200,17 @@ Public Class OptionWindowVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property SelectedVMillTypeType As VMillSelTypeOpt
|
||||||
|
Get
|
||||||
|
Return OptionModule.m_SelVMillQuality
|
||||||
|
End Get
|
||||||
|
Set(value As VMillSelTypeOpt)
|
||||||
|
If WritePrivateProfileString(S_MACH, K_SELVMILLQUALITY, CInt(value).ToString()) Then
|
||||||
|
OptionModule.m_SelVMillQuality = value
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Property GeometryTolerance As String
|
Public Property GeometryTolerance As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(OptionModule.m_dGeometryTolerance, 5)
|
Return LenToString(OptionModule.m_dGeometryTolerance, 5)
|
||||||
@@ -268,8 +287,8 @@ Public Class OptionWindowVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
OptionModule.m_bThickLine = value
|
OptionModule.m_bThickLine = value
|
||||||
WritePrivateProfileString(S_SCENE, K_LINEWIDTH, If( value, "2", "1"))
|
WritePrivateProfileString(S_SCENE, K_LINEWIDTH, If(value, "2", "1"))
|
||||||
EgtSetLineAttribs( If( value, 2, 1))
|
EgtSetLineAttribs(If(value, 2, 1))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -589,7 +608,7 @@ Public Class OptionWindowVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
OptionModule.m_bSpecialOn = value
|
OptionModule.m_bSpecialOn = value
|
||||||
WritePrivateProfileString(S_SPECIAL, K_SPECIALENABLE, If( value, "1", "0"))
|
WritePrivateProfileString(S_SPECIAL, K_SPECIALENABLE, If(value, "1", "0"))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -609,7 +628,7 @@ Public Class OptionWindowVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
OptionModule.m_bBeamOn = value
|
OptionModule.m_bBeamOn = value
|
||||||
WritePrivateProfileString(S_BEAM, K_BEAMENABLE, If( value, "1", "0"))
|
WritePrivateProfileString(S_BEAM, K_BEAMENABLE, If(value, "1", "0"))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -629,7 +648,7 @@ Public Class OptionWindowVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
OptionModule.m_bWallOn = value
|
OptionModule.m_bWallOn = value
|
||||||
WritePrivateProfileString(S_WALL, K_WALLENABLE, If( value, "1", "0"))
|
WritePrivateProfileString(S_WALL, K_WALLENABLE, If(value, "1", "0"))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -644,7 +663,7 @@ Public Class OptionWindowVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
OptionModule.m_bDoorsOn = value
|
OptionModule.m_bDoorsOn = value
|
||||||
WritePrivateProfileString(S_DOORS, K_DDFENABLE, If( value, "1", "0"))
|
WritePrivateProfileString(S_DOORS, K_DDFENABLE, If(value, "1", "0"))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -659,7 +678,7 @@ Public Class OptionWindowVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
OptionModule.m_bGunstockOn = value
|
OptionModule.m_bGunstockOn = value
|
||||||
WritePrivateProfileString(S_GUNSTOCK, K_GUNSTOCKENABLE, If( value, "1", "0"))
|
WritePrivateProfileString(S_GUNSTOCK, K_GUNSTOCKENABLE, If(value, "1", "0"))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -717,17 +736,17 @@ Public Class OptionWindowVM
|
|||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property ThickLineMsg As String
|
Public ReadOnly Property ThickLineMsg As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg( 6536) ' Linee spesse
|
Return EgtMsg(6536) ' Linee spesse
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property SmoothTriMeshMsg As String
|
Public ReadOnly Property SmoothTriMeshMsg As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg( 6518) ' Superfici smussate
|
Return EgtMsg(6518) ' Superfici smussate
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property UpdateLicenceMsg As String
|
Public ReadOnly Property UpdateLicenceMsg As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg( 6553) ' Aggiorna licenza
|
Return EgtMsg(6553) ' Aggiorna licenza
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -966,6 +985,13 @@ Public Class OptionWindowVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property VMillQualityMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(31214)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
@@ -1179,135 +1205,135 @@ Public Class OptionWindowVM
|
|||||||
Dim sMachDir As String = Path.Combine(IniFile.m_sMachinesRoot, sMachName)
|
Dim sMachDir As String = Path.Combine(IniFile.m_sMachinesRoot, sMachName)
|
||||||
' Preparo direttorio temporaneo
|
' Preparo direttorio temporaneo
|
||||||
Dim sTempDir As String = Path.Combine(IniFile.m_sMachinesRoot, "Temp")
|
Dim sTempDir As String = Path.Combine(IniFile.m_sMachinesRoot, "Temp")
|
||||||
If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
|
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
End If
|
End If
|
||||||
My.Computer.FileSystem.CreateDirectory( sTempDir)
|
My.Computer.FileSystem.CreateDirectory(sTempDir)
|
||||||
' Unzip nel direttorio temporaneo
|
' Unzip nel direttorio temporaneo
|
||||||
Using zip As New Ionic.Zip.ZipFile(sMachZip)
|
Using zip As New Ionic.Zip.ZipFile(sMachZip)
|
||||||
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
|
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
|
||||||
End Using
|
End Using
|
||||||
' Se non è una macchina segnalo il problema ed esco
|
' Se non è una macchina segnalo il problema ed esco
|
||||||
If Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".ini")) Or
|
If Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".ini")) Or
|
||||||
Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".mlde")) Then
|
Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".mlde")) Then
|
||||||
' Il file {0} non contiene una macchina - Avviso
|
' Il file {0} non contiene una macchina - Avviso
|
||||||
Dim sOut As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 29), sMachZip)
|
Dim sOut As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 29), sMachZip)
|
||||||
MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
|
MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||||
' Rimuovo il direttorio temporaneo ed esco
|
' Rimuovo il direttorio temporaneo ed esco
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Imposto data e ora correnti al file mlde della macchina
|
' Imposto data e ora correnti al file mlde della macchina
|
||||||
Try
|
Try
|
||||||
File.SetLastWriteTime( Path.Combine( sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now)
|
File.SetLastWriteTime(Path.Combine(sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
' Verifico esistenza di una macchina con lo stesso nome
|
' Verifico esistenza di una macchina con lo stesso nome
|
||||||
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists( sMachDir)
|
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists(sMachDir)
|
||||||
Dim bUpdate As Boolean = True
|
Dim bUpdate As Boolean = True
|
||||||
If bOldExists Then
|
If bOldExists Then
|
||||||
Dim MachBox As New MachineBox( Application.Current.MainWindow, sMachName)
|
Dim MachBox As New MachineBox(Application.Current.MainWindow, sMachName)
|
||||||
Select MachBox.ShowDialog()
|
Select Case MachBox.ShowDialog()
|
||||||
Case MessageBoxResult.Yes
|
Case MessageBoxResult.Yes
|
||||||
bUpdate = False
|
bUpdate = False
|
||||||
Case MessageBoxResult.No
|
Case MessageBoxResult.No
|
||||||
bUpdate = True
|
bUpdate = True
|
||||||
Case MessageBoxResult.Cancel
|
Case MessageBoxResult.Cancel
|
||||||
' Rimuovo il direttorio temporaneo ed esco
|
' Rimuovo il direttorio temporaneo ed esco
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
Return
|
Return
|
||||||
End Select
|
End Select
|
||||||
' Faccio una copia di backup della macchina corrente
|
' Faccio una copia di backup della macchina corrente
|
||||||
Dim sBackupDir As String = sMachDir & ".old"
|
Dim sBackupDir As String = sMachDir & ".old"
|
||||||
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
|
If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
|
||||||
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
End If
|
End If
|
||||||
Try
|
Try
|
||||||
My.Computer.FileSystem.MoveDirectory( sMachDir, sBackupDir, True)
|
My.Computer.FileSystem.MoveDirectory(sMachDir, sBackupDir, True)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
' Ripristino lo stato originale ed esco
|
' Ripristino lo stato originale ed esco
|
||||||
My.Computer.FileSystem.MoveDirectory( sBackupDir, sMachDir, True)
|
My.Computer.FileSystem.MoveDirectory(sBackupDir, sMachDir, True)
|
||||||
' L'aggiornamento della macchina "{0}" non è riuscito.
|
' L'aggiornamento della macchina "{0}" non è riuscito.
|
||||||
Dim sKo As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 35), sMachName)
|
Dim sKo As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 35), sMachName)
|
||||||
EgtOutLog( sKo)
|
EgtOutLog(sKo)
|
||||||
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||||
Return
|
Return
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
' Installo la macchina
|
' Installo la macchina
|
||||||
My.Computer.FileSystem.MoveDirectory( Path.Combine( sTempDir, sMachName), sMachDir, True)
|
My.Computer.FileSystem.MoveDirectory(Path.Combine(sTempDir, sMachName), sMachDir, True)
|
||||||
' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi
|
' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi
|
||||||
If bOldExists And bUpdate Then
|
If bOldExists And bUpdate Then
|
||||||
Dim sBackupDir As String = sMachDir & ".old"
|
Dim sBackupDir As String = sMachDir & ".old"
|
||||||
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Tools") Then
|
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Tools") Then
|
||||||
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Tools") Then
|
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Tools") Then
|
||||||
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Tools", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Tools", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
End If
|
End If
|
||||||
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Tools", sMachDir & "\Tools", True)
|
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Tools", sMachDir & "\Tools", True)
|
||||||
End If
|
End If
|
||||||
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Machinings") Then
|
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Machinings") Then
|
||||||
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Machinings") Then
|
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Machinings") Then
|
||||||
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Machinings", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Machinings", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
End If
|
End If
|
||||||
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Machinings", sMachDir & "\Machinings", True)
|
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Machinings", sMachDir & "\Machinings", True)
|
||||||
End If
|
End If
|
||||||
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\SetUp") Then
|
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\SetUp") Then
|
||||||
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\SetUp") Then
|
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\SetUp") Then
|
||||||
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\SetUp", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\SetUp", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
End If
|
End If
|
||||||
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\SetUp", sMachDir & "\SetUp", True)
|
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\SetUp", sMachDir & "\SetUp", True)
|
||||||
End If
|
End If
|
||||||
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Beam") Then
|
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Beam") Then
|
||||||
' Flag per sovrascrivere vecchio file BeamData.lua con nuovo
|
' Flag per sovrascrivere vecchio file BeamData.lua con nuovo
|
||||||
Dim bBeamDataExists As Boolean = False
|
Dim bBeamDataExists As Boolean = False
|
||||||
Const sBeamData As String = "\BeamData.lua"
|
Const sBeamData As String = "\BeamData.lua"
|
||||||
' Flag per sovrascrivere vecchio file MachiningTypes.ini
|
' Flag per sovrascrivere vecchio file MachiningTypes.ini
|
||||||
Dim bMchgTypesExists As Boolean = False
|
Dim bMchgTypesExists As Boolean = False
|
||||||
Const sMchgTypes As String = "\MachiningTypes.ini"
|
Const sMchgTypes As String = "\MachiningTypes.ini"
|
||||||
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Beam") Then
|
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Beam") Then
|
||||||
If My.Computer.FileSystem.FileExists( sMachDir & "\Beam" & sBeamData) Then
|
If My.Computer.FileSystem.FileExists(sMachDir & "\Beam" & sBeamData) Then
|
||||||
bBeamDataExists = True
|
bBeamDataExists = True
|
||||||
My.Computer.FileSystem.MoveFile( sMachDir & "\Beam" & sBeamData, sMachDir & sBeamData, True)
|
My.Computer.FileSystem.MoveFile(sMachDir & "\Beam" & sBeamData, sMachDir & sBeamData, True)
|
||||||
End If
|
End If
|
||||||
If My.Computer.FileSystem.FileExists( sMachDir & "\Beam" & sMchgTypes) Then
|
If My.Computer.FileSystem.FileExists(sMachDir & "\Beam" & sMchgTypes) Then
|
||||||
bMchgTypesExists = True
|
bMchgTypesExists = True
|
||||||
My.Computer.FileSystem.MoveFile( sMachDir & "\Beam" & sMchgTypes, sMachDir & sMchgTypes, True)
|
My.Computer.FileSystem.MoveFile(sMachDir & "\Beam" & sMchgTypes, sMachDir & sMchgTypes, True)
|
||||||
End If
|
End If
|
||||||
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Beam", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Beam", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
End If
|
End If
|
||||||
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Beam", sMachDir & "\Beam", True)
|
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Beam", sMachDir & "\Beam", True)
|
||||||
If bBeamDataExists Then My.Computer.FileSystem.MoveFile( sMachDir & sBeamData, sMachDir & "\Beam" & sBeamData, True)
|
If bBeamDataExists Then My.Computer.FileSystem.MoveFile(sMachDir & sBeamData, sMachDir & "\Beam" & sBeamData, True)
|
||||||
If bMchgTypesExists Then My.Computer.FileSystem.MoveFile( sMachDir & sMchgTypes, sMachDir & "\Beam" & sMchgTypes, True)
|
If bMchgTypesExists Then My.Computer.FileSystem.MoveFile(sMachDir & sMchgTypes, sMachDir & "\Beam" & sMchgTypes, True)
|
||||||
End If
|
End If
|
||||||
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Wall") Then
|
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Wall") Then
|
||||||
' Flag per sovrascrittura vecchio file WallData.lua con nuovo
|
' Flag per sovrascrittura vecchio file WallData.lua con nuovo
|
||||||
Dim bWallDataExists As Boolean = False
|
Dim bWallDataExists As Boolean = False
|
||||||
Const sWallData As String = "\WallData.lua"
|
Const sWallData As String = "\WallData.lua"
|
||||||
' Flag per sovrascrivere vecchio file MachiningTypes.ini
|
' Flag per sovrascrivere vecchio file MachiningTypes.ini
|
||||||
Dim bMchgTypesExists As Boolean = False
|
Dim bMchgTypesExists As Boolean = False
|
||||||
Const sMchgTypes As String = "\MachiningTypes.ini"
|
Const sMchgTypes As String = "\MachiningTypes.ini"
|
||||||
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Wall") Then
|
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Wall") Then
|
||||||
If My.Computer.FileSystem.FileExists( sMachDir & "\Wall" & sWallData) Then
|
If My.Computer.FileSystem.FileExists(sMachDir & "\Wall" & sWallData) Then
|
||||||
bWallDataExists = True
|
bWallDataExists = True
|
||||||
My.Computer.FileSystem.MoveFile( sMachDir & "\Wall" & sWallData, sMachDir & sWallData, True)
|
My.Computer.FileSystem.MoveFile(sMachDir & "\Wall" & sWallData, sMachDir & sWallData, True)
|
||||||
End If
|
End If
|
||||||
If My.Computer.FileSystem.FileExists( sMachDir & "\Wall" & sMchgTypes) Then
|
If My.Computer.FileSystem.FileExists(sMachDir & "\Wall" & sMchgTypes) Then
|
||||||
bMchgTypesExists = True
|
bMchgTypesExists = True
|
||||||
My.Computer.FileSystem.MoveFile( sMachDir & "\Wall" & sMchgTypes, sMachDir & sMchgTypes, True)
|
My.Computer.FileSystem.MoveFile(sMachDir & "\Wall" & sMchgTypes, sMachDir & sMchgTypes, True)
|
||||||
End If
|
End If
|
||||||
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Wall", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Wall", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
End If
|
End If
|
||||||
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Wall", sMachDir & "\Wall", True)
|
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Wall", sMachDir & "\Wall", True)
|
||||||
If bWallDataExists Then My.Computer.FileSystem.MoveFile( sMachDir & sWallData, sMachDir & "\Wall" & sWallData, True)
|
If bWallDataExists Then My.Computer.FileSystem.MoveFile(sMachDir & sWallData, sMachDir & "\Wall" & sWallData, True)
|
||||||
If bMchgTypesExists Then My.Computer.FileSystem.MoveFile( sMachDir & sMchgTypes, sMachDir & "\Wall" & sMchgTypes, True)
|
If bMchgTypesExists Then My.Computer.FileSystem.MoveFile(sMachDir & sMchgTypes, sMachDir & "\Wall" & sMchgTypes, True)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
'La macchina "{0}" è stata aggiornata con successo.
|
'La macchina "{0}" è stata aggiornata con successo.
|
||||||
Dim sOk As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 30), sMachName)
|
Dim sOk As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 30), sMachName)
|
||||||
EgtOutLog( sOk)
|
EgtOutLog(sOk)
|
||||||
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
|
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
|
||||||
' Rimuovo il direttorio temporaneo
|
' Rimuovo il direttorio temporaneo
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
' Aggiorno la lista delle macchina
|
' Aggiorno la lista delle macchina
|
||||||
Map.refMachinePanelVM.InsertMachine(sMachDir)
|
Map.refMachinePanelVM.InsertMachine(sMachDir)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1355,7 +1381,7 @@ Public Class OptionWindowVM
|
|||||||
' aggiungo i file della Macchina
|
' aggiungo i file della Macchina
|
||||||
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sCurrMachineName
|
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sCurrMachineName
|
||||||
If Directory.Exists(sMachineDir) Then
|
If Directory.Exists(sMachineDir) Then
|
||||||
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
|
zip.AddSelectedFiles("name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
|
||||||
End If
|
End If
|
||||||
' salvo lo zip
|
' salvo lo zip
|
||||||
zip.Save()
|
zip.Save()
|
||||||
@@ -1366,7 +1392,7 @@ Public Class OptionWindowVM
|
|||||||
Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName)
|
Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName)
|
||||||
EgtOutLog(sKo)
|
EgtOutLog(sKo)
|
||||||
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||||
return
|
Return
|
||||||
End Try
|
End Try
|
||||||
'La macchina "{0}" è stata esportata con successo.
|
'La macchina "{0}" è stata esportata con successo.
|
||||||
Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName)
|
Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName)
|
||||||
@@ -1391,10 +1417,10 @@ Public Class OptionWindowVM
|
|||||||
Dim sExeVer As String = IniFile.GetProgramVersion()
|
Dim sExeVer As String = IniFile.GetProgramVersion()
|
||||||
' Verifico presenza di una precedente installazione del Beam
|
' Verifico presenza di una precedente installazione del Beam
|
||||||
Dim sBeamVer As String = ""
|
Dim sBeamVer As String = ""
|
||||||
IniFile.GetSpecialLuaVersion( IniFile.m_sBeamDirPath, sBeamVer)
|
IniFile.GetSpecialLuaVersion(IniFile.m_sBeamDirPath, sBeamVer)
|
||||||
If String.IsNullOrEmpty( sBeamVer) Then
|
If String.IsNullOrEmpty(sBeamVer) Then
|
||||||
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
|
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
|
||||||
Dim sOut As String = String.Format(EgtMsg(6555), "Beam")
|
Dim sOut As String = String.Format(EgtMsg(6555), "Beam")
|
||||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||||
' Esco
|
' Esco
|
||||||
Return
|
Return
|
||||||
@@ -1410,26 +1436,26 @@ Public Class OptionWindowVM
|
|||||||
Dim sBeamZip As String = BeamDlg.FileName
|
Dim sBeamZip As String = BeamDlg.FileName
|
||||||
' Preparo direttorio temporaneo
|
' Preparo direttorio temporaneo
|
||||||
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "Beam")
|
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "Beam")
|
||||||
If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
|
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
End If
|
End If
|
||||||
My.Computer.FileSystem.CreateDirectory( sTempDir)
|
My.Computer.FileSystem.CreateDirectory(sTempDir)
|
||||||
' Unzip nel direttorio temporaneo
|
' Unzip nel direttorio temporaneo
|
||||||
Using zip As New Ionic.Zip.ZipFile(sBeamZip)
|
Using zip As New Ionic.Zip.ZipFile(sBeamZip)
|
||||||
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
|
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
|
||||||
End Using
|
End Using
|
||||||
' Recupero i dati del nuovo Beam
|
' Recupero i dati del nuovo Beam
|
||||||
Dim sNewName = ""
|
Dim sNewName = ""
|
||||||
Dim sNewVer = ""
|
Dim sNewVer = ""
|
||||||
Dim sNewMinExe = ""
|
Dim sNewMinExe = ""
|
||||||
IniFile.GetSpecialLuaData( sTempDir, sNewName, sNewVer, sNewMinExe)
|
IniFile.GetSpecialLuaData(sTempDir, sNewName, sNewVer, sNewMinExe)
|
||||||
' Verifico che sia veramente il Beam
|
' Verifico che sia veramente il Beam
|
||||||
If String.Compare(sNewName, "Beam") <> 0 Then
|
If String.Compare(sNewName, "Beam") <> 0 Then
|
||||||
' Il file zip non contiene il modulo "{0}". - Avviso
|
' Il file zip non contiene il modulo "{0}". - Avviso
|
||||||
Dim sOut As String = String.Format(EgtMsg(6556), "Beam")
|
Dim sOut As String = String.Format(EgtMsg(6556), "Beam")
|
||||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||||
' Rimuovo il direttorio temporaneo ed esco
|
' Rimuovo il direttorio temporaneo ed esco
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Verifico la versione minima del programma
|
' Verifico la versione minima del programma
|
||||||
@@ -1438,42 +1464,42 @@ Public Class OptionWindowVM
|
|||||||
Dim sOut As String = String.Format(EgtMsg(6557), "Beam", sNewMinExe)
|
Dim sOut As String = String.Format(EgtMsg(6557), "Beam", sNewMinExe)
|
||||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||||
' Rimuovo il direttorio temporaneo ed esco
|
' Rimuovo il direttorio temporaneo ed esco
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Verifico la versione del Beam e se più vecchia chiedo cosa fare
|
' Verifico la versione del Beam e se più vecchia chiedo cosa fare
|
||||||
If String.Compare(sNewVer, sBeamVer) < 0 Then
|
If String.Compare(sNewVer, sBeamVer) < 0 Then
|
||||||
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
|
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
|
||||||
Dim sOut As String = String.Format(EgtMsg(6558), "Beam")
|
Dim sOut As String = String.Format(EgtMsg(6558), "Beam")
|
||||||
if MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
|
If MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
|
||||||
' Rimuovo il direttorio temporaneo ed esco
|
' Rimuovo il direttorio temporaneo ed esco
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Faccio una copia di backup del Beam corrente
|
' Faccio una copia di backup del Beam corrente
|
||||||
Dim sBackupDir As String = IniFile.m_sBeamDirPath & ".old"
|
Dim sBackupDir As String = IniFile.m_sBeamDirPath & ".old"
|
||||||
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
|
If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
|
||||||
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
End If
|
End If
|
||||||
Try
|
Try
|
||||||
My.Computer.FileSystem.MoveDirectory( IniFile.m_sBeamDirPath, sBackupDir, True)
|
My.Computer.FileSystem.MoveDirectory(IniFile.m_sBeamDirPath, sBackupDir, True)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
' Ripristino lo stato originale ed esco
|
' Ripristino lo stato originale ed esco
|
||||||
My.Computer.FileSystem.MoveDirectory( sBackupDir, IniFile.m_sBeamDirPath, True)
|
My.Computer.FileSystem.MoveDirectory(sBackupDir, IniFile.m_sBeamDirPath, True)
|
||||||
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
|
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
|
||||||
Dim sOut As String = String.Format(EgtMsg(6559), "Beam")
|
Dim sOut As String = String.Format(EgtMsg(6559), "Beam")
|
||||||
EgtOutLog( sOut)
|
EgtOutLog(sOut)
|
||||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
' Rimuovo il direttorio temporaneo ed esco
|
' Rimuovo il direttorio temporaneo ed esco
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
Return
|
Return
|
||||||
End Try
|
End Try
|
||||||
' Installo il Beam
|
' Installo il Beam
|
||||||
My.Computer.FileSystem.MoveDirectory( sTempDir, IniFile.m_sBeamDirPath, True)
|
My.Computer.FileSystem.MoveDirectory(sTempDir, IniFile.m_sBeamDirPath, True)
|
||||||
' Il modulo "{0}" è stata aggiornato con successo. - Info
|
' Il modulo "{0}" è stata aggiornato con successo. - Info
|
||||||
Dim sOk As String = String.Format(EgtMsg(6560), "Beam")
|
Dim sOk As String = String.Format(EgtMsg(6560), "Beam")
|
||||||
EgtOutLog( sOk)
|
EgtOutLog(sOk)
|
||||||
MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
|
MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1495,10 +1521,10 @@ Public Class OptionWindowVM
|
|||||||
Dim sExeVer As String = IniFile.GetProgramVersion()
|
Dim sExeVer As String = IniFile.GetProgramVersion()
|
||||||
' Verifico presenza di una precedente installazione del Wall
|
' Verifico presenza di una precedente installazione del Wall
|
||||||
Dim sWallVer As String = ""
|
Dim sWallVer As String = ""
|
||||||
IniFile.GetSpecialLuaVersion( IniFile.m_sWallDirPath, sWallVer)
|
IniFile.GetSpecialLuaVersion(IniFile.m_sWallDirPath, sWallVer)
|
||||||
If String.IsNullOrEmpty( sWallVer) Then
|
If String.IsNullOrEmpty(sWallVer) Then
|
||||||
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
|
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
|
||||||
Dim sOut As String = String.Format(EgtMsg(6555), "Wall")
|
Dim sOut As String = String.Format(EgtMsg(6555), "Wall")
|
||||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||||
' Esco
|
' Esco
|
||||||
Return
|
Return
|
||||||
@@ -1514,26 +1540,26 @@ Public Class OptionWindowVM
|
|||||||
Dim sWallZip As String = WallDlg.FileName
|
Dim sWallZip As String = WallDlg.FileName
|
||||||
' Preparo direttorio temporaneo
|
' Preparo direttorio temporaneo
|
||||||
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "Wall")
|
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "Wall")
|
||||||
If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
|
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
End If
|
End If
|
||||||
My.Computer.FileSystem.CreateDirectory( sTempDir)
|
My.Computer.FileSystem.CreateDirectory(sTempDir)
|
||||||
' Unzip nel direttorio temporaneo
|
' Unzip nel direttorio temporaneo
|
||||||
Using zip As New Ionic.Zip.ZipFile(sWallZip)
|
Using zip As New Ionic.Zip.ZipFile(sWallZip)
|
||||||
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
|
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
|
||||||
End Using
|
End Using
|
||||||
' Recupero i dati del nuovo Wall
|
' Recupero i dati del nuovo Wall
|
||||||
Dim sNewName = ""
|
Dim sNewName = ""
|
||||||
Dim sNewVer = ""
|
Dim sNewVer = ""
|
||||||
Dim sNewMinExe = ""
|
Dim sNewMinExe = ""
|
||||||
IniFile.GetSpecialLuaData( sTempDir, sNewName, sNewVer, sNewMinExe)
|
IniFile.GetSpecialLuaData(sTempDir, sNewName, sNewVer, sNewMinExe)
|
||||||
' Verifico che sia veramente il Wall
|
' Verifico che sia veramente il Wall
|
||||||
If String.Compare(sNewName, "Wall") <> 0 Then
|
If String.Compare(sNewName, "Wall") <> 0 Then
|
||||||
' Il file zip non contiene il modulo "{0}". - Avviso
|
' Il file zip non contiene il modulo "{0}". - Avviso
|
||||||
Dim sOut As String = String.Format(EgtMsg(6556), "Wall")
|
Dim sOut As String = String.Format(EgtMsg(6556), "Wall")
|
||||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||||
' Rimuovo il direttorio temporaneo ed esco
|
' Rimuovo il direttorio temporaneo ed esco
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Verifico la versione minima del programma
|
' Verifico la versione minima del programma
|
||||||
@@ -1542,42 +1568,42 @@ Public Class OptionWindowVM
|
|||||||
Dim sOut As String = String.Format(EgtMsg(6557), "Wall", sNewMinExe)
|
Dim sOut As String = String.Format(EgtMsg(6557), "Wall", sNewMinExe)
|
||||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||||
' Rimuovo il direttorio temporaneo ed esco
|
' Rimuovo il direttorio temporaneo ed esco
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Verifico la versione del Wall e se più vecchia chiedo cosa fare
|
' Verifico la versione del Wall e se più vecchia chiedo cosa fare
|
||||||
If String.Compare(sNewVer, sWallVer) < 0 Then
|
If String.Compare(sNewVer, sWallVer) < 0 Then
|
||||||
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
|
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
|
||||||
Dim sOut As String = String.Format(EgtMsg(6558), "Wall")
|
Dim sOut As String = String.Format(EgtMsg(6558), "Wall")
|
||||||
if MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
|
If MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
|
||||||
' Rimuovo il direttorio temporaneo ed esco
|
' Rimuovo il direttorio temporaneo ed esco
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Faccio una copia di backup del Wall corrente
|
' Faccio una copia di backup del Wall corrente
|
||||||
Dim sBackupDir As String = IniFile.m_sWallDirPath & ".old"
|
Dim sBackupDir As String = IniFile.m_sWallDirPath & ".old"
|
||||||
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
|
If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
|
||||||
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
End If
|
End If
|
||||||
Try
|
Try
|
||||||
My.Computer.FileSystem.MoveDirectory( IniFile.m_sWallDirPath, sBackupDir, True)
|
My.Computer.FileSystem.MoveDirectory(IniFile.m_sWallDirPath, sBackupDir, True)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
' Ripristino lo stato originale ed esco
|
' Ripristino lo stato originale ed esco
|
||||||
My.Computer.FileSystem.MoveDirectory( sBackupDir, IniFile.m_sWallDirPath, True)
|
My.Computer.FileSystem.MoveDirectory(sBackupDir, IniFile.m_sWallDirPath, True)
|
||||||
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
|
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
|
||||||
Dim sOut As String = String.Format(EgtMsg(6559), "Wall")
|
Dim sOut As String = String.Format(EgtMsg(6559), "Wall")
|
||||||
EgtOutLog( sOut)
|
EgtOutLog(sOut)
|
||||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
' Rimuovo il direttorio temporaneo ed esco
|
' Rimuovo il direttorio temporaneo ed esco
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
Return
|
Return
|
||||||
End Try
|
End Try
|
||||||
' Installo il Wall
|
' Installo il Wall
|
||||||
My.Computer.FileSystem.MoveDirectory( sTempDir, IniFile.m_sWallDirPath, True)
|
My.Computer.FileSystem.MoveDirectory(sTempDir, IniFile.m_sWallDirPath, True)
|
||||||
' Il modulo "{0}" è stata aggiornato con successo. - Info
|
' Il modulo "{0}" è stata aggiornato con successo. - Info
|
||||||
Dim sOk As String = String.Format(EgtMsg(6560), "Wall")
|
Dim sOk As String = String.Format(EgtMsg(6560), "Wall")
|
||||||
EgtOutLog( sOk)
|
EgtOutLog(sOk)
|
||||||
MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
|
MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1665,4 +1691,29 @@ Public Class GeomTypeConverter
|
|||||||
Throw New NotImplementedException
|
Throw New NotImplementedException
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class VMillTypeConverter
|
||||||
|
Implements IValueConverter
|
||||||
|
|
||||||
|
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||||
|
Select Case CInt(value)
|
||||||
|
Case VMillSelTypeOpt.LOWER
|
||||||
|
Return EgtMsg(31215)
|
||||||
|
Case VMillSelTypeOpt.LOW
|
||||||
|
Return EgtMsg(31216)
|
||||||
|
Case VMillSelTypeOpt.STANDARD
|
||||||
|
Return EgtMsg(31217)
|
||||||
|
Case VMillSelTypeOpt.HIGH
|
||||||
|
Return EgtMsg(31218)
|
||||||
|
Case VMillSelTypeOpt.HIGHER
|
||||||
|
Return EgtMsg(31219)
|
||||||
|
Case Else
|
||||||
|
Return ""
|
||||||
|
End Select
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||||
|
Throw New NotImplementedException()
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
+56
-11
@@ -4,7 +4,7 @@ Imports System.IO
|
|||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
Imports EgtWPFLib5.EgtFloating
|
Imports System.Windows.Forms.AxHost
|
||||||
|
|
||||||
Public Class ProjectVM
|
Public Class ProjectVM
|
||||||
Inherits TabViewModel
|
Inherits TabViewModel
|
||||||
@@ -58,14 +58,16 @@ Public Class ProjectVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
|
|
||||||
|
#End Region
|
||||||
#Region "EGTUILIB FIELDS"
|
#Region "EGTUILIB FIELDS"
|
||||||
|
|
||||||
Private m_bCPlaneTypePos As Boolean
|
Private m_bCPlaneTypePos As Boolean
|
||||||
|
|
||||||
' Variabile per implementazione eventi
|
' Variabile per implementazione eventi
|
||||||
Private m_InputText As String
|
Private m_InputText As String
|
||||||
|
Friend bSelObjOnScene As Boolean = False
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -244,14 +246,14 @@ Public Class ProjectVM
|
|||||||
Dim sTitle As String = EgtMsg(10101)
|
Dim sTitle As String = EgtMsg(10101)
|
||||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
End If
|
End If
|
||||||
' Se altrimenti manca il collegamento con la chiave di rete
|
' Se altrimenti manca il collegamento con la chiave di rete
|
||||||
ElseIf IniFile.m_nKeyLevel = -9 Then
|
ElseIf IniFile.m_nKeyLevel = -9 Then
|
||||||
EgtOutLog("Missing Link with Net Dongle")
|
EgtOutLog("Missing Link with Net Dongle")
|
||||||
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
|
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
|
||||||
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
|
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
|
||||||
Dim sTitle As String = EgtMsg(10101)
|
Dim sTitle As String = EgtMsg(10101)
|
||||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
' Altrimenti manca la licenza
|
' Altrimenti manca la licenza
|
||||||
Else
|
Else
|
||||||
EgtOutLog("Problems with Licence")
|
EgtOutLog("Problems with Licence")
|
||||||
' Box di avviso licenza con problemi : sKeyInfo \n "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
' Box di avviso licenza con problemi : sKeyInfo \n "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
||||||
@@ -307,10 +309,13 @@ Public Class ProjectVM
|
|||||||
Dim nLineWidth As Integer = 1
|
Dim nLineWidth As Integer = 1
|
||||||
nLineWidth = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, nLineWidth)
|
nLineWidth = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, nLineWidth)
|
||||||
m_ProjectScene.SetLineWidth(nLineWidth)
|
m_ProjectScene.SetLineWidth(nLineWidth)
|
||||||
' imposto colore di evidenziazione
|
' imposto colori di evidenziazione
|
||||||
Dim MarkColor As New Color3d(255, 255, 0)
|
Dim MarkColor As New Color3d(255, 255, 0)
|
||||||
GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
|
GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
|
||||||
m_ProjectScene.SetMarkMaterial(MarkColor)
|
m_ProjectScene.SetMarkMaterial(MarkColor)
|
||||||
|
Dim Mark2Color As New Color3d(255, 64, 64)
|
||||||
|
GetPrivateProfileColor(S_SCENE, K_MARK2, Mark2Color)
|
||||||
|
m_ProjectScene.SetMark2Material(Mark2Color)
|
||||||
' imposto colore per superfici selezionate
|
' imposto colore per superfici selezionate
|
||||||
Dim SelSurfColor As New Color3d(255, 255, 192)
|
Dim SelSurfColor As New Color3d(255, 255, 192)
|
||||||
GetPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor)
|
GetPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor)
|
||||||
@@ -483,7 +488,7 @@ Public Class ProjectVM
|
|||||||
End If
|
End If
|
||||||
' Esecuzione
|
' Esecuzione
|
||||||
bOk = ExecBeam(sFile, sMachine, nFlag, True)
|
bOk = ExecBeam(sFile, sMachine, nFlag, True)
|
||||||
' altrimenti pareti
|
' altrimenti pareti
|
||||||
Else
|
Else
|
||||||
' Verifica abilitazione elaborazione pareti
|
' Verifica abilitazione elaborazione pareti
|
||||||
If Not VerifyWall(sFile, sMachine, nFlag) Then
|
If Not VerifyWall(sFile, sMachine, nFlag) Then
|
||||||
@@ -497,12 +502,12 @@ Public Class ProjectVM
|
|||||||
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
|
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
|
||||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
Map.refMainWindowVM.CloseApplicationCmd()
|
Map.refMainWindowVM.CloseApplicationCmd()
|
||||||
' Altrimenti se richiesta visualizzazione DB utensili
|
' Altrimenti se richiesta visualizzazione DB utensili
|
||||||
ElseIf nFlag = 11 And bOk Then
|
ElseIf nFlag = 11 And bOk Then
|
||||||
MyMachinePanelVM.ToolDb()
|
MyMachinePanelVM.ToolDb()
|
||||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
Map.refMainWindowVM.CloseApplicationCmd()
|
Map.refMainWindowVM.CloseApplicationCmd()
|
||||||
' Altrimenti se richiesta visualizzazione DB lavorazioni
|
' Altrimenti se richiesta visualizzazione DB lavorazioni
|
||||||
ElseIf nFlag = 12 And bOk Then
|
ElseIf nFlag = 12 And bOk Then
|
||||||
MyMachinePanelVM.MachDb()
|
MyMachinePanelVM.MachDb()
|
||||||
If bBeam Then
|
If bBeam Then
|
||||||
@@ -512,7 +517,7 @@ Public Class ProjectVM
|
|||||||
End If
|
End If
|
||||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
Map.refMainWindowVM.CloseApplicationCmd()
|
Map.refMainWindowVM.CloseApplicationCmd()
|
||||||
' Altrimenti se errore
|
' Altrimenti se errore
|
||||||
ElseIf Not bOk Then
|
ElseIf Not bOk Then
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
End If
|
End If
|
||||||
@@ -1320,6 +1325,25 @@ Public Class ProjectVM
|
|||||||
If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast)
|
If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast)
|
||||||
Else
|
Else
|
||||||
m_Controller.MouseSelectedObj(nId, bLast)
|
m_Controller.MouseSelectedObj(nId, bLast)
|
||||||
|
' Recupero primo layer selezionato
|
||||||
|
Dim nFirstSelId As Integer = EgtGetFirstSelectedObj()
|
||||||
|
' Se viene selezionato un layer diverso deseleziono il layer precedente
|
||||||
|
If nFirstSelId <> nId Then
|
||||||
|
SetLastInteger(nFirstSelId)
|
||||||
|
Map.refProjectVM.ExecuteCommand(Controller.CMD.DESELECTPARTLAYEROBJ)
|
||||||
|
End If
|
||||||
|
' Selezione layer in albero
|
||||||
|
bSelObjOnScene = True
|
||||||
|
Map.refManageLayerExpanderVM.UpdateObjInObjTree(nId)
|
||||||
|
Map.refManageLayerExpanderVM.SelectIdInObjTree(nId)
|
||||||
|
Map.refManageLayerExpanderVM.UpdateObjTree()
|
||||||
|
Map.refProjectVM.ExecuteCommand(Controller.CMD.SETCURRPARTLAYER)
|
||||||
|
|
||||||
|
' Cancello geometria e info di eventuale precedente analisi
|
||||||
|
Analyze.ClearAnalyzeGroup()
|
||||||
|
Map.refStatusBarVM.NotifyStatusOutput("")
|
||||||
|
EgtDraw()
|
||||||
|
bSelObjOnScene = False
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1390,7 +1414,7 @@ Public Class ProjectVM
|
|||||||
If nFac <> -1 Then
|
If nFac <> -1 Then
|
||||||
' Visualizzo la normale e il contorno della faccia
|
' Visualizzo la normale e il contorno della faccia
|
||||||
Analyze.CreateAnalyzeGroup()
|
Analyze.CreateAnalyzeGroup()
|
||||||
Analyze.CreateNormal(nId, nFac)
|
Analyze.CreateFacetNormal(nId, nFac)
|
||||||
Analyze.CreateFacetLoops(nId, nFac)
|
Analyze.CreateFacetLoops(nId, nFac)
|
||||||
' Recupero i dati (in globale o griglia a seconda della impostazione)
|
' Recupero i dati (in globale o griglia a seconda della impostazione)
|
||||||
Dim ptC As Point3d
|
Dim ptC As Point3d
|
||||||
@@ -1405,6 +1429,27 @@ Public Class ProjectVM
|
|||||||
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
|
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
|
||||||
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
||||||
End If
|
End If
|
||||||
|
' Se Regione, visualizzo dati parte toccata
|
||||||
|
ElseIf EgtGetType(nId) = GDB_TY.SRF_FRGN Then
|
||||||
|
Dim nChk As Integer = nSub
|
||||||
|
If nChk >= 0 AndAlso nChk < EgtSurfFrChunkCount(nId) Then
|
||||||
|
' Visualizzo la normale e il contorno della parte
|
||||||
|
Analyze.CreateAnalyzeGroup()
|
||||||
|
Analyze.CreateChunkNormal(nId, nChk)
|
||||||
|
Analyze.CreateChunkLoops(nId, nChk)
|
||||||
|
' Recupero i dati (in globale o griglia a seconda della impostazione)
|
||||||
|
Dim ptC As Point3d
|
||||||
|
Dim vtN As Vector3d
|
||||||
|
EgtSurfFrChunkCenter(nId, nChk, If(m_bCPlaneTypePos, GDB_ID.GRID, GDB_ID.ROOT), ptC, vtN)
|
||||||
|
Dim dLen, dPhi, dTheta As Double
|
||||||
|
vtN.ToSpherical(dLen, dTheta, dPhi)
|
||||||
|
' Emetto info sulla barra di stato
|
||||||
|
Dim sOut As String = "Chunk " + nChk.ToString() +
|
||||||
|
" : C(" + LenToString(ptC.x, 3) + "," + LenToString(ptC.y, 3) + "," + LenToString(ptC.z, 3) + ")" +
|
||||||
|
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
|
||||||
|
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
|
||||||
|
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
' Aggiorno la visualizzazione
|
' Aggiorno la visualizzazione
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ Module Wall
|
|||||||
Map.refTopCommandBarVM.SetMachiningMode()
|
Map.refTopCommandBarVM.SetMachiningMode()
|
||||||
' Se simulazione
|
' Se simulazione
|
||||||
If bOk And nFlag = 2 Then
|
If bOk And nFlag = 2 Then
|
||||||
' Se da TS3 impedisco di fare altro
|
' Se da TS3 e non pezzo da Vista, impedisco di fare altro
|
||||||
If bBtl Then
|
If bBtl AndAlso sFile.IndexOf( "Part_", StringComparison.InvariantCulture) = -1 Then
|
||||||
Map.refSimulationExpanderVM.bOnlySimulation = True
|
Map.refSimulationExpanderVM.bOnlySimulation = True
|
||||||
End If
|
End If
|
||||||
' Vado in simulazione
|
' Vado in simulazione
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports EgtWPFLib5.MachiningTreeViewItem
|
||||||
|
|
||||||
Public Class PrepareInputBoxParam
|
Public Class PrepareInputBoxParam
|
||||||
Friend sTitle As String
|
Friend sTitle As String
|
||||||
@@ -62,4 +64,112 @@ Public Class NewMachOpParam
|
|||||||
Me.SelMachOpId = SelMachOpId
|
Me.SelMachOpId = SelMachOpId
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class InfoItem
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Friend nId As Integer
|
||||||
|
''' <summary>
|
||||||
|
''' Indice lista info note
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property Id As Integer
|
||||||
|
Get
|
||||||
|
Return Id
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend sKey As String
|
||||||
|
''' <summary>
|
||||||
|
''' Chiave lista info note
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property Key As String
|
||||||
|
Get
|
||||||
|
Return sKey
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend sValour As String
|
||||||
|
''' <summary>
|
||||||
|
''' Valore lista info note
|
||||||
|
''' </summary>
|
||||||
|
Public Property Valour As String
|
||||||
|
Get
|
||||||
|
Return sValour
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sValour = value
|
||||||
|
NotifyPropertyChanged(NameOf(Valour))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
' Comandi
|
||||||
|
Private m_cmdRemoveInfoItem As ICommand
|
||||||
|
Private m_cmdDoneInfo As ICommand
|
||||||
|
|
||||||
|
#Region "CONSTRUCTORS"
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sKey As String, sValue As String)
|
||||||
|
Me.nId = nId
|
||||||
|
Me.sKey = sKey
|
||||||
|
Me.sValour = sValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructors
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "RemoveItemNoteCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Comando per rimuovere l'informazione selezionata dalla combobox
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property RemoveInfoItemCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdRemoveInfoItem Is Nothing Then
|
||||||
|
m_cmdRemoveInfoItem = New Command(AddressOf RemoveInfoItem)
|
||||||
|
End If
|
||||||
|
Return m_cmdRemoveInfoItem
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Rimuove l'informazione selezionata dalla combobox
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="param"></param>
|
||||||
|
Public Sub RemoveInfoItem(ByVal param As Object)
|
||||||
|
Map.refInputExpanderVM.RemoveItemInfo(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' RemoveItemNoteCommand
|
||||||
|
|
||||||
|
#Region "DoneInfoCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Comando per la conferma modifica o aggiunta nuova informazione
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property DoneInfoCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdDoneInfo Is Nothing Then
|
||||||
|
m_cmdDoneInfo = New Command(AddressOf DoneInfo)
|
||||||
|
End If
|
||||||
|
Return m_cmdDoneInfo
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Conferma modifica o aggiunta nuova informazione
|
||||||
|
''' </summary>
|
||||||
|
Public Sub DoneInfo(ByVal param As Object)
|
||||||
|
Map.refInputExpanderVM.Done(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' DoneInfoCommand
|
||||||
|
|
||||||
|
#End Region ' Commands
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
+30
-1
@@ -37,7 +37,7 @@ Module Analyze
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Function CreateNormal( nId As Integer, nFac As Integer) As Boolean
|
Function CreateFacetNormal( nId As Integer, nFac As Integer) As Boolean
|
||||||
If m_AnaGrpId = GDB_ID.NULL Then Return False
|
If m_AnaGrpId = GDB_ID.NULL Then Return False
|
||||||
Dim bEnMod As Boolean = EgtGetEnableModified()
|
Dim bEnMod As Boolean = EgtGetEnableModified()
|
||||||
EgtDisableModified()
|
EgtDisableModified()
|
||||||
@@ -66,6 +66,35 @@ Module Analyze
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Function CreateChunkNormal( nId As Integer, nChk As Integer) As Boolean
|
||||||
|
If m_AnaGrpId = GDB_ID.NULL Then Return False
|
||||||
|
Dim bEnMod As Boolean = EgtGetEnableModified()
|
||||||
|
EgtDisableModified()
|
||||||
|
Dim ptC As Point3d
|
||||||
|
Dim vtN As Vector3d
|
||||||
|
If EgtSurfFrChunkCenter( nId, nChk, GDB_ID.ROOT, ptC, vtN) Then
|
||||||
|
Dim nNormId As Integer = EgtCreateGeoVector( m_AnaGrpId, 50 * vtN, ptC, GDB_RT.GLOB)
|
||||||
|
EgtSetColor( nNormId, New Color3d( 255, 0,0))
|
||||||
|
End If
|
||||||
|
If bEnMod Then EgtEnableModified()
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function CreateChunkLoops( nId As Integer, nChk As Integer) As Boolean
|
||||||
|
If m_AnaGrpId = GDB_ID.NULL Then Return False
|
||||||
|
Dim bEnMod As Boolean = EgtGetEnableModified()
|
||||||
|
EgtDisableModified()
|
||||||
|
Dim nCount As Integer
|
||||||
|
Dim nFirstId As Integer = EgtExtractSurfFrChunkLoops( nId, nChk, m_AnaGrpId, nCount)
|
||||||
|
If nFirstId <> GDB_ID.NULL Then
|
||||||
|
For nCrvId As Integer = nFirstId To nFirstId + nCount - 1
|
||||||
|
EgtSetColor( nCrvId, New Color3d( 255, 0,0))
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If bEnMod Then EgtEnableModified()
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Function CreateCurveCompoPntNbrs( nId As Integer) As Boolean
|
Function CreateCurveCompoPntNbrs( nId As Integer) As Boolean
|
||||||
If m_AnaGrpId = GDB_ID.NULL Then Return False
|
If m_AnaGrpId = GDB_ID.NULL Then Return False
|
||||||
Dim bEnMod As Boolean = EgtGetEnableModified()
|
Dim bEnMod As Boolean = EgtGetEnableModified()
|
||||||
|
|||||||
@@ -34,6 +34,14 @@ Public Module IniFile
|
|||||||
MACHPATH = 5
|
MACHPATH = 5
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
|
Public Enum VMillSelTypeOpt As Integer
|
||||||
|
LOWER = -2
|
||||||
|
LOW = -1
|
||||||
|
STANDARD = 0
|
||||||
|
HIGH = 1
|
||||||
|
HIGHER = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
' MainWindow Page
|
' MainWindow Page
|
||||||
Friend m_nInstance As Integer = 0
|
Friend m_nInstance As Integer = 0
|
||||||
Friend m_nUserLevel As Integer = 1
|
Friend m_nUserLevel As Integer = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user