Compare commits

...

28 Commits

Author SHA1 Message Date
Emmanuele Sassi 25af98b6e8 - creazione StrategyWindow 2025-04-29 01:29:17 +02:00
Demetrio Cassarino b48b63bd4d -aggiunto pulsanti conferma-annulla modifiche si feature
-gestito blocco leftpanel quando si è in modifica feature
2025-04-24 16:44:24 +02:00
Demetrio Cassarino 05feb0ab8b -aggiornato selectedmachgroup 2025-04-24 10:55:06 +02:00
Demetrio Cassarino deca9cd4c0 -ripristinato funzioni da modulo config
-pulizia di proj e prod manager
-da sistemare selectedmachgroup
2025-04-23 16:31:14 +02:00
Demetrio Cassarino 8b36b65b37 -rimosso distinzione tra view, machining page 2025-04-22 16:46:32 +02:00
Demetrio Cassarino 06899fadfd -ripristinato optmizervisibility 2025-04-22 08:55:15 +02:00
Demetrio Cassarino 80e9ea4c15 Merge branch 'feature/NewGraphicsProgram' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/NewGraphicsProgram 2025-04-22 08:07:28 +02:00
Demetrio Cassarino ad47a070ef -pulizia codice 2025-04-22 08:03:44 +02:00
Emmanuele Sassi d99ea84058 - gestita selezione su BTLPartList con apertura e chiusura RowDetails 2025-04-18 17:57:56 +02:00
Demetrio Cassarino 069df21cfa -sistemata visibilità tabella feature per produzione 2025-04-18 09:41:30 +02:00
Demetrio Cassarino 7def1b8d5d -aggiunto pulsante modifica pezzo che apre una nuovo tab
-gestito visualizzazione interfaccia
2025-04-17 17:33:05 +02:00
Emmanuele Sassi 82aea136c2 - correzione riferimento a grafica non utilizzata 2025-04-16 19:48:11 +02:00
Demetrio Cassarino 55260fe380 -inizio pulizia codice
-sistemato apri in supervisor
2025-04-16 17:04:01 +02:00
Demetrio Cassarino 4bdbba6599 -sistemato pulsante per modifica feature 2025-04-15 16:59:02 +02:00
Demetrio Cassarino 0d38b47f24 -aggiunto pulsante per la modifica della feature 2025-04-15 15:51:28 +02:00
Demetrio Cassarino 2332eccef9 -pulizia codice 2025-04-15 11:20:07 +02:00
Emmanuele Sassi a3481659f2 Merge branch 'feature/NewGraphicsProgram' of https://gitlab.steamware.net/egaltech/egtbeamwall into feature/NewGraphicsProgram 2025-04-14 17:05:56 +02:00
Emmanuele Sassi 4b90d2e915 - correzione EgtDataGrid
- introduzione datagrid per pezzi dentro grezzi
2025-04-14 17:03:45 +02:00
Demetrio Cassarino bb0a3b385a cambiato dimensioni bottone reset 2025-04-14 10:24:59 +02:00
Demetrio Cassarino 0c82debdf4 -cambiato stile bottone reset 2025-04-14 10:24:11 +02:00
Demetrio Cassarino 995650aac2 -aggiunto lista FeatureInPartInRawPartList 2025-04-14 09:42:01 +02:00
Demetrio Cassarino f7a85a0680 -gestito PartVMList per pareti 2025-04-14 09:20:36 +02:00
Demetrio Cassarino 910e54cae8 -aggiunto comandi su leftpanel
-sistemato grafica
2025-04-11 16:28:54 +02:00
Demetrio Cassarino ea2cb64886 -aggiunto pulsanti a tabelle
-rivisto grafica
2025-04-10 17:08:53 +02:00
Demetrio Cassarino c785adbcdf -aggiornato grafica
-aggiunto a OnlyProdRawPartListV pulsanti da sistemare
2025-04-09 16:59:02 +02:00
Demetrio Cassarino 9546248819 -aggiunto DG_OnlyProdPartList in Datagridckolumns.ini
- gestione lista feature da rivedere
-aggiunto in OnlyProdRawPartListV lista PartVMList
-aggiunto pulsanti start, save con gestione popup
2025-04-08 17:23:19 +02:00
Emmanuele Sassi 13b2dd29d1 - aggiunta proprieta proj su pezzi
- aggiunto progetto Optimizer
2025-04-05 12:59:22 +02:00
Demetrio Cassarino 55879d431e -riattivato pulsanti per aprire btl 2025-04-03 12:02:11 +02:00
561 changed files with 64558 additions and 58 deletions
-1
View File
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel
Imports System.Globalization
Imports System.Windows
Imports EgtUILib
Imports EgtWPFLib5
+12
View File
@@ -18,6 +18,17 @@ Public Class BTLPartM
End Property
' Info del pezzo
Public m_nPROJ As Integer
Public Property nPROJ As Integer
Get
Return m_nPROJ
End Get
Set(value As Integer)
m_nPROJ = value
End Set
End Property
Public m_nPDN As Integer
Public Property nPDN As Integer
Get
@@ -752,6 +763,7 @@ Public Class BTLPartM
Dim sValArray() As String
Dim sValue As String = String.Empty
Dim nValue As Integer = 0
EgtGetInfo(nPartId, BTL_PRT_PROJ, NewBTLPart.m_nPROJ)
EgtGetInfo(nPartId, BTL_PRT_PDN, NewBTLPart.m_nPDN)
Dim nDO As Integer = 1
If EgtGetInfo(nPartId, BTL_PRT_DO, nDO) Then
@@ -1,6 +1,7 @@
Public Module ConstDataGridColumnsIni
Public Const DATAGRIDCOLUMNS_FILE_NAME As String = "DataGridColumns.ini"
Public Const OPTIMIZERDATAGRIDCOLUMNS_FILE_NAME As String = "OPTIMIZERDataGridColumns.ini"
Public Const S_FEATURELIST As String = "DG_FeatureList"
Public Const S_OPENPROJFILEDLG_PROJ As String = "DG_OpenProjectFileDialog_PROJ"
+6
View File
@@ -78,6 +78,12 @@ Public Module ConstGen
Public Const BEAM_DIR As String = "Beam"
' Sottodirettorio per lavorazioni pareti
Public Const WALL_DIR As String = "Wall"
' Sottodirettorio per setup strategie
Public Const AISETUP_DIR As String = "AISetup"
' Sottodirettorio per automarismo strategie
Public Const STRATEGIES_DIR As String = "Strategies"
' File contenente lista strategie per feature/topologia
Public Const AVAILABLESTRATEGYLIST_FILE As String = "AvailableStrategyList"
' Sottodirettorio di default per il salvataggio con nome
Public Const SAVE_DFL_NAMEDIR As String = "MyProjects"
' Sottodirettorio di default per le macchine
@@ -522,7 +522,11 @@ Public Class EgtDataGridColumn
Private Property m_Width As DataGridLength
Public Property Width As DataGridLength
Get
Return m_dgColumn.Width
If Not IsNothing(m_dgColumn) Then
Return m_dgColumn.Width
Else
Return m_Width
End If
End Get
Set(value As DataGridLength)
If Not IsNothing(m_dgColumn) Then
@@ -539,10 +543,14 @@ Public Class EgtDataGridColumn
End Get
End Property
Private Property m_DisplayIndex As Integer
Private Property m_DisplayIndex As Integer = -1
Public Property DisplayIndex As Integer
Get
Return m_dgColumn.DisplayIndex
If Not IsNothing(m_dgColumn) Then
Return m_dgColumn.DisplayIndex
Else
Return m_DisplayIndex
End If
End Get
Set(value As Integer)
If Not IsNothing(m_dgColumn) Then
@@ -557,7 +565,11 @@ Public Class EgtDataGridColumn
Private Property m_IsReadOnly As Boolean = True
Public Property IsReadOnly As Boolean
Get
Return m_dgColumn.IsReadOnly
If Not IsNothing(m_dgColumn) Then
Return m_dgColumn.IsReadOnly
Else
Return m_IsReadOnly
End If
End Get
Set(value As Boolean)
If Not IsNothing(m_dgColumn) Then
@@ -575,7 +587,11 @@ Public Class EgtDataGridColumn
Private m_CanUserReorder As Boolean
Public Property CanUserReorder As Boolean
Get
Return m_dgColumn.CanUserReorder
If Not IsNothing(m_dgColumn) Then
Return m_dgColumn.CanUserReorder
Else
Return m_CanUserReorder
End If
End Get
Set(value As Boolean)
If Not IsNothing(m_dgColumn) Then
@@ -591,7 +607,11 @@ Public Class EgtDataGridColumn
Private m_CanUserResize As Boolean
Public Property CanUserResize As Boolean
Get
Return m_dgColumn.CanUserResize
If Not IsNothing(m_dgColumn) Then
Return m_dgColumn.CanUserResize
Else
Return m_CanUserResize
End If
End Get
Set(value As Boolean)
If Not IsNothing(m_dgColumn) Then
@@ -606,7 +626,11 @@ Public Class EgtDataGridColumn
Private m_CanUserSort As Boolean
Public Property CanUserSort As Boolean
Get
Return m_dgColumn.CanUserSort
If Not IsNothing(m_dgColumn) Then
Return m_dgColumn.CanUserSort
Else
Return m_CanUserSort
End If
End Get
Set(value As Boolean)
If Not IsNothing(m_dgColumn) Then
@@ -721,6 +745,7 @@ Public Class EgtDataGridColumn
' funzione per calcolare e scrivere la stringa dei parametri della colonna nell'INI
Public Function SaveDataGridColumn() As Boolean
If DisplayIndex = -1 Then Return False
Dim bOk As Boolean
Dim sColumnParams = String.Empty
sColumnParams = Name & "," & If(CanUserReorder, 1, 0) & "," & If(CanUserResize, 1, 0) & "," & If(CanUserSort, 1, 0) & "," & If(m_OrigIsReadOnly, 1, 0) & "," & DoubleToString(Width.Value, 6) & "," & Width.UnitType & "," & If(Visible, 1, 0) & "," & If(CanUserEditVisible, 1, 0) & "," & CInt(SortDirection)
@@ -0,0 +1,52 @@
<Window x:Class="AboutBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
<Border BorderThickness="2" BorderBrush="LightBlue">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.75*"/>
<RowDefinition Height="0.15*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="2.5*"/>
<RowDefinition Height="0.35*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.35*"/>
</Grid.RowDefinitions>
<Grid Grid.Column="1" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Name="LogoBrd" Grid.Column="1" Background="White">
<Image Source="/Resources/AboutBox/EgalwareLogo.png" Stretch="Uniform"/>
</Border>
</Grid>
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18" />
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="12" />
<TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/>
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True"
Margin="100,0"/>
</Grid>
</Border>
</Window>
@@ -0,0 +1,40 @@
Imports EgtUILib
Imports EgtBEAMWALL.Core
Public Class AboutBoxV
Private Sub AboutBoxWD_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
DescriptionLbl.Text = My.Application.Info.Description.ToString()
VersionLbl.Text = "Version : " & My.Application.Info.Version.Major.ToString() &
"." & My.Application.Info.Version.Minor.ToString() &
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
My.Application.Info.Version.Revision.ToString()
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
Dim sInfo As String = String.Empty
Dim sKey As String = String.Empty
EgtGetKeyInfo(sKey)
Dim sKlev As String = Map.refMainWindowVM.MainWindowM.nKeyLevel.ToString()
Dim sOpts As String = Map.refMainWindowVM.MainWindowM.nKeyOptions.ToString()
Dim sLeftDays As String = ""
Dim nLeftDays As Integer
if EgtGetKeyLeftDays( nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays= " (" & nLeftDays.ToString() & ")"
sInfo = If( EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
" (" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() & ")" & Environment.NewLine
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
Dim sOpSys As String = String.Empty
EgtGetOsInfo( sOpSys)
sInfo &= sOpSys & Environment.NewLine
Dim sCPU As String = String.Empty
EgtGetCpuInfo( sCPU)
sInfo &= sCPU & Environment.NewLine
Dim sScene As String = String.Empty
EgtGetSceneInfo(sScene)
sInfo &= sScene
InfoLbl.Text = sInfo
ExitBtn.Content = EgtMsg(10104) 'Ok
End Sub
End Class
@@ -0,0 +1,18 @@
Public Class AddFeatureWndV
Private WithEvents m_AddFeatureWndVM As AddFeatureWndVM
Sub New(Owner As Window, AddFeatureWndVM As AddFeatureWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = AddFeatureWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_AddFeatureWndVM = AddFeatureWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddFeatureWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -0,0 +1,90 @@
<EgtWPFLib5:EgtCustomWindow x:Class="AddFeatureWndV"
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.Optimizer"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddProcess">
<StackPanel Margin="5,5,5,0">
<TabControl SelectedIndex="{Binding SelGRPType}">
<TabItem Header="L"/>
<TabItem Header="T"/>
</TabControl>
<Border Grid.Row="1"
BorderThickness="1"
BorderBrush="DarkGray"
Background="White"
Margin="0,-6,0,5">
<Grid Margin="0,5,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Center"
Grid.Row="0"
Margin="0,0,0,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Process"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding PRCList}"
SelectedItem="{Binding nSelPRC}"
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 MacroCustomList}"
SelectedIndex="{Binding nSelMacroCustom}"
Grid.Row="1"
Grid.Column="1"
DisplayMemberPath="Name"
IsEnabled="{Binding MacroList_IsEnabled}"
Width="200"
Margin="0,5,0,0"
Style="{StaticResource FeatureComboBox}"/>
</Grid>
<Image Source="{Binding sDrawPath}"
Grid.Row="1"
Height="300"
Width="300"
Margin="5,0,5,5"/>
<Grid Grid.Row="2" Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Content="Ok"
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}"/>
</Grid>
</Grid>
</Border>
</StackPanel>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,451 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtBEAMWALL.Core
Public Class AddFeatureWndVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
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
Private m_SelGRPType As GRPType
Public Property SelGRPType As Integer
Get
Return m_SelGRPType
End Get
Set(value As Integer)
m_SelGRPType = value
' carico lista process
Dim TempPRCList As New ObservableCollection(Of Integer)
GetBeamPrivateProfileProcessList(m_SelGRPType, TempPRCList)
m_PRCList.Clear()
For Each PRC In TempPRCList
' leggo gruppi
Dim GRPList As New ObservableCollection(Of Integer)
GetBeamPrivateProfileGRPList(m_SelGRPType, PRC, GRPList)
m_PRCList.Add(New PRC(If(GRPList.Count > 0, GRPList(0), m_SelGRPType), PRC, GetBeamPrivateProfileName(m_SelGRPType, PRC)))
Next
If m_SelGRPType = GRPType.L Then
nSelPRC = PRCList(m_PrevSelPRCIndex_L)
ElseIf m_SelGRPType = GRPType.T Then
nSelPRC = PRCList(m_PrevSelPRCIndex_T)
End If
NotifyPropertyChanged(NameOf(PRCList))
NotifyPropertyChanged(NameOf(nSelPRC))
End Set
End Property
Private m_PRCList As New ObservableCollection(Of PRC)
Public ReadOnly Property PRCList As ObservableCollection(Of PRC)
Get
Return m_PRCList
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
Return m_nSelPRC
End Get
Set(value As PRC)
If value IsNot m_nSelPRC Then
m_nSelPRC = value
If Not IsNothing(m_nSelPRC) Then
If SelGRPType = GRPType.L Then
m_PrevSelPRCIndex_L = PRCList.IndexOf(m_nSelPRC)
ElseIf SelGRPType = GRPType.T Then
m_PrevSelPRCIndex_T = PRCList.IndexOf(m_nSelPRC)
End If
End If
NotifyPropertyChanged(NameOf(sDrawPath))
' carico eventuali file Macro
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 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
Private m_MacroList_IsEnabled As Boolean
Public Property MacroList_IsEnabled As Boolean
Get
Return m_MacroList_IsEnabled
End Get
Set(value As Boolean)
If value <> m_MacroList_IsEnabled Then
m_MacroList_IsEnabled = value
NotifyPropertyChanged(NameOf(MacroList_IsEnabled))
End If
End Set
End Property
Private m_MacroCustomList As New ObservableCollection(Of Object)
Public ReadOnly Property MacroCustomList As ObservableCollection(Of Object)
Get
Return m_MacroCustomList
End Get
End Property
Private m_nSelMacroCustom As Integer = -1
Public Property nSelMacroCustom As Integer
Get
Return m_nSelMacroCustom
End Get
Set(value As Integer)
If value <> m_nSelMacroCustom Then
m_nSelMacroCustom = value
End If
End Set
End Property
Public ReadOnly Property sDrawPath As String
Get
If IsNothing(m_nSelPRC) Then Return ""
Dim sDescConstruction As String = String.Empty
If m_SelGRPType = GRPType.L Then
sDescConstruction = "L"
Else
sDescConstruction = "T"
End If
sDescConstruction &= m_nSelPRC.nPRC.ToString("000")
Return Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescConstruction & ".png"
End Get
End Property
' 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
Public ReadOnly Property OK_Msg As String
Get
Return EgtMsg(91651)
End Get
End Property
Public ReadOnly Property Cancel_Msg As String
Get
Return EgtMsg(91652)
End Get
End Property
#End Region
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New()
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"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public Sub Ok()
'verifico che tutti i campi contengano un valore valido
If Not IsNothing(m_nSelPRC) AndAlso m_nSelPRC.nPRC > 0 Then
RaiseEvent m_CloseWindow(True)
Else
MessageBox.Show(EgtMsg(61852), EgtMsg(30007))
End If
End Sub
#End Region ' Ok
#End Region ' COMMANDS
End Class
Public Class PRC
' Processo
Private m_nPRC As Integer
Friend ReadOnly Property nPRC As Integer
Get
Return m_nPRC
End Get
End Property
' Gruppo
Private m_nGRP As Integer
Friend ReadOnly Property nGRP As Integer
Get
Return m_nGRP
End Get
End Property
Private m_nSIDE As Integer = 2
Public ReadOnly Property nSIDE As Integer
Get
Return m_nSIDE
End Get
End Property
Private m_nVARIANT As Integer = 0
Public ReadOnly Property nVARIANT As Integer
Get
Return m_nVARIANT
End Get
End Property
' Nome
Private m_sName As String
Public ReadOnly Property sName As String
Get
Return m_sName
End Get
End Property
Public ReadOnly Property ghDesc As String
Get
Return If(m_nGRP = 1 OrElse m_nGRP = 2, "T", "L") & m_nPRC.ToString("000") & " " & m_sName
End Get
End Property
' lista dei parametri Q della feature
Protected m_QBTLParamVMList As List(Of QBTLParamVM)
Public Property QBTLParamVMList As List(Of QBTLParamVM)
Get
Return m_QBTLParamVMList
End Get
Set(value As List(Of QBTLParamVM))
m_QBTLParamVMList = value
End Set
End Property
Sub New(GRP As Integer, PRC As Integer, Name As String)
m_nPRC = PRC
m_sName = Name
m_nGRP = GRP
End Sub
Sub New(GRP As Integer, PRC As Integer, Name As String, QBTLParamList As List(Of QBTLParamVM))
m_nPRC = PRC
m_sName = Name
m_nGRP = GRP
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,120 @@
<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"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddProcess"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<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>
<Border Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2" CornerRadius="4,0,0,4">
<TextBlock Text="{Binding Process_Msg}"
Style="{StaticResource ListTextBlock}"/>
</Border>
<Border Grid.Row="1"
Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="4,0,0,4"
BorderThickness="2,2,0,2">
<ListBox Grid.Row="1"
ItemsSource="{Binding PRCListView}"
SelectedItem="{Binding nSelPRC}"
Style="{StaticResource NewAddFeature_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding ghDesc}"
ToolTip="{Binding ghDesc}"
TextAlignment="Justify"
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
Style="{StaticResource OptionTextBlock}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
<Border Grid.Column="1" Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2">
<TextBlock Grid.Column="1"
Text="{Binding Custom_Msg}"
Style="{StaticResource ListTextBlock}"/>
</Border>
<Border Grid.Row="1"
Grid.Column="1"
Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="0"
BorderThickness="0,2,0,2">
<ListBox ItemsSource="{Binding MacroCustomList}"
SelectedIndex="{Binding nSelMacroCustom}"
Style="{StaticResource MacroCustom_ListBox}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Style="{StaticResource MacroCustom_WrapPanel}"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding sMacroName}"
Style="{StaticResource Macro_TextBlock}"/>
<Image Grid.Row="1"
Source="{Binding sMacroDrawPath}"
Style="{StaticResource Macro_Image}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
<Border Grid.Column="2" Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2" Padding="0,10,0,10" CornerRadius="0,4,4,0">
<TextBlock
Text="{Binding Default_Msg}"
Style="{StaticResource ListTextBlock}"/>
</Border>
<Border Grid.Row="1"
Grid.Column="2"
Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="0,4,4,0"
BorderThickness="0,2,2,2">
<ListBox ItemsSource="{Binding MacroDefaultList}"
SelectedIndex="{Binding nSelMacroDefault}"
Style="{StaticResource MacroDefault_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding sMacroName}"
TextAlignment="Justify"
Style="{StaticResource MacroDefault_TextBlock}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
<UniformGrid Columns="2"
Grid.Row="2"
Grid.ColumnSpan="3"
Margin="5">
<Button Content="{Binding OK_Msg}"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Cancel_Msg}"
IsCancel="True"
Style="{StaticResource OnlyProdEgtWPFLib5_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
@@ -0,0 +1,103 @@
<EgtWPFLib5:EgtCustomWindow x:Class="AddPartWndV"
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.Optimizer"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddPartWndV">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Center"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Name"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sNAM}"
Grid.Column="1"
Width="200"/>
</Grid>
<Grid Grid.Row="1"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Prod Number"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding nPDN}"
Grid.Column="1"
Width="45"/>
<TextBlock Text="Count"
Grid.Column="2"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sCNT}"
Grid.Column="3"
Width="45"/>
</Grid>
<Grid Grid.Row="2"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="W"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sW}"
Grid.Column="1"
Width="45"/>
<TextBlock Text="H"
Grid.Column="2"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sH}"
Grid.Column="3"
Width="45"/>
<TextBlock Text="L"
Grid.Column="4"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sL}"
Grid.Column="5"
Width="45"/>
</Grid>
<Grid Grid.Row="3"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Content="Ok"
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}"/>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,18 @@
Public Class AddPartWndV
Private WithEvents m_AddPartWndVM As AddPartWndVM
Sub New(Owner As Window, AddPartWndVM As AddPartWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = AddPartWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_AddPartWndVM = AddPartWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddPartWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -0,0 +1,176 @@
Imports EgtWPFLib5
Imports EgtUILib
Public Class AddPartWndVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Friend Event m_CloseWindow(bDialogResult As Boolean)
Private m_nPDN As Integer
Public Property nPDN As Integer
Get
Return m_nPDN
End Get
Set(value As Integer)
m_nPDN = value
End Set
End Property
Private m_sNAM As String
Public Property sNAM As String
Get
Return m_sNAM
End Get
Set(value As String)
m_sNAM = value
End Set
End Property
Private m_dL As Double
Public ReadOnly Property dL As Double
Get
Return m_dL
End Get
End Property
Public Property sL As String
Get
Return LenToString(m_dL, 3)
End Get
Set(value As String)
Dim dTempL As Double
If StringToLenAdv(value, dTempL, True) AndAlso dTempL > 0 Then
m_dL = dTempL
Else
NotifyPropertyChanged(NameOf(sL))
End If
End Set
End Property
Private m_dW As Double
Public ReadOnly Property dW As Double
Get
Return m_dW
End Get
End Property
Public Property sW As String
Get
Return LenToString(m_dW, 3)
End Get
Set(value As String)
Dim dTempW As Double
If StringToLenAdv(value, dTempW, True) AndAlso dTempW > 0 Then
EgtDraw()
m_dW = dTempW
Else
NotifyPropertyChanged(NameOf(sW))
End If
End Set
End Property
Private m_dH As Double
Public ReadOnly Property dH As Double
Get
Return m_dH
End Get
End Property
Public Property sH As String
Get
Return LenToString(m_dH, 3)
End Get
Set(value As String)
Dim dTempH As Double
If StringToLenAdv(value, dTempH, True) AndAlso dTempH > 0 Then
EgtDraw()
m_dH = dTempH
Else
NotifyPropertyChanged(NameOf(sH))
End If
End Set
End Property
Private m_sMAT As String
Public Property sMAT As String
Get
Return m_sMAT
End Get
Set(value As String)
m_sMAT = value
End Set
End Property
Private m_nCNT As Integer
Public ReadOnly Property nCNT As Integer
Get
Return m_nCNT
End Get
End Property
Public Property sCNT As String
Get
Return m_nCNT
End Get
Set(value As String)
Dim nTempCNT As Integer
If Integer.TryParse(value, nTempCNT) AndAlso nTempCNT > 0 Then
m_nCNT = nTempCNT
Else
NotifyPropertyChanged(NameOf(sCNT))
End If
End Set
End Property
' Definizione comandi
Private m_cmdOk As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New()
If Not IsNothing(Map.refProjectVM.BTLStructureVM.BTLPartVMList) Then
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
m_dW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dW
m_dH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dH
m_dL = Map.refProjectVM.BTLStructureVM.SelBTLPart.dL
ElseIf Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
m_dW = Map.refProjectVM.BTLStructureVM.BTLPartVMList(0).dW
m_dH = Map.refProjectVM.BTLStructureVM.BTLPartVMList(0).dH
m_dL = Map.refProjectVM.BTLStructureVM.BTLPartVMList(0).dL
End If
m_nPDN = Map.refProjectVM.BTLStructureVM.BTLStructureM.NewPDN()
End If
m_nCNT = 1
End Sub
#End Region ' CONSTRUCTOR
#Region "COMMANDS"
#Region "Ok"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public Sub Ok()
'verifico che tutti i campi contengano un valore valido
If Not IsNothing(m_dL) AndAlso m_dL > 0 AndAlso
Not IsNothing(m_dW) AndAlso m_dW >= 0 AndAlso
Not IsNothing(m_dH) AndAlso m_dH >= 0 Then
RaiseEvent m_CloseWindow(True)
Else
MessageBox.Show(EgtMsg(61853), EgtMsg(30007))
End If
End Sub
#End Region ' Ok
#End Region ' COMMANDS
End Class
@@ -0,0 +1,94 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdAddPartWndV"
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"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddPartWndV"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Style="{StaticResource OnlyProdAddPart_Grid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Name"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sNAM}"
Style="{StaticResource NAM_TextBox}"/>
</Grid>
<Grid Grid.Row="1"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Prod Number"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding nPDN}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="2"
Text="Count"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding sCNT}"
Style="{StaticResource Dimension_TextBox}"/>
</Grid>
<Grid Grid.Row="2"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="W"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sW}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="2"
Text="H"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding sH}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="4"
Text="L"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="5"
Text="{Binding sL}"
Style="{StaticResource Dimension_TextBox}"/>
</Grid>
<UniformGrid Grid.Row="3"
Columns="2"
Margin="0,5,0,5">
<Button Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="Cancel"
IsCancel="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,18 @@
Public Class OnlyProdAddPartWndV
Private WithEvents m_AddPartWndVM As AddPartWndVM
Sub New(Owner As Window, AddPartWndVM As AddPartWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = AddPartWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_AddPartWndVM = AddPartWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddPartWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -0,0 +1,64 @@
<EgtWPFLib5:EgtCustomWindow x:Class="AddRawPartWndV"
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.Optimizer"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddRawPartWnd">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ComboBox ItemsSource="{Binding DimensionsList}"
SelectedItem="{Binding SelDimension}"
DisplayMemberPath="sDimension"
Visibility="{Binding DimensionsList_Visibility}"
Margin="0,0,0,5"/>
<ItemsControl ItemsSource="{Binding VariableList}"
Grid.Row="1">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sMsg}"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sValue}"
Grid.Column="1"
Width="65"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Grid Grid.Row="2"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Content="Ok"
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}"/>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,18 @@
Public Class AddRawPartWndV
Private WithEvents m_AddRawPartWndVM As AddRawPartWndVM
Sub New(Owner As Window, AddRawPartWndVM As AddRawPartWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = AddRawPartWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_AddRawPartWndVM = AddRawPartWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddRawPartWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -0,0 +1,256 @@
Imports System.Collections.ObjectModel
Imports EgtWPFLib5
Imports EgtUILib
Imports EgtBEAMWALL.Core
Public Class AddRawPartWndVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Public Enum EditTypes As Integer
ONLY_TEXT = 1
ONLY_COMBO = 2
TEXT_AND_COMBO = 3
End Enum
Friend Event m_CloseWindow(bDialogResult As Boolean)
' flag che indica se trave o parete
Private m_nProjectType As BWType = BWType.BEAM
Private m_EditType As EditTypes = EditTypes.ONLY_TEXT
' lista delle variabili da mostrare
Private m_VariableList_View As CollectionView = Nothing
Private m_VariableList As ObservableCollection(Of Variable)
Public ReadOnly Property VariableList As ObservableCollection(Of Variable)
Get
Return m_VariableList
End Get
End Property
Private m_DimensionsList As List(Of SParam)
Public Property DimensionsList As List(Of SParam)
Get
Return m_DimensionsList
End Get
Set(value As List(Of SParam))
m_DimensionsList = value
End Set
End Property
Private m_SelDimension As SParam
Public Property SelDimension As SParam
Get
Return m_SelDimension
End Get
Set(value As SParam)
m_SelDimension = value
If m_EditType = EditTypes.ONLY_COMBO OrElse m_EditType = EditTypes.TEXT_AND_COMBO Then
' aggiorno textbox
Select Case m_nProjectType
Case BWType.BEAM
m_VariableList(0).SetValue(value.dL)
Case BWType.WALL
m_VariableList(0).SetValue(value.dW)
m_VariableList(1).SetValue(value.dL)
End Select
End If
End Set
End Property
Private m_DimensionsList_Visibility As Visibility
Public ReadOnly Property DimensionsList_Visibility As Visibility
Get
Return If(m_EditType = EditTypes.ONLY_COMBO OrElse m_EditType = EditTypes.TEXT_AND_COMBO, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
' Definizione comandi
Private m_cmdOk As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New(MachineType As Integer, dL As Double, dW As Double, dPosx As Double)
m_nProjectType = MachineType
m_EditType = EditTypes.ONLY_TEXT
Select Case m_nProjectType
Case ConstBeam.MachineType.BEAM
m_VariableList = New ObservableCollection(Of Variable)({New Variable(Variable.VariableType.LENGTH, EgtMsg(61935), dL), ' lunghezza
New Variable(Variable.VariableType.LENGTH, EgtMsg(61816), dPosx)}) ' ritaglio iniziale
Case ConstBeam.MachineType.WALL
m_VariableList = New ObservableCollection(Of Variable)({New Variable(Variable.VariableType.LENGTH, EgtMsg(61935), dL), ' lunghezza
New Variable(Variable.VariableType.LENGTH, EgtMsg(61936), dW)}) ' larghezza
End Select
End Sub
Sub New(EditType As EditTypes, ProjectType As BWType, DimensionsList As List(Of SParam), dL As Double, dW As Double, dPosx As Double, dOffset As Double, dKerf As Double)
m_EditType = EditType
m_nProjectType = ProjectType
Select Case ProjectType
Case BWType.BEAM
m_VariableList = New ObservableCollection(Of Variable)({New Variable(Variable.VariableType.LENGTH, EgtMsg(61935), dL + dPosx), ' lunghezza + ritaglio iniziale
New Variable(Variable.VariableType.LENGTH, EgtMsg(61816), dPosx), ' ritaglio iniziale
New Variable(Variable.VariableType.LENGTH, EgtMsg(61937), dOffset)}) ' offset
Case BWType.WALL
m_VariableList = New ObservableCollection(Of Variable)({New Variable(Variable.VariableType.LENGTH, EgtMsg(61936), dW), ' larghezza
New Variable(Variable.VariableType.LENGTH, EgtMsg(61935), dL), ' lunghezza
New Variable(Variable.VariableType.LENGTH, EgtMsg(61938), dKerf), ' kerf
New Variable(Variable.VariableType.LENGTH, EgtMsg(61937), dOffset)}) ' offset
End Select
m_DimensionsList = DimensionsList
If m_DimensionsList.Count > 0 Then
Dim LastMaterial As SParam = WarehouseHelper.GetLastMaterial(DimensionsList(0).SectXMat)
If IsNothing(LastMaterial) Then
SelDimension = m_DimensionsList(0)
Else
Dim TempDimension As SParam = m_DimensionsList.FirstOrDefault(Function(x) x.SectXMat = LastMaterial.SectXMat AndAlso x.dL = LastMaterial.dL AndAlso x.dW = LastMaterial.dW AndAlso x.nQuantity = LastMaterial.nQuantity)
If Not IsNothing(TempDimension) Then
SelDimension = TempDimension
Else
SelDimension = m_DimensionsList(0)
End If
End If
End If
' riduco lista parametri a solo quelli che utilizzati
m_VariableList_View = CollectionViewSource.GetDefaultView(m_VariableList)
m_VariableList_View.Filter = AddressOf VariableListFilter
NotifyPropertyChanged(NameOf(DimensionsList_Visibility))
End Sub
Private Function VariableListFilter(Variable As Object) As Boolean
Dim CurrVariable As Variable = DirectCast(Variable, Variable)
Dim nVariableIndex As Integer = m_VariableList.IndexOf(Variable)
Select Case m_nProjectType
Case BWType.BEAM
If m_EditType = EditTypes.ONLY_TEXT OrElse m_EditType = EditTypes.TEXT_AND_COMBO Then
Return True
Else
Return nVariableIndex = 1 OrElse nVariableIndex = 2
End If
Case BWType.WALL
If m_EditType = EditTypes.ONLY_TEXT OrElse m_EditType = EditTypes.TEXT_AND_COMBO Then
Return True
Else
Return nVariableIndex = 2 OrElse nVariableIndex = 3
End If
End Select
Return False
End Function
#End Region ' CONSTRUCTOR
#Region "COMMANDS"
#Region "Ok"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public Sub Ok()
'verifico che tutti i campi contengano un valore valido
For Each Variable In m_VariableList
If (Variable.nType = Variable.VariableType.STRING_ AndAlso IsNothing(Variable.sValue)) OrElse
((Variable.nType = Variable.VariableType.DOUBLE_ OrElse Variable.nType = Variable.VariableType.LENGTH) AndAlso IsNothing(Variable.dValue)) Then
MessageBox.Show(If(m_nProjectType = MachineType.BEAM, EgtMsg(61854), EgtMsg(61855)), EgtMsg(30007))
Return
End If
Next
' se non ci sono problemi esco restituendo vero
RaiseEvent m_CloseWindow(True)
End Sub
#End Region ' Ok
#End Region ' COMMANDS
End Class
Public Class Variable
Inherits VMBase
Public Enum VariableType As Integer
DOUBLE_ = 1
STRING_ = 2
COMBO = 3
LENGTH = 4
End Enum
Private m_nType As VariableType
Public ReadOnly Property nType As VariableType
Get
Return m_nType
End Get
End Property
Private m_sMsg As String
Public Property sMsg As String
Get
Return m_sMsg
End Get
Set(value As String)
m_sMsg = value
End Set
End Property
Private m_dValue As Double = 0
Friend ReadOnly Property dValue As Double
Get
Return m_dValue
End Get
End Property
Private m_sValue As String = ""
Public Property sValue As String
Get
Select Case m_nType
Case VariableType.STRING_
Return m_sValue
Case VariableType.LENGTH
Return LenToString(m_dValue, 3)
Case Else ' VariableType.DOUBLE_
Return DoubleToString(m_dValue, 3)
End Select
End Get
Set(value As String)
Select Case m_nType
Case VariableType.STRING_
m_sValue = value
Case VariableType.LENGTH
Dim dTempValue As Double
If StringToLenAdv(value, dTempValue, True) Then
m_dValue = dTempValue
Else
NotifyPropertyChanged(NameOf(sValue))
End If
Case Else ' VariableType.DOUBLE_
Dim dTempValue As Double
If StringToDoubleAdv(value, dTempValue, True) Then
m_dValue = dTempValue
Else
NotifyPropertyChanged(NameOf(sValue))
End If
End Select
End Set
End Property
Sub New(Type As VariableType, Msg As String, Value As Double)
m_nType = Type
m_sMsg = Msg
m_dValue = Value
End Sub
Friend Sub SetValue(dValue As Double)
m_dValue = dValue
NotifyPropertyChanged(NameOf(sValue))
End Sub
End Class
@@ -0,0 +1,60 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdAddRawPartWndV"
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"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddRawPartWnd"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ComboBox ItemsSource="{Binding DimensionsList}"
SelectedItem="{Binding SelDimension}"
DisplayMemberPath="sDimension"
Visibility="{Binding DimensionsList_Visibility}"
Margin="0,0,0,5"
Style="{StaticResource OnlyProd_ComboBox}"/>
<ItemsControl Grid.Row="1"
ItemsSource="{Binding VariableList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sMsg}"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sValue}"
Style="{StaticResource Value_TextBox}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<UniformGrid Grid.Row="2"
Columns="2"
Margin="0,0,0,5">
<Button Grid.Column="1"
Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"
Margin="0,0,5,0"/>
<Button Grid.Column="3"
Content="Cancel"
IsCancel="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,18 @@
Public Class OnlyProdAddRawPartWndV
Private WithEvents m_AddRawPartWndVM As AddRawPartWndVM
Sub New(Owner As Window, AddRawPartWndVM As AddRawPartWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = AddRawPartWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_AddRawPartWndVM = AddRawPartWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddRawPartWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -0,0 +1,128 @@
<EgtWPFLib5:EgtCustomWindow x:Class="AddSectionXMaterialWndV"
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.Optimizer"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddSectionXMaterial">
<StackPanel Margin="5,5,5,0">
<EgtBEAMWALLCORE:EgtDataGrid Grid.Row="0" Width="500" MaxHeight="600"
ItemsSource="{Binding NewSectionXMaterialList}"
SelectedItem="{Binding SelNewSectionXMaterial}"
CanUserAddRows="False"
AutoGenerateColumns="False"
CanUserResizeRows="False"
SelectionMode="Single"
ScrollViewer.CanContentScroll="False"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
Margin="5"
ColumnHeaderBackground="{x:Null}"
BindingColumns="{Binding SectXMatColumns}">
<DataGrid.Resources>
<!-- SectionXMaterial -->
<DataGridTextColumn x:Key="colSECTXMAT" Binding="{Binding sSectionXMaterial}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.SectionXMaterial_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:AddSectionXMaterialWndV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!-- Alias -->
<DataGridTemplateColumn x:Key="colALIAS">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.Alias_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:AddSectionXMaterialWndV}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Path=Alias_IsChecked, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding Alias_IsEnabled}"
HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!-- W -->
<DataGridTextColumn x:Key="colW" Binding="{Binding sNewW}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:AddSectionXMaterialWndV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="IsEnabled" Value="{Binding Alias_IsNotChecked}" />
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
<!-- L -->
<DataGridTextColumn x:Key="colL" Binding="{Binding sNewL}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:AddSectionXMaterialWndV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="IsEnabled" Value="{Binding Alias_IsNotChecked}" />
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
<!-- Material -->
<DataGridTemplateColumn x:Key="colMATERIAL">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.Material_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:AddSectionXMaterialWndV}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ComboBox ItemsSource="{Binding MaterialForSameSection_List}"
SelectedItem="{Binding SelMaterialForSameSection, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding Alias_IsChecked, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!-- Quantity -->
<DataGridTextColumn x:Key="colQTY" Binding="{Binding sQuantity}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.Quantity_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:AddSectionXMaterialWndV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="IsEnabled" Value="{Binding Alias_IsNotChecked}" />
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
</DataGrid.Resources>
</EgtBEAMWALLCORE:EgtDataGrid>
<Grid Grid.Row="2" Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Content="{Binding Ok_Msg}"
Command="{Binding Ok_Command}"
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding Cancel_Msg}"
Command="{Binding Cancel_Command}"
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</StackPanel>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,18 @@
Public Class AddSectionXMaterialWndV
Private WithEvents m_AddSectionXMaterialWndVM As AddSectionXMaterialWndVM
Sub New(Owner As Window, AddSectionXMaterialWndVM As AddSectionXMaterialWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = AddSectionXMaterialWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_AddSectionXMaterialWndVM = AddSectionXMaterialWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddSectionXMaterialWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -0,0 +1,381 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtBEAMWALL.Core
Public Class AddSectionXMaterialWndVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Friend Event m_CloseWindow(bDialogResult As Boolean)
Protected m_SectXMatColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property SectXMatColumns As ObservableCollection(Of EgtDataGridColumn)
Get
Return m_SectXMatColumns
End Get
Set(value As ObservableCollection(Of EgtDataGridColumn))
m_SectXMatColumns = value
End Set
End Property
' Lista dei nuovi SectionXMaterial in BTLSTructure non presenti in Warehouse
Private m_NewSectionXMaterialList As New ObservableCollection(Of SectionXMaterialToBeAdded)
Public Property NewSectionXMaterialList As ObservableCollection(Of SectionXMaterialToBeAdded)
Get
Return m_NewSectionXMaterialList
End Get
Set(value As ObservableCollection(Of SectionXMaterialToBeAdded))
m_NewSectionXMaterialList = value
End Set
End Property
' Lista dei SectionXMaterial presenti in Warehouse
Private m_WhSectXMatList As New List(Of SectionXMaterial)
Public Property WhSectXMatList As List(Of SectionXMaterial)
Get
Return m_WhSectXMatList
End Get
Set(value As List(Of SectionXMaterial))
m_WhSectXMatList = value
End Set
End Property
' SectionXMaterial correntemente selezionato nella Datagrid
Private m_SelNewSectionXMaterial As SectionXMaterialToBeAdded
Public Property SelNewSectionXMaterial As SectionXMaterialToBeAdded
Get
Return m_SelNewSectionXMaterial
End Get
Set(value As SectionXMaterialToBeAdded)
m_SelNewSectionXMaterial = value
End Set
End Property
' Definizione comandi
Private m_cmdOk As ICommand
Private m_cmdCancel As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "MESSAGES"
Public ReadOnly Property SectionXMaterial_Msg As String
Get
Return EgtMsg(61771)
End Get
End Property
Public ReadOnly Property Alias_Msg As String
Get
Return EgtMsg(61772)
End Get
End Property
Public ReadOnly Property L_Msg As String
Get
Return EgtMsg(61604)
End Get
End Property
Public ReadOnly Property W_Msg As String
Get
Return EgtMsg(61605)
End Get
End Property
Public ReadOnly Property Material_Msg As String
Get
Return EgtMsg(61607)
End Get
End Property
Public ReadOnly Property Quantity_Msg As String
Get
Return EgtMsg(61774)
End Get
End Property
Public ReadOnly Property Ok_Msg As String
Get
Return EgtMsg(61761)
End Get
End Property
Public ReadOnly Property Cancel_Msg As String
Get
Return EgtMsg(61763)
End Get
End Property
Public ReadOnly Property Error_Msg As String
Get
Return EgtMsg(61764)
End Get
End Property
Public ReadOnly Property IncorrectValues_Msg As String
Get
Return EgtMsg(61768)
End Get
End Property
#End Region ' MESSAGES
#Region "CONSTRUCTOR"
Sub New(SectXMatList As List(Of SectionXMaterialToBeAdded))
' Aggiungo riferimento a Map
Map.SetRefAddSectionXMaterialWndVM(Me)
' carico le colonne della datagrid
LoadColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
NewSectionXMaterialList = New ObservableCollection(Of SectionXMaterialToBeAdded)(SectXMatList)
WhSectXMatList = WarehouseWndVM.GetSectionXMaterialsFromWarehouse()
' Prendo i SectionXMaterial appena messi nella Lista di questa finestra e li confronto con ciascuno di quelli presenti in Warehouse.
' Se le sezioni sono uguali carico i materiali relativi alla medesima sezione.
' Se i materiali di quella medesima sezione non ci sono disabilito la CheckBox Alias.
For Each NewSectXMatItem In NewSectionXMaterialList
NewSectXMatItem.Alias_IsChecked = False
For Each SectionListItem In WhSectXMatList
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
If NewSectXMatItem.dW = SectionListItem.dW AndAlso NewSectXMatItem.dH = SectionListItem.dH Then
' Se le sezioni sono uguali allora indago sui materiali
For Index As Integer = 0 To SectionListItem.sMaterial.Count - 1
If Not NewSectXMatItem.MaterialForSameSection_List.Contains(SectionListItem.sMaterial(Index)) And
Not NewSectXMatItem.sMaterial.Contains(SectionListItem.sMaterial(Index)) Then
NewSectXMatItem.MaterialForSameSection_List.Add(SectionListItem.sMaterial(Index))
End If
If NewSectXMatItem.MaterialForSameSection_List.Count > 0 Then
NewSectXMatItem.Alias_IsEnabled = True
End If
Next
End If
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
If NewSectXMatItem.dH = SectionListItem.dH Then
' Se le sezioni sono uguali allora indago sui materiali
For Index As Integer = 0 To SectionListItem.sMaterial.Count - 1
If Not NewSectXMatItem.MaterialForSameSection_List.Contains(SectionListItem.sMaterial(Index)) And
Not NewSectXMatItem.sMaterial.Contains(SectionListItem.sMaterial(Index)) Then
NewSectXMatItem.MaterialForSameSection_List.Add(SectionListItem.sMaterial(Index))
End If
If NewSectXMatItem.MaterialForSameSection_List.Count > 0 Then
NewSectXMatItem.Alias_IsEnabled = True
End If
Next
End If
End If
Next
Next
End Sub
#End Region ' CONSTRUCTOR
#Region "COMMANDS"
#Region "Ok"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public Sub Ok()
' Se i valori non sono corretti segnalo l'errore e impedisco il salvataggio
For Index As Integer = 0 To NewSectionXMaterialList.Count - 1
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM AndAlso
(Not NewSectionXMaterialList(Index).Alias_IsChecked And NewSectionXMaterialList(Index).dNewL < 0) OrElse
(NewSectionXMaterialList(Index).Alias_IsChecked And IsNothing(NewSectionXMaterialList(Index).SelMaterialForSameSection)) OrElse
(Not NewSectionXMaterialList(Index).Alias_IsChecked And (NewSectionXMaterialList(Index).nQuantity < 0 Or NewSectionXMaterialList(Index).nQuantity > 99)) Then
MessageBox.Show(IncorrectValues_Msg, Error_Msg)
Return
End If
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL AndAlso
(Not NewSectionXMaterialList(Index).Alias_IsChecked And (NewSectionXMaterialList(Index).dNewW < 0 Or NewSectionXMaterialList(Index).dNewL < 0)) OrElse
(NewSectionXMaterialList(Index).Alias_IsChecked And IsNothing(NewSectionXMaterialList(Index).SelMaterialForSameSection)) OrElse
(Not NewSectionXMaterialList(Index).Alias_IsChecked And (NewSectionXMaterialList(Index).nQuantity < 0 Or NewSectionXMaterialList(Index).nQuantity > 99)) Then
MessageBox.Show(IncorrectValues_Msg, Error_Msg)
Return
End If
Next
' Se i valori sono corretti salvo
Save()
End Sub
#End Region ' Ok
#Region "Cancel"
Public ReadOnly Property Cancel_Command As ICommand
Get
If m_cmdCancel Is Nothing Then
m_cmdCancel = New Command(AddressOf Cancel)
End If
Return m_cmdCancel
End Get
End Property
Public Sub Cancel()
' Resetto i valori prima di salvarli
For Index As Integer = 0 To NewSectionXMaterialList.Count - 1
NewSectionXMaterialList(Index).Alias_IsChecked = False
NewSectionXMaterialList(Index).dNewL = 0
NewSectionXMaterialList(Index).nQuantity = 0
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then NewSectionXMaterialList(Index).dNewW = 0
Next
Save()
End Sub
#End Region ' Cancel
#End Region ' CONSTRUCTOR
#Region "METHODS"
#Region "LoadColumns"
Protected Sub LoadColumns(ProjectType As BWType)
If ProjectType = BWType.BEAM Then
' carico le colonne della datagrid
GetPrivateProfileColumns(S_SECTXMATLIST_BEAM, SectXMatColumns)
ElseIf ProjectType = BWType.WALL Then
' carico le colonne della datagrid
GetPrivateProfileColumns(S_SECTXMATLIST_WALL, SectXMatColumns)
End If
' aggiorno la visibilità delle colonne
For Each col In SectXMatColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
End Sub
#End Region ' LoadColumns
#Region "Save"
Public Sub Save()
' Indice per scansionare NewSectionXMaterialList
Dim Index = 0
' Indice da incrementare in modo da scrivere i nuovi parametri L/S a partire dal giusto numero
Dim ParamIndex = 1
' Indice da incrementare in modo da scrivere i nuovi SectionXMaterial a partire dal giusto numero
Dim SxMParamIndex = 1
Dim sWarehousePath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_MEDIUM_INI_FILE_NAME
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
' Ciclo sui parametri L esistenti nell'INI in modo da avere l'indice di partenza per gli ulteriori parametri da scrivere
Dim sValue As String = String.Empty
While EgtUILib.GetPrivateProfileString(S_BEAM, "L" & ParamIndex, String.Empty, sValue, sWarehousePath)
ParamIndex += 1
End While
' Ciclo sui SectionXMaterial BEAM esistenti nell'INI in modo da avere l'indice di partenza per gli ulteriori parametri da scrivere
While EgtUILib.GetPrivateProfileString(S_BEAM_LIST, SxMParamIndex, String.Empty, sValue, sWarehousePath)
SxMParamIndex += 1
End While
' Se i valori sono tutti >= 0 li scrivo nel file INI
Index = 0
For Each NewSxMItem In NewSectionXMaterialList
Dim sAlias As String = String.Empty
For Each Mat In NewSectionXMaterialList(Index).sMaterial
sAlias &= Mat & ";"
Next
sAlias = sAlias.TrimEnd(";")
' Se Alias è checkato aggiungo l'Alias scelto dalla ComboBox alla stringa e setto NewL e Quantity a 0 e aggiorno il SectionXmaterial in BeamList
If NewSxMItem.Alias_IsChecked Then
sAlias &= ";" & NewSxMItem.SelMaterialForSameSection
NewSectionXMaterialList(Index).dNewL = 0
NewSectionXMaterialList(Index).nQuantity = 0
' Ricavo l'indice del SectionXMaterial da aggiornare
Dim UpdateSxMIndex = 1
For Each WhSectXMat In WhSectXMatList
If WhSectXMat.dW = NewSxMItem.dW AndAlso WhSectXMat.dH = NewSxMItem.dH Then
Exit For
End If
UpdateSxMIndex += 1
Next
' Aggiorno il SectionXMaterial
WritePrivateProfileString(S_BEAM_LIST, UpdateSxMIndex, LenToString(NewSectionXMaterialList(Index).dW, 3) & "," &
LenToString(NewSectionXMaterialList(Index).dH, 3) & "," &
sAlias, sWarehousePath)
Else
' Altrimenti aggiungo il nuovo SectionXMaterial e il parametro
WritePrivateProfileString(S_BEAM_LIST, SxMParamIndex, LenToString(NewSectionXMaterialList(Index).dW, 3) & "," &
LenToString(NewSectionXMaterialList(Index).dH, 3) & "," &
sAlias, sWarehousePath)
WritePrivateProfileString(S_BEAM, K_L & ParamIndex, SxMParamIndex & "," &
LenToString(NewSectionXMaterialList(Index).dNewL, 3) & "," &
NewSectionXMaterialList(Index).nQuantity, sWarehousePath)
ParamIndex += 1
SxMParamIndex += 1
End If
Index += 1
Next
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
' Ciclo sui parametri S esistenti nell'INI in modo da avere l'indice di partenza per gli ulteriori parametri da scrivere
Dim sValue As String = String.Empty
While EgtUILib.GetPrivateProfileString(S_WALL, "S" & ParamIndex, String.Empty, sValue, sWarehousePath)
ParamIndex += 1
End While
' Ciclo sui SectionXMaterial WALL esistenti nell'INI in modo da avere l'indice di partenza per gli ulteriori parametri da scrivere
While EgtUILib.GetPrivateProfileString(S_WALL_LIST, SxMParamIndex, String.Empty, sValue, sWarehousePath)
SxMParamIndex += 1
End While
' Se i valori sono tutti > 0 li scrivo nel file INI
Index = 0
For Each NewSxMItem In NewSectionXMaterialList
Dim sAlias As String = String.Empty
For Each Mat In NewSectionXMaterialList(Index).sMaterial
sAlias &= Mat & ";"
Next
sAlias = sAlias.TrimEnd(";")
' Se Alias è checkato aggiungo l'Alias scelto dalla ComboBox alla stringa
If NewSxMItem.Alias_IsChecked Then
sAlias &= ";" & NewSxMItem.SelMaterialForSameSection
NewSectionXMaterialList(Index).dNewW = 0
NewSectionXMaterialList(Index).dNewL = 0
NewSectionXMaterialList(Index).nQuantity = 0
' Ricavo l'indice del SectionXMaterial da aggiornare
Dim UpdateSxMIndex = 1
For Each WhSectXMat In WhSectXMatList
If WhSectXMat.dH = NewSxMItem.dH Then
Exit For
End If
UpdateSxMIndex += 1
Next
' Aggiorno il SectionXMaterial
WritePrivateProfileString(S_WALL_LIST, UpdateSxMIndex, LenToString(NewSectionXMaterialList(Index).dH, 3) & "," &
sAlias, sWarehousePath)
Else
' Altrimenti aggiungo il nuovo SectionXMaterial e il parametro
WritePrivateProfileString(S_WALL_LIST, SxMParamIndex, LenToString(NewSectionXMaterialList(Index).dH, 3) & "," &
sAlias, sWarehousePath)
WritePrivateProfileString(S_WALL, K_S & ParamIndex, SxMParamIndex & "," &
LenToString(NewSectionXMaterialList(Index).dNewW, 3) & "," &
LenToString(NewSectionXMaterialList(Index).dNewL, 3) & "," &
NewSectionXMaterialList(Index).nQuantity, sWarehousePath)
ParamIndex += 1
SxMParamIndex += 1
End If
Index += 1
Next
End If
RaiseEvent m_CloseWindow(True)
End Sub
#End Region ' Save
#End Region ' METHODS
End Class
+47
View File
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.21.9.0" newVersion="3.21.9.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="K4os.Compression.LZ4.Streams" publicKeyToken="2186fa9121ef231d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.5.0" newVersion="1.3.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.9.0.0" newVersion="1.9.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+9
View File
@@ -0,0 +1,9 @@
<Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary Source="Utility/Dictionary.xaml"/>
</Application.Resources>
</Application>
+14
View File
@@ -0,0 +1,14 @@
Class Application
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
Protected Overrides Sub OnStartup(e As StartupEventArgs)
MyBase.OnStartup(e)
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
' Creo la View principale
Me.MainWindow = New OnlyProdMainWindowV
' Mostro la View principale
Me.MainWindow.Show()
End Sub
End Class
@@ -0,0 +1,159 @@
<EgtWPFLib5:EgtCustomWindow x:Class="BTLDataWndV"
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.Optimizer"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="True"
IsMinimizable="False"
IsResizable="False"
Title="BTLDataWndV"
Name="BTLDataWndV"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<UniformGrid Margin="5"
Columns="6" Rows="7">
<TextBlock Text="{Binding PROJNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPROJNUM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding PROJNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPROJNAME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding PROJPART_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPROJPART, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding PROJGUID_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPROJGUID, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding LISTNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sLISTNAME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding CUSTOMER_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sCUSTOMER, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding ARCHITECT_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sARCHITECT, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EDITOR_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEDITOR, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding DELIVDATE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sDELIVDATE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EXPDATE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEXPDATE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EXPTIME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEXPTIME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EXPRELEASE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEXPRELEASE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding LANGUAGE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sLANGUAGE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding RANGE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}},
Path=Tag.ocRANGE,
Mode=OneWay}"
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}},
Path=Tag.SelRANGE,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/>
<TextBlock Text="{Binding PROCESSINGQUALITY_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}},
Path=Tag.ocPROCESSINGQUALITY,
Mode=OneWay}"
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}},
Path=Tag.SelPROCESSINGQUALITY,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/>
<TextBlock Text="{Binding COMPUTERNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sCOMPUTERNAME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding USER_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sUSER, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding SRCFILE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sSRCFILE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EXPFILE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEXPFILE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding RECESS_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}},
Path=Tag.ocRECESS,
Mode=OneWay}"
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}},
Path=Tag.SelRECESS,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/>
<TextBlock Text="{Binding USERATTRIBUTE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sUSERATTRIBUTE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataWndV}}}"
Style="{StaticResource PartParam_TextBox}"/>
</UniformGrid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,19 @@
Public Class BTLDataWndV
Private WithEvents m_BTLDataWndVM As BTLDataWndVM
Sub New(Owner As Window, BTLDataWndVM As BTLDataWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = BTLDataWndVM
Me.Tag = Map.refProjectVM.BTLStructureVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_BTLDataWndVM = BTLDataWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BTLDataWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -0,0 +1,175 @@
Imports EgtWPFLib5
Imports EgtUILib
Public Class BTLDataWndVM
Inherits VMBase
#Region "Messages"
Public ReadOnly Property PROJNUM_MSG As String
Get
Return EgtMsg(61692)
End Get
End Property
Public ReadOnly Property PROJNAME_MSG As String
Get
Return EgtMsg(61693)
End Get
End Property
Public ReadOnly Property PROJPART_MSG As String
Get
Return EgtMsg(61694)
End Get
End Property
Public ReadOnly Property PROJGUID_MSG As String
Get
Return EgtMsg(61695)
End Get
End Property
Public ReadOnly Property LISTNAME_MSG As String
Get
Return EgtMsg(61696)
End Get
End Property
Public ReadOnly Property CUSTOMER_MSG As String
Get
Return EgtMsg(61697)
End Get
End Property
Public ReadOnly Property ARCHITECT_MSG As String
Get
Return EgtMsg(61698)
End Get
End Property
Public ReadOnly Property EDITOR_MSG As String
Get
Return EgtMsg(61699)
End Get
End Property
Public ReadOnly Property DELIVDATE_MSG As String
Get
Return EgtMsg(61700)
End Get
End Property
Public ReadOnly Property EXPDATE_MSG As String
Get
Return EgtMsg(61701)
End Get
End Property
Public ReadOnly Property EXPTIME_MSG As String
Get
Return EgtMsg(61702)
End Get
End Property
Public ReadOnly Property EXPRELEASE_MSG As String
Get
Return EgtMsg(61703)
End Get
End Property
Public ReadOnly Property LANGUAGE_MSG As String
Get
Return EgtMsg(61704)
End Get
End Property
Public ReadOnly Property RANGE_MSG As String
Get
Return EgtMsg(61705)
End Get
End Property
Public ReadOnly Property PROCESSINGQUALITY_MSG As String
Get
Return EgtMsg(61642)
End Get
End Property
Public ReadOnly Property COMPUTERNAME_MSG As String
Get
Return EgtMsg(61706)
End Get
End Property
Public ReadOnly Property USER_MSG As String
Get
Return EgtMsg(61707)
End Get
End Property
Public ReadOnly Property SRCFILE_MSG As String
Get
Return EgtMsg(61708)
End Get
End Property
Public ReadOnly Property EXPFILE_MSG As String
Get
Return EgtMsg(61709)
End Get
End Property
Public ReadOnly Property RECESS_MSG As String
Get
Return EgtMsg(61643)
End Get
End Property
Public ReadOnly Property USERATTRIBUTE_MSG As String
Get
Return EgtMsg(61648)
End Get
End Property
#End Region ' Messages
#Region "FIELDS & PROPERTIES"
Friend Event m_CloseWindow(bDialogResult As Boolean)
' Definizione comandi
Private m_cmdOk As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New()
End Sub
#End Region ' CONSTRUCTOR
#Region "COMMANDS"
#Region "Ok"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public Sub Ok()
RaiseEvent m_CloseWindow(True)
End Sub
#End Region ' Ok
#End Region ' COMMANDS
End Class
@@ -0,0 +1,79 @@
<StackPanel x:Class="BTLPartManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Orientation="Horizontal"
HorizontalAlignment="Right"
DataContext="{StaticResource BTLPartManagerVM}">
<Button Command="{Binding NewRawPart_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding NewRawPart_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/NewRawPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding NewRawPartLast_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding NewRawPartLast_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/NewRawPartAuto.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddToRawPart_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding AddToRawPart_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddToRawPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CopyPart_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding CopyPart_ToolTip}"
IsEnabled="{Binding CopyPart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/CopyPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddPart_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding AddPart_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemovePart_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding RemovePart_ToolTip}"
IsEnabled="{Binding RemovePart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/RemovePart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Invert_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding InvertSx_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/PartManager/LeftInvert.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Invert_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding InvertDx_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/PartManager/RightInvert.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding BackRotation_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding BackRotation_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/PartManager/LeftRotate.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ForwardRotation_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding ForwardRotation_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/PartManager/RightRotate.png" Stretch="Uniform"/>
</Button>
</StackPanel>
@@ -0,0 +1,3 @@
Public Class BTLPartManagerV
End Class
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,84 @@
<StackPanel x:Class="OnlyProdBTLPartManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{StaticResource BTLPartManagerVM}"
Style="{StaticResource OnlyProdBTLPartManager_StackPanel}">
<Button Command="{Binding CopyPart_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding CopyPart_ToolTip}"
IsEnabled="{Binding CopyPart_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/CopyPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemovePart_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding RemovePart_ToolTip}"
IsEnabled="{Binding RemovePart_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/RemovePart.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Simulate_ToolTip}"
Command="{Binding Simulate_Command}"
IsEnabled="{Binding Simulate_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/CALCPanel/Simulate.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Edit_ToolTip}"
Command="{Binding Edit_Command}"
IsEnabled="{Binding Edit_IsEnabled}"
Visibility="{Binding Edit_Visibility}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
</Button>
<!--<Button Command="{Binding NewRawPart_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding NewRawPart_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/NewRawPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding NewRawPartLast_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding NewRawPartLast_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/NewRawPartAuto.png" Stretch="Uniform"/>
</Button>-->
<!--<Button Command="{Binding AddToRawPart_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding AddToRawPart_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddToRawPart.png" Stretch="Uniform"/>
</Button>-->
<!--<Button Command="{Binding Invert_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding InvertSx_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/PartManager/LeftInvert.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Invert_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding InvertDx_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/PartManager/RightInvert.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding BackRotation_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding BackRotation_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/PartManager/LeftRotate.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ForwardRotation_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding ForwardRotation_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/PartManager/RightRotate.png" Stretch="Uniform"/>
</Button>-->
</StackPanel>
@@ -0,0 +1,3 @@
Public Class OnlyProdBTLPartManagerV
End Class
@@ -0,0 +1,746 @@
Imports System.Collections.ObjectModel
Imports System.Collections.Specialized
Imports System.ComponentModel
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
Public Class BTLFeatureVM
Inherits Core.BTLFeatureVM
Public Property GRPList As ObservableCollection(Of Integer)
Get
Return m_BTLFeatureM.GRPList
End Get
Set(value As ObservableCollection(Of Integer))
m_BTLFeatureM.GRPList = value
End Set
End Property
Public Overrides Property nSelGRP As Integer
Get
Return m_BTLFeatureM.nSelGRP
End Get
Set(value As Integer)
If value <> -1 Then
' verifico se solido attivo
Dim bShowSolid As Boolean = Map.refShowBeamPanelVM.ShowSolid_IsChecked
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
' aggiorno la feature con nuovo valore
Dim vPar() As Double = Nothing
Dim sPar As String = String.Empty
Dim vParQ() As String = Nothing
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
Dim bOK As Boolean = m_BTLFeatureM.UpdateParams(value, m_BTLFeatureM.nPRC, nSelSIDE, m_BTLFeatureM.sDES, m_BTLFeatureM.nPRID,
m_BTLFeatureM.frFRAME, vPar, sPar, vParQ)
If bOK Then
m_BTLFeatureM.nSelGRP = value
' seleziono feature in disegno
SelGeomFeature()
' rendo non calcolata questa feature
ResetCalcFeature()
End If
NotifyPropertyChanged(NameOf(nSelGRP))
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
EgtDraw()
End If
End Set
End Property
Public Property SIDEList As ObservableCollection(Of Integer)
Get
Return m_BTLFeatureM.SIDEList
End Get
Set(value As ObservableCollection(Of Integer))
m_BTLFeatureM.SIDEList = value
End Set
End Property
' Lato
Public Overrides Property nSelSIDE As Integer
Get
Return m_BTLFeatureM.nSelSIDE
End Get
Set(value As Integer)
If value <> -1 Then
' verifico se solido attivo
Dim bShowSolid As Boolean = Map.refShowBeamPanelVM.ShowSolid_IsChecked
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
' se freecontour
If Me.m_BTLFeatureM.IsFreeContour() Then
' cambio faccia alla geometria
Dim frOld As New Frame3d
EgtBeamGetSideData(nSelSIDE, frOld)
frOld.Invert()
Dim frNew As New Frame3d
EgtBeamGetSideData(value, frNew)
Dim sAuxId As String = ""
If EgtGetInfo(nFeatureId, "AUXID", sAuxId) Then
' verifico se ha uno o due percorsi
Dim sAuxIdSplit() As String = sAuxId.Split(","c)
If Not IsNothing(sAuxIdSplit) AndAlso sAuxIdSplit.Length() >= 1 Then
Dim nAuxId As Integer = GDB_ID.NULL
If Integer.TryParse(sAuxIdSplit(0), nAuxId) Then
EgtTransform(nFeatureId + nAuxId, frOld, GDB_RT.GLOB)
EgtTransform(nFeatureId + nAuxId, frNew, GDB_RT.GLOB)
End If
End If
If Not IsNothing(sAuxIdSplit) AndAlso sAuxIdSplit.Length() >= 2 Then
Dim nAux2Id As Integer = GDB_ID.NULL
If Integer.TryParse(sAuxIdSplit(1), nAux2Id) Then
EgtTransform(nFeatureId + nAux2Id, frOld, GDB_RT.GLOB)
EgtTransform(nFeatureId + nAux2Id, frNew, GDB_RT.GLOB)
End If
End If
End If
End If
' aggiorno la feature con nuovo valore
Dim vPar() As Double = Nothing
Dim sPar As String = String.Empty
Dim vParQ() As String = Nothing
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
Dim bOK As Boolean = m_BTLFeatureM.UpdateParams(nSelGRP, m_BTLFeatureM.nPRC, value, m_BTLFeatureM.sDES, m_BTLFeatureM.nPRID,
m_BTLFeatureM.frFRAME, vPar, sPar, vParQ)
If bOK Then
m_BTLFeatureM.nSelSIDE = value
SelGeomFeature()
' rendo non calcolata questa feature
ResetCalcFeature()
End If
NotifyPropertyChanged(NameOf(nSelSIDE))
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
EgtDraw()
End If
End Set
End Property
Public Property VARIANTList As ObservableCollection(Of Integer)
Get
Return m_BTLFeatureM.VARIANTList
End Get
Set(value As ObservableCollection(Of Integer))
m_BTLFeatureM.VARIANTList = value
End Set
End Property
Public Overrides Property nSelVARIANT As Integer
Get
Return m_BTLFeatureM.nSelVARIANT
End Get
Set(value As Integer)
If value <> m_BTLFeatureM.nSelVARIANT Then
m_BTLFeatureM.nSelVARIANT = value
Dim vPar As Double() = Nothing
Dim sPar As String = Nothing
Dim vParQ As String() = Nothing
CreateFeatureVariant(value, vPar, sPar, vParQ)
If IsNothing(vPar) Then
m_BTLFeatureM.nSelVARIANT = 0
CreateFeatureVariant(value, vPar, sPar, vParQ)
End If
m_BTLFeatureM.nSelVARIANT = value
Dim bOK As Boolean = m_BTLFeatureM.UpdateParams(nSelGRP, m_BTLFeatureM.nPRC, nSelSIDE, sDES, m_BTLFeatureM.nPRID,
m_BTLFeatureM.frFRAME, vPar, sPar, vParQ)
If bOK Then
EgtDuploSetModified(m_BTLPartM.nPartId)
' seleziono feature in disegno
SelGeomFeature()
' rendo non calcolata questa feature
ResetCalcFeature()
End If
NotifyPropertyChanged(NameOf(nSelVARIANT))
NotifyPropertyChanged(NameOf(PBTLParamVMList))
NotifyPropertyChanged(NameOf(QBTLParamVMList))
EgtDraw()
End If
End Set
End Property
Private Sub CreateFeatureVariant(value As Integer, ByRef vPar() As Double, ByRef sPar As String, ByRef vParQ() As String)
' crea parametri per questa feature da file ini
m_BTLFeatureM.CreateFeatureParams(m_BTLFeatureM)
m_BTLFeatureM.SetDefaultValues()
CreatePBTLParamVMList()
CreateQBTLParamVMList()
' aggiorno la feature con nuovo valore
vPar = Nothing
sPar = Nothing
vParQ = Nothing
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
'' imposto path disegno da mostrare in BottomPanel
'If value > 0 AndAlso File.Exists(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & "." & sDES & ".png") Then
' Map.refBottomPanelVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & "." & sDES & ".png")
'Else
' Map.refBottomPanelVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & ".png")
'End If
End Sub
Public Property sPriority As String
Get
Return m_BTLFeatureM.nPriority.ToString()
End Get
Set(value As String)
Dim nTemp As Integer = 0
If Integer.TryParse(value, nTemp) Then
If EgtSetInfo(nFeatureId, BTL_FTR_PRIORITY, nTemp) Then
m_BTLFeatureM.nPriority = nTemp
' setto feature da ricalcolare
ResetCalcFeature()
' se in View
If Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
' imposto modificato per copie
MyMachGroupPanelM.SetDuploModified(m_BTLPartM.nPartId)
End If
End If
End If
NotifyPropertyChanged(NameOf(sPriority))
End Set
End Property
' proprieta' che indica se e' attivo l'update del parametro bDO su piu' feature (attiva/disattiva tutti su pezzo, o per tipo con tasto destro)
' necessario per evitare ricalcolo della grafica sulla modifica del parametro per ogni feature
Private Shared m_bDO_MultipleUpdate As Boolean = False
Public Shared Property bDO_MultipleUpdate As Boolean
Get
Return m_bDO_MultipleUpdate
End Get
Set(value As Boolean)
m_bDO_MultipleUpdate = value
End Set
End Property
Public Overrides Property bDO As Boolean
Get
Return m_BTLFeatureM.bDO
End Get
Set(value As Boolean)
Dim bShowSolid As Boolean = Map.refShowBeamPanelVM.ShowSolid_IsChecked
If value <> m_BTLFeatureM.bDO Then
'If Map.refMainMenuVM.SelPage = Pages.VIEW Then
' ' verifico se solido attivo
' If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
'End If
If EgtBeamEnableProcess(nFeatureId, value, Not m_bDO_MultipleUpdate) Then
m_BTLFeatureM.bDO = value
' setto feature da ricalcolare
ResetCalcFeature()
' se in View
If Map.refMainMenuVM.SelPage = Pages.VIEW OrElse (Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Not IsNothing(m_BTLPartM)) Then
MyMachGroupPanelM.SetDuploModified(m_BTLPartM.nPartId)
End If
NotifyPropertyChanged(NameOf(bDO))
' aggiorno messaggio su context menu
For Each Item In MenuList
Item.NotifyPropertyChanged(NameOf(Item.sMsg))
Next
End If
'If Map.refMainMenuVM.SelPage = Pages.VIEW Then
' ' eventualmente ripristino solido
' If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
'End If
If Not m_bDO_MultipleUpdate Then EgtDraw()
' aggiorno stato abilitazione del bottone modifica free contour
Map.refFeatureManagerVM.SetEditIsEnabled()
End If
End Set
End Property
Public ReadOnly Property sDrawPath As String
Get
If nPRC = 900 AndAlso nSelVARIANT > 0 Then
Return Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & "." & sDES & ".png"
Else
Return Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & ".png"
End If
End Get
End Property
Private m_PBTLParamVMList As ObservableCollection(Of BTLParamVM)
Public Property PBTLParamVMList As ObservableCollection(Of BTLParamVM)
Get
Return m_PBTLParamVMList
End Get
Set(value As ObservableCollection(Of BTLParamVM))
m_PBTLParamVMList = value
End Set
End Property
Protected m_SelPBTLParam As BTLParamVM
Public Property SelPBTLParam As BTLParamVM
Get
Return m_SelPBTLParam
End Get
Set(value As BTLParamVM)
m_SelPBTLParam = value
If Not IsNothing(m_SelPBTLParam) Then
' imposto path disegno da mostrare in BottomPanel
'If Not IsNothing(Map.refBottomPanelVM) Then
' Map.refBottomPanelVM.SetCurrDraw(m_SelPBTLParam.sDrawPath)
'End If
End If
NotifyPropertyChanged(NameOf(SelPBTLParam))
End Set
End Property
Private m_QBTLParamVMList As ObservableCollection(Of BTLParamVM)
Public Property QBTLParamVMList As ObservableCollection(Of BTLParamVM)
Get
Return m_QBTLParamVMList
End Get
Set(value As ObservableCollection(Of BTLParamVM))
m_QBTLParamVMList = value
End Set
End Property
Protected m_SelQParam As BTLParamVM
Public Property SelQBTLParam As BTLParamVM
Get
Return m_SelQParam
End Get
Set(value As BTLParamVM)
m_SelQParam = value
'If Not IsNothing(m_SelQParam) AndAlso Not IsNothing(Map.refBottomPanelVM) Then
' ' imposto path disegno da mostrare in BottomPanel
' Map.refBottomPanelVM.SetCurrDraw(m_SelQParam.sDrawPath)
'End If
NotifyPropertyChanged(NameOf(SelQBTLParam))
End Set
End Property
Public ReadOnly Property Edit_Visibility As Visibility
Get
Return If(BTLFeatureM.IsFreeContour AndAlso Not Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
Public ReadOnly Property SaveCancel_Visibility As Visibility
Get
Return If(BTLFeatureM.IsFreeContour AndAlso Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
Friend Sub RefreshFCMBtnVisibility()
NotifyPropertyChanged(NameOf(Edit_Visibility))
NotifyPropertyChanged(NameOf(SaveCancel_Visibility))
End Sub
Private m_MenuList As New List(Of MenuItemVm)
Public Property MenuList As List(Of MenuItemVm)
Get
Return m_MenuList
End Get
Set(value As List(Of MenuItemVm))
m_MenuList = value
End Set
End Property
#Region "Messages"
Public ReadOnly Property Edit_ToolTip As String
Get
Return EgtMsg(61939)
End Get
End Property
#End Region ' Messages
' Definizione comandi
Private m_cmdEdit As ICommand
Private m_cmdSave As ICommand
Private m_cmdCancel As ICommand
Private m_cmdDeleteFeature As ICommand
Private m_cmdEditFeature As ICommand
Private m_cmdStategyCmd As ICommand
#Region "CONSTRUCTOR"
Sub New(BTLFeatureM As BTLFeatureM, BTLPartM As BTLPartM)
m_BTLFeatureM = BTLFeatureM
AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
AddHandler m_BTLFeatureM.QBTLParamAdded, AddressOf OnQBTLParamAdded
m_BTLPartM = BTLPartM
CreatePBTLParamVMList()
CreateQBTLParamVMList()
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
m_MenuList.Add(New MenuItemVm(Me))
End Sub
Sub New(BTLFeatureM As BTLFeatureM)
m_BTLFeatureM = BTLFeatureM
AddHandler m_BTLFeatureM.QBTLParamAdded, AddressOf OnQBTLParamAdded
m_BTLPartM = Nothing
Dim Part As PartM = BTLFeatureM.ParentPart
If Part.nType = BWType.WALL Then CreateQBTLParamVMList()
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
End Sub
#End Region ' CONSTRUCTOR
#Region "METHODS"
Private Sub CreatePBTLParamVMList()
Dim all As List(Of BTLParamVM) = (From BTLParamM In m_BTLFeatureM.GetPBTLParams()
Select New BTLParamVM(BTLParamM, m_BTLFeatureM)).ToList()
For Each BTLParamVM As BTLParamVM In all
AddHandler BTLParamVM.PropertyChanged, AddressOf OnPBTLParamVMPropertyChanged
Next
m_PBTLParamVMList = New ObservableCollection(Of BTLParamVM)(all)
AddHandler m_PBTLParamVMList.CollectionChanged, AddressOf OnPBTLParamVMListChanged
End Sub
Private Sub CreateQBTLParamVMList()
Dim all As List(Of BTLParamVM) = (From BTLParamM In m_BTLFeatureM.GetQBTLParams()
Select New BTLParamVM(BTLParamM, m_BTLFeatureM)).ToList()
For Each BTLParamVM As BTLParamVM In all
AddHandler BTLParamVM.PropertyChanged, AddressOf OnQBTLParamVMPropertyChanged
Next
m_QBTLParamVMList = New ObservableCollection(Of BTLParamVM)(all)
AddHandler m_QBTLParamVMList.CollectionChanged, AddressOf OnQBTLParamVMListChanged
End Sub
' funzione che aggiorna lo stato, la rotazione e gli errori dopo calcolo
Friend Sub CalcFeatureUpdate(ERR As Integer, ROT As Integer, MSG As String)
EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_ERR, ITG_PROD_ERR), ERR, True)
EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_MSG, ITG_PROD_MSG), MSG, True)
EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_ROT, ITG_PROD_ROT), ROT, True)
m_BTLFeatureM.nCALC_ERR = ERR
m_BTLFeatureM.nCALC_ROT = ROT
m_BTLFeatureM.sCALC_MSG = MSG
Select Case ERR
Case 0
m_BTLFeatureM.nState = CalcStates.OK
Case 22
m_BTLFeatureM.nState = CalcStates.COLLISION
Case 17, 19
m_BTLFeatureM.nState = CalcStates.WARNING
Case < 0
m_BTLFeatureM.nState = CalcStates.INFO
Case > 0
m_BTLFeatureM.nState = CalcStates.ERROR_
End Select
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(sCALC_MSG))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
End Sub
' funzione che resetta gli errori del calcolo
Friend Sub ResetFeatureError()
Dim ERR As Integer = 0
Dim MSG As String = ""
EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_ERR, ITG_PROD_ERR), ERR, True)
EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_MSG, ITG_PROD_MSG), MSG, True)
m_BTLFeatureM.nCALC_ERR = ERR
m_BTLFeatureM.sCALC_MSG = MSG
Select Case ERR
Case 0
m_BTLFeatureM.nState = CalcStates.OK
Case 22
m_BTLFeatureM.nState = CalcStates.COLLISION
Case 17, 19
m_BTLFeatureM.nState = CalcStates.WARNING
Case < 0
m_BTLFeatureM.nState = CalcStates.INFO
Case > 0
m_BTLFeatureM.nState = CalcStates.ERROR_
End Select
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(sCALC_MSG))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
End Sub
Friend Sub ResetCalcFeature()
EgtRemoveInfo(nFeatureId, If(IsNothing(m_BTLPartM), ITG_PROD_ERR, ITG_PROJ_ERR))
EgtRemoveInfo(nFeatureId, If(IsNothing(m_BTLPartM), ITG_PROD_MSG, ITG_PROJ_MSG))
EgtRemoveInfo(nFeatureId, If(IsNothing(m_BTLPartM), ITG_PROD_ROT, ITG_PROJ_ROT))
m_BTLFeatureM.nState = CalcStates.NOTCALCULATED
m_BTLFeatureM.nCALC_ERR = 0
m_BTLFeatureM.nCALC_ROT = 0
m_BTLFeatureM.sCALC_MSG = ""
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(sCALC_MSG))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
End Sub
Public Function Copy() As BTLFeatureM
Return Copy(m_BTLPartM)
End Function
Public Function Copy(DestBTLPart As BTLPartM) As BTLFeatureM
' creo nuova feature
Dim vPar() As Double = Nothing
Dim sPar As String = String.Empty
Dim vParQ() As String = Nothing
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
' imposto eventuali percorsi
Dim nCrvId As Integer = GDB_ID.NULL
Dim nCrv2Id As Integer = GDB_ID.NULL
m_BTLFeatureM.GetFreeContourPaths(nCrvId, nCrv2Id)
' creo la feature con nuovi valori
EgtBeamSetPart(DestBTLPart.nPartId)
Dim nNewFeatureId As Integer = EgtBeamAddProcess(m_BTLFeatureM.nSelGRP, m_BTLFeatureM.nPRC, m_BTLFeatureM.nSelSIDE, m_BTLFeatureM.sDES,
DestBTLPart.NewProcId(), m_BTLFeatureM.frFRAME, vPar, sPar, vParQ, nCrvId, nCrv2Id)
' se è stata creata
If nNewFeatureId <> GDB_ID.NULL Then
' Riporto eventuali indicazioni di parametri Q custom
For Each QPar In QBTLParamVMList
If QPar.bCustom Then EgtSetInfo(nNewFeatureId, QPar.sName & "A", 1)
Next
' Riporto priority
EgtSetInfo(nNewFeatureId, BTL_FTR_PRIORITY, m_BTLFeatureM.nPriority)
Dim NewFeat As BTLFeatureM = BTLFeatureM.CreateBTLFeature(m_BTLPartM, nNewFeatureId)
' la aggiungo a struttura BTL pezzo di destinazione
DestBTLPart.AddBTLFeature(NewFeat)
Return NewFeat
End If
Return Nothing
End Function
Public Overrides Sub RefreshFeature()
' leggo gruppo, numero feature, lato e priorità
EgtGetInfo(nFeatureId, BTL_FTR_GRP, m_BTLFeatureM.nSelGRP)
EgtGetInfo(nFeatureId, BTL_FTR_PRC, m_BTLFeatureM.nPRC)
EgtGetInfo(nFeatureId, BTL_FTR_SIDE, m_BTLFeatureM.nSelSIDE)
EgtGetInfo(nFeatureId, BTL_FTR_PRIORITY, m_BTLFeatureM.nPriority)
Dim nDO As Integer = 1
If EgtGetInfo(nFeatureId, BTL_FTR_DO, nDO) Then
m_BTLFeatureM.bDO = (nDO <> 0)
Else
m_BTLFeatureM.bDO = True
End If
NotifyPropertyChanged(NameOf(bDO))
' leggo des,prid e frame
EgtGetInfo(nFeatureId, BTL_FTR_DES, m_BTLFeatureM.sDES)
EgtGetInfo(nFeatureId, BTL_FTR_PRID, m_BTLFeatureM.nPRID)
EgtGetInfo(nFeatureId, BTL_FTR_FRAME, m_BTLFeatureM.frFRAME)
' aggiorno parametri della feature
End Sub
#End Region ' METHODS
#Region "COMMANDS"
#Region "DeleteFeature"
Public ReadOnly Property DeleteFeature_Command As ICommand
Get
If m_cmdDeleteFeature Is Nothing Then
m_cmdDeleteFeature = New Command(AddressOf DeleteFeature)
End If
Return m_cmdDeleteFeature
End Get
End Property
Public Sub DeleteFeature()
If Map.refMainMenuVM.SelPage = Pages.VIEW Then Map.refFeatureListManagerVM.RemoveFeature()
End Sub
#End Region ' DeleteFeature
#Region "Edit"
Public ReadOnly Property Edit_Command As ICommand
Get
If m_cmdEdit Is Nothing Then
m_cmdEdit = New Command(AddressOf Edit)
End If
Return m_cmdEdit
End Get
End Property
Public Sub Edit()
' attivo modalita' contorno libero
Map.refFreeContourManagerVM.Open()
End Sub
#End Region ' Edit
#Region "Save"
Public ReadOnly Property Save_Command As ICommand
Get
If m_cmdSave Is Nothing Then
m_cmdSave = New Command(AddressOf Save)
End If
Return m_cmdSave
End Get
End Property
Public Sub Save()
Select Case Map.refFreeContourManagerVM.SelType
Case FreeContourManagerVM.FreeContourTypes.ONE
Case FreeContourManagerVM.FreeContourTypes.ONEWITHANGLES
Case FreeContourManagerVM.FreeContourTypes.TWO
End Select
' disattivo modalita' contorno libero
Map.refFreeContourManagerVM.Close(True)
End Sub
#End Region ' Save
#Region "Cancel"
Public ReadOnly Property Cancel_Command As ICommand
Get
If m_cmdCancel Is Nothing Then
m_cmdCancel = New Command(AddressOf Cancel)
End If
Return m_cmdCancel
End Get
End Property
Public Sub Cancel()
' disattivo modalita' contorno libero
Map.refFreeContourManagerVM.Close(False)
End Sub
#End Region ' Cancel
#Region "Strategy"
Public ReadOnly Property Strategy_Command As ICommand
Get
If m_cmdStategyCmd Is Nothing Then
m_cmdStategyCmd = New Command(AddressOf Strategy)
End If
Return m_cmdStategyCmd
End Get
End Property
Public Sub Strategy()
' disattivo modalita' contorno libero
Map.refProjectVM.SetSelManagerTab(ProjectVM.ManagerTab.STRATEGYMANAGER)
End Sub
#End Region ' Cancel
#End Region ' COMMANDS
#Region "EVENTS"
Private Sub OnPBTLParamAdded(sender As Object, e As BTLParamAddedEventArgs) Handles m_BTLFeatureM.PBTLParamAdded
Dim BTLParamVM As New BTLParamVM(e.NewBTLParam, m_BTLFeatureM)
PBTLParamVMList.Add(BTLParamVM)
End Sub
Private Sub OnQBTLParamAdded(sender As Object, e As BTLParamAddedEventArgs) Handles m_BTLFeatureM.QBTLParamAdded
Dim BTLParamVM As New BTLParamVM(e.NewBTLParam, m_BTLFeatureM)
QBTLParamVMList.Add(BTLParamVM)
End Sub
Private Sub OnPBTLParamVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
For Each BTLParamVM As BTLParamVM In e.NewItems
AddHandler BTLParamVM.PropertyChanged, AddressOf OnPBTLParamVMPropertyChanged
Next
End If
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
For Each BTLParamVM As BTLParamVM In e.OldItems
RemoveHandler BTLParamVM.PropertyChanged, AddressOf OnPBTLParamVMPropertyChanged
Next
End If
End Sub
Private Sub OnQBTLParamVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
For Each BTLParamVM As BTLParamVM In e.NewItems
AddHandler BTLParamVM.PropertyChanged, AddressOf OnQBTLParamVMPropertyChanged
Next
End If
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
For Each BTLParamVM As BTLParamVM In e.OldItems
RemoveHandler BTLParamVM.PropertyChanged, AddressOf OnQBTLParamVMPropertyChanged
Next
End If
End Sub
Private Sub OnPBTLParamVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
Select Case e.PropertyName
Case NameOf(sender.dValue), NameOf(sender.sValue)
' riseleziono questa feature
SelGeomFeature()
' rendo non calcolata questa feature
ResetCalcFeature()
End Select
End Sub
Private Sub OnQBTLParamVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
Select Case e.PropertyName
Case NameOf(sender.dValue), NameOf(sender.sValue)
' riseleziono questa feature
SelGeomFeature()
' rendo non calcolata questa feature
ResetCalcFeature()
End Select
End Sub
#End Region ' EVENTS
End Class
Public Class MenuItemVm
Inherits VMBase
Private m_ParentFeature As BTLFeatureVM
Public ReadOnly Property ParentFeature As BTLFeatureVM
Get
Return m_ParentFeature
End Get
End Property
Public ReadOnly Property sMsg As String
Get
Return If(ParentFeature.bDO, "Disable all ", "Enable all ") & ParentFeature.sDescGRP
End Get
End Property
' Definizione comando
Private m_cmdCommand As ICommand
Sub New(Parent As BTLFeatureVM)
m_ParentFeature = Parent
End Sub
#Region "Cancel"
Public ReadOnly Property MenuItem_Command As ICommand
Get
If m_cmdCommand Is Nothing Then
m_cmdCommand = New Command(AddressOf Command)
End If
Return m_cmdCommand
End Get
End Property
Public Sub Command()
Dim bNewDo As Boolean = Not ParentFeature.bDO
' imposto modalita' update multiplo
BTLFeatureVM.bDO_MultipleUpdate = True
' aggiorno tutte le feature del pezzo
Dim SameProcFeatureList As List(Of BTLFeatureVM) = Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList.Where(Function(x) x.nPRC = ParentFeature.nPRC AndAlso x.GRPList.Contains(ParentFeature.nSelGRP)).ToList()
For FeatureVMIndex = 0 To SameProcFeatureList.Count - 1
If FeatureVMIndex = SameProcFeatureList.Count - 1 Then
' reset modalita' update multiplo
BTLFeatureVM.bDO_MultipleUpdate = False
End If
Dim FeatureVM As BTLFeatureVM = SameProcFeatureList(FeatureVMIndex)
If FeatureVM.nPRC = ParentFeature.nPRC AndAlso FeatureVM.GRPList.Contains(ParentFeature.nSelGRP) Then
FeatureVM.bDO = bNewDo
End If
Next
End Sub
#End Region ' Cancel
End Class
@@ -0,0 +1,334 @@
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
Public Class BTLParamVM
Inherits VMBase
Protected m_BTLParamM As BTLParamM
Public ReadOnly Property BTLParamM As BTLParamM
Get
Return m_BTLParamM
End Get
End Property
Private m_BTLFeatureM As BTLFeatureM
Public ReadOnly Property bIsP As Boolean
Get
Return m_BTLParamM.bIsP
End Get
End Property
Public Property bIsModified As Boolean
Get
Return m_BTLParamM.bIsModified
End Get
Set(value As Boolean)
m_BTLParamM.bIsModified = value
End Set
End Property
Public ReadOnly Property Custom_Visibility As Visibility
Get
If bIsP Then
Return Visibility.Collapsed
Else
Return Visibility.Visible
End If
End Get
End Property
' parametri da struttura
Public Property sName As String
Get
Return m_BTLParamM.sName
End Get
Set(value As String)
m_BTLParamM.sName = value
End Set
End Property
Public ReadOnly Property nId As Integer
Get
Return m_BTLParamM.nId
End Get
End Property
Public Property sDescription As String
Get
Return m_BTLParamM.sDescription
End Get
Set(value As String)
m_BTLParamM.sDescription = value
End Set
End Property
Public ReadOnly Property sMin As String
Get
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_
Return DoubleToString(m_BTLParamM.dMin, 3)
Case BTLParamType.LENGTH
Return LenToString(m_BTLParamM.dMin, 3)
Case Else
Return ""
End Select
End Get
End Property
Public ReadOnly Property dMin As Double
Get
Return m_BTLParamM.dMin
End Get
End Property
Public ReadOnly Property sMax As String
Get
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_
Return DoubleToString(m_BTLParamM.dMax, 3)
Case BTLParamType.LENGTH
Return LenToString(m_BTLParamM.dMax, 3)
Case Else
Return ""
End Select
End Get
End Property
Public ReadOnly Property dMax As Double
Get
Return m_BTLParamM.dMax
End Get
End Property
' parametri da geometria
Public Property sValue As String
Get
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_
Return DoubleToString(m_BTLParamM.dValue, 3)
Case BTLParamType.LENGTH
Return LenToString(m_BTLParamM.dValue, 3)
Case Else ' stringhe
Return m_BTLParamM.sValue
End Select
Return If(m_BTLParamM.nType = BTLParamType.LENGTH, LenToString(m_BTLParamM.dValue, 3), DoubleToString(m_BTLParamM.dValue, 3))
End Get
Set(value As String)
Dim dNewValue As Double
' trasformo valori
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_
StringToDoubleAdv(value, dNewValue, True)
Case BTLParamType.LENGTH
StringToLenAdv(value, dNewValue, True)
Case Else
' per string non faccio nulla
End Select
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
' verifico che sia compreso tra minimo e massimo
If dNewValue < m_BTLParamM.dMin OrElse dNewValue > m_BTLParamM.dMax Then
MessageBox.Show(EgtMsg(61856), EgtMsg(30007))
NotifyPropertyChanged(NameOf(sValue))
Return
End If
' recupero ParentPart
Dim ParentPart As BTLPartM = TryCast(m_BTLParamM.ParentFeature.ParentPart, BTLPartM)
' recupero PartId
Dim nPartId As Integer = ParentPart.nPartId
' numero di pezzi inseriti nelle barre
Dim INPROD As Integer = 0
EgtDuploInRawCount(nPartId, INPROD)
' recupero pezzi lavorati da Db
Dim nDoneCnt As Integer = DbControllers.m_ProjController.getCountItemState(ProjectManagerVM.CurrProj.nProjId, nPartId, ItemState.Assigned)
' 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)
ElseIf INPROD > 0 Then
MessageBox.Show("Pezzo " & nPartId & " modificato in " & INPROD & " barra/e grezza/e", EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Information)
End If
UpdateParamValue(dNewValue, "")
Case Else
UpdateParamValue(0, value)
End Select
NotifyPropertyChanged(NameOf(bCustom))
End Set
End Property
Public Property dValue As Double
Get
Return m_BTLParamM.dValue
End Get
Set(value As Double)
m_BTLParamM.dValue = value
NotifyPropertyChanged(NameOf(sValue))
End Set
End Property
Public Property sDefault As String
Get
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_
Return DoubleToString(m_BTLParamM.dDefault, 3)
Case BTLParamType.LENGTH
Return LenToString(m_BTLParamM.dDefault, 3)
Case Else
Return ""
End Select
End Get
Set(value As String)
Dim dNewValue As Double
' trasformo valori
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_
StringToDoubleAdv(value, dNewValue, True)
Case BTLParamType.LENGTH
StringToLenAdv(value, dNewValue, True)
Case Else
' per string non faccio nulla
End Select
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
' verifico che sia compreso tra minimo e massimo
If dNewValue < m_BTLParamM.dMin OrElse dNewValue > m_BTLParamM.dMax Then
MessageBox.Show(EgtMsg(61856), EgtMsg(30007))
NotifyPropertyChanged(NameOf(sDefault))
Return
End If
m_BTLParamM.dDefault = dNewValue
m_BTLParamM.bIsModified = True
Case Else
m_BTLParamM.dDefault = 0
m_BTLParamM.bIsModified = True
End Select
End Set
End Property
Public ReadOnly Property nType As BTLParamType
Get
Return m_BTLParamM.nType
End Get
End Property
Protected m_sDrawPath As String
Public ReadOnly Property sDrawPath As String
Get
Return Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Parameters\" & m_BTLFeatureM.sDescGRP & "_" & m_BTLParamM.sName & "_" & m_BTLFeatureM.nSelGRP & ".gif"
End Get
End Property
Public Property bCustom As Boolean
Get
Return m_BTLParamM.bCustom
End Get
Set(value As Boolean)
' Se de-checko il parametro settiamo il suo valore a quello di default
Dim bFound As Boolean = False
If Not value Then
' Cerco il parametro Q direttamente nel file ini
Dim ParamIndex As String = 1
Dim NewBTLParam As BTLParamM = Nothing
While BTLIniFile.GetBeamPrivateProfileParam(Me.m_BTLFeatureM.nSelGRP, Me.m_BTLFeatureM.nPRC, Me.m_BTLFeatureM.nSelVARIANT, False, ParamIndex, Nothing, NewBTLParam)
Dim QBTLParam As BTLParamVM = New BTLParamVM(NewBTLParam)
If QBTLParam.sName = Me.sName Then
Me.sValue = QBTLParam.sDefault
NotifyPropertyChanged(NameOf(sValue))
m_BTLParamM.bCustom = value
' setto nel DB che il parametro attuale è custom o meno
EgtSetInfo(m_BTLFeatureM.nFeatureId, m_BTLParamM.sName & "A", If(value, "1", ""))
NotifyPropertyChanged(NameOf(bCustom))
Exit While
End If
ParamIndex += 1
End While
End If
End Set
End Property
Public ReadOnly Property sBWType As String
Get
Return m_BTLParamM.sBWType
End Get
End Property
#Region "CONSTRUCTOR"
Sub New(BTLParamM As BTLParamM, BTLFeatureM As BTLFeatureM)
m_BTLParamM = BTLParamM
m_BTLFeatureM = BTLFeatureM
End Sub
Sub New(BTLParamM As BTLParamM)
m_BTLParamM = BTLParamM
m_BTLFeatureM = Nothing
End Sub
#End Region ' CONSTRUCTOR
Friend Sub UpdateParamValue(dNewValue As Double, sNewValue As String, Optional bDraw As Boolean = True)
' verifico se solido attivo
Dim bShowSolid As Boolean = Map.refShowBeamPanelVM.ShowSolid_IsChecked
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
' Recupero i parametri attuali della feature
Dim vPar() As Double = Nothing
Dim sPar As String = String.Empty
Dim vParQ() As String = Nothing
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
' se P
If m_BTLParamM.bIsP Then
' modifico parametro cambiato con value
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
vPar(m_BTLParamM.nId - 1) = dNewValue
Case BTLParamType.STRING_
sPar = sNewValue
End Select
Dim bOK As Boolean = m_BTLFeatureM.UpdateParams(m_BTLFeatureM.nSelGRP, m_BTLFeatureM.nPRC, m_BTLFeatureM.nSelSIDE, m_BTLFeatureM.sDES,
m_BTLFeatureM.nPRID, m_BTLFeatureM.frFRAME, vPar, sPar, vParQ)
If bOK Then
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
m_BTLParamM.dValue = dNewValue
NotifyPropertyChanged(NameOf(sValue))
Case BTLParamType.STRING_
m_BTLParamM.sValue = sNewValue
NotifyPropertyChanged(NameOf(sValue))
End Select
Else
NotifyPropertyChanged(NameOf(sValue))
End If
' se Q
Else
For Ind = 0 To vParQ.Length() - 1
If vParQ(Ind).StartsWith(m_BTLParamM.sName) Then
vParQ(Ind) = m_BTLParamM.sName & ":" & DoubleToString(dNewValue, 3)
End If
Next
Dim bOK As Boolean = m_BTLFeatureM.UpdateParams(m_BTLFeatureM.nSelGRP, m_BTLFeatureM.nPRC, m_BTLFeatureM.nSelSIDE, m_BTLFeatureM.sDES,
m_BTLFeatureM.nPRID, m_BTLFeatureM.frFRAME, vPar, sPar, vParQ)
If bOK Then
m_BTLParamM.bCustom = True
' se sono in ottimizzazione
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
' setto nel progetto il fatto che il parametro attuale è custom o meno
EgtSetInfo(m_BTLFeatureM.nFeatureId, m_BTLParamM.sName & "A", If(bCustom, "1", ""))
NotifyPropertyChanged(NameOf(bCustom))
End If
m_BTLParamM.dValue = dNewValue
' modifica provvisoria per mancanza aggiornamento su freecontour
If m_BTLFeatureM.IsFreeContour Then
EgtSetInfo(m_BTLFeatureM.nFeatureId, sName, dNewValue)
End If
NotifyPropertyChanged(NameOf(dValue))
Else
NotifyPropertyChanged(NameOf(dValue))
End If
End If
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
If bDraw Then EgtDraw()
End Sub
End Class
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,3 @@
Friend Class BTLRawPartVM
End Class
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,155 @@
<EgtWPFLib5:EgtCustomWindow x:Class="BeamMachiningsWindowV"
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:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
Title="{Binding Title}"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
Width="500" Height="450"
IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TabControl ItemsSource="{Binding MachiningList}"
SelectedItem="{Binding SelMachining}"
IsSynchronizedWithCurrentItem="True"
Margin="5,0,5,0"
Style="{StaticResource TabControl_OnlyHeaders}"/>
<EgtBEAMWALLCORE:EgtDataGrid Grid.Row="1"
ItemsSource="{Binding TableRowList}"
SelectedIndex="{Binding SelRowIndex}"
AutoGenerateColumns="False"
CanUserResizeRows="False"
SelectionMode="Single"
ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
Margin="0,0,0,5"
BindingColumns="{Binding BeamMachiningsColumns}">
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Setter Property="Height" Value="25"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</DataGrid.RowStyle>
<DataGrid.Resources>
<Style x:Key="DataGridCheckBoxColumn_Style"
TargetType="{x:Type DataGridCell}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Colonna On-->
<DataGridCheckBoxColumn x:Key="colON" Binding="{Binding OnPar, UpdateSourceTrigger=PropertyChanged}"
CellStyle="{StaticResource DataGridCheckBoxColumn_Style}">
<DataGridCheckBoxColumn.Header>
<TextBlock Text="{Binding Path=DataContext.OnHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridCheckBoxColumn.Header>
</DataGridCheckBoxColumn>
<!--Colonna Name-->
<DataGridTemplateColumn x:Key="colNAME">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.NameHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=NamesList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center"
Margin="5,0,0,0"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Style-->
<DataGridTemplateColumn x:Key="colTYPE">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.TypeHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding Type,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=TypeList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Type,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center"
Margin="5,0,0,0"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Resources>
</EgtBEAMWALLCORE:EgtDataGrid>
<Grid Grid.Row="2"
Margin="0,0,0,5"
HorizontalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button Content="/\"
Command="{Binding MoveRowUp_Command}"
Grid.Column="0"
Margin="0,0,2.5,0"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="\/"
Command="{Binding MoveRowDown_Command}"
Grid.Column="1"
Margin="2.5,0,2.5,0"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding AddRowMsg}"
Command="{Binding AddRow_Command}"
Grid.Column="2"
Margin="2.5,0,2.5,0"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding DeleteRowMsg}"
Command="{Binding DeleteRow_Command}"
Grid.Column="3"
Margin="2.5,0,2.5,0"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding SaveMsg}"
Command="{Binding Save_Command}"
Grid.Column="4"
Margin="2.5,0,0,0"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,20 @@
Imports EgtBEAMWALL.Core
Public Class BeamMachiningsWindowV
Private WithEvents m_BeamMachiningsWindowVM As MyBeamMachiningsWindowVM
Sub New(Owner As Window, BeamMachiningsWindowVM As MyBeamMachiningsWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = BeamMachiningsWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_BeamMachiningsWindowVM = BeamMachiningsWindowVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BeamMachiningsWindowVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -0,0 +1,36 @@
Imports System.Collections.ObjectModel
Imports EgtBEAMWALL.Core
Imports EgtWPFLib5
Public Class MyBeamMachiningsWindowVM
Inherits BeamMachiningsWindowVM
#Region "FIELDS & PROPERTIES"
Private m_BeamMachiningsColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property BeamMachiningsColumns As ObservableCollection(Of EgtDataGridColumn)
Get
Return m_BeamMachiningsColumns
End Get
Set(value As ObservableCollection(Of EgtDataGridColumn))
m_BeamMachiningsColumns = value
End Set
End Property
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New(sTitle As String, sBaseDir As String, sMachTypePath As String, sTabTemplPath As String, Optional bIsBeam As Boolean = True)
MyBase.New(sTitle, sBaseDir, sMachTypePath, sTabTemplPath, bIsBeam)
' carico le colonne della datagrid
GetPrivateProfileColumns(S_BEAMMACHININGS, BeamMachiningsColumns)
' aggiorno la visibilità delle colonne
For Each col In BeamMachiningsColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
End Sub
#End Region ' CONSTRUCTOR
End Class
@@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EgtBEAMWALL.EgtBEAMWALL.ViewerOptimizer.Behavior
{
public class DataGridColumnsBehavior
{
public static readonly DependencyProperty BindableColumnsProperty = DependencyProperty.RegisterAttached("BindableColumns", typeof(ObservableCollection<DataGridColumn>), typeof(DataGridColumnsBehavior), new UIPropertyMetadata(null, BindableColumnsPropertyChanged));
/// <summary>Collection to store collection change handlers - to be able to unsubscribe later.</summary>
private static readonly Dictionary<DataGrid, NotifyCollectionChangedEventHandler> _handlers;
static DataGridColumnsBehavior()
{
_handlers = new Dictionary<DataGrid, NotifyCollectionChangedEventHandler>();
}
private static void BindableColumnsPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
{
if (!(source is DataGrid dataGrid)) return;
if (e.OldValue is ObservableCollection<DataGridColumn> oldColumns)
{
// Remove all columns.
dataGrid.Columns.Clear();
// Unsubscribe from old collection.
if (_handlers.TryGetValue(dataGrid, out var h))
{
oldColumns.CollectionChanged -= h;
_handlers.Remove(dataGrid);
}
}
var newColumns = e.NewValue as ObservableCollection<DataGridColumn>;
dataGrid.Columns.Clear();
if (newColumns != null)
{
// Add columns from this source.
foreach (var column in newColumns)
if (column != null)
{
var dg = (DataGrid)column.GetType().GetProperty("DataGridOwner", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(column, null);
dg?.Columns.Clear();
dataGrid.Columns.Add(column);
}
// Subscribe to future changes.
NotifyCollectionChangedEventHandler h = (_, ne) => OnCollectionChanged(ne, dataGrid);
_handlers[dataGrid] = h;
newColumns.CollectionChanged += h;
}
}
private static void OnCollectionChanged(NotifyCollectionChangedEventArgs ne, DataGrid dataGrid)
{
switch (ne.Action)
{
case NotifyCollectionChangedAction.Reset:
dataGrid.Columns.Clear();
if (ne.NewItems != null && ne.NewItems.Count > 0)
foreach (DataGridColumn column in ne.NewItems)
dataGrid.Columns.Add(column);
break;
case NotifyCollectionChangedAction.Add:
foreach (DataGridColumn column in ne.NewItems)
dataGrid.Columns.Add(column);
break;
case NotifyCollectionChangedAction.Move:
dataGrid.Columns.Move(ne.OldStartingIndex, ne.NewStartingIndex);
break;
case NotifyCollectionChangedAction.Remove:
foreach (DataGridColumn column in ne.OldItems)
dataGrid.Columns.Remove(column);
break;
case NotifyCollectionChangedAction.Replace:
dataGrid.Columns[ne.NewStartingIndex] = ne.NewItems[0] as DataGridColumn;
break;
}
}
public static void SetBindableColumns(DependencyObject element, ObservableCollection<DataGridColumn> value)
{
element.SetValue(BindableColumnsProperty, value);
}
public static ObservableCollection<DataGridColumn> GetBindableColumns(DependencyObject element)
{
return (ObservableCollection<DataGridColumn>)element.GetValue(BindableColumnsProperty);
}
}
}
@@ -0,0 +1,94 @@
Imports System.Collections.ObjectModel
Imports System.Collections.Specialized
Imports System.Reflection
Public Class DataGridColumnsBehavior
Public Shared ReadOnly BindableColumnsProperty As DependencyProperty = DependencyProperty.RegisterAttached("BindableColumns", GetType(ObservableCollection(Of DataGridColumn)), GetType(DataGridColumnsBehavior), New UIPropertyMetadata(Nothing, AddressOf BindableColumnsPropertyChanged))
Private Shared ReadOnly _handlers As Dictionary(Of DataGrid, NotifyCollectionChangedEventHandler)
Shared Sub New()
_handlers = New Dictionary(Of DataGrid, NotifyCollectionChangedEventHandler)()
End Sub
Private Shared Sub BindableColumnsPropertyChanged(ByVal source As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
Dim dataGrid As DataGrid = Nothing
If Not (source Is dataGrid) Then Return
Dim h = Nothing, oldColumns As ObservableCollection(Of DataGridColumn) = Nothing
If e.OldValue Is oldColumns Then
dataGrid.Columns.Clear()
If _handlers.TryGetValue(dataGrid, h) Then
RemoveHandler oldColumns.CollectionChanged, h
_handlers.Remove(dataGrid)
End If
End If
Dim newColumns = TryCast(e.NewValue, ObservableCollection(Of DataGridColumn))
dataGrid.Columns.Clear()
If newColumns IsNot Nothing Then
For Each column In newColumns
If column IsNot Nothing Then
Dim dg = CType(column.[GetType]().GetProperty("DataGridOwner", BindingFlags.Instance Or BindingFlags.NonPublic)?.GetValue(column, Nothing), DataGrid)
dg?.Columns.Clear()
dataGrid.Columns.Add(column)
End If
Next
Dim h As NotifyCollectionChangedEventHandler = Function(__, ne) OnCollectionChanged(ne, dataGrid)
_handlers(dataGrid) = h
AddHandler newColumns.CollectionChanged, h
End If
End Sub
Private Shared Sub OnCollectionChanged(ByVal ne As NotifyCollectionChangedEventArgs, ByVal dataGrid As DataGrid)
Select Case ne.Action
Case NotifyCollectionChangedAction.Reset
dataGrid.Columns.Clear()
If ne.NewItems IsNot Nothing AndAlso ne.NewItems.Count > 0 Then
For Each column As DataGridColumn In ne.NewItems
dataGrid.Columns.Add(column)
Next
End If
Case NotifyCollectionChangedAction.Add
For Each column As DataGridColumn In ne.NewItems
dataGrid.Columns.Add(column)
Next
Case NotifyCollectionChangedAction.Move
dataGrid.Columns.Move(ne.OldStartingIndex, ne.NewStartingIndex)
Case NotifyCollectionChangedAction.Remove
For Each column As DataGridColumn In ne.OldItems
dataGrid.Columns.Remove(column)
Next
Case NotifyCollectionChangedAction.Replace
dataGrid.Columns(ne.NewStartingIndex) = TryCast(ne.NewItems(0), DataGridColumn)
End Select
End Sub
Public Shared Sub SetBindableColumns(ByVal element As DependencyObject, ByVal value As ObservableCollection(Of DataGridColumn))
element.SetValue(BindableColumnsProperty, value)
End Sub
Public Shared Function GetBindableColumns(ByVal element As DependencyObject) As ObservableCollection(Of DataGridColumn)
Return CType(element.GetValue(BindableColumnsProperty), ObservableCollection(Of DataGridColumn))
End Function
Private Class CSharpImpl
<Obsolete("Please refactor calling code to use normal Visual Basic assignment")>
Shared Function __Assign(Of T)(ByRef target As T, value As T) As T
target = value
Return value
End Function
End Class
End Class
@@ -0,0 +1,45 @@
<EgtWPFLib5:EgtCustomWindow x:Class="BlockedWndV"
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}}"
Title="{Binding Title}" WindowStartupLocation="CenterOwner"
Height="200" Width="400">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="1"
Text="{Binding Msg_Text}"
TextAlignment="Center"
Margin="40,0,40,0"/>
<Grid Grid.Row="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1" Content="{Binding Save_Msg}"
IsDefault="True"
Command="{Binding Save_Command}"
Visibility="{Binding Buttons_Visibility}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Grid.Column="3" Content="{Binding DoNotSave_Msg}"
Command="{Binding DoNotSave_Command}"
Visibility="{Binding Buttons_Visibility}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,18 @@
Public Class BlockedWndV
Private WithEvents m_BlockedWndVM As BlockedWndVM
Sub New(Owner As Window, BlockedWndVM As BlockedWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = BlockedWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_BlockedWndVM = BlockedWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BlockedWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -0,0 +1,160 @@
Imports System.Windows.Threading
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
Public Class BlockedWndVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Friend Event m_CloseWindow(bDialogResult As Boolean)
Private m_Waiting_Timer As New DispatcherTimer
Private WaitingTimer_TickHandler As New EventHandler(AddressOf WaitingTimer_Tick)
Private m_Buttons_Visibility As Visibility = Visibility.Visible
Public ReadOnly Property Buttons_Visibility As Visibility
Get
Return m_Buttons_Visibility
End Get
End Property
Private m_nIndex As Integer = 0
#Region "Messages"
Private m_Msg_Text As String
Public ReadOnly Property Msg_Text As String
Get
Return m_Msg_Text
End Get
End Property
Public ReadOnly Property Save_Msg As String
Get
Return EgtMsg(61966)
End Get
End Property
Public ReadOnly Property DoNotSave_Msg As String
Get
Return EgtMsg(61967)
End Get
End Property
#End Region ' Messages
' Definizione comandi
Private m_cmdSave As ICommand
Private m_cmdDoNotSave As ICommand
#End Region ' FIELDS & PROPERTIES
Sub New()
If DbControllers.bNetwork Then
m_Buttons_Visibility = Visibility.Visible
m_Msg_Text = "Ottimizzatore bloccato per ricalcolo trave. Salvare le modifiche apportate al progetto?"
Else
m_Msg_Text = "In attesa del ricalcolo da parte del supervisore."
m_Buttons_Visibility = Visibility.Collapsed
Save()
End If
NotifyPropertyChanged(NameOf(Msg_Text))
NotifyPropertyChanged(NameOf(Buttons_Visibility))
' avvio contatore
m_Waiting_Timer.Interval = TimeSpan.FromMilliseconds(500)
AddHandler m_Waiting_Timer.Tick, WaitingTimer_TickHandler
m_Waiting_Timer.Start()
End Sub
Private Sub WaitingTimer_Tick()
' se notifica di chiusura da supervisor, esco
If Not SupervisorCommThread.bViewerOptimizerBlocked And Map.refMainWindowVM.m_ManagingSupervisorStop Then
If m_Waiting_Timer.IsEnabled Then
m_Waiting_Timer.Stop()
RemoveHandler m_Waiting_Timer.Tick, WaitingTimer_TickHandler
End If
' se mi viene passato un Id di MachGroup aggiunto
If SupervisorCommThread.m_AddedMachGroupId > 0 Then
' ricarico progetto
Dim sCurrFilePath As String = ""
EgtGetCurrFilePath(sCurrFilePath)
EgtOpenFile(sCurrFilePath)
' aggiungo a lista nuovo MachGroup
Map.refProjectVM.MachGroupPanelVM.AddMachGroupToList(SupervisorCommThread.m_AddedMachGroupId)
End If
Map.refMainWindowVM.m_ManagingSupervisorStop = False
RaiseEvent m_CloseWindow(True)
End If
' incremento contatore
m_nIndex += 1
' se passata attesa per risposta utente
If m_nIndex = 17 Then
' aggiorno finestra con attesa fine calcolo
m_Msg_Text = "In attesa del ricalcolo da parte del supervisore."
m_Buttons_Visibility = Visibility.Collapsed
NotifyPropertyChanged(NameOf(Buttons_Visibility))
NotifyPropertyChanged(NameOf(Msg_Text))
' mando messaggio di blocco avvenuto
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
End If
End Sub
#Region "COMMANDS"
#Region "Save"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property Save_Command As ICommand
Get
If m_cmdSave Is Nothing Then
m_cmdSave = New Command(AddressOf Save)
End If
Return m_cmdSave
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub Save()
' salvo progetto
'Map.refProdManagerVM.Save()
Map.refOnlyProdManagerVM.Save()
' mando messaggio di blocco avvenuto
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
End Sub
#End Region ' Save
#Region "DoNotSave"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property DoNotSave_Command As ICommand
Get
If m_cmdDoNotSave Is Nothing Then
m_cmdDoNotSave = New Command(AddressOf DoNotSave)
End If
Return m_cmdDoNotSave
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub DoNotSave()
' mando messaggio di blocco avvenuto
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
End Sub
#End Region ' DoNotSave
#End Region ' COMMANDS
End Class
@@ -0,0 +1,106 @@
<Grid x:Class="BottomPanelV"
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.Optimizer"
Height="350"
Visibility="{Binding BottomPanel_Visibility}">
<TabControl SelectedIndex="{Binding SelPartFeatureTab}"
TabStripPlacement="Right"
Margin="5">
<TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TabControl.ItemContainerStyle>
<TabItem Header="STRUCTURE">
<TabItem.Content>
<EgtWPFLib5:EgtScrollViewer Focusable="False">
<EgtBEAMWALL:BTLDataV DataContext="{StaticResource BTLDataWndVM}"
Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5"/>
</EgtWPFLib5:EgtScrollViewer>
</TabItem.Content>
</TabItem>
<TabItem Header="PART">
<TabItem.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<EgtWPFLib5:EgtScrollViewer Focusable="False">
<EgtBEAMWALL:PartParametersV DataContext="{StaticResource PartParametersVM}"
Tag="{Binding Tag.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5"/>
</EgtWPFLib5:EgtScrollViewer>
<TextBlock Grid.Row="1"
Text="{Binding Tag.SelBTLPart.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Foreground="{Binding Tag.SelBTLPart.CALC_ERR_Foreground, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5,0,5,0"
Visibility="{Binding Tag.SelBTLPart.CALC_MSG_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"/>
</Grid>
</TabItem.Content>
</TabItem>
<TabItem Header="FEATURE">
<TabItem.Content>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.Resources>
<Style TargetType="TextBlock">
<Style.Triggers>
<Trigger Property="Text" Value="">
<Setter Property="Visibility" Value="Collapsed"/>
</Trigger>
</Style.Triggers>
</Style>
</Grid.Resources>
<EgtBEAMWALL:FeatureManagerV DataContext="{StaticResource FeatureManagerVM}"
Tag="{Binding Tag.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"/>
<TabControl Grid.Row="1"
TabStripPlacement="Left"
Margin="5,5,2.5,5">
<TabItem Header="P">
<TabItem.Content>
<EgtBEAMWALL:PParameterListV DataContext="{StaticResource PParameterListVM}"
Tag="{Binding Tag.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5"/>
</TabItem.Content>
</TabItem>
<TabItem Header="Q">
<TabItem.Content>
<EgtBEAMWALL:QParameterListV DataContext="{StaticResource QParameterListVM}"
Tag="{Binding Tag.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5"/>
</TabItem.Content>
</TabItem>
</TabControl>
<Image Grid.Column="1"
Grid.Row="1"
Source="{Binding sCurrDraw}"
Margin="5"/>
<TextBlock Grid.Row="2" Grid.ColumnSpan="2"
Text="{Binding Tag.SelBTLPart.SelBTLFeatureVM.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Foreground="{Binding Tag.SelBTLPart.SelBTLFeatureVM.Calc_Background, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5,0,5,0"/>
</Grid>
</TabItem.Content>
</TabItem>
<TabItem Header="STATISTICS">
<TabItem.Content>
<EgtBEAMWALL:StatisticsV DataContext="{StaticResource StatisticsVM}"
Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5"/>
</TabItem.Content>
</TabItem>
</TabControl>
</Grid>
@@ -0,0 +1,3 @@
Public Class BottomPanelV
End Class
@@ -0,0 +1,51 @@
Imports EgtWPFLib5
Public Class BottomPanelVM
Inherits VMBase
Friend Enum PartFeatureTab As Integer
NULL = -1
STRUCTURE_ = 0
PART = 1
FEATURE = 2
STATISTICS = 3
End Enum
Private m_SelPartFeatureTab As PartFeatureTab
Public Property SelPartFeatureTab As Integer
Get
Return m_SelPartFeatureTab
End Get
Set(value As Integer)
m_SelPartFeatureTab = value
End Set
End Property
Friend Sub SetSelPartFeatureTab(SelPartFeatureTab As PartFeatureTab)
If m_SelPartFeatureTab = PartFeatureTab.STATISTICS Then
Map.refInstrumentPanelVM.SetStatisticsIsChecked(False)
End If
m_SelPartFeatureTab = SelPartFeatureTab
NotifyPropertyChanged(NameOf(SelPartFeatureTab))
End Sub
Private m_sCurrDraw As String
Public ReadOnly Property sCurrDraw As String
Get
Return m_sCurrDraw
End Get
End Property
Friend Sub SetCurrDraw(sCurrDraw As String)
m_sCurrDraw = sCurrDraw
NotifyPropertyChanged(NameOf(sCurrDraw))
End Sub
#Region "CONSTRUCTOR"
Sub New()
' Creo riferimento a questa classe in EgtCAM5Map
Map.SetRefBottomPanelVM(Me)
End Sub
#End Region ' CONSTRUCTOR
End Class
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,69 @@
<EgtFloating:EgtFloatingPanel x:Class="CalcPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
<Button FontSize="20"
FontWeight="Light"
ToolTip="{Binding Verify_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding Verify_Command}"
IsEnabled="{Binding Verify_IsEnabled}">
<Image Source="/Resources/CALCPanel/Verify.png" Stretch="Uniform"/>
</Button>
<Button FontSize="20"
FontWeight="Light"
ToolTip="{Binding VerifyAll_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding VerifyAll_Command}"
IsEnabled="{Binding VerifyAll_IsEnabled}">
<Image Source="/Resources/CALCPanel/VerifyAll.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ResetCalc_Command}"
ToolTip="{Binding ResetCalc_ToolTip}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/CALCPanel/ResetCalc.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Simulate_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding Simulate_Command}"
IsEnabled="{Binding Simulate_IsEnabled}">
<Image Source="/Resources/CALCPanel/Simulate.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Edit_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding Edit_Command}"
IsEnabled="{Binding Edit_IsEnabled}"
Visibility="{Binding Edit_Visibility}">
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChooseMachine_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding ChooseMachine_Command}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Visibility="{Binding ChooseMachineBtn_Visibility}">
<Image Source="/Resources/CALCPanel/ChooseMachine.png" Stretch="Uniform"/>
</Button>
<Grid Margin="0,0,5,0" Visibility="{Binding ChooseMachine_Visibility}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!--Combobox per selezionare la macchina corrente-->
<ComboBox ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
Height="22" Width="150"
Grid.Column="0"/>
<Button Content="OK"
FontSize="10"
FontWeight="Light"
Style="{StaticResource ToolBar_Button}"
Command="{Binding Ok_Command}"
Grid.Column="1"/>
</Grid>
</EgtFloating:EgtFloatingPanel>
@@ -0,0 +1,3 @@
Public Class CalcPanelV
End Class
@@ -0,0 +1,64 @@
<StackPanel x:Class="OnlyProdCalcPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Style="{StaticResource OnlyProdPartManager_StackPanel}">
<!--<Button ToolTip="{Binding Verify_ToolTip}"
Command="{Binding Verify_Command}"
IsEnabled="{Binding Verify_IsEnabled}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/CALCPanel/Verify.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding VerifyAll_ToolTip}"
Command="{Binding VerifyAll_Command}"
IsEnabled="{Binding VerifyAll_IsEnabled}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/CALCPanel/VerifyAll.png" Stretch="Uniform"/>
</Button>-->
<!--<Button Command="{Binding ResetCalc_Command}"
ToolTip="{Binding ResetCalc_ToolTip}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/CALCPanel/ResetCalc.png" Stretch="Uniform"/>
</Button>-->
<!--<Button ToolTip="{Binding Simulate_ToolTip}"
Command="{Binding Simulate_Command}"
IsEnabled="{Binding Simulate_IsEnabled}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/CALCPanel/Simulate.png" Stretch="Uniform"/>
</Button>-->
<!--<Button ToolTip="{Binding Edit_ToolTip}"
Command="{Binding Edit_Command}"
IsEnabled="{Binding Edit_IsEnabled}"
Visibility="{Binding Edit_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
</Button>-->
<Button ToolTip="{Binding ChooseMachine_ToolTip}"
Command="{Binding ChooseMachine_Command}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Visibility="{Binding ChooseMachineBtn_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/CALCPanel/ChooseMachine.png" Stretch="Uniform"/>
</Button>
<Grid Margin="0,0,5,0" Visibility="{Binding ChooseMachine_Visibility}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!--Combobox per selezionare la macchina corrente-->
<ComboBox Grid.Column="0"
ItemsSource="{Binding Path=MachineList}"
DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}"
SelectedValuePath="Name"
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<Button Grid.Column="1"
Content="OK"
Command="{Binding Ok_Command}"
Style="{StaticResource ToolBarOnlyProdCalcPanel_Button}"/>
</Grid>
</StackPanel>
@@ -0,0 +1,3 @@
Public Class OnlyProdCalcPanelV
End Class
@@ -0,0 +1,77 @@
<EgtWPFLib5:EgtCustomWindow x:Class="ChangeMaterialWndV"
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.Optimizer"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="ChangeMaterialWnd">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Center"
Grid.Row="0"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding ProjMaterial_Msg}"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding ProjMaterialList}"
SelectedItem="{Binding SelProjMaterial}"
Grid.Column="1"
Width="150"
Style="{StaticResource FeatureComboBox}"/>
</Grid>
<Grid HorizontalAlignment="Center"
Grid.Row="1"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding WjMaterial_Msg}"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding WhMaterialList}"
SelectedItem="{Binding SelWhMaterial}"
Grid.Column="1"
Width="150"
Style="{StaticResource FeatureComboBox}"/>
</Grid>
<Grid Grid.Row="2"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Content="{Binding Ok_Msg}"
Command="{Binding Ok_Command}"
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding Cancel_Msg}"
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,18 @@
Public Class ChangeMaterialWndV
Private WithEvents m_ChangeMaterialWndVM As ChangeMaterialWndVM
Sub New(Owner As Window, ChangeMaterialWndVM As ChangeMaterialWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ChangeMaterialWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_ChangeMaterialWndVM = ChangeMaterialWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ChangeMaterialWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -0,0 +1,140 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtBEAMWALL.Core
Public Class ChangeMaterialWndVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Friend Event m_CloseWindow(bDialogResult As Boolean)
Private m_ProjMaterialList As New ObservableCollection(Of String)
Public Property ProjMaterialList As ObservableCollection(Of String)
Get
Return m_ProjMaterialList
End Get
Set(value As ObservableCollection(Of String))
m_ProjMaterialList = value
End Set
End Property
Private m_SelProjMaterial As String
Public Property SelProjMaterial As String
Get
Return m_SelProjMaterial
End Get
Set(value As String)
m_SelProjMaterial = value
NotifyPropertyChanged(NameOf(SelProjMaterial))
End Set
End Property
Private m_WhMaterialList As New ObservableCollection(Of String)
Public Property WhMaterialList As ObservableCollection(Of String)
Get
Return m_WhMaterialList
End Get
Set(value As ObservableCollection(Of String))
m_WhMaterialList = value
End Set
End Property
Private m_SelWhMaterial As String
Public Property SelWhMaterial As String
Get
Return m_SelWhMaterial
End Get
Set(value As String)
m_SelWhMaterial = value
NotifyPropertyChanged(NameOf(SelWhMaterial))
End Set
End Property
' Definizione comandi
Private m_cmdOk As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "MESSAGES"
Public ReadOnly Property ProjMaterial_Msg As String
Get
Return EgtMsg(61962)
End Get
End Property
Public ReadOnly Property WjMaterial_Msg As String
Get
Return EgtMsg(61963)
End Get
End Property
Public ReadOnly Property Ok_Msg As String
Get
Return EgtMsg(61761)
End Get
End Property
Public ReadOnly Property Cancel_Msg As String
Get
Return EgtMsg(61763)
End Get
End Property
#End Region ' MESSAGES
#Region "CONSTRUCTOR"
Sub New()
' recupero i materiali del progetto
m_ProjMaterialList.Clear()
For Each BTLPart In Map.refProjectVM.BTLStructureVM.BTLPartVMList
If Not m_ProjMaterialList.Contains(BTLPart.sMATERIAL) Then
m_ProjMaterialList.Add(BTLPart.sMATERIAL)
End If
Next
' recupero la lista dei SectionXMaterial presenti in Warehouse
Dim WhSectXMatList As List(Of SectionXMaterial) = WarehouseWndVM.GetSectionXMaterialsFromWarehouse()
' ricavo la lista dei materiali presenti in Warehouse
m_WhMaterialList.Clear()
For Each WhSectXMat In WhSectXMatList
For Each sMatItem In WhSectXMat.sMaterial
If Not m_WhMaterialList.Contains(sMatItem) Then
m_WhMaterialList.Add(sMatItem)
End If
Next
Next
End Sub
#End Region ' CONSTRUCTOR
#Region "COMMANDS"
#Region "Ok"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public Sub Ok()
'verifico che tutti i campi contengano un valore valido
If Not IsNothing(m_SelProjMaterial) AndAlso m_SelProjMaterial <> "" AndAlso
Not IsNothing(m_SelWhMaterial) AndAlso m_SelWhMaterial <> "" Then
RaiseEvent m_CloseWindow(True)
Else
MessageBox.Show(EgtMsg(61858), EgtMsg(30007))
End If
End Sub
#End Region ' Ok
#End Region ' COMMANDS
End Class
@@ -0,0 +1,95 @@
<EgtWPFLib5:EgtCustomWindow x:Class="ChangeParameterWndV"
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.Optimizer"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="Height"
Width="300"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="ChangeParameterWnd">
<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="5"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="5"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="5"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="5"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="Process"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox Grid.Column="1"
ItemsSource="{Binding PRCList}"
SelectedItem="{Binding SelPRC}"
DisplayMemberPath="ghDesc"
HorizontalAlignment="Stretch"
Style="{StaticResource FeatureComboBox}"/>
<TextBlock Grid.Row="2"
Text="Parameter"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox Grid.Row="2" Grid.Column="1"
ItemsSource="{Binding ParamList}"
SelectedItem="{Binding SelParam}"
DisplayMemberPath="sNameAndDescription"
HorizontalAlignment="Stretch"
Style="{StaticResource FeatureComboBox}"/>
<TextBlock Grid.Row="4"
Text="Actual value"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="4" Grid.Column="1"
Text="{Binding SelParam.sActualValue}"
Visibility="{Binding SelParam.IsTextBox_Visibility}"/>
<CheckBox Grid.Row="4" Grid.Column="1"
IsChecked="{Binding SelParam.bActualValue}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="{Binding SelParam.IsCheckBox_Visibility}"/>
<TextBlock Grid.Row="6" Text="New Value"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="6" Grid.Column="1"
Text="{Binding SelParam.sNewValue}"
Visibility="{Binding SelParam.IsTextBox_Visibility}"/>
<CheckBox Grid.Row="6" Grid.Column="1"
IsChecked="{Binding SelParam.bNewValue}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="{Binding SelParam.IsCheckBox_Visibility}"/>
<Grid Grid.Row="8" Grid.ColumnSpan="2"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Content="Ok"
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}"/>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,18 @@
Public Class ChangeParameterWndV
Private WithEvents m_ChangeParameterWndVM As ChangeParameterWndVM
Sub New(Owner As Window, ChangeParameterWndVM As ChangeParameterWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ChangeParameterWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_ChangeParameterWndVM = ChangeParameterWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ChangeParameterWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -0,0 +1,234 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtBEAMWALL.Core
Public Class ChangeParameterWndVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Friend Event m_CloseWindow(bDialogResult As Boolean)
Private m_PRCList As New ObservableCollection(Of PRC)
Public ReadOnly Property PRCList As ObservableCollection(Of PRC)
Get
Return m_PRCList
End Get
End Property
Private m_SelPRC As PRC = Nothing
Public Property SelPRC As PRC
Get
Return m_SelPRC
End Get
Set(value As PRC)
If value IsNot m_SelPRC Then
m_SelPRC = value
' aggiorno lista parametri
m_ParamList.Clear()
Dim ParamIndex As Integer = 1
Dim NewBTLParam As BTLParamM = Nothing
' leggo tutti i P della feature
While BTLIniFile.GetBeamPrivateProfileParam(m_SelPRC.nGRP, m_SelPRC.nPRC, m_SelPRC.nVARIANT, True, ParamIndex, Nothing, NewBTLParam)
m_ParamList.Add(New Parameters(NewBTLParam))
ParamIndex += 1
End While
' aggiungo bDO come parametro
m_ParamList.Add(New Parameters(BTLParamM.CreateNewBTLParam(), True))
' seleziono parametro vuoto per dargli un valore iniziale ed evitare che visualizzi sia text che check
m_SelParam = New Parameters(BTLParamM.CreateNewBTLParam())
NotifyPropertyChanged(NameOf(SelParam))
End If
End Set
End Property
Private m_ParamList As New ObservableCollection(Of Parameters)
Public Property ParamList As ObservableCollection(Of Parameters)
Get
Return m_ParamList
End Get
Set(value As ObservableCollection(Of Parameters))
m_ParamList = value
End Set
End Property
Private m_SelParam As Parameters = New Parameters(BTLParamM.CreateNewBTLParam()) ' False, BTLParamType.STRING_, "") ' per dargli un valore iniziale ed evitare che visualizzi sia text che check
Public Property SelParam As Parameters
Get
Return m_SelParam
End Get
Set(value As Parameters)
m_SelParam = value
NotifyPropertyChanged(NameOf(SelParam))
End Set
End Property
' Definizione comandi
Private m_cmdOk As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New()
Dim TempPRCList As New ObservableCollection(Of Integer)
GetBeamPrivateProfileProcessList(GRPType.T, TempPRCList)
m_PRCList.Clear()
For Each PRC In TempPRCList
If Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x.BTLFeatureVMList.Any(Function(y) y.nPRC = PRC AndAlso CalcBeamPrivateProfileGRP(y.nSelGRP) = 1)) Then
m_PRCList.Add(New PRC(GRPType.T, PRC, GetBeamPrivateProfileName(GRPType.T, PRC)))
End If
Next
GetBeamPrivateProfileProcessList(GRPType.L, TempPRCList)
For Each PRC In TempPRCList
If Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x.BTLFeatureVMList.Any(Function(y) y.nPRC = PRC AndAlso CalcBeamPrivateProfileGRP(y.nSelGRP) = 0)) Then
m_PRCList.Add(New PRC(GRPType.L, PRC, GetBeamPrivateProfileName(GRPType.L, PRC)))
End If
Next
End Sub
#End Region ' CONSTRUCTOR
#Region "COMMANDS"
#Region "Ok"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public Sub Ok()
'verifico che tutti i campi contengano un valore valido
If Not IsNothing(m_SelPRC) AndAlso
Not IsNothing(m_SelParam) AndAlso m_SelParam.sName <> "" Then
RaiseEvent m_CloseWindow(True)
Else
MessageBox.Show(EgtMsg(61858), EgtMsg(30007))
End If
End Sub
#End Region ' Ok
#End Region ' COMMANDS
End Class
Public Class Parameters
Inherits BTLParamVM
Private m_dActualValue As Double
Private m_sActualValue As String
Public ReadOnly Property dActualValue As Double
Get
Return m_dActualValue
End Get
End Property
Public Property sActualValue As String
Get
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_
Return DoubleToString(m_dActualValue, 3)
Case BTLParamType.LENGTH
Return LenToString(m_dActualValue, 3)
Case Else ' BTLParamType.STRING_
Return m_sActualValue
End Select
End Get
Set(value As String)
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_
StringToDoubleAdv(value, m_dActualValue, True)
Case BTLParamType.LENGTH
StringToLenAdv(value, m_dActualValue, True)
Case Else ' BTLParamType.STRING_
m_sActualValue = value
End Select
End Set
End Property
Private m_dNewValue As Double
Private m_sNewValue As String
Public ReadOnly Property dNewValue As Double
Get
Return m_dNewValue
End Get
End Property
Public Property sNewValue As String
Get
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_
Return DoubleToString(m_dNewValue, 3)
Case BTLParamType.LENGTH
Return LenToString(m_dNewValue, 3)
Case Else ' BTLParamType.STRING_
Return m_sNewValue
End Select
End Get
Set(value As String)
Select Case m_BTLParamM.nType
Case BTLParamType.DOUBLE_
StringToDoubleAdv(value, m_dNewValue, True)
Case BTLParamType.LENGTH
StringToLenAdv(value, m_dNewValue, True)
Case Else ' BTLParamType.STRING_
m_sNewValue = value
End Select
End Set
End Property
Private m_bActualValue As Boolean
Public Property bActualValue As Boolean
Get
Return m_bActualValue
End Get
Set(value As Boolean)
m_bActualValue = value
End Set
End Property
Private m_bNewValue As Boolean
Public Property bNewValue As Boolean
Get
Return m_bNewValue
End Get
Set(value As Boolean)
m_bNewValue = value
End Set
End Property
Private m_bIsCheckBox As Boolean = False
Public Property IsTextBox_Visibility As Visibility
Get
Return If(m_bIsCheckBox, Visibility.Collapsed, Visibility.Visible)
End Get
Set(value As Visibility)
m_bIsCheckBox = Not value
End Set
End Property
Public Property IsCheckBox_Visibility As Visibility
Get
Return If(m_bIsCheckBox, Visibility.Visible, Visibility.Collapsed)
End Get
Set(value As Visibility)
m_bIsCheckBox = value
End Set
End Property
Public ReadOnly Property sNameAndDescription As String
Get
Return If(m_bIsCheckBox, "Attivazione", sName & " " & sDescription)
End Get
End Property
Sub New(BTLParamM As BTLParamM, Optional IsCheckBox As Boolean = False)
MyBase.New(BTLParamM)
m_bIsCheckBox = IsCheckBox
If IsCheckBox Then m_BTLParamM.SetType(BTLParamType.CHECKBOX)
End Sub
End Class
@@ -0,0 +1,83 @@
<DockPanel x:Class="ConfigurationPageV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{StaticResource ConfigurationPageVM}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="6*"/>
</Grid.RowDefinitions>
<TabControl Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2"
SelectedIndex="{Binding SelConfigSubPage}">
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding General_Msg}"
Style="{StaticResource OptionTextBlock}"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding General_Visibility}"
Style="{StaticResource OptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALLCORE:General_ConfigurationPageV/>
</TabItem.Content>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding ParameterQ_Msg}"
Style="{StaticResource OptionTextBlock}"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding ParameterQ_Visibility}"
Style="{StaticResource OptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALLCORE:QParameter_ConfigurationPageV/>
</TabItem.Content>
</TabItem>
<TabItem>
<TabItem.Header>
<TextBlock Text="{Binding Machine_Msg}"
Style="{StaticResource Machine_TextBlock}"/>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALLCORE:Machine_ConfigurationPageV/>
</TabItem.Content>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding PDFEditor_Msg}"
Style="{StaticResource OptionTextBlock}"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding PDFEditor_Visibility}"
Style="{StaticResource OptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALL:PDFEditorV/>
</TabItem.Content>
</TabItem>
</TabControl>
</Grid>
</DockPanel>
@@ -0,0 +1,5 @@
Public Class ConfigurationPageV
Private Sub ScrollViewer_Scroll(sender As Object, e As Primitives.ScrollEventArgs)
End Sub
End Class
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,118 @@
<Grid x:Class="General_ConfigurationPageV"
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">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Margin="5,5,5,0">
<GroupBox Header="{Binding CurrentLanguage_Msg}"
Margin="0,0,0,5">
<UniformGrid Rows="2" Margin="3,3,3,3">
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
Margin="0,0,0,5"/>
<TextBlock Text="{Binding LanguageAdvert_Msg}" TextWrapping="Wrap"
TextAlignment="Center"/>
</UniformGrid>
</GroupBox>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding MMUnits_Msg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
SelectedIndex="{Binding SelMeasureUnit}" Height="25"
Margin="0,5,0,0"/>
</UniformGrid>
<GroupBox Header="{Binding Nesting_Msg}"
Margin="0,0,0,5">
<StackPanel>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding SectionTime_Msg}"
Grid.Row="0" Grid.Column="0"/>
<EgtWPFLib5:EgtTextBox Text="{Binding SectionTime, UpdateSourceTrigger=Explicit}"
Grid.Row="0" Grid.Column="1"/>
</UniformGrid>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding PartTime_Msg}"
Grid.Row="1" Grid.Column="0"/>
<EgtWPFLib5:EgtTextBox Text="{Binding PartTime, UpdateSourceTrigger=Explicit}"
Grid.Row="1" Grid.Column="1"/>
</UniformGrid>
</StackPanel>
</GroupBox>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding PrintLabel_Msg}" VerticalAlignment="Center"/>
<CheckBox IsChecked="{Binding bPrintLabel_IsChecked}"
Margin="0,5,0,0"/>
</UniformGrid>
<GroupBox Header="Backup And Restore">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0"
Margin="0,2,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<CheckBox x:Name="ExternalBackup_CheckBox"
IsChecked="{Binding bExternalBackupActive}"
VerticalAlignment="Center"/>
<TextBlock Grid.Column="1"
Text="External file path:"
VerticalAlignment="Center"/>
</Grid>
<Grid Grid.Row="1"
Margin="0,2,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox Text="{Binding ExternalBackupFolderPath}"
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
Margin="0,0,2.5,0"/>
<Button Grid.Column="1"
Content="..."
Width="18"
Command="{Binding ChooseExternalBackupFolderPath_Command}"
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
Margin="2.5,0,0,0"/>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Reminder Frequency"/>
<ComboBox Grid.Column="1"
ItemsSource="{Binding ReminderList}"
SelectedItem="{Binding SelReminder}"/>
</Grid>
<StackPanel Grid.Row="3"
Orientation="Horizontal">
<Button Content="Backup"
Command="{Binding Backup_Command}"
Style="{StaticResource ToolBar_TextButton}"/>
<Button Content="Restore"
Command="{Binding Restore_Command}"
Style="{StaticResource ToolBar_TextButton}"/>
</StackPanel>
</Grid>
</GroupBox>
</StackPanel>
</Grid>
@@ -0,0 +1,3 @@
Public Class General_ConfigurationPageV
End Class
@@ -0,0 +1,70 @@
<Grid x:Class="Machine_ConfigurationPageV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.ViewerOptimizer"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="10*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal">
<GroupBox Style="{StaticResource GroupBoxStyle_NoHeader}" Padding="5,10,5,5">
<EgtBEAMWALL:MachinePanelV DataContext="{Binding MachinePanelVM}" VerticalAlignment="Center"/>
</GroupBox>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal">
<ItemsControl ItemsSource="{Binding ConfigMachTableList}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel x:Name="GroupStackPanel" Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<GroupBox Header="{Binding sName}" Width="Auto" VerticalAlignment="Top" Height="Auto">
<ItemsControl Name="MachParamsItemsControl" ItemsSource="{Binding MachParamList}" Margin="0,5,0,0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
TextWrapping="WrapWithOverflow"
Width="100"
Style="{StaticResource MachParamTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Grid.Column="1"
Width="70"/>
<TextBlock Text="{Binding sDescription}"
TextWrapping="WrapWithOverflow"
Width="200"
Style="{StaticResource MachParamTextBlock}"
Grid.Column="2"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</GroupBox>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Grid>
@@ -0,0 +1,3 @@
Public Class Machine_ConfigurationPageV
End Class
@@ -0,0 +1,143 @@
<Grid x:Class="OnlyProdCheckVersionV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer">
<Grid.Resources>
<!--<EgtBEAMWALL:IsPermittedConverter x:Key="IsPermittedConverter"/>-->
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Margin="10"
VerticalAlignment="Top"
HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Text="{Binding ActVersion_Msg}"
VerticalAlignment="Center"
FontSize="15"
FontWeight="Bold"
Margin="10,0,0,0"
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
<TextBlock Text="{Binding ActualVersion}"
VerticalAlignment="Center"
FontSize="15"
FontWeight="Bold"
Margin="10,0,0,0"
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
</StackPanel>
<UniformGrid Grid.Row="1"
Columns="2"
Margin="0,20,0,10">
<Button Content="{Binding AllVersion_Msg}"
Width="180"
Command="{Binding GetAllReleaseCommand}"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding VersionFrom_Msg}"
Width="150"
Command="{Binding GetVersionFromCommand}"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
<Border Grid.Row="2"
Margin="0,10,10,10"
Visibility="{Binding ProgramVersionListVisibility}"
Style="{StaticResource OnlyProdPage_Border}">
<DataGrid ItemsSource="{Binding ProgramVersionList}"
SelectedItem="{Binding ProgramVersionListItem}"
AutoGenerateColumns="False"
CanUserSortColumns="False"
CanUserResizeColumns="False"
CanUserResizeRows="False"
CanUserReorderColumns="False"
SelectionMode="Single"
ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
Style="{StaticResource DataGrid_OnlyProd}">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="Background" Value="{StaticResource BeamWall_Teal}"/>
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="15"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.Columns>
<!--Numero Versione-->
<DataGridTemplateColumn Width="170">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.NumVersion_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding VersNum}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Versione-->
<DataGridTemplateColumn Width="110">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Version_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding VersText}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Data di Rilascio-->
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.DateVersion_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding ReleaseDate, StringFormat=dd/MM/yyyy}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Stato Versione-->
<DataGridTemplateColumn Width="150">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.StateVersion_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<!--<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource IsPermittedConverter}}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>-->
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Border>
</Grid>
<Border Grid.Column="1"
Margin="0,10,10,10"
Style="{StaticResource OnlyProdPage_Border}">
<!--<WebView:WebView2 Grid.Column="1"
Source="{Binding LinkVersionView}"/>-->
</Border>
</Grid>
@@ -0,0 +1,3 @@
Public Class OnlyProdCheckVersionV
End Class
@@ -0,0 +1,99 @@
<DockPanel x:Class="OnlyProdConfigurationPageV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{StaticResource ConfigurationPageVM}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="6*"/>
</Grid.RowDefinitions>
<TabControl Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2"
SelectedIndex="{Binding SelConfigSubPage}"
Style="{StaticResource OnlyProd_TabControl}">
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding General_Msg}"
FontSize="15"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding General_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALLCORE:OnlyProdGeneral_ConfigurationPageV/>
</TabItem.Content>
</TabItem>
<!--<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding ParameterQ_Msg}"
FontSize="15"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding ParameterQ_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALLCORE:OnlyProdQParameter_ConfigurationPageV/>
</TabItem.Content>
</TabItem>-->
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding Machine_Msg}"
FontSize="15"/>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<StackPanel>
<Button Content="Strategies"
Command="{Binding StrategyManager_Command}"/>
<EgtBEAMWALLCORE:OnlyProdMachine_ConfigurationPageV/>
</StackPanel>
</TabItem.Content>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding PDFEditor_Msg}"
FontSize="15"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding PDFEditor_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALL:OnlyProdPDFEditorV/>
</TabItem.Content>
</TabItem>
<!--<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding CtrlVersion_Msg}"
FontSize="15"/>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALL:OnlyProdCheckVersionV/>
</TabItem.Content>
</TabItem>-->
</TabControl>
</Grid>
</DockPanel>
@@ -0,0 +1,2 @@
Public Class OnlyProdConfigurationPageV
End Class
@@ -0,0 +1,80 @@
<Grid x:Class="QParameter_ConfigurationPageV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.ViewerOptimizer">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<EgtBEAMWALL:QParamListV DataContext="{Binding}"
ItemsSource="{Binding QBTLParamVMList}"
SelectedItem="{Binding SelQParam}"
Grid.Column="0"
Margin="5">
<DataGrid.GroupStyle>
<GroupStyle>
<GroupStyle.Panel>
<ItemsPanelTemplate>
<DataGridRowsPresenter/>
</ItemsPanelTemplate>
</GroupStyle.Panel>
<GroupStyle.HeaderTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Path=Name}"/>
</StackPanel>
</DataTemplate>
</GroupStyle.HeaderTemplate>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander IsExpanded="True">
<Expander.Background>
<SolidColorBrush Color="#FFBABABA"></SolidColorBrush>
</Expander.Background>
<Expander.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Path=Name}" />
</StackPanel>
</Expander.Header>
<ItemsPresenter />
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
<GroupStyle>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander IsExpanded="True">
<Expander.Background>
<SolidColorBrush Color="LightGray"></SolidColorBrush>
</Expander.Background>
<Expander.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Path=Name}" />
</StackPanel>
</Expander.Header>
<ItemsPresenter />
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
</DataGrid.GroupStyle>
</EgtBEAMWALL:QParamListV>
</Grid>
@@ -0,0 +1,3 @@
Public Class QParameter_ConfigurationPageV
End Class
@@ -0,0 +1,16 @@
Module ConstWarehouseIni
Public Const WH_BASIC_INI_FILE_NAME As String = "Basic.ini"
Public Const WH_MEDIUM_INI_FILE_NAME As String = "Medium.ini"
Public Const K_CURRENTL As String = "CurrentL"
Public Const K_CURRENTS As String = "CurrentS"
Public Const K_STARTOFFSET As String = "StartOffset"
Public Const K_KERF As String = "Kerf"
Public Const K_OFFSET As String = "Offset"
Public Const K_QUANTITY As String = "Quantity"
Public Const K_L As String = "L"
Public Const K_S As String = "S"
Public Const K_RANGE As String = "Range"
End Module
@@ -0,0 +1,4 @@
Public Interface IListItemConverter
Function Convert(ByVal masterListItem As Object) As Object
Function ConvertBack(ByVal targetListItem As Object) As Object
End Interface
@@ -0,0 +1,78 @@
Imports System.Windows.Controls.Primitives
Public Class MultiSelectorBehaviours
Public Shared ReadOnly SynchronizedSelectedItemsProperty As DependencyProperty = DependencyProperty.RegisterAttached("SynchronizedSelectedItems", GetType(IList), GetType(MultiSelectorBehaviours), New PropertyMetadata(Nothing, AddressOf OnSynchronizedSelectedItemsChanged))
Public Shared ReadOnly SynchronizationManagerProperty As DependencyProperty = DependencyProperty.RegisterAttached("SynchronizationManager", GetType(SynchronizationManager), GetType(MultiSelectorBehaviours), New PropertyMetadata(Nothing))
Public Shared Function GetSynchronizedSelectedItems(ByVal dependencyObject As DependencyObject) As IList
Return CType(dependencyObject.GetValue(SynchronizedSelectedItemsProperty), IList)
End Function
Public Shared Sub SetSynchronizedSelectedItems(ByVal dependencyObject As DependencyObject, ByVal value As IList)
dependencyObject.SetValue(SynchronizedSelectedItemsProperty, value)
End Sub
Private Shared Function GetSynchronizationManager(ByVal dependencyObject As DependencyObject) As SynchronizationManager
Return CType(dependencyObject.GetValue(SynchronizationManagerProperty), SynchronizationManager)
End Function
Private Shared Sub SetSynchronizationManager(ByVal dependencyObject As DependencyObject, ByVal value As SynchronizationManager)
dependencyObject.SetValue(SynchronizationManagerProperty, value)
End Sub
Private Shared Sub OnSynchronizedSelectedItemsChanged(ByVal dependencyObject As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
If e.OldValue IsNot Nothing Then
Dim synchronizer As SynchronizationManager = GetSynchronizationManager(dependencyObject)
synchronizer.StopSynchronizing()
SetSynchronizationManager(dependencyObject, Nothing)
End If
Dim list As IList = TryCast(e.NewValue, IList)
Dim selector As Selector = TryCast(dependencyObject, Selector)
If list IsNot Nothing AndAlso selector IsNot Nothing Then
Dim synchronizer As SynchronizationManager = GetSynchronizationManager(dependencyObject)
If synchronizer Is Nothing Then
synchronizer = New SynchronizationManager(selector)
SetSynchronizationManager(dependencyObject, synchronizer)
End If
synchronizer.StartSynchronizingList()
End If
End Sub
Private Class SynchronizationManager
Private ReadOnly _multiSelector As Selector
Private _synchronizer As TwoListSynchronizer
Friend Sub New(ByVal selector As Selector)
_multiSelector = selector
End Sub
Public Sub StartSynchronizingList()
Dim list As IList = GetSynchronizedSelectedItems(_multiSelector)
If list IsNot Nothing Then
_synchronizer = New TwoListSynchronizer(GetSelectedItemsCollection(_multiSelector), list)
_synchronizer.StartSynchronizing()
End If
End Sub
Public Sub StopSynchronizing()
_synchronizer.StopSynchronizing()
End Sub
Public Shared Function GetSelectedItemsCollection(ByVal selector As Selector) As IList
If TypeOf selector Is MultiSelector Then
Return (TryCast(selector, MultiSelector)).SelectedItems
ElseIf TypeOf selector Is ListBox Then
Return (TryCast(selector, ListBox)).SelectedItems
Else
Throw New InvalidOperationException("Target object has no SelectedItems property to bind.")
End If
End Function
End Class
End Class
@@ -0,0 +1,164 @@
Imports System.Collections.Specialized
Public Class TwoListSynchronizer
Implements IWeakEventListener
Private Shared ReadOnly DefaultConverter As IListItemConverter = New DoNothingListItemConverter()
Private ReadOnly _masterList As IList
Private ReadOnly _masterTargetConverter As IListItemConverter
Private ReadOnly _targetList As IList
Public Sub New(ByVal masterList As IList, ByVal targetList As IList, ByVal masterTargetConverter As IListItemConverter)
_masterList = masterList
_targetList = targetList
_masterTargetConverter = masterTargetConverter
End Sub
Public Sub New(ByVal masterList As IList, ByVal targetList As IList)
Me.New(masterList, targetList, DefaultConverter)
End Sub
Private Delegate Sub ChangeListAction(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
Public Sub StartSynchronizing()
ListenForChangeEvents(_masterList)
ListenForChangeEvents(_targetList)
SetListValuesFromSource(_masterList, _targetList, New Converter(Of Object, Object)(AddressOf ConvertFromMasterToTarget))
If Not TargetAndMasterCollectionsAreEqual() Then
SetListValuesFromSource(_targetList, _masterList, New Converter(Of Object, Object)(AddressOf ConvertFromTargetToMaster))
End If
End Sub
Public Sub StopSynchronizing()
StopListeningForChangeEvents(_masterList)
StopListeningForChangeEvents(_targetList)
End Sub
Public Function ReceiveWeakEvent(ByVal managerType As Type, ByVal sender As Object, ByVal e As EventArgs) As Boolean Implements IWeakEventListener.ReceiveWeakEvent
HandleCollectionChanged(TryCast(sender, IList), TryCast(e, NotifyCollectionChangedEventArgs))
Return True
End Function
Protected Sub ListenForChangeEvents(ByVal list As IList)
If TypeOf list Is INotifyCollectionChanged Then
CollectionChangedEventManager.AddListener(TryCast(list, INotifyCollectionChanged), Me)
End If
End Sub
Protected Sub StopListeningForChangeEvents(ByVal list As IList)
If TypeOf list Is INotifyCollectionChanged Then
CollectionChangedEventManager.RemoveListener(TryCast(list, INotifyCollectionChanged), Me)
End If
End Sub
Private Sub AddItems(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
Dim itemCount As Integer = e.NewItems.Count
For i As Integer = 0 To itemCount - 1
Dim insertionPoint As Integer = e.NewStartingIndex + i
If insertionPoint > list.Count Then
list.Add(converter(e.NewItems(i)))
Else
list.Insert(insertionPoint, converter(e.NewItems(i)))
End If
Next
End Sub
Private Function ConvertFromMasterToTarget(ByVal masterListItem As Object) As Object
Return If(_masterTargetConverter Is Nothing, masterListItem, _masterTargetConverter.Convert(masterListItem))
End Function
Private Function ConvertFromTargetToMaster(ByVal targetListItem As Object) As Object
Return If(_masterTargetConverter Is Nothing, targetListItem, _masterTargetConverter.ConvertBack(targetListItem))
End Function
Private Sub HandleCollectionChanged(ByVal sender As Object, ByVal e As NotifyCollectionChangedEventArgs)
Dim sourceList As IList = TryCast(sender, IList)
Select Case e.Action
Case NotifyCollectionChangedAction.Add
PerformActionOnAllLists(AddressOf AddItems, sourceList, e)
Case NotifyCollectionChangedAction.Move
PerformActionOnAllLists(AddressOf MoveItems, sourceList, e)
Case NotifyCollectionChangedAction.Remove
PerformActionOnAllLists(AddressOf RemoveItems, sourceList, e)
Case NotifyCollectionChangedAction.Replace
PerformActionOnAllLists(AddressOf ReplaceItems, sourceList, e)
Case NotifyCollectionChangedAction.Reset
UpdateListsFromSource(TryCast(sender, IList))
Case Else
End Select
End Sub
Private Sub MoveItems(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
RemoveItems(list, e, converter)
AddItems(list, e, converter)
End Sub
Private Sub PerformActionOnAllLists(ByVal action As ChangeListAction, ByVal sourceList As IList, ByVal collectionChangedArgs As NotifyCollectionChangedEventArgs)
If sourceList Is _masterList Then
PerformActionOnList(_targetList, action, collectionChangedArgs, New Converter(Of Object, Object)(AddressOf ConvertFromMasterToTarget))
Else
PerformActionOnList(_masterList, action, collectionChangedArgs, New Converter(Of Object, Object)(AddressOf ConvertFromTargetToMaster))
End If
End Sub
Private Sub PerformActionOnList(ByVal list As IList, ByVal action As ChangeListAction, ByVal collectionChangedArgs As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
StopListeningForChangeEvents(list)
action(list, collectionChangedArgs, converter)
ListenForChangeEvents(list)
End Sub
Private Sub RemoveItems(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
If e.OldItems.Count = 1 AndAlso e.OldStartingIndex <= list.Count - 1 Then
list.RemoveAt(e.OldStartingIndex)
Else
For Each Item In e.OldItems
list.Remove(Item)
Next
End If
End Sub
Private Sub ReplaceItems(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
RemoveItems(list, e, converter)
AddItems(list, e, converter)
End Sub
Private Sub SetListValuesFromSource(ByVal sourceList As IList, ByVal targetList As IList, ByVal converter As Converter(Of Object, Object))
StopListeningForChangeEvents(targetList)
targetList.Clear()
For Each o As Object In sourceList
targetList.Add(converter(o))
Next
ListenForChangeEvents(targetList)
End Sub
Private Function TargetAndMasterCollectionsAreEqual() As Boolean
Return _masterList.Cast(Of Object)().SequenceEqual(_targetList.Cast(Of Object)().[Select](Function(item) ConvertFromTargetToMaster(item)))
End Function
Private Sub UpdateListsFromSource(ByVal sourceList As IList)
If sourceList Is _masterList Then
SetListValuesFromSource(_masterList, _targetList, New Converter(Of Object, Object)(AddressOf ConvertFromMasterToTarget))
Else
SetListValuesFromSource(_targetList, _masterList, New Converter(Of Object, Object)(AddressOf ConvertFromTargetToMaster))
End If
End Sub
Friend Class DoNothingListItemConverter
Implements IListItemConverter
Public Function Convert(ByVal masterListItem As Object) As Object Implements IListItemConverter.Convert
Return masterListItem
End Function
Public Function ConvertBack(ByVal targetListItem As Object) As Object Implements IListItemConverter.ConvertBack
Return targetListItem
End Function
End Class
End Class
@@ -0,0 +1,946 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4BD87FB8-9D12-46E3-ABCB-6576415BCE9A}</ProjectGuid>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
<OutputType>WinExe</OutputType>
<RootNamespace>EgtBEAMWALL.Optimizer</RootNamespace>
<AssemblyName>EgtBEAMWALL.Optimizer</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<MyType>Custom</MyType>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x86\Debug\</OutputPath>
<DocumentationFile>EgtBEAMWALL.Optimizer.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x86\Release\</OutputPath>
<DocumentationFile>EgtBEAMWALL.Optimizer.xml</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="EgtBEAMWALL.Core">
<HintPath>..\EgtBEAMWALL.Core\bin\Debug\EgtBEAMWALL.Core.dll</HintPath>
</Reference>
<Reference Include="EgtBEAMWALL.DataLayer">
<HintPath>..\EgtBEAMWALL.DataLayer\bin\Debug\EgtBEAMWALL.DataLayer.dll</HintPath>
</Reference>
<Reference Include="EgtUILib">
<HintPath>..\ExtLibs\EgtUILib.dll</HintPath>
</Reference>
<Reference Include="EgtWPFLib5">
<HintPath>..\ExtLibs\EgtWPFLib5.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="PresentationFramework.Aero2" />
<Reference Include="System.ComponentModel" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing.Design" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Management" />
<Reference Include="System.Numerics" />
<Reference Include="System.Security" />
<Reference Include="System.Transactions" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="Windows">
<HintPath>..\..\..\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.22000.0\Windows.winmd</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System.Net.Http" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="Application.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="AboutBoxWindow\AboutBoxV.xaml.vb">
<DependentUpon>AboutBoxV.xaml</DependentUpon>
</Compile>
<Compile Include="AddFeatureWnd\AddFeatureWndVM.vb" />
<Compile Include="AddFeatureWnd\NewAddFeatureWndV.xaml.vb">
<DependentUpon>NewAddFeatureWndV.xaml</DependentUpon>
</Compile>
<Compile Include="AddPartWnd\AddPartWndVM.vb" />
<Compile Include="AddPartWnd\OnlyProdAddPartWndV.xaml.vb">
<DependentUpon>OnlyProdAddPartWndV.xaml</DependentUpon>
</Compile>
<Compile Include="AddRawPartWnd\AddRawPartWndVM.vb" />
<Compile Include="AddRawPartWnd\OnlyProdAddRawPartWndV.xaml.vb">
<DependentUpon>OnlyProdAddRawPartWndV.xaml</DependentUpon>
</Compile>
<Compile Include="AddSectionXMaterialWnd\AddSectionXMaterialWndV.xaml.vb">
<DependentUpon>AddSectionXMaterialWndV.xaml</DependentUpon>
</Compile>
<Compile Include="AddSectionXMaterialWnd\AddSectionXMaterialWndVM.vb" />
<Compile Include="Application.xaml.vb">
<DependentUpon>Application.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="NestingRunningWnd\NestingRunningWndVM.vb" />
<Compile Include="NestingRunningWnd\OnlyProdNestingRunningWndV.xaml.vb">
<DependentUpon>OnlyProdNestingRunningWndV.xaml</DependentUpon>
</Compile>
<Compile Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogVM.vb" />
<Compile Include="OnlyProdManager\OnlyProdManagerV.vb" />
<Compile Include="OnlyProdManager\OnlyProdManagerVM.vb" />
<Compile Include="OnlyProdProject\OnlyProdProjectV.xaml.vb">
<DependentUpon>OnlyProdProjectV.xaml</DependentUpon>
</Compile>
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogVM.vb" />
<Compile Include="OptimizePanel\OnlyProdOptimizePanelV.xaml.vb">
<DependentUpon>OnlyProdOptimizePanelV.xaml</DependentUpon>
</Compile>
<Compile Include="OptimizePanel\OptimizePanelVM.vb" />
<Compile Include="PartManager\OnlyProdPartManagerV.xaml.vb">
<DependentUpon>OnlyProdPartManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="PartManager\PartManagerVM.vb" />
<Compile Include="PartParametersWnd\PartParametersWndV.xaml.vb">
<DependentUpon>PartParametersWndV.xaml</DependentUpon>
</Compile>
<Compile Include="PartParametersWnd\PartParametersWndVM.vb" />
<Compile Include="PdfViewer\PdfViewer.xaml.vb">
<DependentUpon>PdfViewer.xaml</DependentUpon>
</Compile>
<Compile Include="PdfViewer\PDFViewerVM.vb" />
<Compile Include="ProjectFileVM\ProdFileVM.vb" />
<Compile Include="ProjectFileVM\ProjFileVM.vb" />
<Compile Include="ProjectManager\ProjectManagerVM.vb" />
<Compile Include="ProjectTypeWnd\OnlyProdProjectTypeWndV.xaml.vb">
<DependentUpon>OnlyProdProjectTypeWndV.xaml</DependentUpon>
</Compile>
<Compile Include="ProjectTypeWnd\ProjectTypeWndV.xaml.vb">
<DependentUpon>ProjectTypeWndV.xaml</DependentUpon>
</Compile>
<Compile Include="ProjectTypeWnd\ProjectTypeWndVM.vb" />
<Compile Include="Project\ProjectVM.vb" />
<Compile Include="RawPartManager\OnlyProdRawPartManagerV.xaml.vb">
<DependentUpon>OnlyProdRawPartManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="RawPartManager\RawPartManagerVM.vb" />
<Compile Include="RawPartManager\RawPartManagerWndV.xaml.vb">
<DependentUpon>RawPartManagerWndV.xaml</DependentUpon>
</Compile>
<Compile Include="SceneHost\MySceneHostVM.vb" />
<Compile Include="SceneHost\SceneHostV.xaml.vb">
<DependentUpon>SceneHostV.xaml</DependentUpon>
</Compile>
<Compile Include="SetUp\SetUpSupportClass.vb" />
<Compile Include="SetUp\SetUpV.xaml.vb">
<DependentUpon>SetUpV.xaml</DependentUpon>
</Compile>
<Compile Include="SetUp\SetUpVM.vb" />
<Compile Include="ShowBeamPanel\OnlyProdShowBeamPanelV.xaml.vb">
<DependentUpon>OnlyProdShowBeamPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="ShowBeamPanel\ShowBeamPanelVM.vb" />
<Compile Include="ShowPanel\OnlyProdShowPanelV.xaml.vb">
<DependentUpon>OnlyProdShowPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="SpecialPanel\OnlyProdSpecialPanelV.xaml.vb">
<DependentUpon>OnlyProdSpecialPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="SpecialPanel\SpecialPanelVM.vb" />
<Compile Include="StatisticsTimePanel\OnlyProdStatisticsTimePanelV.xaml.vb">
<DependentUpon>OnlyProdStatisticsTimePanelV.xaml</DependentUpon>
</Compile>
<Compile Include="StatisticsTimePanel\StatisticsTimePanelVM.vb" />
<Compile Include="StatisticsWnd\OptimizerStatisticsWndV.xaml.vb">
<DependentUpon>OptimizerStatisticsWndV.xaml</DependentUpon>
</Compile>
<Compile Include="Statistics\OnlyProdOptimizerStatisticsV.xaml.vb">
<DependentUpon>OnlyProdOptimizerStatisticsV.xaml</DependentUpon>
</Compile>
<Compile Include="Statistics\OnlyProdPDFEditorV.xaml.vb">
<DependentUpon>OnlyProdPDFEditorV.xaml</DependentUpon>
</Compile>
<Compile Include="Statistics\OnlyProdStatisticsV.xaml.vb">
<DependentUpon>OnlyProdStatisticsV.xaml</DependentUpon>
</Compile>
<Compile Include="Statistics\PDFEditorVM.vb" />
<Compile Include="Statistics\PDFHelper.vb" />
<Compile Include="Statistics\StatisticsUtility.vb" />
<Compile Include="Statistics\StatisticsVM.vb" />
<Compile Include="StatusBar\MyStatusBarVM.vb" />
<Compile Include="StatusBar\StatusBarV.xaml.vb">
<DependentUpon>StatusBarV.xaml</DependentUpon>
</Compile>
<Compile Include="StrategyManagerWnd\StrategyManagerWndV.xaml.vb">
<DependentUpon>StrategyManagerWndV.xaml</DependentUpon>
</Compile>
<Compile Include="StrategyManagerWnd\StrategyManagerWndVM.vb" />
<Compile Include="SupervisorCommThread\SupervisorComm.vb" />
<Compile Include="SupervisorCommThread\SupervisorCommThread.vb" />
<Compile Include="ToolsDbWindow\MyToolDbWindowVM.vb" />
<Compile Include="ToolsDbWindow\ToolsUpdate.vb" />
<Compile Include="UpdateBTLWnd\OnlyProdUpdateBTLWndV.xaml.vb">
<DependentUpon>OnlyProdUpdateBTLWndV.xaml</DependentUpon>
</Compile>
<Compile Include="UpdateBTLWnd\OnlyProdUpdateOrAppendWndV.xaml.vb">
<DependentUpon>OnlyProdUpdateOrAppendWndV.xaml</DependentUpon>
</Compile>
<Compile Include="UpdateBTLWnd\UpdateBTLWndV.xaml.vb">
<DependentUpon>UpdateBTLWndV.xaml</DependentUpon>
</Compile>
<Compile Include="UpdateBTLWnd\UpdateBTLWndVM.vb" />
<Compile Include="UpdateBTLWnd\UpdateOrAppendWndV.xaml.vb">
<DependentUpon>UpdateOrAppendWndV.xaml</DependentUpon>
</Compile>
<Compile Include="UpdateBTLWnd\UpdateOrAppendWndVM.vb" />
<Compile Include="Utility\Configuration.vb" />
<Compile Include="Utility\CurrentMachine.vb" />
<Compile Include="Utility\DbControllers.vb" />
<Compile Include="Utility\Dictionary.xaml.vb">
<DependentUpon>Dictionary.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\DisableModifiedMgr.vb" />
<Compile Include="Utility\LuaExec.vb" />
<Compile Include="Utility\MachParamIniFile.vb" />
<Compile Include="Utility\Map.vb" />
<Compile Include="Utility\PartsObservableCollection.vb" />
<Compile Include="Utility\SectionXMaterialToBeAdded.vb" />
<Compile Include="Utility\Statistic_Messages.vb" />
<Compile Include="Utility\TextBlockUtils.vb" />
<Compile Include="Utility\TreeViewItemBase.vb" />
<Compile Include="ViewPanel\OnlyProdViewPanelV.xaml.vb">
<DependentUpon>OnlyProdViewPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="WarehouseWnd\OnlyProdWarehouseWndV.xaml.vb">
<DependentUpon>OnlyProdWarehouseWndV.xaml</DependentUpon>
</Compile>
<Compile Include="WarehouseWnd\WarehouseHelper.vb" />
<Compile Include="WarehouseWnd\WarehouseWndVM.vb" />
</ItemGroup>
<ItemGroup>
<Import Include="System.Threading.Tasks" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Diagnostics" />
<Import Include="System.Windows" />
<Import Include="System.Windows.Controls" />
<Import Include="System.Windows.Data" />
<Import Include="System.Windows.Documents" />
<Import Include="System.Windows.Input" />
<Import Include="System.Windows.Shapes" />
<Import Include="System.Windows.Media" />
<Import Include="System.Windows.Media.Imaging" />
<Import Include="System.Windows.Navigation" />
</ItemGroup>
<ItemGroup>
<Compile Include="BlockedWnd\BlockedWndV.xaml.vb">
<DependentUpon>BlockedWndV.xaml</DependentUpon>
</Compile>
<Compile Include="BlockedWnd\BlockedWndVM.vb" />
<Compile Include="BTLDataWnd\BTLDataWndV.xaml.vb">
<DependentUpon>BTLDataWndV.xaml</DependentUpon>
</Compile>
<Compile Include="BTLDataWnd\BTLDataWndVM.vb" />
<Compile Include="BTLPartManager\BTLPartManagerVM.vb" />
<Compile Include="BTLPartManager\OnlyProdBTLPartManagerV.xaml.vb">
<DependentUpon>OnlyProdBTLPartManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="BTLViewModel\BTLFeatureVM.vb" />
<Compile Include="BTLViewModel\BTLParamVM.vb" />
<Compile Include="BTLViewModel\BTLPartVM.vb" />
<Compile Include="BTLViewModel\BTLStructureVM.vb" />
<Compile Include="CALCPanel\CALCPanelVM.vb" />
<Compile Include="CALCPanel\OnlyProdCalcPanelV.xaml.vb">
<DependentUpon>OnlyProdCalcPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="ChangeMaterialWnd\ChangeMaterialWndV.xaml.vb">
<DependentUpon>ChangeMaterialWndV.xaml</DependentUpon>
</Compile>
<Compile Include="ChangeMaterialWnd\ChangeMaterialWndVM.vb" />
<Compile Include="ChangeParameterWnd\ChangeParameterWndV.xaml.vb">
<DependentUpon>ChangeParameterWndV.xaml</DependentUpon>
</Compile>
<Compile Include="ChangeParameterWnd\ChangeParameterWndVM.vb" />
<Compile Include="ConfigurationPage\ConfigurationPageVM.vb" />
<Compile Include="ConfigurationPage\OnlyProdCheckVersionV.xaml.vb">
<DependentUpon>OnlyProdCheckVersionV.xaml</DependentUpon>
</Compile>
<Compile Include="ConfigurationPage\OnlyProdConfigurationPageV.xaml.vb">
<DependentUpon>OnlyProdConfigurationPageV.xaml</DependentUpon>
</Compile>
<Compile Include="Constants\ConstWarehouseIni.vb" />
<Compile Include="DataGridMultiselectManaging\IListItemConverter.vb" />
<Compile Include="DataGridMultiselectManaging\MultiSelectorBehaviours.vb" />
<Compile Include="DataGridMultiselectManaging\TwoListSynchronizer.vb" />
<Compile Include="FeatureListManager\FeatureListManagerVM.vb" />
<Compile Include="FeatureListManager\OnlyProdFeatureListManagerV.xaml.vb">
<DependentUpon>OnlyProdFeatureListManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="FeatureManager\FeatureManagerVM.vb" />
<Compile Include="FeatureManager\OnlyProdFeatureManagerV.xaml.vb">
<DependentUpon>OnlyProdFeatureManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="FreeContourInput\FreeContourInputVM.vb" />
<Compile Include="FreeContourInput\OnlyProdFreeContourInputV.xaml.vb">
<DependentUpon>OnlyProdFreeContourInputV.xaml</DependentUpon>
</Compile>
<Compile Include="FreeContourManager\FreeContourManagerVM.vb" />
<Compile Include="FreeContourManager\OnlyProdFreeContourManagerV.xaml.vb">
<DependentUpon>OnlyProdFreeContourManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="InputPwdWnd\InputPwdWndVM.vb" />
<Compile Include="InputPwdWnd\OnlyProdInputPwdWndV.xaml.vb">
<DependentUpon>OnlyProdInputPwdWndV.xaml</DependentUpon>
</Compile>
<Compile Include="InstrumentPanel\MyInstrumentPanelVM.vb" />
<Compile Include="InstrumentPanel\OnlyProdInstrumentPanelV.xaml.vb">
<DependentUpon>OnlyProdInstrumentPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\BTLDataV.xaml.vb">
<DependentUpon>BTLDataV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\BTLPartListVM.vb" />
<Compile Include="ItemParamList\DuploQParameterListVM.vb" />
<Compile Include="ItemParamList\FeatureInPartInRawPartListVM.vb" />
<Compile Include="ItemParamList\FeatureListVM.vb" />
<Compile Include="ItemParamList\OnlyProdBTLPartListV.xaml.vb">
<DependentUpon>OnlyProdBTLPartListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdFeatureInPartInRawPartListV.xaml.vb">
<DependentUpon>OnlyProdFeatureInPartInRawPartListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdFeatureListV.xaml.vb">
<DependentUpon>OnlyProdFeatureListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdPartInRawPartListV.xaml.vb">
<DependentUpon>OnlyProdPartInRawPartListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdPParameterListV.xaml.vb">
<DependentUpon>OnlyProdPParameterListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdQParameterListProdV.xaml.vb">
<DependentUpon>OnlyProdQParameterListProdV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdQParameterListV.xaml.vb">
<DependentUpon>OnlyProdQParameterListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdRawPartListV.xaml.vb">
<DependentUpon>OnlyProdRawPartListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\PartInRawPartListVM.vb" />
<Compile Include="ItemParamList\PartParametersV.xaml.vb">
<DependentUpon>PartParametersV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\PartParametersVM.vb" />
<Compile Include="ItemParamList\PParameterListVM.vb" />
<Compile Include="ItemParamList\QBTLParamVM.vb" />
<Compile Include="ItemParamList\QParameterListVM.vb" />
<Compile Include="ItemParamList\QParamListV.xaml.vb">
<DependentUpon>QParamListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\RawPartListVM.vb" />
<Compile Include="LeftPanel\LeftPanelVM.vb" />
<Compile Include="LeftPanel\OnlyProdLeftPanelV.xaml.vb">
<DependentUpon>OnlyProdLeftPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
<Compile Include="MachGroupPanel\MyMachGroupVM.vb" />
<Compile Include="MachGroupPanel\PartVM.vb" />
<Compile Include="MachinePanel\MachinePanelVM.vb" />
<Compile Include="MacroFeatureWnd\MacroFeatureWndVM.vb" />
<Compile Include="MacroFeatureWnd\NewMacroFeatureWnd.xaml.vb">
<DependentUpon>NewMacroFeatureWnd.xaml</DependentUpon>
</Compile>
<Compile Include="MainMenu\MainMenuVM.vb" />
<Compile Include="MainMenu\OnlyProdMainMenuV.xaml.vb">
<DependentUpon>OnlyProdMainMenuV.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow\MainWindowM.vb" />
<Compile Include="MainWindow\MainWindowVM.vb" />
<Compile Include="MainWindow\OnlyProdMainWindowV.xaml.vb">
<DependentUpon>OnlyProdMainWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="MovePartInRawPartWnd\MovePartInRawPartWndVM.vb" />
<Compile Include="MovePartInRawPartWnd\OnlyProdMovePartInRawPartWndV.xaml.vb">
<DependentUpon>OnlyProdMovePartInRawPartWndV.xaml</DependentUpon>
</Compile>
<Compile Include="MultiCopyRawPartWnd\MultiCopyRawPartWndV.xaml.vb">
<DependentUpon>MultiCopyRawPartWndV.xaml</DependentUpon>
</Compile>
<Compile Include="MultiCopyRawPartWnd\MultiCopyRawPartWndVM.vb" />
<Compile Include="My Project\AssemblyInfo.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="My Project\MyExtensions\MyWpfExtension.vb">
<VBMyExtensionTemplateID>Microsoft.VisualBasic.WPF.MyExtension</VBMyExtensionTemplateID>
<VBMyExtensionTemplateVersion>1.0.0.0</VBMyExtensionTemplateVersion>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
</EmbeddedResource>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Page Include="AboutBoxWindow\AboutBoxV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="AddFeatureWnd\NewAddFeatureWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="AddPartWnd\OnlyProdAddPartWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="AddRawPartWnd\OnlyProdAddRawPartWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="AddSectionXMaterialWnd\AddSectionXMaterialWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="BlockedWnd\BlockedWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="BTLDataWnd\BTLDataWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="BTLPartManager\OnlyProdBTLPartManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="CALCPanel\OnlyProdCalcPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ChangeMaterialWnd\ChangeMaterialWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ChangeParameterWnd\ChangeParameterWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ConfigurationPage\OnlyProdCheckVersionV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ConfigurationPage\OnlyProdConfigurationPageV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="FeatureListManager\OnlyProdFeatureListManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="FeatureManager\OnlyProdFeatureManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="FreeContourInput\OnlyProdFreeContourInputV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="FreeContourManager\OnlyProdFreeContourManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="InputPwdWnd\OnlyProdInputPwdWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="InstrumentPanel\OnlyProdInstrumentPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\BTLDataV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdBTLPartListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdFeatureInPartInRawPartListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdFeatureListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdPartInRawPartListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdPParameterListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdQParameterListProdV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdQParameterListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdRawPartListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\PartParametersV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\QParamListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="LeftPanel\OnlyProdLeftPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MacroFeatureWnd\NewMacroFeatureWnd.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainMenu\OnlyProdMainMenuV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainWindow\OnlyProdMainWindowV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MovePartInRawPartWnd\OnlyProdMovePartInRawPartWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MultiCopyRawPartWnd\MultiCopyRawPartWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="NestingRunningWnd\OnlyProdNestingRunningWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OnlyProdManager\OnlyProdManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OnlyProdProject\OnlyProdProjectV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OptimizePanel\OnlyProdOptimizePanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="PartManager\OnlyProdPartManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="PartParametersWnd\PartParametersWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="PdfViewer\PdfViewer.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ProjectTypeWnd\OnlyProdProjectTypeWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ProjectTypeWnd\ProjectTypeWndV.xaml">
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="RawPartManager\OnlyProdRawPartManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="RawPartManager\RawPartManagerWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SceneHost\SceneHostV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SetUp\SetUpV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ShowBeamPanel\OnlyProdShowBeamPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ShowPanel\OnlyProdShowPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SpecialPanel\OnlyProdSpecialPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="StatisticsTimePanel\OnlyProdStatisticsTimePanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="StatisticsWnd\OptimizerStatisticsWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Statistics\OnlyProdOptimizerStatisticsV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Statistics\OnlyProdPDFEditorV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Statistics\OnlyProdStatisticsV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="StatusBar\StatusBarV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="StrategyManagerWnd\StrategyManagerWndV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UpdateBTLWnd\OnlyProdUpdateBTLWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UpdateBTLWnd\OnlyProdUpdateOrAppendWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UpdateBTLWnd\UpdateBTLWndV.xaml">
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="UpdateBTLWnd\UpdateOrAppendWndV.xaml">
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="Utility\Dictionary.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ViewPanel\OnlyProdViewPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="WarehouseWnd\OnlyProdWarehouseWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\AboutBoxImage.png" />
<Resource Include="Resources\AboutBox\EgalwareLogo.png" />
<Resource Include="Resources\CALCPanel\ChooseMachine.png" />
<Resource Include="Resources\CALCPanel\Edit.png" />
<Resource Include="Resources\CALCPanel\ResetCalc.png" />
<Resource Include="Resources\CALCPanel\Simulate.png" />
<Resource Include="Resources\CALCPanel\Verify.png" />
<Resource Include="Resources\CALCPanel\VerifyAll.png" />
<Resource Include="Resources\Configuration\MachiningsTable.png" />
<Resource Include="Resources\DrawPanel\AddPointCurve.png" />
<Resource Include="Resources\DrawPanel\ApproxCurve.png" />
<Resource Include="Resources\DrawPanel\Arc3P.png" />
<Resource Include="Resources\DrawPanel\ArcCSE.png" />
<Resource Include="Resources\DrawPanel\ArcFlip.png" />
<Resource Include="Resources\DrawPanel\ArcPDP.png" />
<Resource Include="Resources\DrawPanel\BreakCurve.png" />
<Resource Include="Resources\DrawPanel\Chamfer.png" />
<Resource Include="Resources\DrawPanel\ChangeColor.png" />
<Resource Include="Resources\DrawPanel\ChangeColorAlpha.png" />
<Resource Include="Resources\DrawPanel\ChangeLayer.png" />
<Resource Include="Resources\DrawPanel\ChangeStart.png" />
<Resource Include="Resources\DrawPanel\Circle3P.png" />
<Resource Include="Resources\DrawPanel\CircleCD.png" />
<Resource Include="Resources\DrawPanel\CircleCP.png" />
<Resource Include="Resources\DrawPanel\Delete.png" />
<Resource Include="Resources\DrawPanel\ExplodeCurve.png" />
<Resource Include="Resources\DrawPanel\ExplodeSurf.png" />
<Resource Include="Resources\DrawPanel\ExtendCurve.png" />
<Resource Include="Resources\DrawPanel\ExtractFacetLoops.png" />
<Resource Include="Resources\DrawPanel\ExtractLoops.png" />
<Resource Include="Resources\DrawPanel\ExtractSurfFacet.png" />
<Resource Include="Resources\DrawPanel\Extrude.png" />
<Resource Include="Resources\DrawPanel\Fillet.png" />
<Resource Include="Resources\DrawPanel\IntersectSurfSurf.png" />
<Resource Include="Resources\DrawPanel\InvertCurve.png" />
<Resource Include="Resources\DrawPanel\InvertSurf.png" />
<Resource Include="Resources\DrawPanel\JoinCurve.png" />
<Resource Include="Resources\DrawPanel\Line2P.png" />
<Resource Include="Resources\DrawPanel\LinearDimension.png" />
<Resource Include="Resources\DrawPanel\LinePDL.png" />
<Resource Include="Resources\DrawPanel\MergeSurf.png" />
<Resource Include="Resources\DrawPanel\Mirror.png" />
<Resource Include="Resources\DrawPanel\Mirror3D.png" />
<Resource Include="Resources\DrawPanel\ModifyCurve.png" />
<Resource Include="Resources\DrawPanel\ModifyText.png" />
<Resource Include="Resources\DrawPanel\Move.png" />
<Resource Include="Resources\DrawPanel\Offset.png" />
<Resource Include="Resources\DrawPanel\Plane.png" />
<Resource Include="Resources\DrawPanel\Point.png" />
<Resource Include="Resources\DrawPanel\Polygon.png" />
<Resource Include="Resources\DrawPanel\PolygonSide.png" />
<Resource Include="Resources\DrawPanel\Rectangle2P.png" />
<Resource Include="Resources\DrawPanel\RemoveColor.png" />
<Resource Include="Resources\DrawPanel\RemovePointCurve.png" />
<Resource Include="Resources\DrawPanel\Revolve.png" />
<Resource Include="Resources\DrawPanel\Rotate.png" />
<Resource Include="Resources\DrawPanel\Rotate3D.png" />
<Resource Include="Resources\DrawPanel\Ruled.png" />
<Resource Include="Resources\DrawPanel\Scale.png" />
<Resource Include="Resources\DrawPanel\Scale3D.png" />
<Resource Include="Resources\DrawPanel\Screw.png" />
<Resource Include="Resources\DrawPanel\SolidAddSurf.png" />
<Resource Include="Resources\DrawPanel\SolidIntersectSurf.png" />
<Resource Include="Resources\DrawPanel\SolidSubtractSurf.png" />
<Resource Include="Resources\DrawPanel\SplitCurve.png" />
<Resource Include="Resources\DrawPanel\Swept.png" />
<Resource Include="Resources\DrawPanel\Text.png" />
<Resource Include="Resources\DrawPanel\ThickCurve.png" />
<Resource Include="Resources\Egalware.ico" />
<Resource Include="Resources\EgtBEAMWALL.ico" />
<Resource Include="Resources\EgtDialog\Folder.png" />
<Resource Include="Resources\EgtDialog\New.png" />
<Resource Include="Resources\EgtDialog\Restore.png" />
<Resource Include="Resources\EgtDialog\Root.png" />
<Resource Include="Resources\EgtMessageBox\Asterisk.png" />
<Resource Include="Resources\EgtMessageBox\Error.png" />
<Resource Include="Resources\EgtMessageBox\Exclamation.png" />
<Resource Include="Resources\EgtMessageBox\Hand.png" />
<Resource Include="Resources\EgtMessageBox\Information.png" />
<Resource Include="Resources\EgtMessageBox\Question.png" />
<Resource Include="Resources\EgtMessageBox\Warning.png" />
<Resource Include="Resources\InstrumentPanel\Analyze.png" />
<Resource Include="Resources\InstrumentPanel\ChangeParam.png" />
<Resource Include="Resources\InstrumentPanel\GetDist.png" />
<Resource Include="Resources\InstrumentPanel\Ott.png" />
<Resource Include="Resources\InstrumentPanel\Statistics.png" />
<Resource Include="Resources\InstrumentPanel\Vis.png" />
<Resource Include="Resources\LeftPanel\AddFeature.png" />
<Resource Include="Resources\LeftPanel\AddPart.png" />
<Resource Include="Resources\LeftPanel\AddToRawPart.png" />
<Resource Include="Resources\LeftPanel\CopyFeature.png" />
<Resource Include="Resources\LeftPanel\CopyPart.png" />
<Resource Include="Resources\LeftPanel\MacroFeature.png" />
<Resource Include="Resources\LeftPanel\NewRawPart.png" />
<Resource Include="Resources\LeftPanel\NewRawPartAuto.png" />
<Resource Include="Resources\LeftPanel\RemoveFeature.png" />
<Resource Include="Resources\LeftPanel\RemovePart.png" />
<Resource Include="Resources\MainMenu\Send.png" />
<Resource Include="Resources\MovePartInRawPart\MoveLeftParts.png" />
<Resource Include="Resources\MovePartInRawPart\MoveRightParts.png" />
<Resource Include="Resources\OpenProjectFileDialog\Archived.png" />
<Resource Include="Resources\OptimizePanel\FlipRot.png" />
<Resource Include="Resources\OptimizePanel\UnlockFlip.png" />
<Resource Include="Resources\OptimizePanel\UnlockRotation.png" />
<Resource Include="Resources\OptimizePanel\Warehouse.png" />
<Resource Include="Resources\PartManager\Clock.png" />
<Resource Include="Resources\PartManager\LeftInvert.png" />
<Resource Include="Resources\PartManager\LeftRotate.png" />
<Resource Include="Resources\PartManager\Locked.old.png" />
<Resource Include="Resources\PartManager\Locked.png" />
<Resource Include="Resources\PartManager\RightInvert.png" />
<Resource Include="Resources\PartManager\RightRotate.png" />
<Resource Include="Resources\PartManager\Unlocked.old.png" />
<Resource Include="Resources\PartManager\Unlocked.png" />
<Resource Include="Resources\PDFEditor\Delete.png" />
<Resource Include="Resources\PDFEditor\MoveDown.png" />
<Resource Include="Resources\PDFEditor\MoveUp.png" />
<Resource Include="Resources\PDFEditor\PDFPreview.png" />
<Resource Include="Resources\PDFEditor\PrintPDF.png" />
<Resource Include="Resources\ProjectManager\AddProj.png" />
<Resource Include="Resources\ProjectManager\ExportProject.png" />
<Resource Include="Resources\ProjectManager\GoToProd.png" />
<Resource Include="Resources\ProjectManager\GoToProj.png" />
<Resource Include="Resources\ProjectManager\ImportBTL.png" />
<Resource Include="Resources\ProjectManager\ImportProject.png" />
<Resource Include="Resources\ProjectManager\New.png" />
<Resource Include="Resources\ProjectManager\Open.png" />
<Resource Include="Resources\ProjectManager\Options.png" />
<Resource Include="Resources\ProjectManager\Save.png" />
<Resource Include="Resources\ProjectManager\SaveAs.png" />
<Resource Include="Resources\ProjectManager\UpdateBTL.png" />
<Resource Include="Resources\ShowBeamPanel\ShowAll.png" />
<Resource Include="Resources\ShowBeamPanel\ShowBuilding.png" />
<Resource Include="Resources\ShowBeamPanel\ShowSolid.png" />
<Resource Include="Resources\ShowPanel\RenderingHL.png" />
<Resource Include="Resources\ShowPanel\RenderingSH.png" />
<Resource Include="Resources\ShowPanel\RenderingWF.png" />
<Resource Include="Resources\Statistics\CopyToClipboard.png" />
<Resource Include="Resources\Statistics\PrintPDF.png" />
<Resource Include="Resources\TopPanel\CopyRawPart.png" />
<Resource Include="Resources\TopPanel\MoveDownPart.png" />
<Resource Include="Resources\TopPanel\MovePartInRawPart.png" />
<Resource Include="Resources\TopPanel\MoveUpPart.png" />
<Resource Include="Resources\TopPanel\ProduceAllRawPart.png" />
<Resource Include="Resources\TopPanel\ProduceRawPart.png" />
<Resource Include="Resources\TopPanel\RemoveAllRawPart.png" />
<Resource Include="Resources\TopPanel\RemovePart.old.png" />
<Resource Include="Resources\TopPanel\RemovePart.png" />
<Resource Include="Resources\TopPanel\RemoveRawPart.png" />
<Resource Include="Resources\TopPanel\ReorderPart.png" />
<Resource Include="Resources\TreeView\Folder.png" />
<Resource Include="Resources\ViewPanel\LookFromBACK.png" />
<Resource Include="Resources\ViewPanel\LookFromBOTTOM.png" />
<Resource Include="Resources\ViewPanel\LookFromFRONT.png" />
<Resource Include="Resources\ViewPanel\LookFromISO_NE.png" />
<Resource Include="Resources\ViewPanel\LookFromISO_NW.png" />
<Resource Include="Resources\ViewPanel\LookFromISO_SE.png" />
<Resource Include="Resources\ViewPanel\LookFromISO_SW.png" />
<Resource Include="Resources\ViewPanel\LookFromLEFT.png" />
<Resource Include="Resources\ViewPanel\LookFromRIGHT.png" />
<Resource Include="Resources\ViewPanel\LookFromTOP.png" />
<Resource Include="Resources\ViewPanel\ZoomAll.png" />
<Resource Include="Resources\ViewPanel\ZoomIn.png" />
<Resource Include="Resources\ViewPanel\ZoomOut.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Behavior\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BouncyCastle">
<Version>1.8.5</Version>
</PackageReference>
<PackageReference Include="DotNetZip">
<Version>1.16.0</Version>
</PackageReference>
<PackageReference Include="EntityFramework">
<Version>6.4.4</Version>
</PackageReference>
<PackageReference Include="Google.Protobuf">
<Version>3.21.9</Version>
</PackageReference>
<PackageReference Include="K4os.Compression.LZ4.Streams">
<Version>1.3.5</Version>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.Contracts">
<Version>10.0.26100.1742</Version>
</PackageReference>
<PackageReference Include="MySql.Data.EntityFramework">
<Version>8.0.21</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
</PackageReference>
<PackageReference Include="NLog">
<Version>5.0.1</Version>
</PackageReference>
<PackageReference Include="PDFsharp-MigraDoc-wpf">
<Version>1.50.5147</Version>
</PackageReference>
<PackageReference Include="Portable.BouncyCastle">
<Version>1.9.0</Version>
</PackageReference>
<PackageReference Include="RestSharp">
<Version>111.2.0</Version>
</PackageReference>
<PackageReference Include="System.IO.Pipelines">
<Version>6.0.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.InteropServices.WindowsRuntime">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.WindowsRuntime.UI.Xaml">
<Version>4.6.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\Setting.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\LeftPanel\All_Filter.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\Cancel.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\Ok.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.OptimizerR32.exe
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.OptimizerD32.exe
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.OptimizerR64.exe
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.OptimizerD64.exe</PostBuildEvent>
</PropertyGroup>
</Project>
@@ -0,0 +1,36 @@
<StackPanel x:Class="FeatureListManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Orientation="Horizontal"
HorizontalAlignment="Right"
DataContext="{StaticResource FeatureListManagerVM}">
<Button Command="{Binding CopyFeature_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding CopyFeature_ToolTip}"
IsEnabled="{Binding CopyFeature_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/CopyFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding MacroFeature_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding MacroFeature_ToolTip}"
IsEnabled="{Binding MacroFeature_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/MacroFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddFeature_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding AddFeature_ToolTip}"
IsEnabled="{Binding AddFeature_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemoveFeature_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding RemoveFeature_ToolTip}"
IsEnabled="{Binding RemoveFeature_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/RemoveFeature.png" Stretch="Uniform"/>
</Button>
</StackPanel>
@@ -0,0 +1,3 @@
Public Class FeatureListManagerV
End Class
@@ -0,0 +1,357 @@
Imports EgtBEAMWALL.Core
Imports EgtUILib.EgtInterface
Imports EgtWPFLib5
Public Class FeatureListManagerVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Public ReadOnly Property ViewPage_Visibility As Visibility
Get
Return If(Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
Public ReadOnly Property PartIsSelected As Boolean
Get
Return Not IsNothing(Map.refProjectVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart)
End Get
End Property
Public ReadOnly Property FeatureIsSelected As Boolean
Get
Return PartIsSelected AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM)
End Get
End Property
Public ReadOnly Property CopyFeature_IsEnabled As Boolean
Get
Return PartIsSelected AndAlso FeatureIsSelected
End Get
End Property
Public ReadOnly Property MacroFeature_IsEnabled As Boolean
Get
Return PartIsSelected AndAlso FeatureIsSelected
End Get
End Property
Public ReadOnly Property AddFeature_IsEnabled As Boolean
Get
Return PartIsSelected AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not Map.refProjectVM.BTLStructureVM.SelBTLPartsCnt > 1
End Get
End Property
Public ReadOnly Property RemoveFeature_IsEnabled As Boolean
Get
Return PartIsSelected AndAlso FeatureIsSelected
End Get
End Property
Private m_cmdCopyFeature As ICommand
Private m_cmdMacroFeature As ICommand
Private m_cmdAddFeature As ICommand
Private m_cmdRemoveFeature As ICommand
#End Region ' Fields & Properties
#Region "Messages"
Public ReadOnly Property CopyFeature_ToolTip As String
Get
Return EgtMsg(61908)
End Get
End Property
Public ReadOnly Property MacroFeature_ToolTip As String
Get
Return EgtMsg(61909)
End Get
End Property
Public ReadOnly Property AddFeature_ToolTip As String
Get
Return EgtMsg(61910)
End Get
End Property
Public ReadOnly Property RemoveFeature_ToolTip As String
Get
Return EgtMsg(61911)
End Get
End Property
#End Region ' Messages
#Region "CONSTRUCTOR"
Sub New()
Map.SetRefFeatureListManagerVM(Me)
End Sub
#End Region ' Constructor
#Region "METHODS"
Friend Sub UpdateView()
NotifyPropertyChanged(NameOf(ViewPage_Visibility))
End Sub
Friend Sub SetLeftPanelIsEnabled(bIsEnabled As Boolean)
NotifyPropertyChanged(NameOf(CopyFeature_IsEnabled))
NotifyPropertyChanged(NameOf(AddFeature_IsEnabled))
NotifyPropertyChanged(NameOf(RemoveFeature_IsEnabled))
NotifyPropertyChanged(NameOf(MacroFeature_IsEnabled))
End Sub
Friend Sub PartShowAllChanged()
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 Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM) Then
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
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"
#Region "CopyFeature"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property CopyFeature_Command As ICommand
Get
If m_cmdCopyFeature Is Nothing Then
m_cmdCopyFeature = New Command(AddressOf CopyFeature)
End If
Return m_cmdCopyFeature
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub CopyFeature()
If IsNothing(ProjectManagerVM.CurrProj) Then Return
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart
If IsNothing(SelPart) Then Return
Dim SelFeature As BTLFeatureVM = SelPart.SelBTLFeatureVM
If IsNothing(SelFeature) Then Return
' creo copia
Dim NewFeature = SelFeature.Copy()
If Not IsNothing(NewFeature) Then
SelPart.SelBTLFeatureVM = Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList.FirstOrDefault(Function(x) x.BTLFeatureM Is NewFeature)
MyMachGroupPanelM.SetDuploModified(SelPart.nPartId)
End If
SelPart.ResetCalcPart()
End Sub
#End Region ' CopyFeature
#Region "MacroFeature"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property MacroFeature_Command As ICommand
Get
If m_cmdMacroFeature Is Nothing Then
m_cmdMacroFeature = New Command(AddressOf MacroFeature)
End If
Return m_cmdMacroFeature
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub MacroFeature()
If IsNothing(ProjectManagerVM.CurrProj) Then Return
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Return
' apro finestra di creazione macro
Dim MacroFeatureWndVM As New MacroFeatureWndVM()
Dim NewMacroFeatureWnd As New NewMacroFeatureWnd(Application.Current.MainWindow, MacroFeatureWndVM)
If NewMacroFeatureWnd.ShowDialog() Then
End If
End Sub
#End Region ' MacroFeature
#Region "AddFeature"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property AddFeature_Command As ICommand
Get
If m_cmdAddFeature Is Nothing Then
m_cmdAddFeature = New Command(AddressOf AddFeature)
End If
Return m_cmdAddFeature
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub AddFeature(ByVal param As Object)
If IsNothing(ProjectManagerVM.CurrProj) Then Return
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Return
' apro finestra di definizione nuova feature
Dim AddFeatureWndVM As New AddFeatureWndVM()
Dim NewFeat As BTLFeatureM = Nothing
Dim nNewFeatureId As Integer = 0
Dim bMacroFlag As Boolean = False
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
End If
End Sub
#End Region ' AddFeature
#Region "RemoveFeature"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property RemoveFeature_Command As ICommand
Get
If m_cmdRemoveFeature Is Nothing Then
m_cmdRemoveFeature = New Command(AddressOf RemoveFeature)
End If
Return m_cmdRemoveFeature
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub RemoveFeature()
If IsNothing(ProjectManagerVM.CurrProj) Then Return
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Return
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then Return
If EgtBeamEraseProcess(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.nFeatureId) Then
MyMachGroupPanelM.SetDuploModified(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
' rimuovo dalla lista feature
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList.IndexOf(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM)
If Index = 0 Then
If Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList.Count > 0 Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM = Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList(0)
Else
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM = Nothing
End If
ElseIf Index = Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList.Count - 1 Then
If Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList.Count > 1 Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM = Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList.Count - 2)
Else
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM = Nothing
End If
Else
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM = Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList(Index - 1)
End If
Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList.RemoveAt(Index)
EgtDraw()
Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart()
End If
End Sub
#End Region ' RemoveFeature
#End Region ' Commands
End Class
@@ -0,0 +1,32 @@
<StackPanel x:Class="OnlyProdFeatureListManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{StaticResource FeatureListManagerVM}"
Style="{StaticResource OnlyProdFeatureListManager_StackPanel}">
<Button Command="{Binding CopyFeature_Command}"
ToolTip="{Binding CopyFeature_ToolTip}"
IsEnabled="{Binding CopyFeature_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/CopyFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding MacroFeature_Command}"
ToolTip="{Binding MacroFeature_ToolTip}"
IsEnabled="{Binding MacroFeature_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/MacroFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddFeature_Command}"
ToolTip="{Binding AddFeature_ToolTip}"
IsEnabled="{Binding AddFeature_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemoveFeature_Command}"
ToolTip="{Binding RemoveFeature_ToolTip}"
IsEnabled="{Binding RemoveFeature_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/RemoveFeature.png" Stretch="Uniform"/>
</Button>
</StackPanel>
@@ -0,0 +1,3 @@
Public Class OnlyProdFeatureListManagerV
End Class
@@ -0,0 +1,55 @@
<StackPanel x:Class="FeatureManagerV"
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.Optimizer"
Orientation="Horizontal"
Height="32">
<TextBlock Text="{Binding Face_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding Tag.SIDEList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelSIDE, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureComboBox}"/>
<TextBlock Text="{Binding Group_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding Tag.GRPList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelGRP, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureComboBox}"/>
<TextBlock Text="{Binding Priority_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Priority_Visibility}"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sPriority,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}},
UpdateSourceTrigger=Explicit}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Priority_Visibility}"
Width="45"/>
<TextBlock Text="{Binding Tag.sName, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding Tag.VARIANTList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelVARIANT, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Variant_Visibility}"
Style="{StaticResource FeatureComboBox}"/>
<Button Content="{Binding Edit_Msg}"
Command="{Binding Tag.Edit_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Visibility="{Binding Tag.Edit_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
IsEnabled="{Binding Edit_IsEnabled}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding Save_Msg}"
Command="{Binding Tag.Save_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding Cancel_Msg}"
Command="{Binding Tag.Cancel_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</StackPanel>
@@ -0,0 +1,3 @@
Public Class FeatureManagerV
End Class
@@ -0,0 +1,115 @@
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
Public Class FeatureManagerVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Private m_FeatureManager_IsEnabled As Boolean = True
Public Property FeatureManager_IsEnabled As Boolean
Get
Return m_FeatureManager_IsEnabled
End Get
Set(value As Boolean)
m_FeatureManager_IsEnabled = value
End Set
End Property
Private m_Variant_Visibility As Visibility = Visibility.Collapsed
Public ReadOnly Property Variant_Visibility As Visibility
Get
Return m_Variant_Visibility
End Get
End Property
Public Sub SetVariant_Visibility(value As Visibility)
m_Variant_Visibility = value
NotifyPropertyChanged(NameOf(Variant_Visibility))
End Sub
Public ReadOnly Property Edit_IsEnabled As Boolean
Get
Return m_FeatureManager_IsEnabled AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso
Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 AndAlso
Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLParts(0)) AndAlso
Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLParts(0).SelBTLFeatureVM) AndAlso
Map.refProjectVM.BTLStructureVM.SelBTLParts(0).SelBTLFeatureVM.BTLFeatureM.IsFreeContour() AndAlso
Map.refProjectVM.BTLStructureVM.SelBTLParts(0).SelBTLFeatureVM.bDO
End Get
End Property
Public ReadOnly Property Priority_Visibility As Visibility
Get
Return If(CurrentMachine.nType = Core.ConstBeam.MachineType.WALL AndAlso CurrentMachine.bIsEnabledPriority, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
#Region "Messages"
Public ReadOnly Property Face_Msg As String
Get
Return EgtMsg(61824)
End Get
End Property
Public ReadOnly Property Group_Msg As String
Get
Return EgtMsg(61825)
End Get
End Property
Public ReadOnly Property Priority_Msg As String
Get
Return EgtMsg(61895)
End Get
End Property
Public ReadOnly Property Edit_Msg As String
Get
Return EgtMsg(61826)
End Get
End Property
Public ReadOnly Property Save_Msg As String
Get
Return EgtMsg(61827)
End Get
End Property
Public ReadOnly Property Cancel_Msg As String
Get
Return EgtMsg(61828)
End Get
End Property
#End Region ' Messages
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTORS"
Sub New()
' imposto riferimento in Map
Map.SetRefFeatureManagerVM(Me)
End Sub
#End Region ' CONSTRUCTORS
#Region "METHODS"
Friend Sub SetFeatureManagerIsEnabled(bIsEnabled As Boolean)
m_FeatureManager_IsEnabled = bIsEnabled
NotifyPropertyChanged(NameOf(FeatureManager_IsEnabled))
NotifyPropertyChanged(NameOf(Edit_IsEnabled))
End Sub
Friend Sub SetEditIsEnabled()
' aggiorno stato abilitazione del bottone modifica free contour
NotifyPropertyChanged(NameOf(Edit_IsEnabled))
End Sub
#End Region ' METHODS
End Class
@@ -0,0 +1,70 @@
<Grid x:Class="OnlyProdFeatureManagerV"
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.Optimizer"
Margin="30,4,0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Expander Header="{Binding Face_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Width="80">
<ListBox ItemsSource="{Binding Tag.SIDEList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelSIDE, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureManager_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
</Expander>
<Expander Grid.Column="1"
Header="{Binding Group_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Width="80">
<ListBox ItemsSource="{Binding Tag.GRPList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelGRP, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureManager_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
</Expander>
<TextBlock Grid.Column="2"
Text="{Binding Priority_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Priority_Visibility}"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding Tag.sPriority,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}},
UpdateSourceTrigger=Explicit}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Priority_Visibility}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="4"
Text="{Binding Tag.sName, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
Style="{StaticResource OnlyProdFeatureManager_OnlyProd}"/>
<Button Grid.Column="5"
Content="{Binding Edit_Msg}"
Command="{Binding Tag.Edit_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
Visibility="{Binding Tag.Edit_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
IsEnabled="{Binding Edit_IsEnabled}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="6"
Content="{Binding Save_Msg}"
Command="{Binding Tag.Save_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="7"
Content="{Binding Cancel_Msg}"
Command="{Binding Tag.Cancel_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
</Grid>
@@ -0,0 +1,3 @@
Public Class OnlyProdFeatureManagerV
End Class
@@ -0,0 +1,46 @@
<UserControl x:Class="FreeContourInputV"
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"
Height="32">
<StackPanel Orientation="Horizontal">
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Style.Triggers>
<DataTrigger Binding="{Binding FocusTextBox}" Value="True">
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=PropertySearch}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<TextBlock Text="{Binding Message}"
Visibility="{Binding Message_Visibility}"
Style="{StaticResource OptionTextBlock}"/>
<TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}"
Width="200"
Visibility="{Binding Text_Visibility}" Margin="5,0,5,0"
Style="{StaticResource FreeContour_TextBox}">
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding Done_Command, UpdateSourceTrigger=PropertyChanged}"/>
<KeyBinding Key="S" Modifiers="Control" Command="{Binding Show_Command}"/>
</TextBox.InputBindings>
</TextBox>
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
Visibility="{Binding Check_Visibility}" Margin="5,0,5,0"
VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
Visibility="{Binding Combo_Visibility}" Margin="5,0,5,0" Style="{x:Null}"/>
<Grid Margin="5,0,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Command="{Binding Show_Command}" Visibility="{Binding ShowBtn_Visibility}"
Content="{Binding ShowMsg}" Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Command="{Binding Done_Command}" Visibility="{Binding DoneBtn_Visibility}"
Grid.Column="1"
Content="{Binding OkMsg}" Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</StackPanel>
</UserControl>
@@ -0,0 +1,3 @@
Public Class FreeContourInputV
End Class
@@ -0,0 +1,335 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtWPFLib5
Public Class FreeContourInputVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Private m_Title As String
Public Property Title As String
Get
Return m_Title
End Get
Set(value As String)
m_Title = value
NotifyPropertyChanged(NameOf(Title))
End Set
End Property
' TextBlock fields
Private m_Message As String
Public Property Message As String
Get
Return m_Message
End Get
Set(value As String)
m_Message = value
NotifyPropertyChanged(NameOf(Message))
End Set
End Property
' TextBox fields
Private m_Text As String
Public Property Text As String
Get
Return m_Text
End Get
Set(value As String)
m_Text = value
'Map.refProjectVM.NotifyInputText(value)
NotifyPropertyChanged(NameOf(Text))
End Set
End Property
Private m_Text_Visibility As Visibility
Public Property Text_Visibility As Visibility
Get
Return m_Text_Visibility
End Get
Set(value As Visibility)
If value <> m_Text_Visibility Then
m_Text_Visibility = value
NotifyPropertyChanged(NameOf(Text_Visibility))
End If
End Set
End Property
Private m_Message_Visibility As Visibility
Public Property Message_Visibility As Visibility
Get
Return m_Message_Visibility
End Get
Set(value As Visibility)
If value <> m_Message_Visibility Then
m_Message_Visibility = value
NotifyPropertyChanged(NameOf(Message_Visibility))
End If
End Set
End Property
Private m_FocusTextBox As Boolean
Public Property FocusTextBox As Boolean
Get
Return m_FocusTextBox
End Get
Set(value As Boolean)
m_FocusTextBox = value
NotifyPropertyChanged(NameOf(FocusTextBox))
End Set
End Property
'CheckBox fields
Private m_CheckBoxText As String
Public Property CheckBoxText As String
Get
Return m_CheckBoxText
End Get
Set(value As String)
m_CheckBoxText = value
NotifyPropertyChanged(NameOf(CheckBoxText))
End Set
End Property
Private m_IsChecked As Boolean = False
Public Property IsChecked As Boolean
Get
Return m_IsChecked
End Get
Set(value As Boolean)
If value <> m_IsChecked Then
Map.refSceneHostVM.MainController.SetLastBoolean(value)
m_IsChecked = value
NotifyPropertyChanged(NameOf(IsChecked))
End If
End Set
End Property
Private m_Check_Visibility As Visibility
Public Property Check_Visibility As Visibility
Get
Return m_Check_Visibility
End Get
Set(value As Visibility)
If value <> m_Check_Visibility Then
m_Check_Visibility = value
NotifyPropertyChanged(NameOf(Check_Visibility))
End If
End Set
End Property
' ComboBox fields
Private m_ComboItemsList As New ObservableCollection(Of String)
Public Property ComboItemsList As ObservableCollection(Of String)
Get
Return m_ComboItemsList
End Get
Set(value As ObservableCollection(Of String))
m_ComboItemsList = value
NotifyPropertyChanged(NameOf(ComboItemsList))
End Set
End Property
Private m_ComboSelectedIndex As Integer
Public Property ComboSelectedIndex As Integer
Get
Return m_ComboSelectedIndex
End Get
Set(value As Integer)
Map.refSceneHostVM.MainController.SetLastInteger(value)
m_ComboSelectedIndex = value
NotifyPropertyChanged(NameOf(ComboSelectedIndex))
End Set
End Property
Private m_Combo_Visibility As Visibility
Public Property Combo_Visibility As Visibility
Get
Return m_Combo_Visibility
End Get
Set(value As Visibility)
If value <> m_Combo_Visibility Then
m_Combo_Visibility = value
NotifyPropertyChanged(NameOf(Combo_Visibility))
End If
End Set
End Property
' Buttons fields
Private m_ShowBtn_Visibility As Visibility
Public Property ShowBtn_Visibility As Visibility
Get
Return m_ShowBtn_Visibility
End Get
Set(value As Visibility)
m_ShowBtn_Visibility = value
NotifyPropertyChanged(NameOf(ShowBtn_Visibility))
End Set
End Property
Private m_DoneBtn_Visibility As Visibility
Public Property DoneBtn_Visibility As Visibility
Get
Return m_DoneBtn_Visibility
End Get
Set(value As Visibility)
m_DoneBtn_Visibility = value
NotifyPropertyChanged(NameOf(DoneBtn_Visibility))
End Set
End Property
' Commands definition
Private m_cmdShow As ICommand
Private m_cmdDone As ICommand
#Region "Messages"
Public ReadOnly Property ShowMsg As String
Get
Return EgtMsg(5364)
End Get
End Property
Public ReadOnly Property OkMsg As String
Get
Return EgtMsg(5365)
End Get
End Property
#End Region
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New()
' Creo riferimento a questa classe in EgtCAM5Map
Map.SetRefFreeContourInputVM(Me)
' nascondo input box
ResetInputBox()
End Sub
#End Region ' Constructor
#Region "METHODS"
Friend Sub ShowMessage(sTitle As String, sLabel As String)
Title = sTitle
If sLabel <> "" Then
Message = sLabel
Message_Visibility = Visibility.Visible
End If
End Sub
Friend Sub PrepareInputBox(sTitle As String, sLabel As String, sCheckLabel As String,
bShowCombo As Boolean, bShowBtn As Boolean)
Title = sTitle
If sLabel <> "" Then
Message = sLabel
Text = ""
Text_Visibility = Visibility.Visible
Message_Visibility = Visibility.Visible
End If
If bShowCombo Then
ComboItemsList.Clear()
Combo_Visibility = Visibility.Visible
End If
If bShowBtn Then
ShowBtn_Visibility = Visibility.Visible
End If
DoneBtn_Visibility = Visibility.Visible
FocusTextBox = True
End Sub
Friend Sub ResetInputBox()
Title = EgtMsg(5355)
Text_Visibility = Visibility.Collapsed
Message_Visibility = Visibility.Collapsed
Check_Visibility = Visibility.Collapsed
Combo_Visibility = Visibility.Collapsed
ShowBtn_Visibility = Visibility.Collapsed
DoneBtn_Visibility = Visibility.Collapsed
End Sub
Friend Function SetInputBoxText(sVal As String) As Boolean
Text = sVal
FocusTextBox = True
Return True
End Function
Friend Function ChangeInputBoxCheck() As Boolean
IsChecked = Not m_IsChecked
Return True
End Function
Friend Function SetInputBoxCheck(bCheck As Boolean) As Boolean
IsChecked = bCheck
Map.refSceneHostVM.MainController.SetLastBoolean(IsChecked)
Return True
End Function
Friend Function AddInputBoxCombo(sText As String, bSelected As Boolean) As Boolean
ComboItemsList.Add(sText)
If bSelected Then
ComboSelectedIndex = ComboItemsList.Count - 1
End If
Return True
End Function
#End Region ' METHODS
#Region "COMMANDS"
#Region "Show"
''' <summary>
''' Returns a command that do Point.
''' </summary>
Public ReadOnly Property Show_Command As ICommand
Get
If m_cmdShow Is Nothing Then
m_cmdShow = New Command(AddressOf Show)
End If
Return m_cmdShow
End Get
End Property
''' <summary>
''' Execute the Point. This method is invoked by the PointCommand.
''' </summary>
Public Sub Show(ByVal param As Object)
Map.refSceneHostVM.MainController.Show(m_Text)
End Sub
#End Region ' Show
#Region "Done"
''' <summary>
''' Returns a command that do Point.
''' </summary>
Public ReadOnly Property Done_Command As ICommand
Get
If m_cmdDone Is Nothing Then
m_cmdDone = New Command(AddressOf Done)
End If
Return m_cmdDone
End Get
End Property
''' <summary>
''' Execute the Point. This method is invoked by the PointCommand.
''' </summary>
Public Sub Done(ByVal param As Object)
If Map.refFreeContourManagerVM.bIsActive AndAlso Map.refFreeContourManagerVM.bIsModifyingTextAngle Then
Map.refFreeContourManagerVM.CloseIsModifyingTextAngle(True)
Else
Map.refSceneHostVM.MainController.Done(m_Text)
End If
End Sub
#End Region ' Done
#End Region ' COMMANDS
End Class
@@ -0,0 +1,53 @@
<UserControl x:Class="OnlyProdFreeContourInputV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="32">
<StackPanel>
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Setter Property="Orientation" Value="Horizontal"/>
<Style.Triggers>
<DataTrigger Binding="{Binding FocusTextBox}" Value="True">
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=PropertySearch}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<TextBlock Text="{Binding Message}"
Visibility="{Binding Message_Visibility}"
Style="{StaticResource OptionTextBlock}"/>
<TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding Text_Visibility}"
Style="{StaticResource FreeContour_TextBox}">
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding Done_Command, UpdateSourceTrigger=PropertyChanged}"/>
<KeyBinding Key="S" Modifiers="Control" Command="{Binding Show_Command}"/>
</TextBox.InputBindings>
</TextBox>
<CheckBox Content="{Binding CheckBoxText}"
IsChecked="{Binding IsChecked}"
Visibility="{Binding Check_Visibility}"
Style="{StaticResource FreeContourInput_CheckBox}"/>
<ComboBox ItemsSource="{Binding ComboItemsList}"
SelectedIndex="{Binding ComboSelectedIndex}"
Visibility="{Binding Combo_Visibility}"
Margin="5,0,5,0"/>
<Grid Margin="5,0,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Command="{Binding Show_Command}"
Visibility="{Binding ShowBtn_Visibility}"
Content="{Binding ShowMsg}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="1"
Command="{Binding Done_Command}"
Visibility="{Binding DoneBtn_Visibility}"
Content="{Binding OkMsg}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
</Grid>
</StackPanel>
</UserControl>
@@ -0,0 +1,3 @@
Public Class OnlyProdFreeContourInputV
End Class
@@ -0,0 +1,70 @@
<EgtFloating:EgtFloatingPanel x:Class="FreeContourManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
<ComboBox ItemsSource="{Binding TypeList}"
SelectedIndex="{Binding SelType, Delay=1}"
Height="22" Width="160"
Margin="0,0,5,0"/>
<ComboBox ItemsSource="{Binding PathList}"
SelectedIndex="{Binding SelPath}"
Height="22" Width="100"
Margin="0,0,5,0"
Visibility="{Binding PathList_Visibility}"/>
<Button Command="{Binding Line2P_Command}"
ToolTip="{Binding Line2P_ToolTip}"
IsEnabled="{Binding Line2P_IsEnabled}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Delete_Command}"
ToolTip="{Binding Delete_ToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/DrawPanel/Delete.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ModifyCurve_Command}"
ToolTip="{Binding ModifyCurve_ToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/DrawPanel/ModifyCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddPointCurve_Command}"
ToolTip="{Binding AddPointCurve_ToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemovePointCurve_Command}"
ToolTip="{Binding RemovePointCurve_ToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ChangeStart_Command}"
ToolTip="{Binding ChangeStart_ToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/DrawPanel/ChangeStart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding InvertCurve_Command}"
ToolTip="{Binding InvertCurve_ToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/DrawPanel/InvertCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Move_Command}"
ToolTip="{Binding Move_ToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/DrawPanel/Move.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Rotate_Command}"
ToolTip="{Binding Rotate_ToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/DrawPanel/Rotate.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding TextAngle_Command}"
ToolTip="{Binding TextAngle_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Visibility="{Binding TextAngle_Visibility}">
<Image Source="/Resources/DrawPanel/Text.png" Stretch="Uniform"/>
</Button>
</EgtFloating:EgtFloatingPanel>
@@ -0,0 +1,3 @@
Public Class FreeContourManagerV
End Class
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,67 @@
<StackPanel x:Class="OnlyProdFreeContourManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Style="{StaticResource OnlyProdBTLPartManager_StackPanel}">
<ComboBox ItemsSource="{Binding TypeList}"
SelectedIndex="{Binding SelType, Delay=1}"
Style="{StaticResource OnlyProdType_ComboBox}"/>
<ComboBox ItemsSource="{Binding PathList}"
SelectedIndex="{Binding SelPath}"
Visibility="{Binding PathList_Visibility}"
Style="{StaticResource OnlyProdPath_ComboBox}"/>
<Button Command="{Binding Line2P_Command}"
ToolTip="{Binding Line2P_ToolTip}"
IsEnabled="{Binding Line2P_IsEnabled}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Delete_Command}"
ToolTip="{Binding Delete_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Delete.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ModifyCurve_Command}"
ToolTip="{Binding ModifyCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/ModifyCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddPointCurve_Command}"
ToolTip="{Binding AddPointCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemovePointCurve_Command}"
ToolTip="{Binding RemovePointCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ChangeStart_Command}"
ToolTip="{Binding ChangeStart_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/ChangeStart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding InvertCurve_Command}"
ToolTip="{Binding InvertCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/InvertCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Move_Command}"
ToolTip="{Binding Move_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Move.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Rotate_Command}"
ToolTip="{Binding Rotate_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Rotate.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding TextAngle_Command}"
ToolTip="{Binding TextAngle_ToolTip}"
Visibility="{Binding TextAngle_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Text.png" Stretch="Uniform"/>
</Button>
</StackPanel>

Some files were not shown because too many files have changed in this diff Show More