Compare commits

...

80 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
Demetrio Cassarino 43268045a1 -inizio nuova grafica 2025-04-03 11:51:44 +02:00
Emmanuele Sassi 5abbb927a7 Merge branch 'master' of https://gitlab.steamware.net/egaltech/egtbeamwall 2025-04-02 15:50:47 +02:00
Emmanuele Sassi 9aa89adf29 - riportato modifiche precedenti perse durante il merge 2025-04-02 15:50:44 +02:00
Demetrio Cassarino e1184b723c -sistemato visibilità partmanager 2025-03-31 17:28:39 +02:00
Demetrio Cassarino f68b4384e0 -modifica radiobutton 2025-03-31 17:21:25 +02:00
Emmanuele Sassi 6188c67845 Merge branch 'feature/AddButtonVersion' 2025-03-31 16:06:08 +02:00
Emmanuele Sassi 5dbacabbac - correzioni del merge 2025-03-31 16:05:37 +02:00
Emmanuele Sassi e66b65c3ba Merge remote-tracking branch 'gitlab.seriate/master' into feature/AddButtonVersion 2025-03-31 13:06:01 +02:00
Demetrio Cassarino 1874f0aa4b -ripristinata datagridclassica 2025-03-27 14:51:06 +01:00
Demetrio Cassarino 966b8ea26d -ripristinato finestra di dialogo di windows e messagebox 2025-03-27 11:31:57 +01:00
Emmanuele Sassi 854cd2a937 - aggiunta estensione di salvataggio per file salvati senza supervisore
- aggiunta messaggio risultato creazione file senza supervisore
2025-03-24 17:52:27 +01:00
Emmanuele Sassi 73ede8520a Merge branch 'master' of https://gitlab.steamware.net/egaltech/egtbeamwall 2025-02-20 17:24:09 +01:00
Emmanuele Sassi fb3a53be59 - aggiunta gestione macchine senza supervisore 2025-02-20 17:24:05 +01:00
Dario Sassi af8fbf8a3d Merge branch 'master' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall 2025-02-06 18:37:40 +01:00
Emmanuele Sassi a2da16761f Merge branch 'master' of https://gitlab.steamware.net/egaltech/egtbeamwall 2025-02-06 18:35:52 +01:00
Emmanuele Sassi 7f964cd55b - correzione AddToRaw e Flip Part in RawPart 2025-02-06 18:35:48 +01:00
Dario Sassi 95a1cc8f3c Merge commit '963c515da47cb18988734f147ad64b87ac325b60' 2025-01-24 11:38:11 +01:00
Demetrio Cassarino 963c515da4 -aggiunto cambio immagine per variant 2025-01-24 09:20:14 +01:00
Dario Sassi 1f654dc708 Merge commit '5febbf0805bb0fa6c1a0abf63fb83ae45ab98635' 2025-01-23 10:32:28 +01:00
Demetrio Cassarino 5febbf0805 -sistemata variabile combobox variant 2025-01-23 10:28:40 +01:00
Dario Sassi 09baa238d8 Merge commit '6c580fecdb59c5783b1fa12567ab908741f23824' 2025-01-23 10:21:15 +01:00
Demetrio Cassarino 6c580fecdb -piccola modifica cariamento variant 2025-01-23 10:20:07 +01:00
Demetrio Cassarino 616e1fba47 Merge commit 'ab5defd09000a5e95cbc5e4d3141a705678ed5db' into feature/Variant 2025-01-23 10:14:41 +01:00
Dario Sassi ab5defd090 EgtBEAMWALL 2.7a2 :
- modifiche per feature Variant generate da script lua.
2025-01-22 11:15:38 +01:00
Dario Sassi e29abf6a4f Merge commit '64beb381caef7423465d21e01c2a3fdc6c05a804' 2025-01-22 09:33:38 +01:00
Demetrio Cassarino 64beb381ca -piccola sistemazione su variant 2025-01-22 09:32:19 +01:00
Dario Sassi 7f5d678dbd EgtBEAMWALL :
- sistemazione MaxIndex per Variant.
2025-01-21 16:54:05 +01:00
Dario Sassi d781989da9 EgtBEAMWALL :
- risistemazione.
2025-01-21 16:50:49 +01:00
Dario Sassi 387d1241b2 Merge branch 'master' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall 2025-01-21 16:31:47 +01:00
Dario Sassi c2f4d38d32 EgtBEAMWALL :
- aggiornate le versioni delle varie parti a 2.7a1.
2025-01-21 16:27:02 +01:00
Dario Sassi d731248ffc EgtBEAMWALL :
- modificata combo di Variant con primo valore 0 (per poter verificare funzionamento librerie).
2025-01-21 16:27:02 +01:00
Dario Sassi 701071aab0 Merge commit '24bb030080f6c6a7ba41f64470e8e15300fe3ca3'
# Conflicts:
#	EgtBEAMWALL.Core/BTLModel/BTLFeatureM.vb
2025-01-21 15:29:20 +01:00
Demetrio Cassarino 24bb030080 -aggiunto scelta variant da file btlfeatureini 2025-01-21 11:33:16 +01:00
Dario Sassi 9de7422f1a EgtBEAMWALL :
- aggiornate le versioni delle varie parti a 2.7a1.
2025-01-15 19:23:04 +01:00
Dario Sassi e69f85e5e1 EgtBEAMWALL :
- modificata combo di Variant con primo valore 0 (per poter verificare funzionamento librerie).
2025-01-15 19:16:35 +01:00
Dario Sassi f6c736ef40 Merge commit '0d134324da55297ec91c55796eb18eea592463ef' 2025-01-15 16:03:19 +01:00
Demetrio Cassarino 0d134324da -aggiunto variant combobox 2025-01-15 15:58:53 +01:00
Dario Sassi a224660a00 EgtBeamWall 2.7a1 :
- ricompilazione con cambio versione e prime modifiche per feature Variant.
2025-01-15 12:30:33 +01:00
Dario Sassi 580a454ad1 EgtBEAMWALL 2.6k1 :
- ricompilazione con cambio versione.
2024-12-13 16:40:56 +01:00
Demetrio Cassarino 971628a549 -modifiche grafiche finestre 2024-11-29 09:45:03 +01:00
Emmanuele Sassi ec73d2944b - gestito stato calcolo con collisioni considerate anche su feature disattivate
- nuova funzione che resetta stato di calcolo
- gestito ripristino PosZ dopo modifica dimensioni grezzo
- corretta gestione pos X ed Y in CopyPart
2024-10-28 19:01:07 +01:00
Demetrio Cassarino caf0a0ea3a -modificato messaggi 2024-09-26 16:29:05 +02:00
Demetrio Cassarino 83fd6bda1b -aggiunto nuove finestre oer nuova grafica tooldb, machdb e setup 2024-09-17 14:42:28 +02:00
Demetrio Cassarino a624b67848 -aggiornato icona egalware 2024-09-05 11:37:43 +02:00
Demetrio Cassarino c244f3e87b -migliorata gesione funzione comunicazione server 2024-08-09 16:54:18 +02:00
Demetrio Cassarino 487efdd029 -aggiornato wpflib5 2024-08-09 15:01:37 +02:00
Demetrio Cassarino a9e961a0ee -creato in configurazione nuovo tab per visualizzare le versioni presenti del programma 2024-08-09 15:00:18 +02:00
Emmanuele Sassi df9ee8bdb4 - correzione messaggi CALC se non trovo feature o pezzi
- eliminazione verisone 64 bit
2024-06-12 17:24:29 +02:00
Emmanuele Sassi 114255bb87 Merge branch 'feature/DuploCorrection' 2024-06-04 15:11:18 +02:00
Dario Sassi 4499a042f8 EgtBEAMWALL 2.6f1 :
- correzioni a gestione riferimento di feature entrando in modifica Freecontour.
2024-06-03 18:19:24 +02:00
Emmanuele Sassi f9f0d90334 - modifiche alla creazione PrId su Duplo 2024-06-03 15:15:23 +02:00
Dario Sassi 958421f4f5 EgtBeamWall :
- aggiornate dll da cui dipende.
2024-01-17 17:19:08 +01:00
690 changed files with 67110 additions and 1616 deletions
+49 -11
View File
@@ -129,6 +129,16 @@ Public Class BTLFeatureM
End Set
End Property
Protected m_VARIANTList As New ObservableCollection(Of Integer)()
Public Property VARIANTList As ObservableCollection(Of Integer)
Get
Return m_VARIANTList
End Get
Set(value As ObservableCollection(Of Integer))
m_VARIANTList = value
End Set
End Property
Protected m_sDES As String = String.Empty
Public Property sDES As String
Get
@@ -139,6 +149,16 @@ Public Class BTLFeatureM
End Set
End Property
Public Overridable Property nSelVARIANT As Integer
Get
Dim nDes As Integer = 0
Return If(Integer.TryParse(m_sDES, nDes), nDes, 0)
End Get
Set(value As Integer)
m_sDES = value.ToString()
End Set
End Property
Protected m_frFRAME As New Frame3d
Public Property frFRAME As Frame3d
Get
@@ -242,6 +262,7 @@ Public Class BTLFeatureM
#Region "CONSTRUCTOR"
Protected Sub New()
CreateVariantList()
End Sub
Public Shared Function CreateNewBTLFeature() As BTLFeatureM
@@ -256,7 +277,7 @@ Public Class BTLFeatureM
EgtGetInfo(nFeatureId, BTL_FTR_GRP, NewBTLFeature.m_nSelGRP)
EgtGetInfo(nFeatureId, BTL_FTR_PRC, NewBTLFeature.m_nPRC)
EgtGetInfo(nFeatureId, BTL_FTR_SIDE, NewBTLFeature.m_nSelSIDE)
EgtGetInfo(nFeatureId, BTL_FTR_PRIORITY, NewBTLFeature.m_nPRIORITY)
EgtGetInfo(nFeatureId, BTL_FTR_PRIORITY, NewBTLFeature.m_nPriority)
Dim nDO As Integer = 1
If EgtGetInfo(nFeatureId, BTL_FTR_DO, nDO) Then
NewBTLFeature.m_bDO = (nDO <> 0)
@@ -319,13 +340,24 @@ Public Class BTLFeatureM
.m_nSelGRP = nGRP,
.m_nSelSIDE = nSIDE,
.m_nPriority = 0,
.m_bDO = True
.m_bDO = True,
.nSelVARIANT = 0
}
' crea parametri per questa feature da file ini
NewBTLFeature.CreateFeatureParams(NewBTLFeature)
Return NewBTLFeature
End Function
Private Sub CreateVariantList()
Dim sMaxIndex As String = ""
Dim nMaxIndex As Integer = 0
EgtUILib.GetPrivateProfileString([VARIANT], K_MAXINDEX, "", sMaxIndex, m_sBTLIniFile)
Integer.TryParse(sMaxIndex, nMaxIndex)
For Index As Integer = 0 To nMaxIndex
m_VARIANTList.Add(Index)
Next
End Sub
#End Region ' CONSTRUCTOR
#Region "METHODS"
@@ -361,15 +393,21 @@ Public Class BTLFeatureM
Dim TempList As New List(Of BTLParamM)
Dim NewBTLParam As BTLParamM = Nothing
' leggo tutti i P della feature
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, True, ParamIndex, Me, NewBTLParam)
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, nSelVARIANT, True, ParamIndex, Me, NewBTLParam)
TempList.Add(NewBTLParam)
ParamIndex += 1
End While
If TempList.Count <= 0 Then
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, 0, True, ParamIndex, Me, NewBTLParam)
TempList.Add(NewBTLParam)
ParamIndex += 1
End While
End If
NewBTLFeature.PBTLParamMList = TempList
' leggo tutti i Q della feature
ParamIndex = 1
TempList = New List(Of BTLParamM)
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, False, ParamIndex, Me, NewBTLParam)
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, nSelVARIANT, False, ParamIndex, Me, NewBTLParam)
TempList.Add(NewBTLParam)
ParamIndex += 1
End While
@@ -540,19 +578,14 @@ Public Class BTLFeatureM
For Each QPar In QBTLParamMList
If QPar.bCustom Then EgtSetInfo(nFeatureId, QPar.sName & "A", 1)
Next
EgtSetInfo( nFeatureId, BTL_FTR_PRIORITY, nPriority)
EgtSetInfo(nFeatureId, BTL_FTR_PRIORITY, nPriority)
SetFeatureId(nFeatureId)
' imposto modificato per copie
MyMachGroupPanelM.SetDuploModified(ParentPart.nPartId)
bOk = True
Else
' Impossibile creare una feature con questi valori - ERRORE
'MessageBox.Show(EgtMsg(61852), EgtMsg(30007))
If bOnlyProd Then
EgtBEAMWALL.Core.OnlyProdEgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61852), EgtMsg(30007))
Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61852), EgtMsg(30007))
End If
MessageBox.Show(EgtMsg(61852), EgtMsg(30007))
nFeatureId = EgtBeamModifyProcess(Me.nFeatureId, Me.nSelGRP, Me.nPRC, Me.nSelSIDE, "", Me.nPRID,
Me.frFRAME, vPar, sPar, vParQ, nCrvId, nCrv2Id)
SetFeatureId(nFeatureId)
@@ -598,6 +631,11 @@ Public Class BTLFeatureM
Return True
End Function
' funzione che restituisce se la feature è un Variant
Public Function IsVariant() As Boolean
Return m_nPRC = 900
End Function
#End Region ' METHODS
End Class
+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
@@ -60,6 +60,15 @@ Public Class BTLFeatureVM
End Set
End Property
Public Overridable Property nSelVARIANT As Integer
Get
Return m_BTLFeatureM.nSelVARIANT
End Get
Set(value As Integer)
m_BTLFeatureM.nSelVARIANT = value
End Set
End Property
Public ReadOnly Property sName As String
Get
Return m_BTLFeatureM.sName
@@ -0,0 +1,166 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdBeamMachiningsWindowV"
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.Core"
Title="{Binding Title}"
WindowStyle="None" ResizeMode="NoResize"
Width="500" Height="450"
IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<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 OnlyProdTabControl_OnlyHeaders}"/>
<Border Grid.Row="1" Margin="0,1,0,2" Style="{StaticResource OnlyProdPage_Border}">
<EgtBEAMWALL: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.5,0.5,0.5,5"
BindingColumns="{Binding BeamMachiningsColumns}"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
ColumnHeaderBackground="{StaticResource BeamWall_Teal}"
ColumnHeaderForeground="{StaticResource BeamWall_White}"
ColumnHeaderHorizontalContentAlignment="Center"
ColumnHeaderFontWeight="Bold"
ColumnHeaderFontSize="15"
ColumnHeaderPadding="0,2,0,2"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
Style="{StaticResource DataGrid_OnlyProd}">
<DataGrid.RowStyle>
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
<Setter Property="Height" Value="25"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</DataGrid.RowStyle>
<DataGrid.Resources>
<Style x:Key="DataGridCheckBoxColumn_Style"
TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
<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>
</EgtBEAMWALL:EgtDataGrid>
</Border>
<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 OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="\/"
Command="{Binding MoveRowDown_Command}"
Grid.Column="1"
Margin="2.5,0,2.5,0"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding AddRowMsg}"
Command="{Binding AddRow_Command}"
Grid.Column="2"
Margin="2.5,0,2.5,0"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding DeleteRowMsg}"
Command="{Binding DeleteRow_Command}"
Grid.Column="3"
Margin="2.5,0,2.5,0"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding SaveMsg}"
Command="{Binding Save_Command}"
Grid.Column="4"
Margin="2.5,0,0,0"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,18 @@
Public Class OnlyProdBeamMachiningsWindowV
Private WithEvents m_BeamMachiningsWindowVM As MyBeamMachiningsWindowVM
Sub New(Owner As System.Windows.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
@@ -577,4 +577,13 @@ Public Class ProcessResult
m_nTIME = TIME
End Sub
Public Sub ResetTypeFeature()
m_Type = ProcessResultTypes.PART
m_nTASKID = 0
End Sub
Public Sub ResetTypePart()
m_Type = ProcessResultTypes.BAR
m_nCUTID = 0
End Sub
End Class
+2
View File
@@ -199,12 +199,14 @@
Public Const BTL_GEN_USERATTRIBUTE = "USERATTRIBUTE"
Public Const PROCESSINGS As String = "Processings"
Public Const [VARIANT] As String = "Variant"
Public Const OUTLINE As String = "Outline"
Public Const BTL_FTR_GRP As String = "GRP"
Public Const BTL_FTR_PRC As String = "PRC"
Public Const BTL_FTR_DO As String = "DO"
Public Const BTL_FTR_SIDE As String = "SIDE"
Public Const BTL_FTR_PRIORITY As String = "PRIORITY"
Public Const BTL_FTR_VARIANT As String = "VARIANT"
Public Const BTL_FTR_NAME As String = "NAME"
Public Const BTL_FTR_DES As String = "DES"
Public Const BTL_FTR_PRID As String = "PRID"
@@ -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"
+7
View File
@@ -24,6 +24,7 @@ Public Module ConstGen
Public Const K_LOCKID As String = "LockId"
Public Const K_KEY As String = "Key"
Public Const K_NESTKEY As String = "NestKey"
Public Const K_MAXINDEX As String = "MaxIndex"
' Pagine del programma
Public Enum Pages As Integer
@@ -77,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
+3
View File
@@ -116,4 +116,7 @@ Public Module ConstIni
Public Const S_SPECIAL As String = "Special"
Public Const K_SPECIALENABLE As String = "SpecialEnable"
' Server Address
Public Const K_SERVERADDRESS As String = "ServerAddressRelease"
Public Const K_BEAMWALL As String = "EgtBeamWall"
End Module
@@ -7,6 +7,9 @@
Public Const K_NCTYPE As String = "NCType"
Public Const K_CONNECTIONSTRING As String = "ConnectionString"
Public Const K_SUPERVISOR As String = "Supervisor"
Public Const K_SAVECNCPATH As String = "SaveCncPath"
Public Const K_SAVEEXT As String = "SaveExt"
Public Const S_CHANNELS As String = "Channels"
+69
View File
@@ -53,11 +53,50 @@
<Reference Include="EgtWPFLib5">
<HintPath>..\ExtLibs\EgtWPFLib5.dll</HintPath>
</Reference>
<Reference Include="EgwProxy.LiMan, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EgwProxy.LiMan.1.0.2408.718\lib\EgwProxy.LiMan.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="RestSharp, Version=111.2.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.111.2.0\lib\net471\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json, Version=8.0.0.3, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.8.0.3\lib\net462\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml" />
@@ -81,6 +120,9 @@
<DependentUpon>BeamMachiningsWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="BeamMachiningsWindow\MyBeamMachiningsWindowVM.vb" />
<Compile Include="BeamMachiningsWindow\OnlyProdBeamMachiningsWindowV.xaml.vb">
<DependentUpon>OnlyProdBeamMachiningsWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="BTLViewModel\BTLFeatureVM.vb" />
<Compile Include="CALCPanel\CalcEditEndEventArgs.vb" />
<Compile Include="ConfigurationPage\OnlyProdMachine_ConfigurationPageV.xaml.vb">
@@ -167,6 +209,9 @@
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
<DependentUpon>MachinePanelV.xaml</DependentUpon>
</Compile>
<Compile Include="MachiningDbWindow\OnlyProdMachiningDbWindowV.xaml.vb">
<DependentUpon>OnlyProdMachiningDbWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogV.xaml.vb">
<DependentUpon>NewOpenProjectFileDialogV.xaml</DependentUpon>
</Compile>
@@ -177,6 +222,12 @@
<Compile Include="OpenProjectFileDialog\OnlyProdOpenProjectFileDialogV.xaml.vb">
<DependentUpon>OnlyProdOpenProjectFileDialogV.xaml</DependentUpon>
</Compile>
<Compile Include="SetUpWindow\OnlyProdSetUpWindowV.xaml.vb">
<DependentUpon>OnlyProdSetUpWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="ToolsDbWindow\OnlyProdToolDbWindowV.xaml.vb">
<DependentUpon>OnlyProdToolDbWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\Configuration.vb" />
<Compile Include="ProjectFileVM\ProdItem.vb" />
<Compile Include="Utility\DimensionsIniFile.vb" />
@@ -238,6 +289,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
@@ -247,12 +299,17 @@
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Page Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="BeamMachiningsWindow\OnlyProdBeamMachiningsWindowV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ConfigurationPage\OnlyProdMachine_ConfigurationPageV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -329,6 +386,10 @@
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="MachiningDbWindow\OnlyProdMachiningDbWindowV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -345,6 +406,14 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SetUpWindow\OnlyProdSetUpWindowV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ToolsDbWindow\OnlyProdToolDbWindowV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ViewPanel\ViewPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -62,12 +62,7 @@ Public Class EgtDataGrid
newItems(index).InitColumn(col)
context.Columns.Add(col)
Catch ex As Exception
'MessageBox.Show(String.Format(EgtMsg(61883), newItems(index).Name, newItems(index).ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
If bOnlyProd Then
EgtBEAMWALL.Core.OnlyProdEgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61883), newItems(index).Name, newItems(index).ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61883), newItems(index).Name, newItems(index).ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
End If
MessageBox.Show(String.Format(EgtMsg(61883), newItems(index).Name, newItems(index).ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
End Try
Next
@@ -90,12 +85,7 @@ Public Class EgtDataGrid
CurrDataGrid.Columns(e.NewStartingIndex).DisplayIndex = e.NewStartingIndex
End If
Catch ex As Exception
'MessageBox.Show(String.Format(EgtMsg(61883), one.Name, one.ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
If bOnlyProd Then
EgtBEAMWALL.Core.OnlyProdEgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61883), one.Name, one.ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61883), one.Name, one.ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
End If
MessageBox.Show(String.Format(EgtMsg(61883), one.Name, one.ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
End Try
Next
End If
@@ -532,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
@@ -549,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
@@ -567,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
@@ -585,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
@@ -601,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
@@ -616,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
@@ -731,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)
+2 -10
View File
@@ -214,11 +214,7 @@ Public Class NewMachGroupPanelVM
Dim m_MessageBoxResult As MessageBoxResult
If MachGroupVMList.Count = 1 Then
'chiedo conferma prima di resettare il gruppo di lavorazione
If bOnlyProd Then
EgtBEAMWALL.Core.OnlyProdEgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
End If
MessageBox.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
Select Case m_MessageBoxResult
Case MessageBoxResult.Yes
' cancello il gruppo corrente e ne creo uno nuovo con lo stesso nome
@@ -232,11 +228,7 @@ Public Class NewMachGroupPanelVM
End Select
Else
'chiedo conferma prima di cancellare il gruppo di lavorazione
If bOnlyProd Then
EgtBEAMWALL.Core.OnlyProdEgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
End If
MessageBox.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
Select Case m_MessageBoxResult
Case MessageBoxResult.Yes
' cancello quello selezionato (ovvero il corrente)
@@ -192,7 +192,13 @@ Public Class MyMachGroupPanelM
While nOutlineId <> GDB_ID.NULL
' verifico che sia feature
If EgtExistsInfo(nOutlineId, MGR_FTR_PRC) Then
If EgtExistsInfo(nOutlineId, MGR_FTR_PRID) Then
Dim nCurrPrId As Integer = GDB_ID.NULL
If EgtGetInfo(nOutlineId, MGR_FTR_PRID, nCurrPrId) AndAlso nCurrPrId <> GDB_ID.NULL Then
If nCurrPrId < nPRId Then
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
nPRId += 1
End If
nPRId = Math.Max(nPRId - 1, nCurrPrId) + 1
nOutlineId = EgtGetNext(nOutlineId)
Continue While
Else
@@ -231,7 +237,14 @@ Public Class MyMachGroupPanelM
Dim nPRC As Integer
If EgtGetInfo(nOutlineId, MGR_FTR_PRC, nPRC) Then
nPRId = 0
If Not EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId) Then
If EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId) Then
If nPRId < nGlobPRId Then
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nGlobPRId)
nPRId = nGlobPRId
nGlobPRId += 1
End If
nGlobPRId = Math.Max(nGlobPRId - 1, nPRId) + 1
Else
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nGlobPRId)
nPRId = nGlobPRId
nGlobPRId += 1
+7 -1
View File
@@ -573,7 +573,13 @@ Public MustInherit Class PartVM
Public Sub CalcGlobalUpdate()
m_PartM.nCALC_GlobalState = nCALC_State
For Each Feature In FeatureVMList
If Not Feature.bDO Then Continue For
If Not Feature.bDO Then
If Feature.nState = CalcStates.COLLISION AndAlso Feature.nState > m_PartM.nCALC_GlobalState Then
m_PartM.nCALC_GlobalState = Feature.nState
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
End If
Continue For
End If
If Feature.nState > m_PartM.nCALC_GlobalState Then
m_PartM.nCALC_GlobalState = Feature.nState
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
@@ -0,0 +1,128 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdMachiningDbWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding Title}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
CloseCommand="{Binding CloseMachiningsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<EgtWPFLib5:EgtCustomWindow.InputBindings>
<KeyBinding Key="Escape" Command="{Binding ReloadMachiningCommand}"
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"/>
</EgtWPFLib5:EgtCustomWindow.InputBindings>
<EgtWPFLib5:EgtCustomWindow.Resources>
<EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
</EgtWPFLib5:EgtCustomWindow.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.75*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<UniformGrid Grid.Row="0" Columns="3">
<Button Content="{Binding NewMsg}" Command="{Binding NewCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding SaveMsg}" Command="{Binding SaveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding RemoveMsg}" Command="{Binding RemoveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</UniformGrid>
<TreeView Name="MachiningsTreeView" Grid.Row="1"
ItemsSource="{Binding Path=MachiningsList}">
<TreeView.Style>
<Style TargetType="{x:Type TreeView}">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.35,0">
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
</TreeView.Style>
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
</Style>
</TreeView.ItemContainerStyle>
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}" ItemsSource="{Binding Items}">
<Grid Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
</Grid>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}">
<Grid Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
<TextBlock Grid.Column="1" Text="{Binding NamePar}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
</Grid>
</DataTemplate>
</TreeView.Resources>
</TreeView>
<UniformGrid Grid.Row="2" Columns="3">
<Button Content="{Binding ImportMsg}" Command="{Binding ImportCommand}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding ExportMsg}" Command="{Binding ExportCommand}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding ResetMsg}" Command="{Binding ReloadMachiningCommand}"
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</UniformGrid>
</Grid>
<ContentControl Content="{Binding Path=ParamPageV}" Grid.Column="1" Grid.ColumnSpan="2"/>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,30 @@
Imports EgtWPFLib5
Imports System.Windows.Input
Public Class OnlyProdMachiningDbWindowV
Private WithEvents m_MachiningDbWindowVM As MachiningDbWindowVM
Sub New(Owner As System.Windows.Window, MachiningDbWindowVM As MachiningDbWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = MachiningDbWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_MachiningDbWindowVM = MachiningDbWindowVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MachiningDbWindowVM.m_CloseWindow
Me.DataContext = Nothing
Me.DialogResult = bDialogResult
Me.Close()
End Sub
Private Sub MachiningDb_Closing(sender As Object, e As ComponentModel.CancelEventArgs) Handles Me.Closing
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
e.Cancel = True
Return
End If
End Sub
End Class
+3 -3
View File
@@ -16,7 +16,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("EgtBEAMWALL.Core")>
<Assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.12.2")>
<Assembly: AssemblyFileVersion("2.5.12.2")>
<Assembly: AssemblyVersion("2.7.1.1")>
<Assembly: AssemblyFileVersion("2.7.1.1")>
@@ -104,6 +104,7 @@
Margin="5"
RowDetailsVisibilityMode="Visible"
CellEditEnding="MainDataGrid_CellEditEnding"
ColumnHeaderBackground="{x:Null}"
BindingColumns="{Binding ProdColumns}">
<DataGrid.Resources>
<!-- ProdId -->
@@ -126,7 +127,7 @@
<ToggleButton Grid.Column="1"
Margin="5,0,0,0"
IsChecked="{Binding Path=DataContext.bIsEditNameActive,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:NewOpenProjectFileDialogV}}}"
Style="{StaticResource ToolBar_SmallToggleButton}">
Style="{StaticResource OldToolBar_SmallToggleButton}">
<Image Source="\Resources\CalcPanel\Edit.png"
Style="{StaticResource LockImage}"/>
</ToggleButton>
@@ -4,7 +4,7 @@
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core"
Title="{Binding Title}"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
Style="{StaticResource OnlyProd_EgtCustomWindow}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
IsClosable="False"
@@ -47,13 +47,17 @@
<StackPanel Orientation="Horizontal"
Visibility="{Binding Date_Visibility}">
<TextBlock Text="{Binding From_Msg}"
Style="{StaticResource Filter_TextBlock}"/>
Style="{StaticResource Filter_TextBlock}"
Foreground="{StaticResource BeamWall_Corduroy}"/>
<DatePicker SelectedDate="{Binding dtStartDate}"
Style="{StaticResource Filter_DatePicker}"/>
Style="{StaticResource Filter_DatePicker}"
CalendarStyle="{StaticResource Filter_Calendar}"/>
<TextBlock Text="{Binding To_Msg}"
Style="{StaticResource Filter_TextBlock}"/>
Style="{StaticResource Filter_TextBlock}"
Foreground="{StaticResource BeamWall_Corduroy}"/>
<DatePicker SelectedDate="{Binding dtEndDate}"
Style="{StaticResource Filter_DatePicker}"/>
Style="{StaticResource Filter_DatePicker}"
CalendarStyle="{StaticResource Filter_Calendar}"/>
</StackPanel>
</StackPanel>
<CheckBox Grid.Column="2"
@@ -69,7 +73,9 @@
</Grid.ColumnDefinitions>
<ComboBox ItemsSource="{Binding FilterTypeList}"
SelectedItem="{Binding SelFilterType}"
Style="{StaticResource BTLDateTypeList_ComboBox}"/>
Width="105"
Margin="5"
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding SearchText}"
Visibility="{Binding SearchText_Visibility}"
@@ -77,7 +83,8 @@
<StackPanel Grid.Column="2"
Orientation="Horizontal">
<TextBlock Text="{Binding Rows_Msg}"
Style="{StaticResource OptionTextBlock}"/>
Style="{StaticResource OptionTextBlock}"
Foreground="{StaticResource BeamWall_Corduroy}"/>
<ComboBox ItemsSource="{Binding RowQuantityList}"
SelectedIndex="{Binding SelRowQuantity}"
Style="{StaticResource OnyProd_FeatureComboBox}"/>
@@ -86,21 +93,27 @@
</Grid>
</GroupBox>
<EgtBEAMWALL:EgtDataGrid x:Name="MainDataGrid"
Grid.Row="1"
<Border Grid.Row="1" Style="{StaticResource OnlyProdPage_Border}" Margin="1"/>
<EgtBEAMWALL:EgtDataGrid Grid.Row="1"
x:Name="MainDataGrid"
ItemsSource="{Binding ProjectList}"
SelectedItem="{Binding SelProject}"
CanUserAddRows="False"
AutoGenerateColumns="False"
CanUserResizeRows="False"
SelectionMode="Single"
ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
Margin="5"
BindingColumns="{Binding ProdColumns}"
RowDetailsVisibilityMode="Visible"
CellEditEnding="MainDataGrid_CellEditEnding"
BindingColumns="{Binding ProdColumns}">
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
ColumnHeaderBackground="{StaticResource BeamWall_Teal}"
ColumnHeaderForeground="{StaticResource BeamWall_White}"
ColumnHeaderHorizontalContentAlignment="Center"
ColumnHeaderFontWeight="Bold"
ColumnHeaderFontSize="15"
ColumnHeaderPadding="0,2,0,2"
Style="{StaticResource DataGrid_OnlyProd}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
<DataGrid.Resources>
<!-- ProdId -->
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
@@ -155,7 +168,7 @@
</DataGridTemplateColumn>
</DataGrid.Resources>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
<Setter Property="FontWeight" Value="DemiBold"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<EventSetter Event="MouseDoubleClick" Handler="ProjectList_MouseDoubleClick"/>
@@ -220,18 +233,18 @@
Margin="0,0,0,5">
<Button IsDefault="True" Name="OpenBtn"
Content="{Binding Open_Msg}"
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Archive_Msg}"
Command="{Binding Archive_Command}"
IsEnabled="{Binding bArchived_IsEnabled}"
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Delete_Msg}"
Command="{Binding Delete_Command}"
IsEnabled="{Binding bDelete_IsEnabled}"
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Command="{Binding Cancel_Command}"
Content="{Binding Cancel_Msg}"
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
@@ -77,4 +77,17 @@ Public Class OnlyProdNewOpenProjectFileDialogV
'm_OpenProjFileDialogVM.SetIsEditNameActive(False)
End Sub
Public Shared ReadOnly IsSelectedProperty As DependencyProperty = DependencyProperty.Register("IsSelected",
GetType(Boolean),
GetType(ItemsControl))
Public Property IsSelected As Boolean
Get
Return DirectCast(GetValue(IsSelectedProperty), Boolean)
End Get
Set(value As Boolean)
SetValue(IsSelectedProperty, value)
End Set
End Property
End Class
@@ -76,7 +76,8 @@
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding SearchText}"
Margin="5"
Visibility="{Binding SearchText_Visibility}"/>
Visibility="{Binding SearchText_Visibility}"
Style="{StaticResource NewSearchText_TextBox}"/>
<StackPanel Grid.Column="2"
Orientation="Horizontal">
<TextBlock Text="Rows"
@@ -94,6 +94,7 @@
ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ColumnHeaderBackground="{x:Null}"
Margin="5"
BindingColumns="{Binding ProjectColumns}">
<DataGrid.Resources>
@@ -0,0 +1,208 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdSetUpWindowV"
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"
Title="{Binding TitleMsg}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
CloseCommand="{Binding CloseSetUpCommand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<EgtWPFLib5:EgtCustomWindow.Resources>
<Style x:Key="HorizontalScrollViewerItemsControlStyle" TargetType="{x:Type ItemsControl}">
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ItemsControl}">
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" >
<ItemsPresenter/>
</ScrollViewer>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</EgtWPFLib5:EgtCustomWindow.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<UniformGrid Columns="4">
<Button Content="{Binding ApplyMsg}" Command="{Binding ApplyCommand}"
IsEnabled="{Binding IsEnabledApplyBtn}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding ArchiveMsg}" Command="{Binding ArchiveCommand}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding RetrievesMsg}" Command="{Binding RetrievesCommand}" Height="30"
CommandParameter="{Binding SelectedItem,ElementName=ToolsTreeView}"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding AutomaticMsg}" Command="{Binding AutomaticCommand}" Height="30"
CommandParameter="{Binding SelectedItem,ElementName=ToolsTreeView}"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</UniformGrid>
<TreeView Grid.Row="1" Name="ToolsTreeView" ItemsSource="{Binding ToolsList}">
<TreeView.Style>
<Style TargetType="{x:Type TreeView}">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.35,0">
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
</TreeView.Style>
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<EventSetter Event="MouseDoubleClick" Handler="Tool_DoubleClick"/>
</Style>
</TreeView.ItemContainerStyle>
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyToolItem}" ItemsSource="{Binding Items}">
<Grid Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
</Grid>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:ToolItem}">
<Grid Height="20" ToolTip="{Binding ToolTipMsg}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
</Grid>
</DataTemplate>
</TreeView.Resources>
</TreeView>
</Grid>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding SetUpImage}" MaxWidth="300"/>
<ItemsControl Grid.Column="1" ItemsSource="{Binding PositionGroupList}"
Style="{DynamicResource HorizontalScrollViewerItemsControlStyle}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<ItemsControl Grid.Column="1" ItemsSource="{Binding PositionList}" Margin="0,0,20,0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="5,5,15,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding TcPos}"/>
<ItemsControl Grid.Column="1" ItemsSource="{Binding ExitToolAssociationList}"
HorizontalAlignment="Left">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<!--<WrapPanel Orientation="Horizontal" MaxWidth="200"/>-->
<UniformGrid Columns="1"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="10,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ToggleButton Content="{Binding ExitPar}" Name="ExitBtn"
CommandParameter="{Binding SelectedItem,ElementName=ToolsTreeView}"
IsChecked="{Binding IsOccupied}" Height="25" Width="25" Margin="0,0,5,0"
Command="{Binding SetUpToolCommand}"
IsEnabled="{Binding IsEnabledPos}"
Background="{Binding ExitBtnBackgroundCol}"/>
<Border x:Name="ToolBorder" Grid.Column="1" BorderBrush="#4D84C4"
BorderThickness="1" ToolTip="{Binding ToolTipMsg}">
<Border.Style>
<Style TargetType="{x:Type Border}">
<Setter Property="Visibility" Value="Hidden"/>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ExitBtn, Path=IsChecked}" Value="True">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<TextBlock Text="{Binding Tool.Name}" Margin="3"/>
</Border>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,31 @@
Imports EgtWPFLib5
Imports System.Windows.Controls
Imports System.Windows.Input
Public Class OnlyProdSetUpWindowV
Private WithEvents m_SetUpWindowVM As SetUpWindowVM
Sub New(Owner As System.Windows.Window, SetUpWindowVM As SetUpWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = SetUpWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_SetUpWindowVM = SetUpWindowVM
End Sub
Private Sub Tool_DoubleClick(sender As Object, e As MouseButtonEventArgs)
Dim TreeViewItem As TreeViewItem = DirectCast(sender, TreeViewItem)
If TypeOf TreeViewItem.DataContext Is ToolItem Then
Dim SelTool As ToolItem = DirectCast(TreeViewItem.DataContext, ToolItem)
m_SetUpWindowVM.ToolDoubleClick(SelTool)
e.Handled = True
End If
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpWindowVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -0,0 +1,138 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdToolDbWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding Title}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
CloseCommand="{Binding CloseToolsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<EgtWPFLib5:EgtCustomWindow.InputBindings>
<KeyBinding Key="Escape" Command="{Binding ReloadToolCommand}"
CommandParameter="{Binding Path=SelectedItem,ElementName=ToolsTreeView}"/>
</EgtWPFLib5:EgtCustomWindow.InputBindings>
<EgtWPFLib5:EgtCustomWindow.Resources>
<EgtWPFLib5:ToolDrawUUIDConverter x:Key="ToolDrawUUIDConverter"/>
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
</EgtWPFLib5:EgtCustomWindow.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.75*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<UniformGrid Grid.Row="0" Columns="3">
<Button Content="{Binding NewMsg}" Command="{Binding NewCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding SaveMsg}" Command="{Binding SaveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding RemoveMsg}" Command="{Binding RemoveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</UniformGrid>
<TreeView Name="ToolsTreeView" Grid.Row="1" ItemsSource="{Binding ToolsList}">
<TreeView.Style>
<Style TargetType="{x:Type TreeView}">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.35,0">
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
</TreeView.Style>
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
</Style>
</TreeView.ItemContainerStyle>
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyToolTreeViewItem}" ItemsSource="{Binding Items}">
<Grid Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
</Grid>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:ToolTreeViewItem}">
<Grid Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
<CheckBox Name="ActiveTxBx" Grid.Column="0" Height="15" Width="15" Margin="-15,0,5,0" VerticalContentAlignment="Center"
IsChecked="{Binding Active}"
Visibility="{Binding Path=DataContext.Active_Visibility,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
<TextBlock Grid.Column="1" Text="{Binding NamePar}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
</Grid>
</DataTemplate>
</TreeView.Resources>
</TreeView>
<UniformGrid Grid.Row="2" Columns="3">
<Button Content="{Binding ImportMsg}"
Command="{Binding ImportCommand}"
IsEnabled="{Binding IsEnabledImpExpBtn, Mode=OneWay}"
Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding ExportMsg}"
Command="{Binding ExportCommand}"
IsEnabled="{Binding IsEnabledImpExpBtn, Mode=OneWay}"
Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding ResetMsg}"
Command="{Binding ReloadToolCommand}"
CommandParameter="{Binding Path=SelectedItem,ElementName=ToolsTreeView}"
Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</UniformGrid>
</Grid>
<ContentControl Content="{Binding Path=ParamPageV}" Grid.Column="1"/>
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
<ContentControl Content="{Binding ToolSceneHost}" Grid.Column="2"/>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,33 @@
Imports EgtWPFLib5
Imports System.Windows.Input
Imports EgtUILib
Public Class OnlyProdToolDbWindowV
Private WithEvents m_ToolDbWindowVM As ToolDbWindowVM
Sub New(Owner As System.Windows.Window, ToolDbWindowVM As ToolDbWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ToolDbWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_ToolDbWindowVM = ToolDbWindowVM
End Sub
Private Sub ToolsDbView_Closed(bDialogResult As Boolean) Handles m_ToolDbWindowVM.m_CloseWindow
' Imposto contesto generale
EgtSetCurrentContext(ToolDbWindowVM.ProjectSceneContext)
' Cancello contesto di visualizzazione utensile
EgtDeleteContext(ToolDbWindowVM.ToolDbSceneContext)
Me.Close()
End Sub
Private Sub ToolsDbView_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
e.Cancel = True
Return
End If
End Sub
End Class
+2 -2
View File
@@ -109,7 +109,7 @@ Public Module BTLIniFile
End Function
' funzione che ottiene il parametro P/Q usando m_nBTLBWType del modulo
Public Function GetBeamPrivateProfileParam(IpGRP As Integer, IpPRC As Integer, IsP As Boolean, IpFeatureParamIndex As String, IpParentFeature As BTLFeatureM, ByRef IpBTLParam As BTLParamM) As Boolean
Public Function GetBeamPrivateProfileParam(IpGRP As Integer, IpPRC As Integer, IpVariant As Integer, IsP As Boolean, IpFeatureParamIndex As String, IpParentFeature As BTLFeatureM, ByRef IpBTLParam As BTLParamM) As Boolean
Dim sBTLParam As String = String.Empty
Dim sBWQParam As String = String.Empty
If m_nBTLBWType = BWType.BEAM Then
@@ -117,7 +117,7 @@ Public Module BTLIniFile
ElseIf m_nBTLBWType = BWType.WALL Then
sBWQParam = "W"
End If
If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & IpPRC, If(IsP, "P", "Q" & sBWQParam) & IpFeatureParamIndex, String.Empty, sBTLParam, m_sBTLIniFile) > 0 Then
If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & If(IpPRC = 900 AndAlso IpVariant > 0, IpPRC & "." & IpVariant, IpPRC), If(IsP, "P", "Q" & sBWQParam) & IpFeatureParamIndex, String.Empty, sBTLParam, m_sBTLIniFile) > 0 Then
Dim sBTLParamParams() As String = sBTLParam.Split(","c)
' verifico numero minimo di parametri
If sBTLParamParams.Count >= 6 Then
+38
View File
@@ -1,7 +1,11 @@
Imports EgtWPFLib5
Imports EgwProxy.LiMan
Public Module Configuration
' Test per comunicazione
Public m_commLib As DataSyncro
''' <summary>
''' Flag per impostare la visualizzazione con la singola pagina
''' </summary>
@@ -41,6 +45,26 @@ Public Module Configuration
m_bMachConfig = value
End Sub
''' <summary>
''' Flag per impostare la visualizzazione con la singola pagina
''' </summary>
Private m_sServerAddressRelease As String
Public ReadOnly Property sServerAddressRelease As String
Get
Return m_sServerAddressRelease
End Get
End Property
Public Sub SetServerAddressRelease(value As String)
m_sServerAddressRelease = value
End Sub
' Versione attuale del programma
Public ReadOnly Property ActualVersion As String
Get
Return My.Application.Info.Version.ToString()
End Get
End Property
''' <summary>
''' Funzione che recupera la directory del file INI
''' </summary>
@@ -84,4 +108,18 @@ Public Module Configuration
Return Default_Value
End Function
''' <summary>
''' Metodo che controlla la comunicazione server
''' </summary>
''' <returns></returns>
Public Function GetComunication() As Boolean
' eseguo test per comunicazione server (ping, alive)
m_commLib = New DataSyncro(EgtBEAMWALL.Core.Configuration.sServerAddressRelease)
If m_commLib.CheckRemote() Then
Return True
Else
Return False
End If
End Function
End Module
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<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>
</assemblyBinding>
</runtime>
</configuration>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EgwProxy.LiMan" version="1.0.2408.718" targetFramework="net472" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
<package id="RestSharp" version="111.2.0" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net472" />
<package id="System.Text.Json" version="8.0.3" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
</packages>
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Egalware s.r.l.")]
[assembly: AssemblyProduct("EgtBEAMWALL.DataLayer")]
[assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")]
[assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.5.12.2")]
[assembly: AssemblyFileVersion("2.5.12.2")]
[assembly: AssemblyVersion("2.7.1.1")]
[assembly: AssemblyFileVersion("2.7.1.1")]
@@ -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

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