Merge branch 'feature/AddNewFeature' into feature/NewPage
This commit is contained in:
@@ -316,12 +316,13 @@ Public Class BTLFeatureM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateBTLFeature(nPRC As Integer, nGRP As Integer, nSIDE As Integer) As BTLFeatureM
|
||||
Dim NewBTLFeature As New BTLFeatureM
|
||||
NewBTLFeature.m_nPRC = nPRC
|
||||
NewBTLFeature.m_nSelGRP = nGRP
|
||||
NewBTLFeature.m_nSelSIDE = nSIDE
|
||||
NewBTLFeature.m_nPriority = 0
|
||||
NewBTLFeature.m_bDO = True
|
||||
Dim NewBTLFeature As New BTLFeatureM With {
|
||||
.m_nPRC = nPRC,
|
||||
.m_nSelGRP = nGRP,
|
||||
.m_nSelSIDE = nSIDE,
|
||||
.m_nPriority = 0,
|
||||
.m_bDO = True
|
||||
}
|
||||
' crea parametri per questa feature da file ini
|
||||
NewBTLFeature.CreateFeatureParams(NewBTLFeature)
|
||||
Return NewBTLFeature
|
||||
|
||||
@@ -68,7 +68,9 @@ Public Module ConstGen
|
||||
' Sottodirettorio per Csv automatico
|
||||
Public Const PRODS_DIR As String = "Prods"
|
||||
' Sottodirettorio per Macro
|
||||
Public Const MACRO_DIR As String = "Macro"
|
||||
Public Const MACRODEFAULT_DIR As String = "MacroDefault"
|
||||
' Sottodirettorio per MacroCustom
|
||||
Public Const MACROCUSTOM_DIR As String = "MacroCustom"
|
||||
' Sottodirettorio per Magazzino
|
||||
Public Const WAREHOUSE_DIR As String = "Warehouse"
|
||||
' Sottodirettorio per lavorazioni travi
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid HorizontalAlignment="Center"
|
||||
Grid.Row="0"
|
||||
Margin="0,0,0,5">
|
||||
@@ -46,13 +45,14 @@
|
||||
Grid.Column="1"
|
||||
DisplayMemberPath="ghDesc"
|
||||
Width="200"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<TextBlock Text="Macro"
|
||||
Grid.Row="1"
|
||||
Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding MacroList}"
|
||||
SelectedIndex="{Binding nSelMacro}"
|
||||
<ComboBox ItemsSource="{Binding MacroCustomList}"
|
||||
SelectedIndex="{Binding nSelMacroCustom}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
DisplayMemberPath="Name"
|
||||
@@ -66,7 +66,6 @@
|
||||
Height="300"
|
||||
Width="300"
|
||||
Margin="5,0,5,5"/>
|
||||
|
||||
<!--<StackPanel Orientation="Horizontal"
|
||||
HorizontalAlignment="Center"
|
||||
Grid.Row="2"
|
||||
@@ -84,7 +83,6 @@
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
</StackPanel>-->
|
||||
|
||||
<Grid Grid.Row="2" Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -94,18 +92,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="Ok"
|
||||
Command="{Binding Ok_Command}"
|
||||
IsDefault="True"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
Command="{Binding Ok_Command}"
|
||||
IsDefault="True"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="Cancel"
|
||||
IsCancel="True"
|
||||
Grid.Column="3"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
IsCancel="True"
|
||||
Grid.Column="3"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</StackPanel>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
|
||||
@@ -11,6 +11,7 @@ Public Class AddFeatureWndVM
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
Friend m_MacroFilePathList As List(Of String)
|
||||
Friend m_MacroCustomFilePathList As List(Of String)
|
||||
|
||||
Private m_PrevSelPRCIndex_L As Integer = 0
|
||||
Private m_PrevSelPRCIndex_T As Integer = 0
|
||||
@@ -37,8 +38,8 @@ Public Class AddFeatureWndVM
|
||||
ElseIf m_SelGRPType = GRPType.T Then
|
||||
nSelPRC = PRCList(m_PrevSelPRCIndex_T)
|
||||
End If
|
||||
NotifyPropertyChanged("PRCList")
|
||||
NotifyPropertyChanged("nSelPRC")
|
||||
NotifyPropertyChanged(NameOf(PRCList))
|
||||
NotifyPropertyChanged(NameOf(nSelPRC))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -49,6 +50,36 @@ Public Class AddFeatureWndVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_PRCListView As New List(Of PRC)
|
||||
Public ReadOnly Property PRCListView As List(Of PRC)
|
||||
Get
|
||||
Return m_PRCListView
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "New Macro OnlyProdPage"
|
||||
|
||||
Private m_MacroDefaultList As New ObservableCollection(Of Object)
|
||||
Public ReadOnly Property MacroDefaultList As ObservableCollection(Of Object)
|
||||
Get
|
||||
Return m_MacroDefaultList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nSelMacroDefault As Integer = -1
|
||||
Public Property nSelMacroDefault As Integer
|
||||
Get
|
||||
Return m_nSelMacroDefault
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If value <> m_nSelMacroDefault Then
|
||||
m_nSelMacroDefault = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' New Macro OnlyProdPage
|
||||
|
||||
Private m_nSelPRC As PRC = Nothing
|
||||
Public Property nSelPRC As PRC
|
||||
Get
|
||||
@@ -64,47 +95,31 @@ Public Class AddFeatureWndVM
|
||||
m_PrevSelPRCIndex_T = PRCList.IndexOf(m_nSelPRC)
|
||||
End If
|
||||
End If
|
||||
NotifyPropertyChanged("sDrawPath")
|
||||
NotifyPropertyChanged(NameOf(sDrawPath))
|
||||
' carico eventuali file Macro
|
||||
MacroList.Clear()
|
||||
MacroCustomList.Clear()
|
||||
If Core.Configuration.bOnlyProd Then
|
||||
MacroDefaultList.Clear()
|
||||
End If
|
||||
m_MacroFilePathList = New List(Of String)
|
||||
m_MacroCustomFilePathList = New List(Of String)
|
||||
If Not IsNothing(nSelPRC) Then
|
||||
Dim nGRPFromFileName As Integer = 0
|
||||
Dim nPRCFromFileName As Integer = 0
|
||||
Dim sMacroNameFromFileName As String = String.Empty
|
||||
Dim nIdMacroName As Integer = 0
|
||||
' ricavo lista file Macro
|
||||
Dim AllFilesInDir As IEnumerable(Of String) = IO.Directory.EnumerateFiles(Map.refMainWindowVM.MainWindowM.sMacroDir)
|
||||
For Each File In AllFilesInDir
|
||||
If Path.GetExtension(File).ToLower() = ".lua" Then
|
||||
If File.Contains(FILENAMESEPARATOR) Then
|
||||
Dim FileName As String = Path.GetFileNameWithoutExtension(File)
|
||||
Dim DataFromFileName As String() = FileName.Split(FILENAMESEPARATOR)
|
||||
If DataFromFileName.Count = 2 Then
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||
Dim NumbersFromFileName As String() = DataFromFileName(0).Split(".")
|
||||
Integer.TryParse(NumbersFromFileName(0), nGRPFromFileName)
|
||||
Integer.TryParse(NumbersFromFileName(1), nPRCFromFileName)
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||
sMacroNameFromFileName = DataFromFileName(1)
|
||||
End If
|
||||
If nGRPFromFileName = CalcBeamPrivateProfileGRP(nSelPRC.nGRP) AndAlso nPRCFromFileName = nSelPRC.nPRC Then
|
||||
MacroList.Add(New IdNameStruct(nIdMacroName, sMacroNameFromFileName))
|
||||
m_MacroFilePathList.Add(File)
|
||||
nIdMacroName = nIdMacroName + 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If MacroList.Count > 0 Then
|
||||
' ricavo lista file Macro Default
|
||||
GetMacroListDefault(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName)
|
||||
' ricavo lista file Macro Custom
|
||||
If Core.Configuration.bOnlyProd Then GetMacroListCustom(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName)
|
||||
If MacroCustomList.Count > 0 Then
|
||||
MacroList_IsEnabled = True
|
||||
Else
|
||||
MacroList_IsEnabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(nSelPRC))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -116,26 +131,26 @@ Public Class AddFeatureWndVM
|
||||
Set(value As Boolean)
|
||||
If value <> m_MacroList_IsEnabled Then
|
||||
m_MacroList_IsEnabled = value
|
||||
NotifyPropertyChanged("MacroList_IsEnabled")
|
||||
NotifyPropertyChanged(NameOf(MacroList_IsEnabled))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_MacroList As New ObservableCollection(Of Object)
|
||||
Public ReadOnly Property MacroList As ObservableCollection(Of Object)
|
||||
Private m_MacroCustomList As New ObservableCollection(Of Object)
|
||||
Public ReadOnly Property MacroCustomList As ObservableCollection(Of Object)
|
||||
Get
|
||||
Return m_MacroList
|
||||
Return m_MacroCustomList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nSelMacro As Integer = -1
|
||||
Public Property nSelMacro As Integer
|
||||
Private m_nSelMacroCustom As Integer = -1
|
||||
Public Property nSelMacroCustom As Integer
|
||||
Get
|
||||
Return m_nSelMacro
|
||||
Return m_nSelMacroCustom
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If value <> m_nSelMacro Then
|
||||
m_nSelMacro = value
|
||||
If value <> m_nSelMacroCustom Then
|
||||
m_nSelMacroCustom = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -157,17 +172,133 @@ Public Class AddFeatureWndVM
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property Process_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61805).ToUpper()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Default_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61899).ToUpper()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Custom_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61801).ToUpper()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
SelGRPType = 0
|
||||
nSelPRC = PRCList(0)
|
||||
If Core.Configuration.bOnlyProd Then
|
||||
' carico lista process
|
||||
Dim TempPRCList As New ObservableCollection(Of Integer)
|
||||
Dim TempPRCLList As New ObservableCollection(Of Integer)
|
||||
Dim TempPRCLTist As New ObservableCollection(Of Integer)
|
||||
GetBeamPrivateProfileProcessList(0, TempPRCLList)
|
||||
GetBeamPrivateProfileProcessList(1, TempPRCLTist)
|
||||
' riporto le liste process in un unica lista
|
||||
For Each PRCL In TempPRCLList
|
||||
TempPRCList.Add(PRCL)
|
||||
Next
|
||||
For Each PRCT In TempPRCLTist
|
||||
TempPRCList.Add(PRCT)
|
||||
Next
|
||||
m_PRCList.Clear()
|
||||
' ciclo sulla lista process eliminado i doppi
|
||||
For Each PRC In TempPRCList.Distinct()
|
||||
' leggo gruppi
|
||||
Dim GRPLList As New ObservableCollection(Of Integer)
|
||||
Dim GRPTList As New ObservableCollection(Of Integer)
|
||||
GetBeamPrivateProfileGRPList(0, PRC, GRPLList)
|
||||
GetBeamPrivateProfileGRPList(1, PRC, GRPTList)
|
||||
If GRPLList.Count > 0 Then m_PRCList.Add(New PRC(GRPLList(0), PRC, GetBeamPrivateProfileName(0, PRC)))
|
||||
If GRPTList.Count > 0 Then m_PRCList.Add(New PRC(GRPTList(0), PRC, GetBeamPrivateProfileName(1, PRC)))
|
||||
Next
|
||||
m_PRCListView = m_PRCList.OrderBy(Function(x) x.nPRC).ToList()
|
||||
nSelPRC = m_PRCList(0)
|
||||
NotifyPropertyChanged(NameOf(PRCListView))
|
||||
NotifyPropertyChanged(NameOf(PRCList))
|
||||
Else
|
||||
SelGRPType = 0
|
||||
nSelPRC = PRCList(0)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Sub GetMacroListDefault(ByRef nGRPFromFileName As Integer, ByRef nPRCFromFileName As Integer, ByRef sMacroNameFromFileName As String, ByRef nIdMacroName As Integer)
|
||||
Dim AllFilesInDir As IEnumerable(Of String) = IO.Directory.EnumerateFiles(Map.refMainWindowVM.MainWindowM.sMacroCustomDir)
|
||||
For Each File In AllFilesInDir
|
||||
If Path.GetExtension(File).ToLower() = ".lua" Then
|
||||
If File.Contains(FILENAMESEPARATOR) Then
|
||||
Dim FileName As String = Path.GetFileNameWithoutExtension(File)
|
||||
Dim DataFromFileName As String() = FileName.Split(FILENAMESEPARATOR)
|
||||
If DataFromFileName.Count = 2 Then
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||
Dim NumbersFromFileName As String() = DataFromFileName(0).Split(".")
|
||||
Integer.TryParse(NumbersFromFileName(0), nGRPFromFileName)
|
||||
Integer.TryParse(NumbersFromFileName(1), nPRCFromFileName)
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||
sMacroNameFromFileName = DataFromFileName(1)
|
||||
End If
|
||||
If nGRPFromFileName = CalcBeamPrivateProfileGRP(nSelPRC.nGRP) AndAlso nPRCFromFileName = nSelPRC.nPRC Then
|
||||
If Core.Configuration.bOnlyProd Then
|
||||
MacroCustomList.Add(New NewMacro(nIdMacroName, sMacroNameFromFileName, Map.refMainWindowVM.MainWindowM.sMacroCustomDir & "\Template\" & sMacroNameFromFileName & ".png"))
|
||||
Else
|
||||
MacroCustomList.Add(New IdNameStruct(nIdMacroName, sMacroNameFromFileName))
|
||||
End If
|
||||
m_MacroFilePathList.Add(File)
|
||||
nIdMacroName += 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub GetMacroListCustom(ByRef nGRPFromFileName As Integer, ByRef nPRCFromFileName As Integer, ByRef sMacroNameFromFileName As String, ByRef nIdMacroName As Integer)
|
||||
nIdMacroName = 0
|
||||
Dim AllFilesInDirCustom As IEnumerable(Of String) = IO.Directory.EnumerateFiles(Map.refMainWindowVM.MainWindowM.sMacroDefaultDir)
|
||||
For Each File In AllFilesInDirCustom
|
||||
If Path.GetExtension(File).ToLower() = ".lua" Then
|
||||
If File.Contains(FILENAMESEPARATOR) Then
|
||||
Dim FileName As String = Path.GetFileNameWithoutExtension(File)
|
||||
Dim DataFromFileName As String() = FileName.Split(FILENAMESEPARATOR)
|
||||
If DataFromFileName.Count = 2 Then
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||
Dim NumbersFromFileName As String() = DataFromFileName(0).Split(".")
|
||||
Integer.TryParse(NumbersFromFileName(0), nGRPFromFileName)
|
||||
Integer.TryParse(NumbersFromFileName(1), nPRCFromFileName)
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||
sMacroNameFromFileName = DataFromFileName(1)
|
||||
End If
|
||||
If nGRPFromFileName = CalcBeamPrivateProfileGRP(nSelPRC.nGRP) AndAlso nPRCFromFileName = nSelPRC.nPRC Then
|
||||
MacroDefaultList.Add(New NewMacro(nIdMacroName, sMacroNameFromFileName))
|
||||
m_MacroCustomFilePathList.Add(File)
|
||||
nIdMacroName += 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Ok"
|
||||
@@ -259,4 +390,43 @@ Public Class PRC
|
||||
m_QBTLParamVMList = QBTLParamList
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class NewMacro
|
||||
|
||||
' Indice Macro
|
||||
Private m_nIndexMacro As Integer
|
||||
Public ReadOnly Property nIndexMacro As Integer
|
||||
Get
|
||||
Return m_nIndexMacro
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Nome Macro
|
||||
Private m_sMacroName As String
|
||||
Public ReadOnly Property sMacroName As String
|
||||
Get
|
||||
Return m_sMacroName.ToUpper()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Cartella dove sono contenuti i templete delle macro
|
||||
Private m_sMacroDrawPath As String
|
||||
Public ReadOnly Property sMacroDrawPath As String
|
||||
Get
|
||||
Return m_sMacroDrawPath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(IndexMacro As Integer, MacroName As String)
|
||||
m_nIndexMacro = IndexMacro
|
||||
m_sMacroName = MacroName
|
||||
End Sub
|
||||
|
||||
Sub New(IndexMacro As Integer, MacroName As String, MacroDrawPath As String)
|
||||
m_nIndexMacro = IndexMacro
|
||||
m_sMacroName = MacroName
|
||||
m_sMacroDrawPath = MacroDrawPath
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,159 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="NewAddFeatureWndV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
IsClosable="False"
|
||||
IsMinimizable="False"
|
||||
IsResizable="False"
|
||||
Title="AddProcess">
|
||||
<Grid Margin="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding Process_Msg}"
|
||||
Style="{StaticResource ListTextBlock}"/>
|
||||
<ListBox ItemsSource="{Binding PRCListView}"
|
||||
SelectedItem="{Binding nSelPRC}"
|
||||
Grid.Row="1"
|
||||
BorderThickness="0"
|
||||
Height="585"
|
||||
Width="260"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="5">
|
||||
<ListBox.Resources>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Border Name="Border" Padding="2" SnapsToDevicePixels="True">
|
||||
<ContentPresenter/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static SystemColors.HotTrackBrushKey}}"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontSize" Value="15"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ListBox.Resources>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding ghDesc}"
|
||||
ToolTip="{Binding ghDesc}"
|
||||
HorizontalAlignment="Left"
|
||||
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<TextBlock Text="{Binding Custom_Msg}"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource ListTextBlock}"/>
|
||||
<ListBox ItemsSource="{Binding MacroCustomList}"
|
||||
SelectedIndex="{Binding nSelMacroCustom}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
BorderThickness="0"
|
||||
Width="980"
|
||||
Height="610"
|
||||
Margin="5">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel IsItemsHost="True" Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding sMacroName}"
|
||||
Margin="5"
|
||||
FontSize="14"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<Image Source="{Binding sMacroDrawPath}"
|
||||
Grid.Row="1"
|
||||
Width="300"
|
||||
Margin="5,0,5,5"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<TextBlock Text="{Binding Default_Msg}"
|
||||
Grid.Column="2"
|
||||
Style="{StaticResource ListTextBlock}"/>
|
||||
<ListBox ItemsSource="{Binding MacroDefaultList}"
|
||||
SelectedIndex="{Binding nSelMacroDefault}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
BorderThickness="0"
|
||||
Height="585"
|
||||
Width="250"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="5">
|
||||
<ListBox.Resources>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Border Name="Border" Padding="2" SnapsToDevicePixels="True">
|
||||
<ContentPresenter/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static SystemColors.HotTrackBrushKey}}"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ListBox.Resources>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sMacroName}"
|
||||
Margin="2.5"
|
||||
HorizontalAlignment="Left"
|
||||
Width="239"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<UniformGrid Columns="2"
|
||||
Grid.Row="2"
|
||||
Grid.ColumnSpan="3"
|
||||
Margin="5">
|
||||
<Button Content="Ok"
|
||||
Command="{Binding Ok_Command}"
|
||||
IsDefault="True"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="Cancel"
|
||||
IsCancel="True"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,17 @@
|
||||
Public Class NewAddFeatureWndV
|
||||
|
||||
Private WithEvents m_AddFeatureWndVM As AddFeatureWndVM
|
||||
|
||||
Sub New(Owner As Window, AddFeatureWndVM As AddFeatureWndVM)
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
Me.DataContext = AddFeatureWndVM
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
m_AddFeatureWndVM = AddFeatureWndVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddFeatureWndVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -147,7 +147,6 @@ Public Class BTLParamVM
|
||||
' controllo se i pezzi sono lavorati se si messaggio di warning altrimenti messaggio informativo
|
||||
If nDoneCnt > 0 Then
|
||||
MessageBox.Show("Pezzo " & nPartId & " non modificato in " & INPROD & " barra/e perche' settata/e come da produrre", EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
dNewValue = m_BTLParamM.dValue
|
||||
ElseIf INPROD > 0 Then
|
||||
MessageBox.Show("Pezzo " & nPartId & " modificato in " & INPROD & " barra/e grezza/e", EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
End If
|
||||
|
||||
@@ -213,7 +213,6 @@ Public Class BTLStructureVM
|
||||
SelBTLPart = Nothing
|
||||
End Select
|
||||
' aggiornamento grafica
|
||||
'Map.refLeftPanelVM.PartShowAllChanged()
|
||||
Configuration.UpdateGraphics()
|
||||
End Sub
|
||||
|
||||
@@ -225,10 +224,8 @@ Public Class BTLStructureVM
|
||||
If Not IsNothing(Map.refBottomPanelVM) Then
|
||||
Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.PART)
|
||||
End If
|
||||
'' mostro barra di gestione pezzo
|
||||
'Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
|
||||
' deseleziono le feature
|
||||
If Not IsNothing(BtlPart.SelBTLFeatureVM) Then SelBTLPart.SelBTLFeatureVM = Nothing
|
||||
' mostro barra di gestione pezzo
|
||||
If Not IsNothing(BtlPart.BTLFeatureVMList) AndAlso BtlPart.BTLFeatureVMList.Count > 0 Then SelBTLPart.SelBTLFeatureVM = BtlPart.BTLFeatureVMList(0)
|
||||
' aggiorno stato selezionato tutto
|
||||
Map.refShowBeamPanelVM.bShowAll = False
|
||||
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
|
||||
@@ -258,26 +255,6 @@ Public Class BTLStructureVM
|
||||
If Not IsNothing(BtlPart.BTLFeatureVMList) AndAlso BtlPart.BTLFeatureVMList.Count > 0 Then SelBTLPart.SelBTLFeatureVM = BtlPart.BTLFeatureVMList(0)
|
||||
' aggiorno stato selezionato tutto
|
||||
Map.refShowBeamPanelVM.bShowAll = False
|
||||
'' trovo ed evidenzio MachGroup e Duplo di questo pezzo
|
||||
'If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
' Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
' For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
' Dim bFound As Boolean = False
|
||||
' For Each Part As PartVM In Machgroup.PartVMList
|
||||
' If EgtDuploGetOriginal(Part.nPartId) = BtlPart.nPartId Then
|
||||
' Part.SetSearchFound()
|
||||
' bFound = True
|
||||
' Else
|
||||
' Part.ResetSearchFound()
|
||||
' End If
|
||||
' Next
|
||||
' If bFound Then
|
||||
' Machgroup.SetSearchFound()
|
||||
' Else
|
||||
' Machgroup.ResetSearchFound()
|
||||
' End If
|
||||
' Next
|
||||
'End If
|
||||
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
|
||||
EgtZoom(ZM.ALL)
|
||||
End If
|
||||
@@ -294,24 +271,6 @@ Public Class BTLStructureVM
|
||||
End If
|
||||
' disabilito eventuale feature selezionata
|
||||
If Not IsNothing(BtlPart.m_SelBTLFeatureVM) AndAlso (Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.MACHINING) Then BtlPart.SelBTLFeatureVM = Nothing
|
||||
'' deevidenzio MachGroup e Duplo di questo pezzo
|
||||
'If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
' Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
' For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
' Dim bFound As Boolean = False
|
||||
' For Each Part As PartVM In Machgroup.PartVMList
|
||||
' Dim i = EgtDuploGetOriginal(Part.nPartId)
|
||||
' If EgtDuploGetOriginal(Part.nPartId) = BtlPart.nPartId Then
|
||||
' Part.ResetSearchFound()
|
||||
' bFound = True
|
||||
' End If
|
||||
' Next
|
||||
' If bFound Then
|
||||
' Machgroup.ResetSearchFound()
|
||||
' End If
|
||||
' Next
|
||||
'End If
|
||||
'EgtResetCurrMachGroup()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
Private Sub HighlightBTLPart(BtlPart As BTLPartVM)
|
||||
@@ -387,7 +346,7 @@ Public Class BTLStructureVM
|
||||
m_SelBTLPart = value
|
||||
' se seleziono un pezzo
|
||||
If Not IsNothing(m_SelBTLPart) Then
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
' se modalità building, la tolgo
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
ShowBuilding(False, False)
|
||||
@@ -399,7 +358,6 @@ Public Class BTLStructureVM
|
||||
' seleziono pagina BottomPanel
|
||||
Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.PART)
|
||||
' mostro barra di gestione pezzo
|
||||
'Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
|
||||
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProdProjManagerVM.PartManager_Visibility))
|
||||
' deseleziono le feature
|
||||
If Not IsNothing(m_SelBTLPart.SelBTLFeatureVM) Then SelBTLPart.SelBTLFeatureVM = Nothing
|
||||
@@ -414,28 +372,6 @@ Public Class BTLStructureVM
|
||||
SceneSelPartSelection()
|
||||
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
|
||||
EgtZoom(ZM.ALL)
|
||||
ElseIf Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
' se modalità building, la tolgo
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
ShowBuilding(False, False)
|
||||
End If
|
||||
' seleziono pezzo nella scena
|
||||
SceneSelPartSelection()
|
||||
' seleziono pezzo in Db geometrico
|
||||
EgtBeamSetPart(m_SelBTLPart.nPartId)
|
||||
' seleziono pagina BottomPanel
|
||||
Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.PART)
|
||||
' mostro barra di gestione pezzo
|
||||
'Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
|
||||
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProdProjManagerVM.PartManager_Visibility))
|
||||
' deseleziono le feature
|
||||
If Not IsNothing(m_SelBTLPart.SelBTLFeatureVM) Then SelBTLPart.SelBTLFeatureVM = Nothing
|
||||
' aggiorno stato selezionato tutto
|
||||
Map.refShowBeamPanelVM.bShowAll = False
|
||||
' trovo ed evidenzio MachGroup e Duplo di questo pezzo
|
||||
Configuration.ResetSearchPiece(m_SelBTLPart.nPartId)
|
||||
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
|
||||
EgtZoom(ZM.ALL)
|
||||
End If
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(SelBTLPart))
|
||||
|
||||
@@ -180,6 +180,9 @@
|
||||
<Compile Include="AboutBoxWindow\AboutBoxV.xaml.vb">
|
||||
<DependentUpon>AboutBoxV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AddFeatureWnd\NewAddFeatureWndV.xaml.vb">
|
||||
<DependentUpon>NewAddFeatureWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BTLPartManager\BTLPartManagerV.xaml.vb">
|
||||
<DependentUpon>BTLPartManagerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -196,6 +199,9 @@
|
||||
</Compile>
|
||||
<Compile Include="FeatureListManager\FeatureListManagerVM.vb" />
|
||||
<Compile Include="MachinePanel\MachinePanelVM.vb" />
|
||||
<Compile Include="MacroFeatureWnd\NewMacroFeatureWnd.xaml.vb">
|
||||
<DependentUpon>NewMacroFeatureWnd.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PartInRawPartManager\PartInRawPartManagerWndV.xaml.vb">
|
||||
<DependentUpon>PartInRawPartManagerWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -465,6 +471,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="AddFeatureWnd\NewAddFeatureWndV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="BTLPartManager\BTLPartManagerV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -489,6 +499,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="MacroFeatureWnd\NewMacroFeatureWnd.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="PartInRawPartManager\PartInRawPartManagerWndV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -1123,6 +1137,12 @@
|
||||
<Version>6.0.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\InstrumentPanel\Ott.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\InstrumentPanel\Vis.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerR32.exe
|
||||
|
||||
@@ -112,13 +112,88 @@ Public Class FeatureListManagerVM
|
||||
NotifyPropertyChanged(NameOf(AddFeature_IsEnabled))
|
||||
End Sub
|
||||
|
||||
|
||||
Friend Sub FeatureSelectionChanged()
|
||||
NotifyPropertyChanged(NameOf(CopyFeature_IsEnabled))
|
||||
NotifyPropertyChanged(NameOf(MacroFeature_IsEnabled))
|
||||
NotifyPropertyChanged(NameOf(RemoveFeature_IsEnabled))
|
||||
End Sub
|
||||
|
||||
Private Sub CreateNewFeature(MacroListCount As Integer, nSelMacro As Integer, AddFeatureWndVM As AddFeatureWndVM, nNewFeatureId As Integer, bMacroFlag As Boolean, NewFeat As BTLFeatureM)
|
||||
' verifico se una Macro è selezionata
|
||||
If MacroListCount > 0 AndAlso nSelMacro >= 0 Then
|
||||
' Creo nuova feature sulla base della Macro selezionata
|
||||
' Creo table e setto variabili
|
||||
CreateMacroTable()
|
||||
Dim bOk As Boolean
|
||||
If AddFeatureWndVM.nSelMacroDefault >= 0 Then
|
||||
bOk = EgtLuaExecFile(AddFeatureWndVM.m_MacroCustomFilePathList(nSelMacro))
|
||||
Else
|
||||
bOk = EgtLuaExecFile(AddFeatureWndVM.m_MacroFilePathList(nSelMacro))
|
||||
End If
|
||||
' Leggo variabili
|
||||
EgtLuaGetGlobIntVar("MACRO.FEATUREID", nNewFeatureId)
|
||||
' Reset lua
|
||||
EgtLuaResetGlobVar("MACRO")
|
||||
If Not bOk Then
|
||||
MessageBox.Show(EgtMsg(61869), EgtMsg(30007))
|
||||
Return
|
||||
End If
|
||||
bMacroFlag = True
|
||||
Else
|
||||
' Creo nuova feature (Macro non selezionata)
|
||||
NewFeat = BTLFeatureM.CreateBTLFeature(AddFeatureWndVM.nSelPRC.nPRC, AddFeatureWndVM.nSelPRC.nGRP, AddFeatureWndVM.nSelPRC.nSIDE)
|
||||
NewFeat.SetDefaultValues()
|
||||
Dim vPar() As Double = Nothing
|
||||
Dim sPar As String = String.Empty
|
||||
Dim vParQ() As String = Nothing
|
||||
NewFeat.CalcParamArray(vPar, sPar, vParQ)
|
||||
If NewFeat.nPRC = 900 Then NewFeat.sDES = "2"
|
||||
' aggiorno la feature con nuovo valore
|
||||
EgtBeamSetPart(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
|
||||
nNewFeatureId = EgtBeamAddProcess(NewFeat.nSelGRP, NewFeat.nPRC, NewFeat.nSelSIDE, NewFeat.sDES,
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.NewProcId(),
|
||||
New Frame3d(), vPar, sPar, vParQ, GDB_ID.NULL, GDB_ID.NULL)
|
||||
bMacroFlag = False
|
||||
End If
|
||||
' se è stata creata
|
||||
If nNewFeatureId <> GDB_ID.NULL Then
|
||||
MyMachGroupPanelM.SetDuploModified(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
|
||||
' la aggiungo a struttura BTL corrente
|
||||
NewFeat = BTLFeatureM.CreateBTLFeature(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM, nNewFeatureId)
|
||||
If Not bMacroFlag Then NewFeat.SetDefaultValues()
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.AddBTLFeature(NewFeat)
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM = Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList.FirstOrDefault(Function(x) x.BTLFeatureM Is NewFeat)
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CreateMacroTable()
|
||||
Dim nMacroW, nMacroH As Integer
|
||||
If Map.refProjectVM.BTLStructureVM.SelBTLPart.nROTATED = 0 OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.nROTATED = 180 Then
|
||||
If Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM.nSelSIDE = 1 OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM.nSelSIDE = 3 Then
|
||||
nMacroW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW
|
||||
nMacroH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH
|
||||
Else
|
||||
nMacroW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH
|
||||
nMacroH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW
|
||||
End If
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.SelBTLPart.nROTATED = 90 OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.nROTATED = 270 Then
|
||||
If Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM.nSelSIDE = 1 OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM.nSelSIDE = 3 Then
|
||||
nMacroW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH
|
||||
nMacroH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW
|
||||
Else
|
||||
nMacroW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW
|
||||
nMacroH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH
|
||||
End If
|
||||
End If
|
||||
|
||||
EgtLuaCreateGlobTable("MACRO")
|
||||
EgtLuaSetGlobNumVar("MACRO.L", Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlL)
|
||||
EgtLuaSetGlobNumVar("MACRO.W", nMacroW)
|
||||
EgtLuaSetGlobNumVar("MACRO.H", nMacroH)
|
||||
EgtLuaSetGlobIntVar("MACRO.PROCID", Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.NewProcId())
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -179,9 +254,14 @@ Public Class FeatureListManagerVM
|
||||
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Return
|
||||
' apro finestra di creazione macro
|
||||
Dim MacroFeatureWndVM As New MacroFeatureWndVM()
|
||||
Dim MacroFeatureWnd As New MacroFeatureWndV(Application.Current.MainWindow, MacroFeatureWndVM)
|
||||
If MacroFeatureWnd.ShowDialog() Then
|
||||
|
||||
If bOnlyProd Then
|
||||
Dim NewMacroFeatureWnd As New NewMacroFeatureWnd(Application.Current.MainWindow, MacroFeatureWndVM)
|
||||
If NewMacroFeatureWnd.ShowDialog() Then
|
||||
End If
|
||||
Else
|
||||
Dim MacroFeatureWnd As New MacroFeatureWndV(Application.Current.MainWindow, MacroFeatureWndVM)
|
||||
If MacroFeatureWnd.ShowDialog() Then
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -209,55 +289,24 @@ Public Class FeatureListManagerVM
|
||||
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Return
|
||||
' apro finestra di definizione nuova feature
|
||||
Dim AddFeatureWndVM As New AddFeatureWndVM()
|
||||
Dim AddFeatureWnd As New AddFeatureWndV(Application.Current.MainWindow, AddFeatureWndVM)
|
||||
If AddFeatureWnd.ShowDialog() Then
|
||||
Dim NewFeat As BTLFeatureM
|
||||
Dim nNewFeatureId As Integer = 0
|
||||
Dim bMacroFlag As Boolean = False
|
||||
' verifico se una Macro è selezionata
|
||||
If AddFeatureWndVM.MacroList.Count > 0 AndAlso AddFeatureWndVM.nSelMacro >= 0 Then
|
||||
' Creo nuova feature sulla base della Macro selezionata
|
||||
' Creo table e setto variabili
|
||||
EgtLuaCreateGlobTable("MACRO")
|
||||
EgtLuaSetGlobNumVar("MACRO.L", Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlL)
|
||||
EgtLuaSetGlobNumVar("MACRO.W", Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW)
|
||||
EgtLuaSetGlobNumVar("MACRO.H", Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH)
|
||||
EgtLuaSetGlobIntVar("MACRO.PROCID", Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.NewProcId())
|
||||
Dim bOk = EgtLuaExecFile(AddFeatureWndVM.m_MacroFilePathList(AddFeatureWndVM.nSelMacro))
|
||||
' Leggo variabili
|
||||
EgtLuaGetGlobIntVar("MACRO.FEATUREID", nNewFeatureId)
|
||||
' Reset lua
|
||||
EgtLuaResetGlobVar("MACRO")
|
||||
If Not bOk Then
|
||||
MessageBox.Show(EgtMsg(61869), EgtMsg(30007))
|
||||
Return
|
||||
Dim NewFeat As BTLFeatureM = Nothing
|
||||
Dim nNewFeatureId As Integer = 0
|
||||
Dim bMacroFlag As Boolean = False
|
||||
If bOnlyProd Then
|
||||
Dim AddNewFeatureWnd As New NewAddFeatureWndV(Application.Current.MainWindow, AddFeatureWndVM)
|
||||
If AddNewFeatureWnd.ShowDialog() Then
|
||||
' verifico se una Macro è selezionata
|
||||
If AddFeatureWndVM.nSelMacroDefault >= 0 Then
|
||||
CreateNewFeature(AddFeatureWndVM.MacroDefaultList.Count, AddFeatureWndVM.nSelMacroDefault, AddFeatureWndVM, nNewFeatureId, bMacroFlag, NewFeat)
|
||||
Else
|
||||
CreateNewFeature(AddFeatureWndVM.MacroCustomList.Count, AddFeatureWndVM.nSelMacroCustom, AddFeatureWndVM, nNewFeatureId, bMacroFlag, NewFeat)
|
||||
End If
|
||||
bMacroFlag = True
|
||||
Else
|
||||
' Creo nuova feature (Macro non selezionata)
|
||||
NewFeat = BTLFeatureM.CreateBTLFeature(AddFeatureWndVM.nSelPRC.nPRC, AddFeatureWndVM.nSelPRC.nGRP, AddFeatureWndVM.nSelPRC.nSIDE)
|
||||
NewFeat.SetDefaultValues()
|
||||
Dim vPar() As Double = Nothing
|
||||
Dim sPar As String = String.Empty
|
||||
Dim vParQ() As String = Nothing
|
||||
NewFeat.CalcParamArray(vPar, sPar, vParQ)
|
||||
If NewFeat.nPRC = 900 Then NewFeat.sDES = "2"
|
||||
' aggiorno la feature con nuovo valore
|
||||
EgtBeamSetPart(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
|
||||
nNewFeatureId = EgtBeamAddProcess(NewFeat.nSelGRP, NewFeat.nPRC, NewFeat.nSelSIDE, NewFeat.sDES,
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.NewProcId(),
|
||||
New Frame3d(), vPar, sPar, vParQ, GDB_ID.NULL, GDB_ID.NULL)
|
||||
bMacroFlag = False
|
||||
End If
|
||||
' se è stata creata
|
||||
If nNewFeatureId <> GDB_ID.NULL Then
|
||||
MyMachGroupPanelM.SetDuploModified(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
|
||||
' la aggiungo a struttura BTL corrente
|
||||
NewFeat = BTLFeatureM.CreateBTLFeature(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM, nNewFeatureId)
|
||||
If Not bMacroFlag Then NewFeat.SetDefaultValues()
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.AddBTLFeature(NewFeat)
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM = Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList.FirstOrDefault(Function(x) x.BTLFeatureM Is NewFeat)
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart()
|
||||
Else
|
||||
Dim AddFeatureWnd As New AddFeatureWndV(Application.Current.MainWindow, AddFeatureWndVM)
|
||||
If AddFeatureWnd.ShowDialog() Then
|
||||
' verifico se una Macro è selezionata
|
||||
CreateNewFeature(AddFeatureWndVM.MacroCustomList.Count, AddFeatureWndVM.nSelMacroCustom, AddFeatureWndVM, nNewFeatureId, bMacroFlag, NewFeat)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</Style>
|
||||
</StackPanel.Style>
|
||||
<TextBlock Text="{Binding Message}"
|
||||
Visibility="{Binding Message_Visibility}"
|
||||
Visibility="{Binding Message_Visibility}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}"
|
||||
Width="200"
|
||||
|
||||
@@ -442,7 +442,6 @@ Public Class FreeContourManagerVM
|
||||
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProdProjManagerVM.PartManager_Visibility))
|
||||
' attivo pannello
|
||||
Map.refProjectVM.SetFreeContourManager_Visibility(True)
|
||||
Map.refProjWndVM.SetFreeContourManager_Visibility(True)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
@@ -531,7 +530,6 @@ Public Class FreeContourManagerVM
|
||||
End If
|
||||
' disattivo pannello
|
||||
Map.refProjectVM.SetFreeContourManager_Visibility(False)
|
||||
Map.refProjWndVM.SetFreeContourManager_Visibility(False)
|
||||
' attivo bottone edit
|
||||
SelFeature.RefreshFCMBtnVisibility()
|
||||
' resetto tutte le variabili correnti
|
||||
|
||||
@@ -45,18 +45,20 @@
|
||||
<Image Source="/Resources/InstrumentPanel/Statistics.png" Stretch="Uniform"/>
|
||||
</ToggleButton>
|
||||
|
||||
<Button Content="VIS"
|
||||
Command="{Binding Visualization_Command}"
|
||||
<Button Command="{Binding Visualization_Command}"
|
||||
ToolTip="{Binding Statistics_Msg}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Visibility="{Binding VisStatistic_Visibility}"
|
||||
IsEnabled="{Binding VisStatistic_IsEnabled}"/>
|
||||
IsEnabled="{Binding VisStatistic_IsEnabled}">
|
||||
<Image Source="/Resources/InstrumentPanel/Vis.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
<Button Content="OTT"
|
||||
Command="{Binding Optimizer_Command}"
|
||||
<Button Command="{Binding Optimizer_Command}"
|
||||
ToolTip="{Binding Statistics_Msg}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Visibility="{Binding OtStatistic_Visibility}"
|
||||
IsEnabled="{Binding OtStatistic_IsEnabled}"/>
|
||||
IsEnabled="{Binding OtStatistic_IsEnabled}">
|
||||
<Image Source="/Resources/InstrumentPanel/Ott.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -108,9 +108,11 @@
|
||||
</DataGridTextColumn>
|
||||
<!--ROT - Rotazione-->
|
||||
<DataGridTemplateColumn x:Key="colROT" SortMemberPath="dROT">
|
||||
<DataGridTemplateColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.ROTATION_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||
</DataGridTemplateColumn.Header>
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.ROTATION_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
@@ -143,9 +145,11 @@
|
||||
</DataGridTemplateColumn>
|
||||
<!--INV - Inversione-->
|
||||
<DataGridTemplateColumn x:Key="colFLIP">
|
||||
<DataGridTemplateColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.INVERSION_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||
</DataGridTemplateColumn.Header>
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.INVERSION_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding bFLIP, UpdateSourceTrigger=PropertyChanged}"
|
||||
|
||||
@@ -155,6 +155,11 @@ Public Class PartInRawPartListVM
|
||||
m_colPartInRawPart_PosY = m_PartInRawPartColumns.FirstOrDefault(Function(x) x.Name = COL_POSY)
|
||||
' aggiorno la visibilità delle colonne
|
||||
For Each col In PartInRawPartColumns
|
||||
If Not bOnlyProd AndAlso nMachType = MachineType.BEAM AndAlso (col.Name.Equals(COL_ROT) OrElse col.Name.Equals(COL_FLIP) OrElse col.Name.Equals(COL_POSX)) Then
|
||||
col.Visible = False
|
||||
Else
|
||||
col.Visible = True
|
||||
End If
|
||||
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
@@ -133,10 +133,12 @@
|
||||
</DataGridTextColumn>
|
||||
<!--PosZ - Posizione in Z-->
|
||||
<DataGridTextColumn x:Key="colPOSZ" Binding="{Binding sPosZ}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.PosZ_Msg,
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.PosZ_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="Blue" />
|
||||
|
||||
@@ -222,7 +222,7 @@ Public Class PartVM
|
||||
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min
|
||||
' reinserisco il pezzo nel grezzo
|
||||
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
ElseIf bOnlyProd AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||
DeleteOldRaw()
|
||||
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||
@@ -320,7 +320,7 @@ Public Class PartVM
|
||||
End Sub
|
||||
|
||||
Private Sub Rotate(IsPositive As Boolean)
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
If bOnlyProd AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||
DeleteOldRaw()
|
||||
' recupero layer del box
|
||||
|
||||
@@ -59,6 +59,44 @@ Public Class MacroFeatureWndVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sDescBTLFeature As String
|
||||
Public Property sDescBTLFeature As String
|
||||
Get
|
||||
Return m_sDescBTLFeature
|
||||
End Get
|
||||
Set(value As String)
|
||||
If value <> m_sDescBTLFeature Then
|
||||
m_sDescBTLFeature = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sMacroCustom As String
|
||||
Public Property sMacroCustom As String
|
||||
Get
|
||||
Return m_sMacroCustom
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sMacroCustom = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bIsCustomChecked As Boolean
|
||||
Public Property bIsCustomChecked As Boolean
|
||||
Get
|
||||
Return m_bIsCustomChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsCustomChecked = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property bCustomVisibility As Visibility
|
||||
Get
|
||||
Return If(Map.refMainWindowVM.MainWindowM.nUserLevel >= 10, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
|
||||
@@ -70,6 +108,11 @@ Public Class MacroFeatureWndVM
|
||||
For Each FeatureItem In Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList
|
||||
FeatureList.Add(FeatureItem)
|
||||
Next
|
||||
|
||||
If bOnlyProd Then
|
||||
nSelFeature = Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM
|
||||
sDescBTLFeature = nSelFeature.sDesc.ToUpper()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
@@ -107,7 +150,7 @@ Public Class MacroFeatureWndVM
|
||||
|
||||
Friend Sub WriteMacro(sMacroName As String)
|
||||
' inizio routine di scrittura
|
||||
Dim FileContent As String() = File.ReadAllLines(Map.refMainWindowVM.MainWindowM.sMacroDir & "\" & MACROTEMPLATE_FILE)
|
||||
Dim FileContent As String() = File.ReadAllLines(Map.refMainWindowVM.MainWindowM.sConfigDir & "\" & MACROTEMPLATE_FILE)
|
||||
Dim FileName As String = CalcBeamPrivateProfileGRP(nSelFeature.nSelGRP) & "." & nSelFeature.nPRC & FILENAMESEPARATOR & sMacroName
|
||||
For LineIndex As Integer = 0 To FileContent.Count - 1
|
||||
Dim sCurrLine As String = FileContent(LineIndex)
|
||||
@@ -153,7 +196,17 @@ Public Class MacroFeatureWndVM
|
||||
"'" & nSelFeature.sDES & "', " &
|
||||
"MACRO.PROCID") 'nSelFeature.ParentPart.NewProcId() &
|
||||
Next
|
||||
File.WriteAllLines(Map.refMainWindowVM.MainWindowM.sMacroDir & "\" & FileName & ".lua", FileContent, Text.Encoding.UTF8)
|
||||
If bOnlyProd Then
|
||||
If m_bIsCustomChecked AndAlso Map.refMainWindowVM.MainWindowM.nUserLevel >= 10 Then
|
||||
File.WriteAllLines(Map.refMainWindowVM.MainWindowM.sMacroDefaultDir & "\" & FileName & ".lua", FileContent, Text.Encoding.UTF8)
|
||||
ElseIf Not bIsCustomChecked AndAlso Map.refMainWindowVM.MainWindowM.nUserLevel >= 10 Then
|
||||
File.WriteAllLines(Map.refMainWindowVM.MainWindowM.sMacroCustomDir & "\" & FileName & ".lua", FileContent, Text.Encoding.UTF8)
|
||||
Else
|
||||
File.WriteAllLines(Map.refMainWindowVM.MainWindowM.sMacroDefaultDir & "\" & FileName & ".lua", FileContent, Text.Encoding.UTF8)
|
||||
End If
|
||||
Else
|
||||
File.WriteAllLines(Map.refMainWindowVM.MainWindowM.sMacroCustomDir & "\" & FileName & ".lua", FileContent, Text.Encoding.UTF8)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Ok
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="NewMacroFeatureWnd"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.ViewerOptimizer"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
IsClosable="False"
|
||||
IsMinimizable="False"
|
||||
IsResizable="False"
|
||||
Title="NewMacroFeature">
|
||||
<Grid Margin="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Feature"
|
||||
Margin="5"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<TextBlock Text="{Binding sDescBTLFeature}"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<CheckBox Content="Default Macro"
|
||||
IsChecked="{Binding bIsCustomChecked}"
|
||||
Visibility="{Binding bCustomVisibility}"
|
||||
Grid.Column="2"
|
||||
Margin="0,6,5,0"/>
|
||||
<TextBlock Text="Name"
|
||||
Grid.Row="1"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sFeatureName}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="5"
|
||||
Width="200"/>
|
||||
<UniformGrid Columns="2"
|
||||
Grid.Row="2"
|
||||
Grid.ColumnSpan="3"
|
||||
Margin="5">
|
||||
<Button Content="Ok"
|
||||
Command="{Binding Ok_Command}"
|
||||
IsDefault="True"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="Cancel"
|
||||
IsCancel="True"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,18 @@
|
||||
Public Class NewMacroFeatureWnd
|
||||
|
||||
Private WithEvents m_MacroFeatureWndVM As MacroFeatureWndVM
|
||||
|
||||
Sub New(Owner As Window, MacroFeatureWndVM As MacroFeatureWndVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = MacroFeatureWndVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_MacroFeatureWndVM = MacroFeatureWndVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MacroFeatureWndVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -144,9 +144,15 @@ Public Class MainWindowM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property sMacroDir As String
|
||||
Friend ReadOnly Property sMacroDefaultDir As String
|
||||
Get
|
||||
Return m_sDataDir & "\" & MACRO_DIR
|
||||
Return m_sDataDir & "\" & MACRODEFAULT_DIR
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property sMacroCustomDir As String
|
||||
Get
|
||||
Return m_sDataDir & "\" & MACROCUSTOM_DIR
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
<EgtBEAMWALL:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
|
||||
<EgtBEAMWALL:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
|
||||
<EgtBEAMWALL:CalcPanelV DataContext="{StaticResource CALCPanelVM}"/>
|
||||
<EgtBEAMWALL:SpecialPanelV DataContext="{StaticResource SpecialPanelVM}"
|
||||
Visibility="{Binding DataContext.SpecialPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
|
||||
<EgtBEAMWALL:FreeContourManagerV DataContext="{StaticResource FreeContourManagerVM}"
|
||||
Visibility="{Binding DataContext.FreeContourManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}"/>
|
||||
</WrapPanel>
|
||||
|
||||
@@ -20,7 +20,7 @@ Public Class ProdProjManagerVM
|
||||
|
||||
Public ReadOnly Property PartManager_Visibility As Visibility
|
||||
Get
|
||||
Return If((Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.SelectionType = BTLStructureVM.SelectionTypes.SELECT_ AndAlso Not Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed)
|
||||
Return Map.refProjectVM.PartManager_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtBEAMWALL.DataLayer.Controllers
|
||||
|
||||
Public Class ProjectVM
|
||||
Inherits VMBase
|
||||
@@ -101,7 +99,7 @@ Public Class ProjectVM
|
||||
Private m_PartManager_Visibility As Boolean = True
|
||||
Public ReadOnly Property PartManager_Visibility As Visibility
|
||||
Get
|
||||
Return If(Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.SelectionType = BTLStructureVM.SelectionTypes.SELECT_ AndAlso Not Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed)
|
||||
Return If(Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.SelectionType = BTLStructureVM.SelectionTypes.SELECT_ AndAlso Not Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 644 B |
Binary file not shown.
|
After Width: | Height: | Size: 682 B |
@@ -179,7 +179,6 @@ Public Class ShowBeamPanelVM
|
||||
End If
|
||||
' nascondo barra del pezzo
|
||||
Map.refProjectVM.BTLStructureVM.SetSelectionType(BTLStructureVM.SelectionTypes.NULL)
|
||||
'Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
|
||||
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProdProjManagerVM.PartManager_Visibility))
|
||||
' mostro in parte bassa dati BTL
|
||||
If Not IsNothing(Map.refBottomPanelVM) Then Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.STRUCTURE_)
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
</TabControl>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid Grid.Row="1" Margin="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
</EgtBEAMWALLCORE:EgtDataGrid>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid Grid.Row="1" Margin="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
|
||||
@@ -351,7 +351,7 @@ Public Class StatisticsVM
|
||||
sFileName = ProjectManagerVM.CurrProd.sProdDirPath & "\" & ProjectManagerVM.CurrProd.sProdId & " - " & "Statistics.pdf"
|
||||
ElseIf ActivePage = Pages.MACHINING OrElse Pages.ONLYPRODPAGE AndAlso bPreview Then ' Se la pagina e' 1 e' bPreview e' True creo PDF Optimizer
|
||||
sFileName = Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf"
|
||||
PrevSelect()
|
||||
If Not bOnlyProd Then PrevSelect()
|
||||
End If
|
||||
|
||||
' avvio il visualizzatore
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<EgtBEAMWALL:FreeContourInputV DataContext="{StaticResource FreeContourInputVM}"
|
||||
Visibility="{Binding DataContext.FreeContourManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjWndV}}}"/>
|
||||
Visibility="{Binding Tag.FreeContourManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjWndV}}}"/>
|
||||
<EgtBEAMWALL:PartManagerV DataContext="{StaticResource PartManagerVM}"
|
||||
Tag="{Binding Tag.BTLStructureVM.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjWndV}}}"
|
||||
Visibility="{Binding DataContext.PartManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjWndV}}}"/>
|
||||
Visibility="{Binding Tag.PartManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjWndV}}}"/>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
|
||||
|
||||
@@ -377,6 +377,14 @@
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="10,0,10,0"/>
|
||||
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ListTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="10,0,10,0"/>
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MachParamTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
|
||||
Reference in New Issue
Block a user