Compare commits

..

1 Commits

Author SHA1 Message Date
Emmanuele Sassi 908e407147 - modifiche 2025-11-07 11:12:45 +01:00
343 changed files with 14348 additions and 15062 deletions
+44 -3
View File
@@ -1,6 +1,7 @@
Imports System.Collections.ObjectModel Imports System.Collections.ObjectModel
Imports System.Windows Imports System.Windows
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5
Public Class BTLFeatureM Public Class BTLFeatureM
@@ -219,6 +220,17 @@ Public Class BTLFeatureM
End Set End Set
End Property End Property
' lista dei parametri della feature
Protected m_QBTLParamMList As List(Of BTLParamM)
Public Property QBTLParamMList As List(Of BTLParamM)
Get
Return m_QBTLParamMList
End Get
Set(value As List(Of BTLParamM))
m_QBTLParamMList = value
End Set
End Property
#Region "MESSAGES" #Region "MESSAGES"
Public ReadOnly Property Name_Msg As String Public ReadOnly Property Name_Msg As String
@@ -360,10 +372,20 @@ Public Class BTLFeatureM
RaiseEvent PBTLParamAdded(Me, New BTLParamAddedEventArgs(BTLparamM)) RaiseEvent PBTLParamAdded(Me, New BTLParamAddedEventArgs(BTLparamM))
End If End If
End Sub End Sub
Public Sub AddQBTLParam(BTLparamM As BTLParamM)
If IsNothing(BTLparamM) Then Return
If Not m_QBTLParamMList.Contains(BTLparamM) Then
m_QBTLParamMList.Add(BTLparamM)
RaiseEvent QBTLParamAdded(Me, New BTLParamAddedEventArgs(BTLparamM))
End If
End Sub
Public Function GetPBTLParams() As List(Of BTLParamM) Public Function GetPBTLParams() As List(Of BTLParamM)
Return New List(Of BTLParamM)(m_PBTLParamMList) Return New List(Of BTLParamM)(m_PBTLParamMList)
End Function End Function
Public Function GetQBTLParams() As List(Of BTLParamM)
Return New List(Of BTLParamM)(m_QBTLParamMList)
End Function
' funzione che crea l'elenco dei parametri ' funzione che crea l'elenco dei parametri
Public Sub CreateFeatureParams(NewBTLFeature As BTLFeatureM) Public Sub CreateFeatureParams(NewBTLFeature As BTLFeatureM)
@@ -389,11 +411,12 @@ Public Class BTLFeatureM
TempList.Add(NewBTLParam) TempList.Add(NewBTLParam)
ParamIndex += 1 ParamIndex += 1
End While End While
NewBTLFeature.QBTLParamMList = TempList
End Sub End Sub
' funzione che legge il valore corrente del parametro ' funzione che legge il valore corrente del parametro
Public Function ReadFeatureParams() As Boolean Public Function ReadFeatureParams() As Boolean
Return ReadFeatureParams(m_PBTLParamMList) Return ReadFeatureParams(m_PBTLParamMList) And ReadFeatureParams(m_QBTLParamMList)
End Function End Function
Private Function ReadFeatureParams(ParamList As List(Of BTLParamM)) As Boolean Private Function ReadFeatureParams(ParamList As List(Of BTLParamM)) As Boolean
Dim bToRecalc As Boolean = False Dim bToRecalc As Boolean = False
@@ -478,9 +501,13 @@ Public Class BTLFeatureM
Return True Return True
End Function End Function
' funzione che rilegge i parametri Q
Public Function ReadQValues()
Return ReadFeatureParams(m_QBTLParamMList)
End Function
' funzione che setta i valori di default a tutti i parametri ' funzione che setta i valori di default a tutti i parametri
Public Function SetDefaultValues() As Boolean Public Function SetDefaultValues() As Boolean
Return SetDefaultValues(m_PBTLParamMList) Return SetDefaultValues(m_PBTLParamMList) And SetDefaultValues(m_QBTLParamMList)
End Function End Function
Private Function SetDefaultValues(ParamList As List(Of Core.BTLParamM)) As Boolean Private Function SetDefaultValues(ParamList As List(Of Core.BTLParamM)) As Boolean
' leggo valore parametro da struttura geometrica ' leggo valore parametro da struttura geometrica
@@ -517,6 +544,16 @@ Public Class BTLFeatureM
vPar = vTempPar vPar = vTempPar
sPar = If(String.IsNullOrEmpty(sTempPar), " ", sTempPar) sPar = If(String.IsNullOrEmpty(sTempPar), " ", sTempPar)
End If End If
' Determino parametri Q
Dim vTempParQ(m_QBTLParamMList.Count) As String
For ParQIndex = 0 To m_QBTLParamMList.Count - 1
Dim ParQ As BTLParamM = m_QBTLParamMList(ParQIndex)
vTempParQ(ParQIndex) = ParQ.sName & ":" & If(ParQ.nType <> BTLParamType.STRING_, DoubleToString(ParQ.dValue, 3), ParQ.sValue)
Next
Dim sDO As String = ""
If Not bDO Then sDO = 0
vTempParQ(m_QBTLParamMList.Count) = "DO:" & sDO
vParQ = vTempParQ
Return True Return True
End Function End Function
@@ -537,6 +574,10 @@ Public Class BTLFeatureM
frNewRef, vNewParP, sNewPar, vNewParQ, nCrvId, nCrv2Id, bUpdate) frNewRef, vNewParP, sNewPar, vNewParQ, nCrvId, nCrv2Id, bUpdate)
Dim bOk As Boolean = nFeatureId <> GDB_ID.NULL Dim bOk As Boolean = nFeatureId <> GDB_ID.NULL
If bOk Then If bOk Then
' riporto parametri Q custom
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) SetFeatureId(nFeatureId)
' imposto modificato per copie ' imposto modificato per copie
@@ -544,7 +585,7 @@ Public Class BTLFeatureM
bOk = True bOk = True
Else Else
' Impossibile creare una feature con questi valori - ERRORE ' Impossibile creare una feature con questi valori - ERRORE
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61852), EgtMsg(30007)) MessageBox.Show(EgtMsg(61852), EgtMsg(30007))
nFeatureId = EgtBeamModifyProcess(Me.nFeatureId, Me.nSelGRP, Me.nPRC, Me.nSelSIDE, "", Me.nPRID, nFeatureId = EgtBeamModifyProcess(Me.nFeatureId, Me.nSelGRP, Me.nPRC, Me.nSelSIDE, "", Me.nPRID,
Me.frFRAME, vPar, sPar, vParQ, nCrvId, nCrv2Id) Me.frFRAME, vPar, sPar, vParQ, nCrvId, nCrv2Id)
SetFeatureId(nFeatureId) SetFeatureId(nFeatureId)
+2 -4
View File
@@ -958,9 +958,7 @@ Public Class BTLPartM
NewBTLPart.nState = CalcStates.OK NewBTLPart.nState = CalcStates.OK
Case 22 Case 22
NewBTLPart.nState = CalcStates.COLLISION NewBTLPart.nState = CalcStates.COLLISION
Case 17 Case 17, 19
NewBTLPart.nState = CalcStates.SECTION
Case 19
NewBTLPart.nState = CalcStates.WARNING NewBTLPart.nState = CalcStates.WARNING
Case < 0 Case < 0
NewBTLPart.nState = CalcStates.INFO NewBTLPart.nState = CalcStates.INFO
@@ -1061,7 +1059,7 @@ Public Class BTLPartM
' ripristino inversione ' ripristino inversione
Inversion(SelectedMachineType) Inversion(SelectedMachineType)
End If End If
If bRedraw Then EgtRedraw() If bRedraw Then EgtDraw()
Return bOk Return bOk
End Function End Function
@@ -13,7 +13,6 @@ Public Class BTLFeatureVM
End Get End Get
End Property End Property
Protected m_BTLPartM As BTLPartM Protected m_BTLPartM As BTLPartM
Protected m_PartM As PartM
Public ReadOnly Property nFeatureId As Integer Public ReadOnly Property nFeatureId As Integer
Get Get
@@ -210,23 +209,6 @@ Public Class BTLFeatureVM
End Set End Set
End Property End Property
Private m_bStrategy_Visibility As Visibility = Visibility.Collapsed
Public ReadOnly Property bStrategy_Visibility As Visibility
Get
Return m_bStrategy_Visibility
End Get
End Property
Public Sub SetbStrategy_Visibility(value As Boolean)
m_bStrategy_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bStrategy_Visibility))
End Sub
Public ReadOnly Property IsEnabled As Boolean
Get
Return m_PartM.nProductionState < ItemState.Assigned
End Get
End Property
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
Sub New() Sub New()
@@ -1,14 +1,15 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="BeamMachiningsWindowV" <EgtWPFLib5:EgtCustomWindow x:Class="BeamMachiningsWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core" xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
WindowStyle="None" Title="{Binding Title}"
Width="500" Height="450" WindowStyle="None" ResizeMode="NoResize"
WindowStartupLocation="CenterOwner" Width="500" Height="450"
ShowInTaskbar="False" IsResizable="False"
Title="{Binding Title}" IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
@@ -21,9 +22,9 @@
SelectedItem="{Binding SelMachining}" SelectedItem="{Binding SelMachining}"
IsSynchronizedWithCurrentItem="True" IsSynchronizedWithCurrentItem="True"
Margin="5,0,5,0" Margin="5,0,5,0"
Style="{StaticResource OnlyHeaders_TabControl}"/> Style="{StaticResource OnlyProdTabControl_OnlyHeaders}"/>
<Border Grid.Row="1" Margin="0,1,0,2" Style="{StaticResource Optimizer_Border}"> <Border Grid.Row="1" Margin="0,1,0,2" Style="{StaticResource OnlyProdPage_Border}">
<EgtBEAMWALLCORE:EgtDataGrid Grid.Row="1" <EgtBEAMWALLCORE:EgtDataGrid Grid.Row="1"
ItemsSource="{Binding TableRowList}" ItemsSource="{Binding TableRowList}"
@@ -40,7 +41,7 @@
AlternationCount="2" AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}" ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}" CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
Style="{StaticResource Optimizer_DataGrid}"> Style="{StaticResource DataGrid_OnlyProd}">
<DataGrid.RowStyle> <DataGrid.RowStyle>
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}"> <Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
@@ -67,14 +68,14 @@
<DataGridCheckBoxColumn x:Key="colON" Binding="{Binding OnPar, UpdateSourceTrigger=PropertyChanged}" <DataGridCheckBoxColumn x:Key="colON" Binding="{Binding OnPar, UpdateSourceTrigger=PropertyChanged}"
CellStyle="{StaticResource DataGridCheckBoxColumn_Style}"> CellStyle="{StaticResource DataGridCheckBoxColumn_Style}">
<DataGridCheckBoxColumn.Header> <DataGridCheckBoxColumn.Header>
<TextBlock Text="{Binding Path=DataContext.OnHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"/> <TextBlock Text="{Binding Path=DataContext.OnHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridCheckBoxColumn.Header> </DataGridCheckBoxColumn.Header>
</DataGridCheckBoxColumn> </DataGridCheckBoxColumn>
<!--Colonna Name--> <!--Colonna Name-->
<DataGridTemplateColumn x:Key="colNAME"> <DataGridTemplateColumn x:Key="colNAME">
<DataGridTemplateColumn.Header> <DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.NameHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"/> <TextBlock Text="{Binding Path=DataContext.NameHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header> </DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate> <DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate> <DataTemplate>
@@ -95,7 +96,7 @@
<!--Colonna Style--> <!--Colonna Style-->
<DataGridTemplateColumn x:Key="colTYPE"> <DataGridTemplateColumn x:Key="colTYPE">
<DataGridTemplateColumn.Header> <DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.TypeHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"/> <TextBlock Text="{Binding Path=DataContext.TypeHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header> </DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate> <DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate> <DataTemplate>
@@ -132,29 +133,29 @@
Command="{Binding MoveRowUp_Command}" Command="{Binding MoveRowUp_Command}"
Grid.Column="0" Grid.Column="0"
Margin="0,0,2.5,0" Margin="0,0,2.5,0"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="\/" <Button Content="\/"
Command="{Binding MoveRowDown_Command}" Command="{Binding MoveRowDown_Command}"
Grid.Column="1" Grid.Column="1"
Margin="2.5,0,2.5,0" Margin="2.5,0,2.5,0"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding AddRowMsg}" <Button Content="{Binding AddRowMsg}"
Command="{Binding AddRow_Command}" Command="{Binding AddRow_Command}"
Grid.Column="2" Grid.Column="2"
Margin="2.5,0,2.5,0" Margin="2.5,0,2.5,0"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding DeleteRowMsg}" <Button Content="{Binding DeleteRowMsg}"
Command="{Binding DeleteRow_Command}" Command="{Binding DeleteRow_Command}"
Grid.Column="3" Grid.Column="3"
Margin="2.5,0,2.5,0" Margin="2.5,0,2.5,0"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding SaveMsg}" <Button Content="{Binding SaveMsg}"
Command="{Binding Save_Command}" Command="{Binding Save_Command}"
Grid.Column="4" Grid.Column="4"
Margin="2.5,0,0,0" Margin="2.5,0,0,0"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</Grid> </Grid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_BeamMachiningsWindowVM As MyBeamMachiningsWindowVM Private WithEvents m_BeamMachiningsWindowVM As MyBeamMachiningsWindowVM
Sub New(Owner As System.Windows.Window, BeamMachiningsWindowVM As MyBeamMachiningsWindowVM) Sub New(Owner As System.Windows.Window, BeamMachiningsWindowVM As MyBeamMachiningsWindowVM)
MyBase.New(Owner)
' This call is required by the designer. ' This call is required by the designer.
InitializeComponent() InitializeComponent()
Me.DataContext = BeamMachiningsWindowVM Me.DataContext = BeamMachiningsWindowVM
@@ -25,7 +25,6 @@ Public Module CalcIntegration
EDIT = 7 EDIT = 7
CHECKNOSIM = 8 CHECKNOSIM = 8
TOPOLOGY = 9 TOPOLOGY = 9
FLIP_ROT = 10
OPENTOOLDB = 11 ' Non utilizzato OPENTOOLDB = 11 ' Non utilizzato
OPENMACHINIGDB = 12 ' Non utilizzato OPENMACHINIGDB = 12 ' Non utilizzato
End Enum End Enum
@@ -220,7 +219,6 @@ Public Module CalcIntegration
' se sono in simulazione ' se sono in simulazione
If bIsSimulation Then If bIsSimulation Then
Dim sOriPath As String = Path.ChangeExtension(vBar(0).sBarPath, ".ori.bwe") Dim sOriPath As String = Path.ChangeExtension(vBar(0).sBarPath, ".ori.bwe")
If String.IsNullOrWhiteSpace(sOriPath) Then Return
' se file modificato a mano ' se file modificato a mano
If File.GetLastWriteTime(sOriPath) < File.GetLastWriteTime(vBar(0).sBarPath) Then If File.GetLastWriteTime(sOriPath) < File.GetLastWriteTime(vBar(0).sBarPath) Then
' aggiorno progetto ' aggiorno progetto
@@ -397,6 +395,9 @@ Public Module CalcIntegration
If EgtSaveMachGroupToFile(nMachGroupId, {EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO), EgtGetFirstNameInGroup(GDB_ID.ROOT, PROJECTINFO)}, sMachGroupFilePath, NGE.CMPTEXT) Then If EgtSaveMachGroupToFile(nMachGroupId, {EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO), EgtGetFirstNameInGroup(GDB_ID.ROOT, PROJECTINFO)}, sMachGroupFilePath, NGE.CMPTEXT) Then
Return sMachGroupFilePath Return sMachGroupFilePath
End If End If
'If EgtSaveObjToFile(nMachGroupId, sMachGroupFilePath, NGE.CMPTEXT) Then
' Return sMachGroupFilePath
'End If
Return String.Empty Return String.Empty
End Function End Function
@@ -8,38 +8,41 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Style="{StaticResource List_StackPanel}"> <Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<StackPanel Margin="5,5,5,0">
<GroupBox Header="{Binding CurrentLanguage_Msg}" <GroupBox Header="{Binding CurrentLanguage_Msg}"
Style="{StaticResource Warehouse_GroupBox}"> Margin="0,0,0,5"
<UniformGrid Rows="2" Foreground="{StaticResource BeamWall_Corduroy}">
Style="{StaticResource General_UniformGrid}"> <UniformGrid Rows="2" Margin="3,3,3,3">
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" <ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
SelectedItem="{Binding SelectedLanguage}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
DisplayMemberPath="Name" Margin="0,0,0,5" Style="{StaticResource OnlyProd_ComboBox}" />
Style="{StaticResource General_ComboBox}"/> <TextBlock Text="{Binding LanguageAdvert_Msg}" TextWrapping="Wrap"
<TextBlock Text="{Binding LanguageAdvert_Msg}" TextAlignment="Center"/>
Style="{StaticResource General_TextBlock}"/>
</UniformGrid> </UniformGrid>
</GroupBox> </GroupBox>
<UniformGrid Columns="2" <UniformGrid Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}"> Margin="0,0,0,5">
<TextBlock Text="{Binding MMUnits_Msg}" <TextBlock Text="{Binding MMUnits_Msg}" VerticalAlignment="Center" Foreground="{StaticResource BeamWall_Corduroy}"/>
Style="{StaticResource MMUnits_TextBlock}"/>
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}" <ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
SelectedIndex="{Binding SelMeasureUnit}" SelectedIndex="{Binding SelMeasureUnit}" Height="25"
Style="{StaticResource UnitMeasureList_ComboBox}"/> Margin="0,5,0,0" Style="{StaticResource OnlyProd_ComboBox}" />
</UniformGrid> </UniformGrid>
<GroupBox Header="{Binding Nesting_Msg}" <GroupBox Header="{Binding Nesting_Msg}"
Style="{StaticResource Warehouse_GroupBox}"> Margin="0,0,0,5"
Foreground="{StaticResource BeamWall_Corduroy}">
<StackPanel> <StackPanel>
<UniformGrid Columns="2" <UniformGrid Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}"> Margin="0,0,0,5">
<TextBlock Text="{Binding SectionTime_Msg}"/> <TextBlock Text="{Binding SectionTime_Msg}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding SectionTime, UpdateSourceTrigger=Explicit}"/> Text="{Binding SectionTime, UpdateSourceTrigger=Explicit}"/>
</UniformGrid> </UniformGrid>
<UniformGrid Columns="2" <UniformGrid Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}"> Margin="0,0,0,5">
<TextBlock Grid.Row="1" Text="{Binding PartTime_Msg}"/> <TextBlock Grid.Row="1" Text="{Binding PartTime_Msg}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1" <EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1" Grid.Column="1"
@@ -48,14 +51,13 @@
</StackPanel> </StackPanel>
</GroupBox> </GroupBox>
<UniformGrid Columns="2" <UniformGrid Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}"> Margin="0,0,0,5">
<TextBlock Text="{Binding PrintLabel_Msg}" <TextBlock Text="{Binding PrintLabel_Msg}" VerticalAlignment="Center" Foreground="{StaticResource BeamWall_Corduroy}"/>
Style="{StaticResource MMUnits_TextBlock}"/>
<CheckBox IsChecked="{Binding bPrintLabel_IsChecked}" <CheckBox IsChecked="{Binding bPrintLabel_IsChecked}"
Style="{StaticResource General_CheckBox}"/> Margin="0,5,0,0"/>
</UniformGrid> </UniformGrid>
<GroupBox Header="{Binding BackupRestore_Msg}" <GroupBox Header="Backup And Restore"
Style="{StaticResource Optimizer_GroupBox}"> Foreground="{StaticResource BeamWall_Corduroy}">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -63,76 +65,66 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource General_Grid}"> <Grid Margin="0,2,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<CheckBox x:Name="ExternalBackup_CheckBox" <CheckBox x:Name="ExternalBackup_CheckBox"
IsChecked="{Binding bExternalBackupActive}" IsChecked="{Binding bExternalBackupActive}"
Style="{StaticResource PParameters_CheckBox}"/> VerticalAlignment="Center"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding External_Msg}" Text="External file path:"
Style="{StaticResource Ext_TextBlock}"/> VerticalAlignment="Center"/>
</Grid> </Grid>
<Grid Grid.Row="1" <Grid Grid.Row="1"
Style="{StaticResource General_Grid}"> Margin="0,2,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBox Text="{Binding ExternalBackupFolderPath}" <TextBox Text="{Binding ExternalBackupFolderPath}"
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}" IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
Style="{StaticResource General_TextBox}"/> Margin="0,0,2.5,0"/>
<Button Grid.Column="1" <Button Grid.Column="1"
Content="..." Content="..."
Foreground="{StaticResource BeamWall_White}" Foreground="{StaticResource BeamWall_White}"
Width="20"
Height="20"
Command="{Binding ChooseExternalBackupFolderPath_Command}" Command="{Binding ChooseExternalBackupFolderPath_Command}"
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}" IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
Style="{StaticResource General_Button}"/> Margin="2.5,0,0,0"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</Grid> </Grid>
<Grid Grid.Row="2"> <Grid Grid.Row="2">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="{Binding Remainder_Msg}"/> <TextBlock Text="Reminder Frequency"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding ReminderList}" ItemsSource="{Binding ReminderList}"
SelectedItem="{Binding SelReminder}" SelectedItem="{Binding SelReminder}"
Style="{StaticResource GeneralConfiguration_ComboBox}" /> Margin="0,0,0,5" Style="{StaticResource OnlyProd_ComboBox}" />
</Grid> </Grid>
<StackPanel Grid.Row="3" <StackPanel Grid.Row="3"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<Button Content="{Binding Backup_Msg}" <Button Content="Backup"
Command="{Binding Backup_Command}" Command="{Binding Backup_Command}"
Style="{StaticResource MovePartInRawPartWnd_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"
<Button Content="{Binding Restore_Msg}" Margin="0,0,5,0"/>
<Button Content="Restore"
Command="{Binding Restore_Command}" Command="{Binding Restore_Command}"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</GroupBox> </GroupBox>
<!--<UniformGrid Columns="2" <UniformGrid Columns="2"
Style="{StaticResource GeneralConfiguration_UniformGrid}"> Margin="0,5,0,0">
<TextBlock Text="{Binding Import_Msg}" <TextBlock Text="Importa BTL con verifica" VerticalAlignment="Center" Foreground="{StaticResource BeamWall_Corduroy}"/>
Style="{StaticResource MMUnits_TextBlock}"/>
<CheckBox IsChecked="{Binding bVerifyImportBTL_IsChecked}" <CheckBox IsChecked="{Binding bVerifyImportBTL_IsChecked}"
Style="{StaticResource General_CheckBox}"/> Margin="0,5,0,0"/>
</UniformGrid> </UniformGrid>
<GroupBox Header="{Binding Tema_Msg}"
Style="{StaticResource Warehouse_GroupBox}">
<UniformGrid Rows="2"
Style="{StaticResource General_UniformGrid}">
<ComboBox ItemsSource="{Binding Themes, Mode=OneWay}"
SelectedItem="{Binding SelectedTheme}"
DisplayMemberPath="Name"
Style="{StaticResource General_ComboBox}"/>
<TextBlock Text="{Binding TemaAdvert_Msg}"
Style="{StaticResource General_TextBlock}"/>
</UniformGrid>
</GroupBox>-->
</StackPanel> </StackPanel>
</Grid> </Grid>
@@ -14,36 +14,30 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<GroupBox Style="{StaticResource MachineConfiguration_GroupBox}"> <GroupBox Style="{StaticResource GroupBoxStyle_NoHeader}" Padding="5,10,5,5">
<EgtBEAMWALLCORE:MachinePanelV DataContext="{Binding MachinePanelVM}" VerticalAlignment="Center"/> <EgtBEAMWALLCORE:MachinePanelV DataContext="{Binding MachinePanelVM}" VerticalAlignment="Center"/>
</GroupBox> </GroupBox>
</StackPanel> </StackPanel>
<StackPanel Grid.Row="1" <StackPanel Grid.Row="1" Orientation="Horizontal" Visibility="{Binding MachineParameter_Visibility}">
Visibility="{Binding MachineParameter_Visibility}"
Style="{StaticResource PartManager_StackPanel}">
<ItemsControl ItemsSource="{Binding ConfigMachTableList}"> <ItemsControl ItemsSource="{Binding ConfigMachTableList}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel x:Name="GroupStackPanel" <StackPanel x:Name="GroupStackPanel" Orientation="Horizontal"/>
Style="{StaticResource PartManager_StackPanel}"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<GroupBox Header="{Binding sName}" <GroupBox Header="{Binding sName}" Width="Auto" VerticalAlignment="Top" Height="Auto" Foreground="{StaticResource BeamWall_Corduroy}">
Style="{StaticResource MachineParam_GroupBox}"> <ItemsControl Name="MachParamsItemsControl" ItemsSource="{Binding MachParamList}" Margin="0,5,0,0">
<ItemsControl Name="MachParamsItemsControl"
ItemsSource="{Binding MachParamList}"
Style="{StaticResource MachinePanel_ItemsControl}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<WrapPanel Style="{StaticResource Project_WrapPanel}"/> <WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Style="{StaticResource MachParam_Grid}"> <Grid Margin="0,0,5,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
@@ -51,14 +45,18 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}" <TextBlock Text="{Binding sName}"
ToolTip="{Binding sName}" ToolTip="{Binding sName}"
Style="{StaticResource MachinePanel_TextBlock}"/> TextWrapping="WrapWithOverflow"
Width="150"
Style="{StaticResource MachParamTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}" Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Style="{StaticResource MachineConfiguration_TextBox}"/> Width="60"/>
<TextBlock Grid.Column="2" <TextBlock Grid.Column="2"
Text="{Binding sDescription}" Text="{Binding sDescription}"
ToolTip="{Binding sDescription}" ToolTip="{Binding sDescription}"
Style="{StaticResource Description_TextBlock}"/> TextWrapping="WrapWithOverflow"
Width="148"
Style="{StaticResource MachParamTextBlock}"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
@@ -74,8 +72,7 @@
ToolTip="{Binding SaveToolTip}" ToolTip="{Binding SaveToolTip}"
Visibility="{Binding Machine_Visibility}" Visibility="{Binding Machine_Visibility}"
Style="{StaticResource SaveMachinePanel_Button}"> Style="{StaticResource SaveMachinePanel_Button}">
<Image Source="{StaticResource Save_Image}" <Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
</Grid> </Grid>
-3
View File
@@ -309,7 +309,4 @@
' parametri modifica percorsi free contour ' parametri modifica percorsi free contour
Public Const PATH_SIDEANGLAYER As String = "SideAngLayer" Public Const PATH_SIDEANGLAYER As String = "SideAngLayer"
' Strategia
Public Const AI_SETUP As String = "AISETUP"
Public Const STRATEGY As String = "STRATEGY"
End Module End Module
@@ -1,7 +1,10 @@
Public Module ConstDataGridColumnsIni Public Module ConstDataGridColumnsIni
Public Const DATAGRIDCOLUMNS_FILE_NAME As String = "DataGridColumns.json" 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"
Public Const S_OPENPROJFILEDLG_PROD As String = "DG_OpenProjectFileDialog_PROD" Public Const S_OPENPROJFILEDLG_PROD As String = "DG_OpenProjectFileDialog_PROD"
Public Const S_NEWOPENPROJFILEDLG_PROD As String = "DG_NewOpenProjectFileDialog_PROD" Public Const S_NEWOPENPROJFILEDLG_PROD As String = "DG_NewOpenProjectFileDialog_PROD"
Public Const S_RAWPARTLIST_BEAM As String = "DG_RawPartList_BEAM" Public Const S_RAWPARTLIST_BEAM As String = "DG_RawPartList_BEAM"
@@ -9,6 +12,8 @@
Public Const S_PARTINRAWPARTLIST_BEAM As String = "DG_PartInRawPartList_BEAM" Public Const S_PARTINRAWPARTLIST_BEAM As String = "DG_PartInRawPartList_BEAM"
Public Const S_PARTINRAWPARTLIST_WALL As String = "DG_PartInRawPartList_WALL" Public Const S_PARTINRAWPARTLIST_WALL As String = "DG_PartInRawPartList_WALL"
Public Const S_PARAMETERLIST_P As String = "DG_ParameterList_P" Public Const S_PARAMETERLIST_P As String = "DG_ParameterList_P"
Public Const S_PARAMETERLIST_Q As String = "DG_ParameterList_Q"
Public Const S_DUPLOPARAMETERLIST_Q As String = "DG_DuploParameterList_Q"
Public Const S_RAWPARTLIST_SUPERVISOR As String = "DG_RawPartList_SUPERVISOR" Public Const S_RAWPARTLIST_SUPERVISOR As String = "DG_RawPartList_SUPERVISOR"
Public Const S_PARTINRAWPARTLIST_SUPERVISOR As String = "DG_PartInRawPartList_SUPERVISOR" Public Const S_PARTINRAWPARTLIST_SUPERVISOR As String = "DG_PartInRawPartList_SUPERVISOR"
Public Const S_FEATUREINPARTINRAWPARTLIST_SUPERVISOR As String = "DG_FeatureInPartInRawPartList_SUPERVISOR" Public Const S_FEATUREINPARTINRAWPARTLIST_SUPERVISOR As String = "DG_FeatureInPartInRawPartList_SUPERVISOR"
@@ -18,8 +23,11 @@
Public Const S_STATISTICS_PART As String = "DG_Statistics_PART" Public Const S_STATISTICS_PART As String = "DG_Statistics_PART"
Public Const S_OPTIMIZERSTATISTICS As String = "DG_OptimizerStatistics" Public Const S_OPTIMIZERSTATISTICS As String = "DG_OptimizerStatistics"
Public Const S_RAWPARTSTATISTICS As String = "DG_RawPartStatistics" Public Const S_RAWPARTSTATISTICS As String = "DG_RawPartStatistics"
Public Const S_BEAMMACHININGS As String = "DG_BeamMachinings"
Public Const S_SPARAMLIST_BEAM As String = "DG_SParamList_BEAM" Public Const S_SPARAMLIST_BEAM As String = "DG_SParamList_BEAM"
Public Const S_SPARAMLIST_WALL As String = "DG_SParamList_WALL" Public Const S_SPARAMLIST_WALL As String = "DG_SParamList_WALL"
Public Const S_SECTXMATLIST_BEAM As String = "DG_SectXMatList_BEAM"
Public Const S_SECTXMATLIST_WALL As String = "DG_SectXMatList_WALL"
Public Const S_VARIABLESLIST As String = "DG_VariablesList" Public Const S_VARIABLESLIST As String = "DG_VariablesList"
Public Const S_MDICOMMANDS As String = "DG_MDICommands" Public Const S_MDICOMMANDS As String = "DG_MDICommands"
Public Const S_MACHINELOG As String = "DG_MachineLog" Public Const S_MACHINELOG As String = "DG_MachineLog"
+5 -1
View File
@@ -2,9 +2,13 @@
Public Const DIMENSIONS_FILE_NAME As String = "Dimensions.ini" Public Const DIMENSIONS_FILE_NAME As String = "Dimensions.ini"
Public Const PROJECT_VIEW As String = "Project_View"
Public Const PROJECT_OPTIMIZER As String = "Project_Optimizer"
Public Const LEFTPANEL_VIEW As String = "LeftPanel_View" Public Const LEFTPANEL_VIEW As String = "LeftPanel_View"
Public Const LEFTPANEL_OPTIMIZER As String = "LeftPanel_Optimizer"
Public Const TOPPANEL_OPTIMIZER As String = "TopPanel_Optimizer"
Public Const LEFTPANEL_SUPERVISOR As String = "LeftPanel_Supervisor" Public Const LEFTPANEL_SUPERVISOR As String = "LeftPanel_Supervisor"
Public Const PROJECT_SUPERVISOR As String = "Project_Supervisor" Public Const PROJECT_SUPERVISOR As String = "Project_Supervisor"
Public Const PROJECT_AEDIFICA As String = "Project_Aedifica" Public Const PROJECT_ONLYPROD As String = "Project_OnlyProd"
End Class End Class
+4 -9
View File
@@ -19,7 +19,7 @@ Public Module ConstGen
Public Const K_DATAROOT As String = "DataRoot" Public Const K_DATAROOT As String = "DataRoot"
' File con dati di licenza ' File con dati di licenza
Public Const LIC_FILE_NAME As String = "Aedifica.lic" Public Const LIC_FILE_NAME As String = "EgtBEAMWALL.lic"
Public Const S_LICENCE As String = "Licence" Public Const S_LICENCE As String = "Licence"
Public Const K_LOCKID As String = "LockId" Public Const K_LOCKID As String = "LockId"
Public Const K_KEY As String = "Key" Public Const K_KEY As String = "Key"
@@ -35,7 +35,7 @@ Public Module ConstGen
CONFIG = 3 CONFIG = 3
INPUTS = 4 INPUTS = 4
OUTPUTS = 5 OUTPUTS = 5
OPTIMIZERPAGE = 6 ONLYPRODPAGE = 6
CONFIGPROGRAM = 7 CONFIGPROGRAM = 7
End Enum End Enum
@@ -57,8 +57,8 @@ Public Module ConstGen
End Enum End Enum
' File di log generale ' File di log generale
Public Const VWOPTGENLOG_FILE_NAME As String = "Aedifica.OptimizerLog#.txt" Public Const VWOPTGENLOG_FILE_NAME As String = "EgtBEAMWALL.OptimizerLog#.txt"
Public Const SUPGENLOG_FILE_NAME As String = "Aedifica.SupervisorLog#.txt" Public Const SUPGENLOG_FILE_NAME As String = "EgtBEAMWALL.SupervisorLog#.txt"
' Sottodirettorio di configurazione ' Sottodirettorio di configurazione
Public Const CONF_DIR As String = "Config" Public Const CONF_DIR As String = "Config"
@@ -90,8 +90,6 @@ Public Module ConstGen
Public Const MACHINES_DFL_DIR As String = "Machines" Public Const MACHINES_DFL_DIR As String = "Machines"
' Sottodirettorio di default per toolmakers ' Sottodirettorio di default per toolmakers
Public Const TOOLMAKERS_DFL_DIR As String = "ToolMakers" Public Const TOOLMAKERS_DFL_DIR As String = "ToolMakers"
' Sottodirettorio di immagini
Public Const IMAGE_DIR As String = "Image"
' Nome file Lua con le funzioni di attrezzaggio ' Nome file Lua con le funzioni di attrezzaggio
Public Const SETUP_LUA As String = "SetUp.lua" Public Const SETUP_LUA As String = "SetUp.lua"
' Nome eseguibile per stampa ' Nome eseguibile per stampa
@@ -110,7 +108,4 @@ Public Module ConstGen
Public Const CUSTOMERCONFIG_FILE As String = "CustomerConfig" Public Const CUSTOMERCONFIG_FILE As String = "CustomerConfig"
' File contenente i parametri generali ' File contenente i parametri generali
Public Const GENERALPARAMETERS_FILE As String = "GeneralParameters" Public Const GENERALPARAMETERS_FILE As String = "GeneralParameters"
' Info per temi
Public Const THEMES_FOLDER As String = "Themes"
Public Const DICTIONARY_FILENAME As String = "Dictionary.xaml"
End Module End Module
+2 -6
View File
@@ -13,8 +13,7 @@
Public Module ConstIni Public Module ConstIni
Public Const INI_FILE_NAME As String = "Aedifica.ini" Public Const INI_FILE_NAME As String = "EgtBEAMWALL.ini"
Public Const CONFIG_FILE_NAME As String = "Config.ini"
Public Const K_NETKEY As String = "NetKey" Public Const K_NETKEY As String = "NetKey"
Public Const K_MAXCAMINST As String = "MaxCamInstances" Public Const K_MAXCAMINST As String = "MaxCamInstances"
@@ -57,7 +56,6 @@ Public Module ConstIni
Public Const K_CALCPATH As String = "CalcPath" Public Const K_CALCPATH As String = "CalcPath"
Public Const K_BEAMBASEDIR As String = "BaseDir" Public Const K_BEAMBASEDIR As String = "BaseDir"
Public Const K_BEAMBWEEXEC As String = "BweExec" Public Const K_BEAMBWEEXEC As String = "BweExec"
Public Const K_FLIPROTEXEC As String = "FlipRotExec"
Public Const S_WALL As String = "Wall" Public Const S_WALL As String = "Wall"
Public Const S_WALLNEW As String = "WallNew" Public Const S_WALLNEW As String = "WallNew"
@@ -109,7 +107,6 @@ Public Module ConstIni
Public Const S_WAREHOUSE As String = "Warehouse" Public Const S_WAREHOUSE As String = "Warehouse"
Public Const K_TYPE As String = "Type" Public Const K_TYPE As String = "Type"
Public Const K_DEFAULTQUANTITY As String = "DefaultQuantity" Public Const K_DEFAULTQUANTITY As String = "DefaultQuantity"
Public Const K_DEFAULTLENGTH As String = "DefaultLength"
Public Const S_SECTION As String = "Section_Checked" Public Const S_SECTION As String = "Section_Checked"
Public Const S_IMAGE As String = "Image_Checked" Public Const S_IMAGE As String = "Image_Checked"
@@ -121,6 +118,7 @@ Public Module ConstIni
Public Const K_EXTERNALFILEPATH As String = "ExternalFilePath" Public Const K_EXTERNALFILEPATH As String = "ExternalFilePath"
Public Const K_REMINDERFREQUENCY As String = "ReminderFrequency" Public Const K_REMINDERFREQUENCY As String = "ReminderFrequency"
Public Const K_ONLYPROD As String = "OnlyProd"
Public Const K_MODIFYSETUP As String = "ModifySetup" Public Const K_MODIFYSETUP As String = "ModifySetup"
Public Const K_MACHCONFIG As String = "MachConfig" Public Const K_MACHCONFIG As String = "MachConfig"
@@ -136,6 +134,4 @@ Public Module ConstIni
Public Const K_DEFAULTCONFIG As String = "DefaultConfiguration" Public Const K_DEFAULTCONFIG As String = "DefaultConfiguration"
Public Const K_VERIFYIMPORTBTL As String = "VerifyImportBTL" Public Const K_VERIFYIMPORTBTL As String = "VerifyImportBTL"
Public Const K_THEMA As String = "Thema"
End Module End Module
+9 -19
View File
@@ -56,9 +56,6 @@
<Reference Include="EgwProxy.LiMan, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <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> <HintPath>..\packages\EgwProxy.LiMan.1.0.2408.718\lib\EgwProxy.LiMan.dll</HintPath>
</Reference> </Reference>
<Reference Include="EgwWPFBaseLib, Version=3.1.1.2, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EgwWPFBaseLib.3.1.1.2\lib\EgwWPFBaseLib.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <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> <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference> </Reference>
@@ -119,6 +116,10 @@
<Import Include="System.Xml.Linq" /> <Import Include="System.Xml.Linq" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="BeamMachiningsWindow\MyBeamMachiningsWindowVM.vb" />
<Compile Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml.vb">
<DependentUpon>BeamMachiningsWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="BTLViewModel\BTLFeatureVM.vb" /> <Compile Include="BTLViewModel\BTLFeatureVM.vb" />
<Compile Include="CALCPanel\CalcEditEndEventArgs.vb" /> <Compile Include="CALCPanel\CalcEditEndEventArgs.vb" />
<Compile Include="ConfigurationPage\Machine_ConfigurationPageV.xaml.vb"> <Compile Include="ConfigurationPage\Machine_ConfigurationPageV.xaml.vb">
@@ -182,10 +183,6 @@
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml.vb"> <Compile Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml.vb">
<DependentUpon>OpenProjectFileDialogV.xaml</DependentUpon> <DependentUpon>OpenProjectFileDialogV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="OptmizerWindow\OptimizerWindow.vb" />
<Compile Include="TitleBar\TitleBarV.xaml.vb">
<DependentUpon>TitleBarV.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\Configuration.vb" /> <Compile Include="Utility\Configuration.vb" />
<Compile Include="ProjectFileVM\ProdItem.vb" /> <Compile Include="ProjectFileVM\ProdItem.vb" />
<Compile Include="Utility\DimensionsIniFile.vb" /> <Compile Include="Utility\DimensionsIniFile.vb" />
@@ -257,6 +254,10 @@
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Page Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ConfigurationPage\Machine_ConfigurationPageV.xaml"> <Page Include="ConfigurationPage\Machine_ConfigurationPageV.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -301,23 +302,12 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="TitleBar\TitleBarV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ViewPanel\ViewPanelV.xaml"> <Page Include="ViewPanel\ViewPanelV.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\EgalwareLogo.ico" />
<Content Include="Resources\PartManager\Locked.old.png" />
<Content Include="Resources\PartManager\Unlocked.old.png" />
<Content Include="Resources\ProjectManager\Save.png" /> <Content Include="Resources\ProjectManager\Save.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -326,6 +316,6 @@
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>copy $(TargetPath) c:\EgtProg\Aedifica\EgtBEAMWALL.Core.dll</PostBuildEvent> <PostBuildEvent>copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.Core.dll</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
@@ -1,218 +1,268 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="EgtColorPickerV" <EgtWPFLib5:EgtCustomWindow x:Class="EgtColorPickerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core" Title="{Binding sTitle}"
Title="{Binding sTitle}" WindowStartupLocation="CenterOwner"
WindowStartupLocation="CenterOwner" SizeToContent="WidthAndHeight"
SizeToContent="WidthAndHeight" WindowStyle="None" ResizeMode="NoResize"
ShowInTaskbar="False" IsMinimizable="False" ShowInTaskbar="False"
Width="750" Height="450" Width="750" Height="450"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TabControl>
<TabItem Header="{Binding BasicColor_Msg}">
<Grid HorizontalAlignment="Center"
VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding BasicColors}"
SelectedItem="{Binding SelColor}"
HorizontalAlignment="Center"
BorderThickness="0">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="13"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Rectangle Width="20"
Height="20"
Margin="2"
Stroke="Black"
StrokeThickness="0.5"
Fill="{Binding Fill}"/>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
</TabItem>
<TabItem Header="{Binding ColorPicker_Msg}">
<TabItem.Resources>
<Style TargetType="{x:Type EgtWPFLib5:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
<Setter Property="BorderThickness" Value="1.5"/>
<Setter Property="BorderBrush" Value="White"/>
</Style>
</TabItem.Resources>
<EgtWPFLib5:EgtHexList ItemsSource="{Binding HexList}"
SelectedItem="{Binding sHexSelColor}"
Orientation="Vertical"
Margin="2.5"
RowCount="13"
ColumnCount="13"
Height="300"
Width="350"
Style="{StaticResource EgtHexList}">
<EgtWPFLib5:EgtHexList.ItemTemplate>
<DataTemplate/>
</EgtWPFLib5:EgtHexList.ItemTemplate>
<EgtWPFLib5:EgtHexList.ItemContainerStyle>
<Style TargetType="EgtWPFLib5:EgtHexItem" BasedOn="{StaticResource EgtHexItem}">
<Setter Property="Grid.Row" Value="{Binding nRow}"/>
<Setter Property="Grid.Column" Value="{Binding nColumn}"/>
<Setter Property="Background" Value="{Binding Background}"/>
</Style>
</EgtWPFLib5:EgtHexList.ItemContainerStyle>
</EgtWPFLib5:EgtHexList>
</TabItem>
<TabItem Header="{Binding ColorPickerTheme_Msg}">
<Grid HorizontalAlignment="Center"
VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding BasicColorsTheme}"
SelectedItem="{Binding SelColorTheme}"
BorderThickness="0">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="13"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Rectangle Width="20"
Height="20"
Margin="2"
Stroke="Black"
StrokeThickness="0.5"
Fill="{Binding Fill}"/>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
</TabItem>
</TabControl>
</Grid>
<Grid Grid.Column="1"
Margin="5,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding CustomColor_Msg}"
Margin="5,18,5,10"
Style="{StaticResource DialogWindow_TextBlock}"/>
<Grid Grid.Row="1">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TabControl> <ListBox ItemsSource="{Binding CustomColors}"
<TabItem Header="{Binding BasicColor_Msg}">
<Grid Style="{StaticResource EgtColorPicker_Grid}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding BasicColors}"
SelectedItem="{Binding SelColor}"
Style="{StaticResource EgtColorPicker_ListBox}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="13"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Rectangle Fill="{Binding Fill}"
Style="{StaticResource EgtColorPicker_Rectangle}"/>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
</TabItem>
<TabItem Header="{Binding ColorPicker_Msg}">
<TabItem.Resources>
<Style TargetType="{x:Type EgtWPFLib5:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
<Setter Property="BorderThickness" Value="1.5"/>
<Setter Property="BorderBrush" Value="{StaticResource BeamWall_White}"/>
</Style>
</TabItem.Resources>
<EgtWPFLib5:EgtHexList ItemsSource="{Binding HexList}"
SelectedItem="{Binding sHexSelColor}"
Style="{StaticResource EgtHexList}">
<EgtWPFLib5:EgtHexList.ItemTemplate>
<DataTemplate/>
</EgtWPFLib5:EgtHexList.ItemTemplate>
<EgtWPFLib5:EgtHexList.ItemContainerStyle>
<Style TargetType="{x:Type EgtWPFLib5:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
<Setter Property="Grid.Row" Value="{Binding nRow}"/>
<Setter Property="Grid.Column" Value="{Binding nColumn}"/>
<Setter Property="Background" Value="{Binding Background}"/>
</Style>
</EgtWPFLib5:EgtHexList.ItemContainerStyle>
</EgtWPFLib5:EgtHexList>
</TabItem>
<TabItem Header="{Binding ColorPickerTheme_Msg}">
<Grid Style="{StaticResource EgtColorPicker_Grid}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding BasicColorsTheme}"
SelectedItem="{Binding SelColorTheme}"
Style="{StaticResource BasicColor_ListBox}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="13"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Rectangle Fill="{Binding Fill}"
Style="{StaticResource EgtColorPicker_Rectangle}"/>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
</TabItem>
</TabControl>
</Grid>
<Grid Grid.Column="1"
Style="{StaticResource CustomerColor_Grid}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding CustomColor_Msg}"
Style="{StaticResource EgtColorPicker_TextBlock}"/>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding CustomColors}"
SelectedItem="{Binding SelCustomColor}" SelectedItem="{Binding SelCustomColor}"
Style="{StaticResource CustomerColor_ListBox}"> HorizontalAlignment="Center"
<ListBox.ItemsPanel> Background="Transparent"
<ItemsPanelTemplate> BorderThickness="0">
<UniformGrid Columns="13"/> <ListBox.ItemsPanel>
</ItemsPanelTemplate> <ItemsPanelTemplate>
</ListBox.ItemsPanel> <UniformGrid Columns="13"/>
<ListBox.ItemTemplate> </ItemsPanelTemplate>
<DataTemplate> </ListBox.ItemsPanel>
<Rectangle Fill="{Binding Fill}" <ListBox.ItemTemplate>
Style="{StaticResource EgtColorPicker_Rectangle}"/> <DataTemplate>
</DataTemplate> <Rectangle Width="20"
</ListBox.ItemTemplate> Height="20"
<ListBox.ItemContainerStyle> Margin="2"
<Style TargetType="ListBoxItem"> Stroke="Black"
<Setter Property="Margin" Value="0"/> StrokeThickness="0.5"
<Setter Property="Padding" Value="0"/> Fill="{Binding Fill}"/>
</Style> </DataTemplate>
</ListBox.ItemContainerStyle> </ListBox.ItemTemplate>
</ListBox> <ListBox.ItemContainerStyle>
</Grid> <Style TargetType="ListBoxItem">
<Grid Grid.Row="2" <Setter Property="Margin" Value="0"/>
Style="{StaticResource CurrColor_Grid}"> <Setter Property="Padding" Value="0"/>
<Grid.ColumnDefinitions> </Style>
<ColumnDefinition Width="Auto"/> </ListBox.ItemContainerStyle>
<ColumnDefinition Width="1*"/> </ListBox>
</Grid.ColumnDefinitions> </Grid>
<Grid Style="{StaticResource AddColor_Grid}"> <Grid Grid.Row="2"
<Grid.RowDefinitions> Margin="0,20,0,0">
<RowDefinition Height="1*"/> <Grid.ColumnDefinitions>
<RowDefinition Height="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.RowDefinitions> <ColumnDefinition Width="1*"/>
<Rectangle Fill="{Binding CurrColor}" </Grid.ColumnDefinitions>
Style="{StaticResource CurrColor_Rectangle}"/> <Grid Margin="0,10,5,0"
<Button Grid.Row="1" HorizontalAlignment="Left">
x:Name="SaveColor" <Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle Width="100"
Height="70"
Stroke="Black"
StrokeThickness="0.5"
Fill="{Binding CurrColor}"/>
<Button x:Name="SaveColor"
Grid.Row="1"
Margin="0,10,0,0"
Content="{Binding AddCColor_Msg}" Content="{Binding AddCColor_Msg}"
Command="{Binding SaveColor_Command}" Command="{Binding SaveColor_Command}"
Style="{StaticResource EgtColorPicker_TextButton}"/> Style="{StaticResource LeftPanel_TextButton}"/>
</Grid> </Grid>
<Grid Grid.Column="1"> <Grid Grid.Column="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding Red_Msg}" <TextBlock Text="{Binding Red_Msg}"
Style="{StaticResource RedColor_TextBlock}"/> Margin="0,10,5,0"
<TextBox Grid.Column="1" HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
HorizontalAlignment="Right"
Margin="0,5,5,0"
IsReadOnly="False"
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource RedColor_TextBox}"/> Style="{StaticResource ColorPicker_TextBox}"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding Green_Msg}" Text="{Binding Green_Msg}"
Style="{StaticResource GreenColor_TextBlock}"/> Margin="5,5,5,0"
<TextBox Grid.Column="1" HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Grid.Row="1" Grid.Row="1"
HorizontalAlignment="Right"
Margin="5,5,5,0"
IsReadOnly="False"
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource GreenColor_TextBox}"/> Style="{StaticResource ColorPicker_TextBox}"/>
<TextBlock Grid.Row="2" <TextBlock Grid.Row="2"
Text="{Binding Blu_Msg}" Text="{Binding Blu_Msg}"
Style="{StaticResource GreenColor_TextBlock}"/> Margin="5,5,5,0"
<TextBox Grid.Row="2" HorizontalAlignment="Right"
Grid.Column="1" Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Grid.Row="2"
HorizontalAlignment="Right"
Margin="5,5,5,0"
IsReadOnly="False"
Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource GreenColor_TextBox}"/> Style="{StaticResource ColorPicker_TextBox}"/>
<TextBlock Grid.Row="3" <TextBlock Grid.Row="3"
Text="{Binding Hexadecimal_Msg}" Text="{Binding Hexadecimal_Msg}"
Style="{StaticResource GreenColor_TextBlock}"/> Margin="5,5,5,0"
<TextBox Grid.Row="3" HorizontalAlignment="Right"
Grid.Column="1" Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Grid.Row="3"
HorizontalAlignment="Right"
Margin="5,5,5,0"
Text="{Binding Hexadecimal}" Text="{Binding Hexadecimal}"
Style="{StaticResource GreenColor_TextBox}"/> Style="{StaticResource ColorPicker_TextBox}"/>
</Grid>
</Grid> </Grid>
</Grid> </Grid>
</Grid> </Grid>
<UniformGrid Grid.Row="2" </Grid>
<UniformGrid Grid.Row="2"
Rows="1" Rows="1"
Style="{StaticResource EgtColorPicker_UniformGrid}"> Margin="10,10,10,0">
<Button IsDefault="True" <Button IsDefault="True"
Content="OK" Content="OK"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
Style="{StaticResource EgtColorPicker_HalfRound_Button}"/> Margin="2.5,0,2.5,0"
<Button Content="Cancel" Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}" Command="{Binding Cancel_Command}"
Style="{StaticResource EgtColorPicker_HalfRound_Button}"/> Margin="2.5,0,2.5,0"
</UniformGrid> Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</UniformGrid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -1,5 +1,6 @@
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports System.Windows Imports System.Windows
Imports System.Windows.Forms
Public Class EgtColorPickerV Public Class EgtColorPickerV
@@ -7,7 +8,7 @@ Public Class EgtColorPickerV
Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM
Private Shadows DialogResult As Boolean Private Shadows DialogResult As DialogResult
Public Property CustomColors As Integer() Public Property CustomColors As Integer()
Get Get
@@ -34,6 +35,7 @@ Public Class EgtColorPickerV
#Region "CONTRUCTORS" #Region "CONTRUCTORS"
Sub New(Owner As Window, EtgColorPickerVM As EgtColorPickerVM) Sub New(Owner As Window, EtgColorPickerVM As EgtColorPickerVM)
MyBase.New(Owner)
InitializeComponent() InitializeComponent()
Me.DataContext = EtgColorPickerVM Me.DataContext = EtgColorPickerVM
' Assegno al riferimento locale al VM il VM preso dal DataContext ' Assegno al riferimento locale al VM il VM preso dal DataContext
@@ -44,7 +46,7 @@ Public Class EgtColorPickerV
#Region "EVENTS" #Region "EVENTS"
Private Sub CloseWindow(DialogResult As Boolean) Handles m_EgtColorPickerVM.OnCloseWindow Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtColorPickerVM.m_CloseWindow
Me.DialogResult = DialogResult Me.DialogResult = DialogResult
Me.Close() Me.Close()
End Sub End Sub
@@ -57,7 +59,7 @@ Public Class EgtColorPickerV
''' Apre una finestra EgtColorPicker ''' Apre una finestra EgtColorPicker
''' </summary> ''' </summary>
''' <returns></returns> ''' <returns></returns>
Public Overloads Function ShowDialog() As Boolean Public Overloads Function ShowDialog() As DialogResult
MyBase.ShowDialog() MyBase.ShowDialog()
Return Me.DialogResult Return Me.DialogResult
End Function End Function
@@ -64,7 +64,7 @@ Public Class EgtDataGrid
newItems(index).InitColumn(col) newItems(index).InitColumn(col)
context.Columns.Add(col) context.Columns.Add(col)
Catch ex As Exception Catch ex As Exception
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61883), newItems(index).Name, newItems(index).ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning) MessageBox.Show(String.Format(EgtMsg(61883), newItems(index).Name, newItems(index).ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
End Try End Try
Next Next
@@ -159,7 +159,7 @@ Public Class EgtDataGrid
Me.Columns(e.NewStartingIndex).DisplayIndex = e.NewStartingIndex Me.Columns(e.NewStartingIndex).DisplayIndex = e.NewStartingIndex
End If End If
Catch ex As Exception Catch ex As Exception
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61883), one.Name, one.ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning) MessageBox.Show(String.Format(EgtMsg(61883), one.Name, one.ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
End Try End Try
Next Next
End If End If
@@ -1,22 +1,22 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="EgtManageFileDialogV" <EgtWPFLib5:EgtCustomWindow x:Class="EgtManageFileDialogV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core" Title="{Binding sTitle}"
Title="{Binding sTitle}" WindowStartupLocation="CenterOwner"
WindowStartupLocation="CenterOwner" WindowStyle="None" ResizeMode="NoResize"
ShowInTaskbar="False" IsMinimizable="False" ShowInTaskbar="False"
Height="650" Width="1000" Height="500" Width="800"
Style="{StaticResource OptimizerWindow.Dialog}"> Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -24,50 +24,48 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Command="{Binding GoBack_Command}" <Button Command="{Binding GoBack_Command}"
Style="{StaticResource RightPanel_Button}"> Style="{StaticResource RightPanel_Button}">
<Image Source="{DynamicResource Restore_Image}" <Image Source="\Resources\EgtDialog\Restore.png"
Style="{StaticResource Button_Image}"/> Style="{StaticResource Button_Image}"/>
</Button> </Button>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Margin="5"
Text="{Binding sSelPath}" Text="{Binding sSelPath}"
Style="{StaticResource EgtManageDialog_TextBlock}"/> HorizontalAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
<ComboBox Grid.Column="2" <ComboBox Grid.Column="2"
HorizontalAlignment="Right"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding ViewModeList}" ItemsSource="{Binding ViewModeList}"
SelectedItem="{Binding SelViewMode}" SelectedItem="{Binding SelViewMode}"
Style="{StaticResource EgtManageDialog_ComboBox}"> Margin="2.5,5,2.5,5"
<ComboBox.ItemTemplate> Style="{StaticResource RightPanel_ComboBox}"/>
<DataTemplate>
<StackPanel Style="{StaticResource PartManager_StackPanel}">
<Image Source="{Binding Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<TextBlock Text="{Binding Name}"
Style="{StaticResource ComboManageDialog_TextBlock}"/>
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid> </Grid>
<Grid Grid.Row="1" <Grid Grid.Row="1"
Style="{StaticResource AddRawPartWnd_Grid}"> Margin="5,5,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="4*"/> <ColumnDefinition Width="4*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TreeView x:Name="FileTree" <TreeView x:Name="FileTree"
ItemsSource="{Binding RootList}" ItemsSource="{Binding RootList}"
Style="{StaticResource EgtManageDialog_TreeView}"> Margin="10"
FontSize="15"
BorderBrush="White">
<TreeView.Resources> <TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:EgtFolder}" <HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:EgtFolder}"
ItemsSource="{Binding TreeItemList_View}"> ItemsSource="{Binding TreeItemList_View}">
<StackPanel Style="{StaticResource PartManager_StackPanel}"> <StackPanel Orientation="Horizontal">
<Image Source="{Binding sIconSource}" <Image Source="{Binding sIconSource}"
Height="15"
Style="{StaticResource Button_Image}"/> Style="{StaticResource Button_Image}"/>
<TextBlock Text="{Binding sName}" <TextBlock Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/> Style="{StaticResource DialogWindow_TextBlock}"/>
</StackPanel> </StackPanel>
</HierarchicalDataTemplate> </HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtItem}"> <DataTemplate DataType="{x:Type EgtWPFLib5:EgtItem}">
<StackPanel Style="{StaticResource PartManager_StackPanel}"> <StackPanel Orientation="Horizontal">
<Image Source="{Binding sIconSource}" <Image Source="{Binding sIconSource}"
Height="15"
Style="{StaticResource Button_Image}"/> Style="{StaticResource Button_Image}"/>
<TextBlock Text="{Binding sName}" <TextBlock Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/> Style="{StaticResource DialogWindow_TextBlock}"/>
@@ -82,27 +80,34 @@
</TreeView.ItemContainerStyle> </TreeView.ItemContainerStyle>
</TreeView> </TreeView>
<TabControl Grid.Column="1" <TabControl Grid.Column="1"
SelectedIndex="{Binding nSelTab}" Background="Transparent"
Style="{StaticResource EgtManageDialog_TabControl}"> BorderBrush="White"
BorderThickness="0"
SelectedIndex="{Binding nSelTab}">
<TabControl.ItemContainerStyle> <TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}"> <Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/> <Setter Property="Visibility" Value="Collapsed"/>
</Style> </Style>
</TabControl.ItemContainerStyle> </TabControl.ItemContainerStyle>
<TabItem Header="LISTBOX"> <TabItem Header="LISTBOX">
<ListBox Grid.Row="1" <ListBox x:Name="FileList"
x:Name="FileList" Grid.Row="1"
Margin="5,5,5,5"
BorderBrush="White"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}" ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
SelectedItem="{Binding ItemSelected, Mode=TwoWay}"> SelectedItem="{Binding ItemSelected, Mode=TwoWay}">
<ListBox.Resources> <ListBox.Resources>
<DataTemplate x:Key="ListTemplateView" <DataTemplate x:Key="ListTemplateView"
DataType="{x:Type EgtWPFLib5:EgtDirectory}"> DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<Grid Style="{StaticResource EgtManageDialog_Grid}"> <Grid Margin="5,5,5,0"
Height="20">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}" <Image Source="{Binding sIconSource}"
Height="15"
Style="{StaticResource Button_Image}"/> Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding sName}" Text="{Binding sName}"
@@ -111,7 +116,9 @@
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="TilesTemplateView" <DataTemplate x:Key="TilesTemplateView"
DataType="{x:Type EgtWPFLib5:EgtDirectory}"> DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<Grid Style="{StaticResource EgtDirectory_Grid}"> <Grid Margin="5,5,5,0"
Height="50"
Width="250">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -120,19 +127,26 @@
Style="{StaticResource Button_Image}"/> Style="{StaticResource Button_Image}"/>
<UniformGrid Grid.Column="1" <UniformGrid Grid.Column="1"
Rows="3" Rows="3"
Style="{StaticResource EgtManageDialog_UniformGrid}"> Margin="2.5,0,2.5,5">
<TextBlock Text="{Binding sName}" <TextBlock TextAlignment="Left"
Style="{StaticResource Info_TextBlock}"/> Text="{Binding sName}"
<TextBlock Text="{Binding ghTypeItem}" HorizontalAlignment="Left"
Style="{StaticResource Info_TextBlock}"/> Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock Text="{Binding sDimension}" <TextBlock TextAlignment="Left"
Style="{StaticResource Info_TextBlock}"/> Text="{Binding ghTypeItem}"
HorizontalAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
Text="{Binding sDimension}"
HorizontalAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="ContentTemplateView" <DataTemplate x:Key="ContentTemplateView"
DataType="{x:Type EgtWPFLib5:EgtDirectory}"> DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<Grid Style="{StaticResource ContentTemplate_Grid}"> <Grid Margin="5,5,5,0"
Height="50">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -147,23 +161,32 @@
Style="{StaticResource Button_Image}"/> Style="{StaticResource Button_Image}"/>
<UniformGrid Grid.Column="1" <UniformGrid Grid.Column="1"
Rows="2" Rows="2"
Style="{StaticResource EgtManageDialog_UniformGrid}"> Margin="2.5,0,2.5,5">
<TextBlock Text="{Binding sName}" <TextBlock TextAlignment="Left"
Style="{StaticResource Info_TextBlock}"/> HorizontalAlignment="Left"
<TextBlock Text="{Binding ghTypeItem}" Text="{Binding sName}"
Style="{StaticResource Info_TextBlock}"/> Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding ghTypeItem}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid> </UniformGrid>
<UniformGrid Grid.Column="2" <UniformGrid Grid.Column="2"
Rows="2" Rows="2"
Style="{StaticResource EgtManageDialog_UniformGrid}"> Margin="2.5,0,2.5,5">
<TextBlock Text="{Binding sLastModifyDate}" <TextBlock TextAlignment="Left"
Style="{StaticResource Info_TextBlock}"/> HorizontalAlignment="Left"
<TextBlock Text="{Binding sDimension}" Text="{Binding sLastModifyDate}"
Style="{StaticResource Info_TextBlock}"/> Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding sDimension}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
<Border Grid.Row="1" <Border Grid.Row="1"
Style="{StaticResource EgtManageDialog_Border}"/> BorderThickness="1"
BorderBrush="LightGray"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</ListBox.Resources> </ListBox.Resources>
@@ -173,13 +196,13 @@
<ContentControl.Style> <ContentControl.Style>
<Style TargetType="{x:Type ContentControl}"> <Style TargetType="{x:Type ContentControl}">
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}" Value="0"> <DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="0">
<Setter Property="ContentTemplate" Value="{StaticResource ListTemplateView}" /> <Setter Property="ContentTemplate" Value="{StaticResource ListTemplateView}" />
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}" Value="1"> <DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="1">
<Setter Property="ContentTemplate" Value="{StaticResource TilesTemplateView}" /> <Setter Property="ContentTemplate" Value="{StaticResource TilesTemplateView}" />
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}" Value="2"> <DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="2">
<Setter Property="ContentTemplate" Value="{StaticResource ContentTemplateView}" /> <Setter Property="ContentTemplate" Value="{StaticResource ContentTemplateView}" />
</DataTrigger> </DataTrigger>
</Style.Triggers> </Style.Triggers>
@@ -196,42 +219,40 @@
</ListBox.ItemContainerStyle> </ListBox.ItemContainerStyle>
<ListBox.Style> <ListBox.Style>
<Style TargetType="{x:Type ListBox}"> <Style TargetType="{x:Type ListBox}">
<Setter Property="BorderBrush" Value="{StaticResource BeamWall_White}"/>
<Setter Property="IsSynchronizedWithCurrentItem" Value="True"/>
<Setter Property="Margin" Value="5"/>
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}" <DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
Value="0"> Value="0">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ItemsPanel"> <Setter Property="ItemsPanel">
<Setter.Value> <Setter.Value>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<WrapPanel Style="{StaticResource Project_WrapPanel}"/> <WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}" <DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
Value="1"> Value="1">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ItemsPanel"> <Setter Property="ItemsPanel">
<Setter.Value> <Setter.Value>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<WrapPanel Style="{StaticResource ProjectH_WrapPanel}"/> <WrapPanel Orientation="Horizontal"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}" <DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
Value="2"> Value="2">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ItemsPanel"> <Setter Property="ItemsPanel">
<Setter.Value> <Setter.Value>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel Style="{StaticResource EgtManageDialog_StackPanel}"/> <StackPanel Orientation="Vertical"
HorizontalAlignment="Stretch"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
@@ -252,13 +273,25 @@
SelectedItem="{Binding ItemSelected}" SelectedItem="{Binding ItemSelected}"
RowStyle="{StaticResource RowDataGrid_CustomHighLight}" RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}" CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}" Style="{StaticResource DataGrid_OnlyProd}">
Style="{StaticResource Optimizer_DataGrid}"> <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"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="BorderBrush" Value="{StaticResource Omag_DarkGray}"/>
<Setter Property="BorderThickness" Value="0,0,1,1"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTemplateColumn Width="5*"> <DataGridTemplateColumn Width="5*">
<DataGridTemplateColumn.HeaderTemplate> <DataGridTemplateColumn.HeaderTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/> <TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
HorizontalAlignment="Left"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.HeaderTemplate> </DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
@@ -269,77 +302,115 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}" <Image Source="{Binding sIconSource}"
Style="{StaticResource Source_Image}"/> Margin="2.5,0,2.5,0"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding sName}" Text="{Binding sName}"
Style="{StaticResource NameImage_TextBlock}"/> VerticalAlignment="Center"
Margin="2.5,0,0,0"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding sLastModifyDate}" <DataGridTextColumn Binding="{Binding sLastModifyDate}"
Width="2*" Width="2*">
ElementStyle="{StaticResource DataGrid_TextBlock}">
<DataGridTextColumn.HeaderTemplate> <DataGridTextColumn.HeaderTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/> <TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
HorizontalAlignment="Left"/>
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Left"/>
<Setter Property="Padding" Value="12,6,12,6"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn> </DataGridTextColumn>
<DataGridTextColumn Binding="{Binding ghTypeItem}" <DataGridTextColumn Binding="{Binding ghTypeItem}"
Width="1*" Width="1*">
ElementStyle="{StaticResource DataGrid_TextBlock}">
<DataGridTextColumn.HeaderTemplate> <DataGridTextColumn.HeaderTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/> <TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
HorizontalAlignment="Left"/>
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Left"/>
<Setter Property="Padding" Value="12,6,12,6"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn> </DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sDimension}" <DataGridTextColumn Binding="{Binding sDimension}"
Width="1*" Width="1*">
ElementStyle="{StaticResource DataGridR_TextBlock}">
<DataGridTextColumn.HeaderTemplate> <DataGridTextColumn.HeaderTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/> <TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
HorizontalAlignment="Left"/>
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Right"/>
<Setter Property="Padding" Value="12,6,12,6"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn> </DataGridTextColumn>
</DataGrid.Columns> </DataGrid.Columns>
<DataGrid.InputBindings> <DataGrid.InputBindings>
<MouseBinding MouseAction="LeftDoubleClick" Command="{Binding DataContext.DoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"/> <MouseBinding MouseAction="LeftDoubleClick" Command="{Binding DataContext.DoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGrid.InputBindings> </DataGrid.InputBindings>
</DataGrid> </DataGrid>
</TabItem> </TabItem>
</TabControl> </TabControl>
</Grid> </Grid>
<Grid Grid.Row="2" <Grid Grid.Row="2"
Style="{StaticResource AddRawPartWnd_Grid}"> Margin="5,5,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="{Binding FileName_Msg}" <TextBlock Margin="5,5,5,5"
Style="{StaticResource FileName_TextBlock}"/> Text="{Binding FileName_Msg}"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1" <TextBox Grid.Column="1"
Margin="2.5,2.5,2.5,5"
TextAlignment="Left"
HorizontalAlignment="Stretch"
Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Style="{StaticResource SaveFileName_TextBox}"/> Style="{StaticResource ParameterList_TextBox}"/>
<ComboBox Grid.Column="2" <ComboBox Grid.Column="2"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding FilterList}" ItemsSource="{Binding FilterList}"
SelectedItem="{Binding SelFilter, Mode=OneWayToSource}" SelectedItem="{Binding SelFilter, Mode=OneWayToSource}"
DisplayMemberPath="sNameExstension" DisplayMemberPath="sNameExstension"
Style="{StaticResource FilterList_ComboBox}"/> HorizontalAlignment="Right"
Margin="10,2.5,2.5,5"
Style="{StaticResource RightPanel_ComboBox}"/>
</Grid> </Grid>
<UniformGrid Grid.Row="3" <UniformGrid Grid.Row="3"
Rows="1" Rows="1"
Style="{StaticResource Command_UniformGrid}"> Margin="2.5,0,2.5,0">
<Button IsDefault="True" <Button IsDefault="True"
Content="OK" Content="OK"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
Style="{StaticResource EgtManageDialogOK_HalfRound_Button}"/> HorizontalAlignment="Right"
Margin="15,0,2.5,0"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="Cancel" <Button Content="Cancel"
Command="{Binding Cancel_Command}" Command="{Binding Cancel_Command}"
Style="{StaticResource EgtManageDialogCancel_HalfRound_Button}"/> HorizontalAlignment="Left"
Margin="2.5,0,0,0"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -1,6 +1,6 @@
Imports System.Windows.Input Imports EgtWPFLib5
Imports EgtWPFLib5 Imports System.Windows.Forms
Imports System.Windows Imports System.Windows.Input
Public Class EgtManageFileDialogV Public Class EgtManageFileDialogV
@@ -8,7 +8,7 @@ Public Class EgtManageFileDialogV
Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM
Private Shadows DialogResult As Boolean Private Shadows DialogResult As DialogResult
''' <summary> ''' <summary>
''' Stringa che specifica il titolo da mostrare ''' Stringa che specifica il titolo da mostrare
@@ -31,15 +31,6 @@ Public Class EgtManageFileDialogV
End Set End Set
End Property End Property
Public Property SelFilter As EgtExstension
Get
Return m_EgtManageFileDialogVM.SelFilter
End Get
Set(value As EgtExstension)
m_EgtManageFileDialogVM.SelFilter = value
End Set
End Property
Public Property InitialDirectory As String Public Property InitialDirectory As String
Get Get
Return m_EgtManageFileDialogVM.sInitialDirectory Return m_EgtManageFileDialogVM.sInitialDirectory
@@ -112,31 +103,32 @@ Public Class EgtManageFileDialogV
End Set End Set
End Property End Property
#End Region ' Fields & Properties #End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS" #Region "CONTRUCTORS"
Sub New(Owner As Window, EgtManageFileDialogVM As EgtManageFileDialogVM) Sub New(Owner As System.Windows.Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
MyBase.New(Owner)
InitializeComponent() InitializeComponent()
Me.DataContext = EgtManageFileDialogVM Me.DataContext = EgtManageFileDialogVM
' Assegno al riferimento locale al VM il VM preso dal DataContext ' Assegno al riferimento locale al VM il VM preso dal DataContext
m_EgtManageFileDialogVM = EgtManageFileDialogVM m_EgtManageFileDialogVM = EgtManageFileDialogVM
End Sub End Sub
#End Region ' Constructor #End Region
#Region "EVENTS" #Region "EVENTS"
Private Sub CloseWindow(DialogResult As Boolean) Handles m_EgtManageFileDialogVM.OnCloseWindow Private Sub CloseWindow(DialogResult As DialogResult) Handles m_EgtManageFileDialogVM.m_CloseWindow
Me.DialogResult = DialogResult Me.DialogResult = DialogResult
Me.Close() Me.Close()
End Sub End Sub
#End Region ' Events #End Region
#Region "METHODS" #Region "METHODS"
Public Overloads Function ShowDialog() As Boolean Public Overloads Function ShowDialog() As DialogResult
MyBase.ShowDialog() MyBase.ShowDialog()
Return Me.DialogResult Return Me.DialogResult
End Function End Function
@@ -145,6 +137,6 @@ Public Class EgtManageFileDialogV
m_EgtManageFileDialogVM.MouseDoubleClick() m_EgtManageFileDialogVM.MouseDoubleClick()
End Sub End Sub
#End Region ' Methods #End Region ' METHODS
End Class End Class
@@ -1,32 +1,34 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="EgtMessageBoxV" <EgtWPFLib5:EgtCustomWindow x:Class="EgtMessageBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core" Title="{Binding sTitle}"
Title="{Binding sTitle}" SizeToContent="WidthAndHeight"
SizeToContent="WidthAndHeight" WindowStartupLocation="CenterOwner"
WindowStartupLocation="CenterOwner" WindowStyle="None" ResizeMode="NoResize"
ShowInTaskbar="False" IsMinimizable="False" ShowInTaskbar="False"
Style="{StaticResource OptimizerWindow.Dialog}"> Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Style="{StaticResource EgtMessageBox_Grid}"> <Grid Margin="2.5,2.5,2.5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource MessageBox_Grid}"> <Grid Margin="20,20,20,20">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"/> <Image Source="{Binding sIconSource}"
Margin="0,0,0,0"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding sMessage}" Text="{Binding sMessage}"
Style="{StaticResource EgtMessageBox_TextBlock}"/> Margin="5,0,5,0"
Style="{StaticResource DialogWindow_TextBlock}"/>
</Grid> </Grid>
<ItemsControl Grid.Row="1" <ItemsControl Grid.Row="1"
ItemsSource="{Binding ButtonList}" ItemsSource="{Binding ButtonList}"
Style="{StaticResource EgtMessageBox_ItemsControl}"> HorizontalAlignment="Center">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<UniformGrid Rows="1"/> <UniformGrid Rows="1"/>
@@ -37,9 +39,11 @@
<Button IsDefault="{Binding bIsDefault}" <Button IsDefault="{Binding bIsDefault}"
Content="{Binding sMessage}" Content="{Binding sMessage}"
Command="{Binding Command_Command}" Command="{Binding Command_Command}"
Style="{StaticResource EgtColorPicker_HalfRound_Button}"/> Margin="2.5,0,2.5,0"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -14,6 +14,7 @@ Public Class EgtMessageBoxV
#Region "CONTRUCTORS" #Region "CONTRUCTORS"
Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM) Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM)
MyBase.New(Owner)
' This call is required by the designer. ' This call is required by the designer.
InitializeComponent() InitializeComponent()
Me.DataContext = EgtMessageBoxVM Me.DataContext = EgtMessageBoxVM
@@ -99,7 +100,7 @@ Public Class EgtMessageBoxV
#Region "EVENTS" #Region "EVENTS"
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.OnCloseWindow Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.m_CloseWindow
Me.DialogResult = DialogResult Me.DialogResult = DialogResult
Me.Close() Me.Close()
End Sub End Sub
+2 -2
View File
@@ -214,7 +214,7 @@ Public Class NewMachGroupPanelVM
Dim m_MessageBoxResult As MessageBoxResult Dim m_MessageBoxResult As MessageBoxResult
If MachGroupVMList.Count = 1 Then If MachGroupVMList.Count = 1 Then
'chiedo conferma prima di resettare il gruppo di lavorazione 'chiedo conferma prima di resettare il gruppo di lavorazione
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question) MessageBox.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
Select Case m_MessageBoxResult Select Case m_MessageBoxResult
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
' cancello il gruppo corrente e ne creo uno nuovo con lo stesso nome ' cancello il gruppo corrente e ne creo uno nuovo con lo stesso nome
@@ -228,7 +228,7 @@ Public Class NewMachGroupPanelVM
End Select End Select
Else Else
'chiedo conferma prima di cancellare il gruppo di lavorazione 'chiedo conferma prima di cancellare il gruppo di lavorazione
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question) MessageBox.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
Select Case m_MessageBoxResult Select Case m_MessageBoxResult
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
' cancello quello selezionato (ovvero il corrente) ' cancello quello selezionato (ovvero il corrente)
@@ -1,5 +1,4 @@
Imports System.Threading Imports System.Threading
Imports System.Threading.Tasks
Imports System.Windows.Threading Imports System.Windows.Threading
Public Module LoadingWndHelper Public Module LoadingWndHelper
+15 -9
View File
@@ -8,7 +8,7 @@
ResizeMode="NoResize" WindowStyle="None" ResizeMode="NoResize" WindowStyle="None"
IsClosable="False" IsMinimizable="False" IsClosable="False" IsMinimizable="False"
WindowStartupLocation="Manual" ShowInTaskbar="False"> WindowStartupLocation="Manual" ShowInTaskbar="False">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@@ -23,27 +23,33 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding TotText_Msg}" Text="{Binding TotText_Msg}"
Style="{StaticResource MessageBox_TextBlock}"/> TextAlignment="Center"/>
<TextBlock Grid.Row="2" <TextBlock Grid.Row="2"
Text="{Binding StepText_Msg}" Text="{Binding StepText_Msg}"
Visibility="{Binding StepText_Visibility}" TextAlignment="Center"
Style="{StaticResource MessageBox_TextBlock}"/> Visibility="{Binding StepText_Visibility}"/>
<Grid Grid.Row="3" <Grid Grid.Row="3"
Visibility="{Binding StepProgress_Visibility}"> Visibility="{Binding StepProgress_Visibility}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource EgtManageDialog_Grid}"/> <Grid Height="20"/>
<ProgressBar Grid.Row="1" <ProgressBar Grid.Row="1"
Value="{Binding StepProgress_Value}" Minimum="0"
Style="{StaticResource NestingRunningWndV_ProgressBar}"/> Maximum="100"
Value="{Binding StepProgress_Value}"
Height="20"
Margin="40,0,40,0"/>
</Grid> </Grid>
<ProgressBar Grid.Row="5" <ProgressBar Grid.Row="5"
Minimum="0"
Maximum="100"
Value="{Binding TotProgress_Value}" Value="{Binding TotProgress_Value}"
Style="{StaticResource NestingRunningWndV_ProgressBar}"/> Height="20"
Margin="40,0,40,0"/>
<TextBlock Grid.Row="7" <TextBlock Grid.Row="7"
Text="{Binding TotProgress_Msg}" Text="{Binding TotProgress_Msg}"
Style="{StaticResource MessageBox_TextBlock}"/> TextAlignment="Center"/>
</Grid> </Grid>
</EgtWPFLib5:EgtCustomWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -214,6 +214,7 @@ Public Class MyMachGroupPanelM
Dim DuploArray() As Integer Dim DuploArray() As Integer
Dim RotArray(DuploList.Count) As Integer Dim RotArray(DuploList.Count) As Integer
Dim FlipArray(DuploList.Count) As Integer Dim FlipArray(DuploList.Count) As Integer
Dim QArray(DuploList.Count) As Dictionary(Of String, Dictionary(Of String, String))
DuploArray = DuploList.ToArray() DuploArray = DuploList.ToArray()
' recupero ROT (gradi) e FLIP (0/1) per non perderli ' recupero ROT (gradi) e FLIP (0/1) per non perderli
For Duploindex = 0 To DuploArray.Length - 1 For Duploindex = 0 To DuploArray.Length - 1
@@ -223,6 +224,8 @@ Public Class MyMachGroupPanelM
EgtGetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex)) EgtGetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex))
If FlipArray(Duploindex) <> 0 Then FlipArray(Duploindex) = 180 If FlipArray(Duploindex) <> 0 Then FlipArray(Duploindex) = 180
If nBWType = BWType.WALL Then If nBWType = BWType.WALL Then
' salvo parametri Q
QArray(Duploindex) = New Dictionary(Of String, Dictionary(Of String, String))
' ciclo sugli outline ' ciclo sugli outline
nOutlineLayer = EgtGetFirstNameInGroup(DuploArray(Duploindex), OUTLINE) nOutlineLayer = EgtGetFirstNameInGroup(DuploArray(Duploindex), OUTLINE)
If nOutlineLayer <> GDB_ID.NULL Then If nOutlineLayer <> GDB_ID.NULL Then
@@ -245,10 +248,42 @@ Public Class MyMachGroupPanelM
nPRId = nGlobPRId nPRId = nGlobPRId
nGlobPRId += 1 nGlobPRId += 1
End If End If
Dim sKey As String = nPRId & "." & nPRC
QArray(Duploindex).Add(sKey, New Dictionary(Of String, String))
For QIndex = 1 To 10
Dim QKey As String = "Q" & QIndex.ToString("D2")
Dim QValue As Integer = 0
If EgtGetInfo(nOutlineId, QKey, QValue) Then
QArray(Duploindex)(sKey).Add(QKey, QValue)
End If
Next
End If End If
nOutlineId = EgtGetNext(nOutlineId) nOutlineId = EgtGetNext(nOutlineId)
End While End While
End If End If
' ciclo sulle feature
Dim nFeatureLayer As Integer = EgtGetFirstNameInGroup(DuploArray(Duploindex), PROCESSINGS)
If nFeatureLayer <> GDB_ID.NULL Then
Dim nFeatureId As Integer = EgtGetFirstInGroup(nFeatureLayer)
While nFeatureId <> GDB_ID.NULL
' verifico che sia feature
Dim nPRC As Integer
If EgtGetInfo(nFeatureId, MGR_FTR_PRC, nPRC) Then
nPRId = 0
EgtGetInfo(nFeatureId, MGR_FTR_PRID, nPRId)
Dim sKey As String = nPRId & "." & nPRC
QArray(Duploindex).Add(sKey, New Dictionary(Of String, String))
For QIndex = 1 To 10
Dim QKey As String = "Q" & QIndex.ToString("D2")
Dim QValue As Integer = 0
If EgtGetInfo(nFeatureId, QKey, QValue) Then
QArray(Duploindex)(sKey).Add(QKey, QValue)
End If
Next
End If
nFeatureId = EgtGetNext(nFeatureId)
End While
End If
End If End If
Next Next
' aggiornamento dei Duplo ' aggiornamento dei Duplo
@@ -258,6 +293,50 @@ Public Class MyMachGroupPanelM
' ripristino info rot e flip ' ripristino info rot e flip
EgtSetInfo(DuploArray(Duploindex), MGR_PRT_ROT, RotArray(Duploindex)) EgtSetInfo(DuploArray(Duploindex), MGR_PRT_ROT, RotArray(Duploindex))
EgtSetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex)) EgtSetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex))
If nBWType = BWType.WALL Then
' ciclo sugli outline
nOutlineLayer = EgtGetFirstNameInGroup(DuploArray(Duploindex), OUTLINE)
If nOutlineLayer <> GDB_ID.NULL Then
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayer)
While nOutlineId <> GDB_ID.NULL
' verifico che sia feature
Dim nPRC As Integer
If EgtGetInfo(nOutlineId, MGR_FTR_PRC, nPRC) Then
nPRId = 0
EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
Dim sKey As String = nPRId & "." & nPRC
' ripristino parametri Q
If QArray(Duploindex).ContainsKey(sKey) Then
For Each QPar In QArray(Duploindex)(sKey)
EgtSetInfo(nOutlineId, QPar.Key, QPar.Value)
Next
End If
End If
nOutlineId = EgtGetNext(nOutlineId)
End While
End If
' ciclo sulle feature
Dim nFeatureLayer As Integer = EgtGetFirstNameInGroup(DuploArray(Duploindex), PROCESSINGS)
If nFeatureLayer <> GDB_ID.NULL Then
Dim nFeatureId As Integer = EgtGetFirstInGroup(nFeatureLayer)
While nFeatureId <> GDB_ID.NULL
' verifico che sia feature
Dim nPRC As Integer
If EgtGetInfo(nFeatureId, MGR_FTR_PRC, nPRC) Then
nPRId = 0
EgtGetInfo(nFeatureId, MGR_FTR_PRID, nPRId)
Dim sKey As String = nPRId & "." & nPRC
' ripristino parametri Q
If QArray(Duploindex).ContainsKey(sKey) Then
For Each QPar In QArray(Duploindex)(sKey)
EgtSetInfo(nFeatureId, QPar.Key, QPar.Value)
Next
End If
End If
nFeatureId = EgtGetNext(nFeatureId)
End While
End If
End If
Next Next
End Sub End Sub
@@ -538,7 +538,6 @@ Public MustInherit Class MyMachGroupVM
MyMachGroupM.nCALC_ROT = 0 MyMachGroupM.nCALC_ROT = 0
MyMachGroupM.nCALC_FALL = 0 MyMachGroupM.nCALC_FALL = 0
MyMachGroupM.sCALC_MSG = "" MyMachGroupM.sCALC_MSG = ""
MyMachGroupM.nCALC_TIME = 0
NotifyPropertyChanged(NameOf(Calc_Background)) NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility)) NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility)) NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
-11
View File
@@ -195,14 +195,9 @@ Public MustInherit Class PartVM
Return m_SelFeatureVM Return m_SelFeatureVM
End Get End Get
Set(value As BTLFeatureVM) Set(value As BTLFeatureVM)
If Not IsNothing(m_SelFeatureVM) Then
Dim OldSelFeatureVM As BTLFeatureVM = m_SelFeatureVM
EgtResetMark(OldSelFeatureVM.nFeatureId)
End If
m_SelFeatureVM = value m_SelFeatureVM = value
If Not IsNothing(m_SelFeatureVM) Then If Not IsNothing(m_SelFeatureVM) Then
DirectCast(m_SelFeatureVM, BTLFeatureVM).SelGeomFeature() DirectCast(m_SelFeatureVM, BTLFeatureVM).SelGeomFeature()
EgtSetMark(m_SelFeatureVM.nFeatureId)
Else Else
EgtDeselectAll() EgtDeselectAll()
End If End If
@@ -483,12 +478,6 @@ Public MustInherit Class PartVM
End Get End Get
End Property End Property
Public ReadOnly Property ButtonIsEnabled As Boolean
Get
Return m_PartM.nProductionState < ItemState.Assigned
End Get
End Property
#End Region ' Supervisor #End Region ' Supervisor
' definizione comandi ' definizione comandi
@@ -8,34 +8,35 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Style="{StaticResource CalcPanel_Grid}"> <Grid Margin="0,0,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="Macchina corrente" <TextBlock Text="Macchina corrente"
Style="{StaticResource CurrMach_TextBlock}"/> VerticalAlignment="Center"
Margin="0,0,5,0"
Foreground="{StaticResource BeamWall_Corduroy}"/>
<!--Combobox per selezionare la macchina corrente--> <!--Combobox per selezionare la macchina corrente-->
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name" ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name" SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
Style="{StaticResource CalcPanel_ComboBox}"/> Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
</Grid> </Grid>
<StackPanel Grid.Column="1" <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center">
Style="{StaticResource MachinePanel_StackPanel}">
<Button Content="{Binding ToolDBMsg}" <Button Content="{Binding ToolDBMsg}"
ToolTip="{Binding ToolDBToolTip}" ToolTip="{Binding ToolDBToolTip}"
Command="{Binding ToolDbCommand}" Command="{Binding ToolDbCommand}"
Style="{StaticResource GeneralConfiguration_Button}"/> Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Content="{Binding SetUpMsg}" <Button Content="{Binding SetUpMsg}"
Command="{Binding SetUpCommand}" Command="{Binding SetUpCommand}"
ToolTip="{Binding SetUpToolTip}" ToolTip="{Binding SetUpToolTip}"
Style="{StaticResource GeneralConfiguration_Button}" Style="{StaticResource GeneralConfigurationToolBar_TextButton}"
Visibility="{Binding SetUp_Visibility}"/> Visibility="{Binding SetUp_Visibility}"/>
<Button Content="{Binding ParameterMachineMsg}" <Button Content="{Binding ParameterMachineMsg}"
ToolTip="{Binding ParameterMachineMsg}" ToolTip="{Binding ParameterMachineMsg}"
Command="{Binding ParameterMachine_Command}" Command="{Binding ParameterMachine_Command}"
Style="{StaticResource ParameterMachine_Button}"/> Style="{StaticResource MachineToolBar_ParameterMachineButton}" Width="140"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
@@ -1,23 +1,24 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="MachiningDbWindowV" <EgtWPFLib5:EgtCustomWindow x:Class="MachiningDbWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core" Title="{Binding Title}"
Title="{Binding Title}" WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
TitleBarHeight="30" IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
WindowStartupLocation="CenterOwner" ShowInTaskbar="False" CloseCommand="{Binding CloseMachiningsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> CloseCommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<EgtBEAMWALLCORE:OptimizerWindow.InputBindings> <EgtWPFLib5:EgtCustomWindow.InputBindings>
<KeyBinding Key="Escape" Command="{Binding ReloadMachiningCommand}" <KeyBinding Key="Escape" Command="{Binding ReloadMachiningCommand}"
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"/> CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"/>
</EgtBEAMWALLCORE:OptimizerWindow.InputBindings> </EgtWPFLib5:EgtCustomWindow.InputBindings>
<EgtBEAMWALLCORE:OptimizerWindow.Resources> <EgtWPFLib5:EgtCustomWindow.Resources>
<EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/> <EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/> <EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
</EgtBEAMWALLCORE:OptimizerWindow.Resources> </EgtWPFLib5:EgtCustomWindow.Resources>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -33,28 +34,37 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<UniformGrid Columns="3"> <UniformGrid Grid.Row="0" Columns="3">
<Button Content="{Binding NewMsg}" <Button Content="{Binding NewMsg}" Command="{Binding NewCommand}"
Command="{Binding NewCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}" IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}" Height="30"
Style="{StaticResource MachiningDB_Button}"/> Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding SaveMsg}" <Button Content="{Binding SaveMsg}" Command="{Binding SaveCommand}"
Command="{Binding SaveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}" IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}" Height="30"
Style="{StaticResource MachiningDB_Button}"/> Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding RemoveMsg}" <Button Content="{Binding RemoveMsg}" Command="{Binding RemoveCommand}"
Command="{Binding RemoveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}" IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}" Height="30"
Style="{StaticResource MachiningDB_Button}"/> Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</UniformGrid> </UniformGrid>
<TreeView Grid.Row="1" <TreeView Name="MachiningsTreeView" Grid.Row="1"
Name="MachiningsTreeView" ItemsSource="{Binding Path=MachiningsList}">
ItemsSource="{Binding Path=MachiningsList}" <TreeView.Style>
Style="{StaticResource MachiningDB_TreeView}"> <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> <TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}"> <Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
@@ -62,63 +72,57 @@
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" /> <Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
</Style> </Style>
</TreeView.ItemContainerStyle> </TreeView.ItemContainerStyle>
<TreeView.Resources> <TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}" <HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}" ItemsSource="{Binding Items}">
ItemsSource="{Binding Items}">
<Grid Style="{StaticResource MachiningDB_Grid}"> <Grid Height="20">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Source="{Binding PictureString}"
Style="{StaticResource MachiningDB_Image}"/> <Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
Text="{Binding Name}" <Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
Style="{StaticResource MachiningDB_TextBlock}"/>
<Ellipse Grid.Column="2"
Fill="{Binding FamilyColor}"
Style="{StaticResource SetUp_Ellipse}"/>
</Grid> </Grid>
</HierarchicalDataTemplate> </HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}"> <DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}">
<Grid Style="{StaticResource MachiningDB_Grid}"> <Grid Height="20">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="1"
Text="{Binding NamePar}" <!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
Style="{StaticResource MachiningDB_TextBlock}"/> <TextBlock Grid.Column="1" Text="{Binding NamePar}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
<Ellipse Grid.Column="2" <Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
Fill="{Binding ToolColor}"
Style="{StaticResource SetUp_Ellipse}"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</TreeView.Resources> </TreeView.Resources>
</TreeView> </TreeView>
<UniformGrid Grid.Row="2" <UniformGrid Grid.Row="2" Columns="3">
Columns="3"> <Button Content="{Binding ImportMsg}" Command="{Binding ImportCommand}" Height="30"
<Button Content="{Binding ImportMsg}" Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
Command="{Binding ImportCommand}" <Button Content="{Binding ExportMsg}" Command="{Binding ExportCommand}" Height="30"
Style="{StaticResource MachiningDB_Button}"/> Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding ExportMsg}" <Button Content="{Binding ResetMsg}" Command="{Binding ReloadMachiningCommand}"
Command="{Binding ExportCommand}" CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}" Height="30"
Style="{StaticResource MachiningDB_Button}"/> Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding ResetMsg}"
Command="{Binding ReloadMachiningCommand}"
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"
Style="{StaticResource MachiningDB_Button}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
<ContentControl Grid.Column="1" <ContentControl Content="{Binding Path=ParamPageV}" Grid.Column="1" Grid.ColumnSpan="2"/>
Grid.ColumnSpan="2"
Content="{Binding Path=ParamPageV}"/>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -6,6 +6,7 @@ Public Class MachiningDbWindowV
Private WithEvents m_MachiningDbWindowVM As MachiningDbWindowVM Private WithEvents m_MachiningDbWindowVM As MachiningDbWindowVM
Sub New(Owner As System.Windows.Window, MachiningDbWindowVM As MachiningDbWindowVM) Sub New(Owner As System.Windows.Window, MachiningDbWindowVM As MachiningDbWindowVM)
MyBase.New(Owner)
' This call is required by the designer. ' This call is required by the designer.
InitializeComponent() InitializeComponent()
Me.DataContext = MachiningDbWindowVM Me.DataContext = MachiningDbWindowVM
@@ -13,7 +14,7 @@ Public Class MachiningDbWindowV
m_MachiningDbWindowVM = MachiningDbWindowVM m_MachiningDbWindowVM = MachiningDbWindowVM
End Sub End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MachiningDbWindowVM.OnCloseWindow Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MachiningDbWindowVM.m_CloseWindow
Me.DataContext = Nothing Me.DataContext = Nothing
Me.DialogResult = bDialogResult Me.DialogResult = bDialogResult
Me.Close() Me.Close()
+5 -8
View File
@@ -1,7 +1,6 @@
Imports System Imports System
Imports System.Reflection Imports System.Reflection
Imports System.Runtime.InteropServices Imports System.Runtime.InteropServices
Imports System.Windows
' General Information about an assembly is controlled through the following ' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information ' set of attributes. Change these attribute values to modify the information
@@ -10,13 +9,13 @@ Imports System.Windows
' Review the values of the assembly attributes ' Review the values of the assembly attributes
#If DEBUG Then #If DEBUG Then
<Assembly: AssemblyTitle("Aedifica.Core Debug AnyCPU")> <Assembly: AssemblyTitle("EgtBEAMWALL.Core Debug AnyCPU")>
#Else #Else
<Assembly: AssemblyTitle("Aedifica.Core Release AnyCPU")> <Assembly: AssemblyTitle("EgtBEAMWALL.Core Release AnyCPU")>
#End If #End If
<Assembly: AssemblyDescription("")> <Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Egalware s.r.l.")> <Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("Aedifica.Core")> <Assembly: AssemblyProduct("EgtBEAMWALL.Core")>
<Assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")> <Assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")> <Assembly: AssemblyTrademark("")>
@@ -25,8 +24,6 @@ Imports System.Windows
'The following GUID is for the ID of the typelib if this project is exposed to COM 'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("632ea0b1-10e2-4f07-8b1b-d9371ef8392e")> <Assembly: Guid("632ea0b1-10e2-4f07-8b1b-d9371ef8392e")>
<Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
' Version information for an assembly consists of the following four values: ' Version information for an assembly consists of the following four values:
' '
' Major Version ' Major Version
@@ -38,5 +35,5 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.5.2")> <Assembly: AssemblyVersion("2.7.1.1")>
<Assembly: AssemblyFileVersion("3.1.5.2")> <Assembly: AssemblyFileVersion("2.7.1.1")>
@@ -1,19 +1,19 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="NewOpenProjectFileDialogV" <EgtWPFLib5:EgtCustomWindow x:Class="NewOpenProjectFileDialogV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core" xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib" Title="{Binding Title}"
Title="{Binding Title}" Style="{StaticResource OnlyProd_EgtCustomWindow}"
ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True" WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
WindowStartupLocation="CenterScreen" ShowInTaskbar="False" IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
MinHeight="500" MinWidth="500" IsClosable="False"
DataContext="{Binding RelativeSource={RelativeSource Self}}" MinHeight="500" MinWidth="500"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> DataContext="{Binding RelativeSource={RelativeSource Self}}">
<EgtBEAMWALLCORE:OptimizerWindow.Resources> <EgtWPFLib5:EgtCustomWindow.Resources>
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/> <EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
</EgtBEAMWALLCORE:OptimizerWindow.Resources> </EgtWPFLib5:EgtCustomWindow.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
@@ -24,7 +24,7 @@
<GroupBox Header="{Binding Filters_Msg}" <GroupBox Header="{Binding Filters_Msg}"
Visibility="{Binding Filters_Visibility}" Visibility="{Binding Filters_Visibility}"
Style="{StaticResource NewOpenProjectFile_GroupBox}"> Margin="5">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -40,28 +40,30 @@
SelectedIndex="{Binding SelBTLDateType}" SelectedIndex="{Binding SelBTLDateType}"
Style="{StaticResource BTLDateTypeList_ComboBox}"/> Style="{StaticResource BTLDateTypeList_ComboBox}"/>
<StackPanel Grid.Column="1" <StackPanel Grid.Column="1"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<ComboBox ItemsSource="{Binding DayTypeList}" <ComboBox ItemsSource="{Binding DayTypeList}"
SelectedIndex="{Binding SelDayType}" SelectedIndex="{Binding SelDayType}"
Style="{StaticResource DayTypeList_ComboBox}"/> Style="{StaticResource DayTypeList_ComboBox}"/>
<StackPanel Visibility="{Binding Date_Visibility}" <StackPanel Orientation="Horizontal"
Style="{StaticResource PartManager_StackPanel}"> Visibility="{Binding Date_Visibility}">
<TextBlock Text="{Binding From_Msg}" <TextBlock Text="{Binding From_Msg}"
Style="{StaticResource Filter_TextBlock}"/> Style="{StaticResource Filter_TextBlock}"
<DatePicker SelectedDate="{Binding dtStartDate}" Foreground="{StaticResource BeamWall_Corduroy}"/>
CalendarStyle="{StaticResource Filter_Calendar}" <DatePicker SelectedDate="{Binding dtStartDate}"
Style="{StaticResource Filter_DatePicker}"/> Style="{StaticResource Filter_DatePicker}"
CalendarStyle="{StaticResource Filter_Calendar}"/>
<TextBlock Text="{Binding To_Msg}" <TextBlock Text="{Binding To_Msg}"
Style="{StaticResource Filter_TextBlock}"/> Style="{StaticResource Filter_TextBlock}"
<DatePicker SelectedDate="{Binding dtEndDate}" Foreground="{StaticResource BeamWall_Corduroy}"/>
CalendarStyle="{StaticResource Filter_Calendar}" <DatePicker SelectedDate="{Binding dtEndDate}"
Style="{StaticResource Filter_DatePicker}"/> Style="{StaticResource Filter_DatePicker}"
CalendarStyle="{StaticResource Filter_Calendar}"/>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<CheckBox Grid.Column="2" <CheckBox Grid.Column="2"
IsChecked="{Binding bViewArchived}" IsChecked="{Binding bViewArchived}"
Content="{Binding ViewArchived_Msg}" Content="{Binding ViewArchived_Msg}"
Style="{StaticResource PParameters_CheckBox}"/> VerticalAlignment="Center"/>
</Grid> </Grid>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -71,40 +73,42 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ComboBox ItemsSource="{Binding FilterTypeList}" <ComboBox ItemsSource="{Binding FilterTypeList}"
SelectedItem="{Binding SelFilterType}" SelectedItem="{Binding SelFilterType}"
Style="{StaticResource NewOpenProjectFile_ComboBox}"/> Width="105"
Margin="5"
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding SearchText}" Text="{Binding SearchText}"
Visibility="{Binding SearchText_Visibility}" Visibility="{Binding SearchText_Visibility}"
Style="{StaticResource NewSearchText_TextBox}"/> Style="{StaticResource NewSearchText_TextBox}"/>
<StackPanel Grid.Column="2" <StackPanel Grid.Column="2"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<TextBlock Text="{Binding Rows_Msg}" <TextBlock Text="{Binding Rows_Msg}"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"
Foreground="{StaticResource BeamWall_Corduroy}"/>
<ComboBox ItemsSource="{Binding RowQuantityList}" <ComboBox ItemsSource="{Binding RowQuantityList}"
SelectedIndex="{Binding SelRowQuantity}" SelectedIndex="{Binding SelRowQuantity}"
Style="{StaticResource OpenProjectFileDialog_ComboBox}"/> Style="{StaticResource OnyProd_FeatureComboBox}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Grid> </Grid>
</GroupBox> </GroupBox>
<Border Grid.Row="1" <Border Grid.Row="1" Style="{StaticResource OnlyProdPage_Border}" Margin="1"/>
Style="{StaticResource NewOpenProjectFileDialog_Border}"/>
<EgwWPFBaseLib:EgwDataGrid Grid.Row="1" <EgtBEAMWALLCORE:EgtDataGrid Grid.Row="1"
x:Name="MainDataGrid" x:Name="MainDataGrid"
ItemsSource="{Binding ProjectList}" ItemsSource="{Binding ProjectList}"
SelectedItem="{Binding SelProject}" SelectedItem="{Binding SelProject}"
SelectionMode="Single" SelectionMode="Single"
Margin="5" Margin="5"
ColumnLayouts="{Binding ProdColumns}" BindingColumns="{Binding ProdColumns}"
RowDetailsVisibilityMode="Visible" RowDetailsVisibilityMode="Visible"
CellEditEnding="MainDataGrid_CellEditEnding" CellEditEnding="MainDataGrid_CellEditEnding"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}" AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2" AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}" ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource Optimizer_DataGrid}" Style="{StaticResource DataGrid_OnlyProd}"
CellStyle="{StaticResource CellDataGrid_NewOpenProject}"> CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
<DataGrid.Resources> <DataGrid.Resources>
<!-- ProdId --> <!-- ProdId -->
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}"> <DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
@@ -125,9 +129,9 @@
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"/> <TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"/>
<ToggleButton Grid.Column="1" <ToggleButton Grid.Column="1"
IsChecked="{Binding Path=DataContext.bIsEditNameActive,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}" IsChecked="{Binding Path=DataContext.bIsEditNameActive,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
Style="{StaticResource Small_ToggleButton}"> Style="{StaticResource ToolBar_SmallToggleButton}">
<Image Source="{StaticResource Edit_Image}" <Image Source="\Resources\CalcPanel\Edit.png"
Style="{StaticResource Lock_Image}"/> Style="{StaticResource LockImage}"/>
</ToggleButton> </ToggleButton>
</Grid> </Grid>
</DataGridTextColumn.Header> </DataGridTextColumn.Header>
@@ -148,7 +152,7 @@
<DataGridTemplateColumn x:Key="colARCHIVED"> <DataGridTemplateColumn x:Key="colARCHIVED">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<Image Source="{StaticResource Archived_Image}" <Image Source="\Resources\OpenProjectFileDialog\Archived.png"
Visibility="{Binding Archived_Visibility}" Visibility="{Binding Archived_Visibility}"
Style="{StaticResource Archived_Image}"/> Style="{StaticResource Archived_Image}"/>
</DataTemplate> </DataTemplate>
@@ -167,7 +171,7 @@
</DataGrid.RowStyle> </DataGrid.RowStyle>
<DataGrid.RowDetailsTemplate> <DataGrid.RowDetailsTemplate>
<DataTemplate> <DataTemplate>
<ItemsControl ItemsSource="{Binding ProjFileList}" HorizontalAlignment="Left" Margin="50,-1,0,0" <ItemsControl ItemsSource="{Binding ProjFileList}"
Style="{StaticResource ProjFileList_ItemsControl}"> Style="{StaticResource ProjFileList_ItemsControl}">
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
@@ -180,11 +184,12 @@
<RowDefinition Height="1"/> <RowDefinition Height="1"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Grid.ColumnSpan="2" <Grid Grid.Row="0"
Grid.ColumnSpan="2"
Style="{StaticResource Gray_Grid}"/> Style="{StaticResource Gray_Grid}"/>
<Grid Grid.Column="1" <Grid Grid.Column="1"
Grid.Row="1" Grid.Row="1"
Style="{StaticResource NewOpenProjectFile_Grid}"> Margin="2">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -202,8 +207,8 @@
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding Path=DataContext.ListName_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}" Text="{Binding Path=DataContext.ListName_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
Style="{StaticResource OpenWnd_TextBlock}"/> Style="{StaticResource OpenWnd_TextBlock}"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Column="1"
Grid.Column="1" Grid.Row="1"
Text="{Binding sListName}"/> Text="{Binding sListName}"/>
<TextBlock Grid.Column="2" <TextBlock Grid.Column="2"
Text="{Binding Path=DataContext.ExportDate_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}" Text="{Binding Path=DataContext.ExportDate_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
@@ -217,28 +222,26 @@
</ItemsControl> </ItemsControl>
</DataTemplate> </DataTemplate>
</DataGrid.RowDetailsTemplate> </DataGrid.RowDetailsTemplate>
</EgwWPFBaseLib:EgwDataGrid> </EgtBEAMWALLCORE:EgtDataGrid>
<UniformGrid Grid.Row="2" <UniformGrid Columns="4" Grid.Row="2"
Columns="4" Margin="0,0,0,5">
Style="{StaticResource AddRawPartWnd_UniformGrid}"> <Button IsDefault="True" Name="OpenBtn"
<Button Name="OpenBtn"
IsDefault="True"
Content="{Binding Open_Msg}" Content="{Binding Open_Msg}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Archive_Msg}" <Button Content="{Binding Archive_Msg}"
Command="{Binding Archive_Command}" Command="{Binding Archive_Command}"
IsEnabled="{Binding bArchived_IsEnabled}" IsEnabled="{Binding bArchived_IsEnabled}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Delete_Msg}" <Button Content="{Binding Delete_Msg}"
Command="{Binding Delete_Command}" Command="{Binding Delete_Command}"
IsEnabled="{Binding bDelete_IsEnabled}" IsEnabled="{Binding bDelete_IsEnabled}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Command="{Binding Cancel_Command}" <Button Command="{Binding Cancel_Command}"
Content="{Binding Cancel_Msg}" Content="{Binding Cancel_Msg}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -41,30 +41,40 @@ Public MustInherit Class NewOpenProjectFileDialogVM
Friend Event m_CloseWindow(bDialogResult As Boolean) Friend Event m_CloseWindow(bDialogResult As Boolean)
Protected m_ProdColumns As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout) Protected m_ProdColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property ProdColumns As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout) Public Property ProdColumns As ObservableCollection(Of EgtDataGridColumn)
Get Get
Return m_ProdColumns Return m_ProdColumns
End Get End Get
Set(value As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)) Set(value As ObservableCollection(Of EgtDataGridColumn))
m_ProdColumns = value m_ProdColumns = value
End Set End Set
End Property End Property
Private m_colProdFile_Name As EgwWPFBaseLib.ColumnLayout Private m_colProdFile_Name As EgtDataGridColumn
Public ReadOnly Property colProdFile_Name As EgwWPFBaseLib.ColumnLayout Public ReadOnly Property colProdFile_Name As EgtDataGridColumn
Get Get
Return m_colProdFile_Name Return m_colProdFile_Name
End Get End Get
End Property End Property
Private m_colArchived_Name As EgwWPFBaseLib.ColumnLayout Private m_colArchived_Name As EgtDataGridColumn
Public ReadOnly Property colArchived_Name As EgwWPFBaseLib.ColumnLayout Public ReadOnly Property colArchived_Name As EgtDataGridColumn
Get Get
Return m_colArchived_Name Return m_colArchived_Name
End Get End Get
End Property End Property
Protected m_ProjColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property ProjColumns As ObservableCollection(Of EgtDataGridColumn)
Get
Return m_ProjColumns
End Get
Set(value As ObservableCollection(Of EgtDataGridColumn))
m_ProjColumns = value
End Set
End Property
Protected m_ProjectType As ProjectType Protected m_ProjectType As ProjectType
Protected m_sFilter As String Protected m_sFilter As String
@@ -378,9 +388,9 @@ Public MustInherit Class NewOpenProjectFileDialogVM
Set(value As Boolean) Set(value As Boolean)
m_bViewArchived = value m_bViewArchived = value
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_VIEWARCHIVED, If(bViewArchived, 1, 0)) WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_VIEWARCHIVED, If(bViewArchived, 1, 0))
If Not IsNothing(m_colArchived_Name) Then If Not IsNothing( m_colArchived_Name) Then
m_colArchived_Name.IsVisible = value m_colArchived_Name.Visible = value
RefreshProjectList() RefreshProjectList()
End If End If
End Set End Set
End Property End Property
@@ -541,8 +551,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
ProdItem.m_delIsModifiedSetUp = AddressOf SetIsEditNameActive ProdItem.m_delIsModifiedSetUp = AddressOf SetIsEditNameActive
' carico colonne ' carico colonne
LoadColumns() LoadColumns()
m_colProdFile_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Key = COL_NAME) m_colProdFile_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_NAME)
m_colArchived_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Key = COL_ARCHIVED) m_colArchived_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_ARCHIVED)
' leggo valori per filtri ' leggo valori per filtri
m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0) m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0)
Select Case m_SelDayType Select Case m_SelDayType
@@ -579,7 +589,7 @@ Public MustInherit Class NewOpenProjectFileDialogVM
Protected Sub LoadColumns() Protected Sub LoadColumns()
' carico le colonne della datagrid ' carico le colonne della datagrid
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_NEWOPENPROJFILEDLG_PROD, ProdColumns) GetPrivateProfileColumns(S_NEWOPENPROJFILEDLG_PROD, ProdColumns)
' carico campi su cui eseguire il filtro di ricerca ' carico campi su cui eseguire il filtro di ricerca
m_BTLDateTypeList = New List(Of String)({CreateDate_Msg}) m_BTLDateTypeList = New List(Of String)({CreateDate_Msg})
m_SelBTLDateType = BTLDateTypes.CREATEDATE m_SelBTLDateType = BTLDateTypes.CREATEDATE
@@ -591,14 +601,29 @@ Public MustInherit Class NewOpenProjectFileDialogVM
New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)}) New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL) m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL)
NotifyPropertyChanged(NameOf(SelFilterType)) NotifyPropertyChanged(NameOf(SelFilterType))
'End If
' setto la visibilità delle colonne delle EgtDataGrid
For Each col In ProjColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
For Each col In ProdColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
End Sub End Sub
Friend Function VerifySelected() As Boolean Friend Function VerifySelected() As Boolean
' Salvo modifiche a colonne
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_NEWOPENPROJFILEDLG_PROD, ProdColumns)
If IsNothing(SelProject) Then Return False If IsNothing(SelProject) Then Return False
Dim AllFilesInDir As IEnumerable(Of String) = Nothing Dim AllFilesInDir As IEnumerable(Of String) = Nothing
If m_ProjectType = Core.ConstBeam.ProjectType.PROD Then If m_ProjectType = Core.ConstBeam.ProjectType.PROJ Then
If Not IsNothing(SelProject.ProdFileVM) Then
If String.IsNullOrWhiteSpace(SelProject.ProdFileVM.sProdDirPath) OrElse Not Directory.Exists(SelProject.ProdFileVM.sProdDirPath) Then Return False
AllFilesInDir = Directory.EnumerateFiles(SelProject.ProdFileVM.sProdDirPath)
ElseIf SelProject.ProjFileList.Count > 0 Then
If String.IsNullOrWhiteSpace(SelProject.ProjFileList(0).sProjDirPath) OrElse Not Directory.Exists(SelProject.ProjFileList(0).sProjDirPath) Then Return False
AllFilesInDir = Directory.EnumerateFiles(SelProject.ProjFileList(0).sProjDirPath)
Else Return False
End If
ElseIf m_ProjectType = Core.ConstBeam.ProjectType.PROD Then
If String.IsNullOrWhiteSpace(SelProject.ProdFileVM.sProdDirPath) OrElse Not Directory.Exists(SelProject.ProdFileVM.sProdDirPath) Then Return False If String.IsNullOrWhiteSpace(SelProject.ProdFileVM.sProdDirPath) OrElse Not Directory.Exists(SelProject.ProdFileVM.sProdDirPath) Then Return False
AllFilesInDir = Directory.EnumerateFiles(SelProject.ProdFileVM.sProdDirPath) AllFilesInDir = Directory.EnumerateFiles(SelProject.ProdFileVM.sProdDirPath)
Else Else
@@ -1,19 +1,18 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="OpenProjectFileDialogV" <EgtWPFLib5:EgtCustomWindow x:Class="OpenProjectFileDialogV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core" xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib" Title="{Binding Title}"
Title="{Binding Title}" Style="{StaticResource OnlyProd_EgtCustomWindow}"
ResizeMode="NoResize" TitleBarHeight="30" WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
WindowStartupLocation="CenterScreen" ShowInTaskbar="False" IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
MinHeight="500" MinWidth="500" MinHeight="500" MinWidth="500"
DataContext="{Binding RelativeSource={RelativeSource Self}}" DataContext="{Binding RelativeSource={RelativeSource Self}}">
Style="{StaticResource OptimizerWindow.Dialog}">
<EgtBEAMWALLCORE:OptimizerWindow.Resources> <EgtWPFLib5:EgtCustomWindow.Resources>
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/> <EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
</EgtBEAMWALLCORE:OptimizerWindow.Resources> </EgtWPFLib5:EgtCustomWindow.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
@@ -23,8 +22,9 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<GroupBox Header="Filters" <GroupBox Header="Filters"
Margin="5"
Visibility="{Binding Filters_Visibility}" Visibility="{Binding Filters_Visibility}"
Style="{StaticResource OpenProjectFile_GroupBox}"> BorderBrush="{StaticResource BeamWall_RegentStBlue}">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -37,24 +37,28 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ComboBox ItemsSource="{Binding BTLDateTypeList}" <ComboBox ItemsSource="{Binding BTLDateTypeList}"
SelectedIndex="{Binding SelBTLDateType}" SelectedIndex="{Binding SelBTLDateType}"
Style="{StaticResource NewOpenProjectFile_ComboBox}"/> Width="105"
<StackPanel Grid.Column="1" Margin="5"
Style="{StaticResource PartManager_StackPanel}"> Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<ComboBox ItemsSource="{Binding DayTypeList}" <ComboBox ItemsSource="{Binding DayTypeList}"
SelectedIndex="{Binding SelDayType}" SelectedIndex="{Binding SelDayType}"
Style="{StaticResource OpenProjectFile_ComboBox}"/> Width="105"
<StackPanel Visibility="{Binding Date_Visibility}" Margin="0,0,2.5,0"
Style="{StaticResource PartManager_StackPanel}"> Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<StackPanel Orientation="Horizontal" Visibility="{Binding Date_Visibility}">
<TextBlock Text="{Binding From_Msg}" <TextBlock Text="{Binding From_Msg}"
Style="{StaticResource Filter_TextBlock}"/> Style="{StaticResource Filter_TextBlock}"
<DatePicker SelectedDate="{Binding dtStartDate}" Foreground="{StaticResource BeamWall_Corduroy}"/>
CalendarStyle="{StaticResource Filter_Calendar}" <DatePicker SelectedDate="{Binding dtStartDate}"
Style="{StaticResource Filter_DatePicker}"/> Style="{StaticResource Filter_DatePicker}"
CalendarStyle="{StaticResource Filter_Calendar}"/>
<TextBlock Text="{Binding To_Msg}" <TextBlock Text="{Binding To_Msg}"
Style="{StaticResource Filter_TextBlock}"/> Style="{StaticResource Filter_TextBlock}"
<DatePicker SelectedDate="{Binding dtEndDate}" Foreground="{StaticResource BeamWall_Corduroy}"/>
CalendarStyle="{StaticResource Filter_Calendar}" <DatePicker SelectedDate="{Binding dtEndDate}"
Style="{StaticResource Filter_DatePicker}"/> Style="{StaticResource Filter_DatePicker}"
CalendarStyle="{StaticResource Filter_Calendar}"/>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Grid> </Grid>
@@ -66,37 +70,41 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ComboBox ItemsSource="{Binding FilterTypeList}" <ComboBox ItemsSource="{Binding FilterTypeList}"
SelectedItem="{Binding SelFilterType}" SelectedItem="{Binding SelFilterType}"
Style="{StaticResource NewOpenProjectFile_ComboBox}"/> Width="105"
Margin="5"
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding SearchText}" Text="{Binding SearchText}"
Margin="5"
Visibility="{Binding SearchText_Visibility}" Visibility="{Binding SearchText_Visibility}"
Style="{StaticResource NewSearchText_TextBox}"/> Style="{StaticResource NewSearchText_TextBox}"/>
<StackPanel Grid.Column="2" <StackPanel Grid.Column="2"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<TextBlock Text="Rows" <TextBlock Text="Rows"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"
Foreground="{StaticResource BeamWall_Corduroy}"/>
<ComboBox ItemsSource="{Binding RowQuantityList}" <ComboBox ItemsSource="{Binding RowQuantityList}"
SelectedIndex="{Binding SelRowQuantity}" SelectedIndex="{Binding SelRowQuantity}"
Style="{StaticResource RowQTY_ComboBox}"/> Width="55"
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Grid> </Grid>
</GroupBox> </GroupBox>
<Border Grid.Row="1" <Border Grid.Row="1" Style="{StaticResource OnlyProdPage_Border}" Margin="1"/>
Style="{StaticResource NewOpenProjectFileDialog_Border}"/>
<EgwWPFBaseLib:EgwDataGrid Grid.Row="1" <EgtBEAMWALLCORE:EgtDataGrid Grid.Row="1"
ItemsSource="{Binding ProjectList}" ItemsSource="{Binding ProjectList}"
SelectedItem="{Binding SelProject}" SelectedItem="{Binding SelProject}"
SelectionMode="Single" SelectionMode="Single"
Margin="5" Margin="5"
ColumnLayouts="{Binding ProjectColumns}" BindingColumns="{Binding ProjectColumns}"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}" AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2" AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}" ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource Optimizer_DataGrid}" Style="{StaticResource DataGrid_OnlyProd}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"> CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
<DataGrid.RowStyle> <DataGrid.RowStyle>
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}"> <Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
<Setter Property="IsEnabled" Value="{Binding bIsEnabled}"/> <Setter Property="IsEnabled" Value="{Binding bIsEnabled}"/>
@@ -104,14 +112,14 @@
</Style> </Style>
</DataGrid.RowStyle> </DataGrid.RowStyle>
<DataGrid.Resources> <DataGrid.Resources>
<!-- ProjId --><!-- <!-- ProjId -->
<DataGridTextColumn x:Key="colPROJID" Binding="{Binding sProjId}"> <DataGridTextColumn x:Key="colPROJID" Binding="{Binding sProjId}">
<DataGridTextColumn.HeaderTemplate> <DataGridTextColumn.HeaderTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/> <TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>--> </DataGridTextColumn>
<!-- ProdId --> <!-- ProdId -->
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}"> <DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
<DataGridTextColumn.HeaderTemplate> <DataGridTextColumn.HeaderTemplate>
@@ -120,14 +128,14 @@
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn> </DataGridTextColumn>
<!-- Project Name --><!-- <!-- Project Name -->
<DataGridTextColumn x:Key="colPROJNAME" Binding="{Binding sDescription}"> <DataGridTextColumn x:Key="colPROJNAME" Binding="{Binding sDescription}">
<DataGridTextColumn.HeaderTemplate> <DataGridTextColumn.HeaderTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/> <TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>--> </DataGridTextColumn>
<!-- BTL FileName --> <!-- BTL FileName -->
<DataGridTextColumn x:Key="colBTLNAME" Binding="{Binding sBTLFileName}"> <DataGridTextColumn x:Key="colBTLNAME" Binding="{Binding sBTLFileName}">
<DataGridTextColumn.HeaderTemplate> <DataGridTextColumn.HeaderTemplate>
@@ -136,22 +144,22 @@
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn> </DataGridTextColumn>
<!-- ListName --><!-- <!-- ListName -->
<DataGridTextColumn x:Key="colLISTNAME" Binding="{Binding sListName}"> <DataGridTextColumn x:Key="colLISTNAME" Binding="{Binding sListName}">
<DataGridTextColumn.HeaderTemplate> <DataGridTextColumn.HeaderTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding Path=DataContext.ListName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/> <TextBlock Text="{Binding Path=DataContext.ListName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>--> </DataGridTextColumn>
<!-- Exported date --><!-- <!-- Exported date -->
<DataGridTextColumn x:Key="colEXPDATE" Binding="{Binding dtExportDate}"> <DataGridTextColumn x:Key="colEXPDATE" Binding="{Binding dtExportDate}">
<DataGridTextColumn.HeaderTemplate> <DataGridTextColumn.HeaderTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding Path=DataContext.ExportDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/> <TextBlock Text="{Binding Path=DataContext.ExportDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>--> </DataGridTextColumn>
<!-- Creation date --> <!-- Creation date -->
<DataGridTextColumn x:Key="colCRTDATE" Binding="{Binding dtCreateDate}"> <DataGridTextColumn x:Key="colCRTDATE" Binding="{Binding dtCreateDate}">
<DataGridTextColumn.Header> <DataGridTextColumn.Header>
@@ -164,30 +172,27 @@
<TextBlock Text="{Binding Path=DataContext.Machine_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/> <TextBlock Text="{Binding Path=DataContext.Machine_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataGridTextColumn.Header> </DataGridTextColumn.Header>
</DataGridTextColumn> </DataGridTextColumn>
<!-- Name (per Prod) --><!-- <!-- Name (per Prod) -->
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}"> <DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
<DataGridTextColumn.Header> <DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/> <TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataGridTextColumn.Header> </DataGridTextColumn.Header>
</DataGridTextColumn>--> </DataGridTextColumn>
</DataGrid.Resources> </DataGrid.Resources>
</EgwWPFBaseLib:EgwDataGrid> </EgtBEAMWALLCORE:EgtDataGrid>
<UniformGrid Grid.Row="2" <UniformGrid Columns="3" Grid.Row="2" Margin="0,0,0,5">
Columns="3" <Button IsDefault="True" Name="OpenBtn"
Style="{StaticResource AddRawPartWnd_UniformGrid}">
<Button Name="OpenBtn"
IsDefault="True"
Content="{Binding Open_Msg}" Content="{Binding Open_Msg}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Delete_Msg}" <Button Content="{Binding Delete_Msg}"
Command="{Binding Delete_Command}" Command="{Binding Delete_Command}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button IsCancel="True" <Button IsCancel="True"
Content="{Binding Cancel_Msg}" Content="{Binding Cancel_Msg}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -69,8 +69,6 @@ Public Class OpenProjectFileDialogV
End Sub End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_OpenProjFileDialogVM.m_CloseWindow Private Sub CloseWindow(bDialogResult As Boolean) Handles m_OpenProjFileDialogVM.m_CloseWindow
' Salvo modifiche a colonne
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_OPENPROJFILEDLG_PROD, m_OpenProjFileDialogVM.ProjectColumns)
Me.DialogResult = bDialogResult Me.DialogResult = bDialogResult
End Sub End Sub
@@ -42,12 +42,12 @@ Public MustInherit Class OpenProjectFileDialogVM
Protected m_GoToProd As Boolean = False Protected m_GoToProd As Boolean = False
Protected m_ProjectColumns As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout) Protected m_ProjectColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property ProjectColumns As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout) Public Property ProjectColumns As ObservableCollection(Of EgtDataGridColumn)
Get Get
Return m_ProjectColumns Return m_ProjectColumns
End Get End Get
Set(value As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)) Set(value As ObservableCollection(Of EgtDataGridColumn))
m_ProjectColumns = value m_ProjectColumns = value
End Set End Set
End Property End Property
@@ -408,8 +408,6 @@ Public MustInherit Class OpenProjectFileDialogVM
#End Region ' FIELDS & PROPERTIES #End Region ' FIELDS & PROPERTIES
Sub New() Sub New()
' carico colonne
LoadColumns()
' leggo valori per filtri ' leggo valori per filtri
m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0) m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0)
Select Case m_SelDayType Select Case m_SelDayType
@@ -443,28 +441,51 @@ Public MustInherit Class OpenProjectFileDialogVM
Public Overridable Sub RefreshProjectList() Public Overridable Sub RefreshProjectList()
End Sub End Sub
Protected Sub LoadColumns() Protected Sub LoadColumns(ProjectType As ProjectType)
' carico le colonne della datagrid If ProjectType = ProjectType.PROJ Then
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_OPENPROJFILEDLG_PROD, ProjectColumns) ' carico le colonne della datagrid
' carico campi su cui eseguire il filtro di ricerca GetPrivateProfileColumns(S_OPENPROJFILEDLG_PROJ, ProjectColumns)
m_BTLDateTypeList = New List(Of String)({CreateDate_Msg}) ' carico campi su cui eseguire il filtro di ricerca
m_SelBTLDateType = BTLDateTypes.CREATEDATE m_BTLDateTypeList = New List(Of String)({CreateDate_Msg, ExportDate_Msg})
NotifyPropertyChanged(NameOf(BTLDateTypeList)) m_SelBTLDateType = BTLDateTypes.CREATEDATE
NotifyPropertyChanged(NameOf(SelBTLDateType)) NotifyPropertyChanged(NameOf(BTLDateTypeList))
m_FilterTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(FilterTypes.NULL, ""), NotifyPropertyChanged(NameOf(SelBTLDateType))
New IdNameStruct(FilterTypes.ID, Id_Msg), m_FilterTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(FilterTypes.NULL, ""),
New IdNameStruct(FilterTypes.BTLFILENAME, BTLFileName_Msg), New IdNameStruct(FilterTypes.ID, Id_Msg),
New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)}) New IdNameStruct(FilterTypes.BTLFILENAME, BTLFileName_Msg),
m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL) New IdNameStruct(FilterTypes.LISTNAME, ListName_Msg),
NotifyPropertyChanged(NameOf(SelFilterType)) New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL)
NotifyPropertyChanged(NameOf(SelFilterType))
ElseIf ProjectType = ProjectType.PROD Then
' carico le colonne della datagrid
GetPrivateProfileColumns(S_OPENPROJFILEDLG_PROD, ProjectColumns)
' carico campi su cui eseguire il filtro di ricerca
m_BTLDateTypeList = New List(Of String)({CreateDate_Msg})
m_SelBTLDateType = BTLDateTypes.CREATEDATE
NotifyPropertyChanged(NameOf(BTLDateTypeList))
NotifyPropertyChanged(NameOf(SelBTLDateType))
m_FilterTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(FilterTypes.NULL, ""),
New IdNameStruct(FilterTypes.ID, Id_Msg),
New IdNameStruct(FilterTypes.BTLFILENAME, BTLFileName_Msg),
New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL)
NotifyPropertyChanged(NameOf(SelFilterType))
End If
' setto la visibilità delle colonne delle EgtDataGrid
For Each col In ProjectColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
End Sub End Sub
Friend Function VerifySelected() As Boolean Friend Function VerifySelected() As Boolean
' Salvo modifiche a colonne
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_OPENPROJFILEDLG_PROD, ProjectColumns)
If IsNothing(SelProject) Then Return False If IsNothing(SelProject) Then Return False
Dim AllFilesInDir As IEnumerable(Of String) = Nothing Dim AllFilesInDir As IEnumerable(Of String) = Nothing
If m_ProjectType = Core.ConstBeam.ProjectType.PROD Then If m_ProjectType = Core.ConstBeam.ProjectType.PROJ Then
If String.IsNullOrWhiteSpace(SelProject.sProjDirPath) OrElse Not Directory.Exists(SelProject.sProjDirPath) Then Return False
' verifico se esiste ProdId
AllFilesInDir = Directory.EnumerateFiles(SelProject.sProjDirPath)
ElseIf m_ProjectType = Core.ConstBeam.ProjectType.PROD Then
If String.IsNullOrWhiteSpace(SelProject.sProdDirPath) OrElse Not Directory.Exists(SelProject.sProdDirPath) Then Return False If String.IsNullOrWhiteSpace(SelProject.sProdDirPath) OrElse Not Directory.Exists(SelProject.sProdDirPath) Then Return False
AllFilesInDir = Directory.EnumerateFiles(SelProject.sProdDirPath) AllFilesInDir = Directory.EnumerateFiles(SelProject.sProdDirPath)
Else Else
@@ -480,13 +501,25 @@ Public MustInherit Class OpenProjectFileDialogVM
Protected Function ProjectFilter(Proj As Object) As Boolean Protected Function ProjectFilter(Proj As Object) As Boolean
Dim bProjectOk As Boolean = True Dim bProjectOk As Boolean = True
Dim CurrProj As ProdFileVM = DirectCast(Proj, ProdFileVM) If m_ProjectType = ProjectType.PROJ Then
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso ( Dim CurrProj As ProjFileVM = DirectCast(Proj, ProjFileVM)
(m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso ( (m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not SearchDate.Contains(CurrProj.dtExportDate.Date)) OrElse
(m_SelFilterType.Id = FilterTypes.ID AndAlso CurrProj.sProdId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse (m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
(m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False (m_SelFilterType.Id = FilterTypes.ID AndAlso CurrProj.sProjId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
(m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
(m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
ElseIf m_ProjectType = ProjectType.PROD Then
Dim CurrProj As ProdFileVM = DirectCast(Proj, ProdFileVM)
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
(m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
(m_SelFilterType.Id = FilterTypes.ID AndAlso CurrProj.sProdId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
(m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
End If
Return bProjectOk Return bProjectOk
End Function End Function
@@ -1,10 +0,0 @@
Imports System.Windows
Public Class OptimizerWindow
Inherits EgwWPFBaseLib.EgtWindow
Shared Sub New()
DefaultStyleKeyProperty.OverrideMetadata(GetType(OptimizerWindow), New FrameworkPropertyMetadata(GetType(OptimizerWindow)))
End Sub
End Class
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

-552
View File
@@ -1,552 +0,0 @@
<ResourceDictionary 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:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/EgtBEAMWALL.Core;component/Themes/Generic.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--#region Colori per EgtWPFLib5-->
<SolidColorBrush x:Key="TextBox.Static.Border" Color="{StaticResource BeamWall_Bombay_Color}"/>
<!--#endregion Colori per EgtWPFLib5-->
<!--#region Colori Button-->
<SolidColorBrush x:Key="ButtonBasic.Static.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.Static.Border" Color="{StaticResource BeamWall_DoveGray_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.MouseOver.Background" Color="{StaticResource BeamWall_FrenchPass_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.MouseOver.Border" Color="{StaticResource BeamWall_BostonBlue_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.Pressed.Background" Color="{StaticResource BeamWall_TropicalBlue_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.Pressed.Border" Color="{StaticResource BeamWall_Calypso_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.Disabled.Background" Color="{StaticResource BeamWall_WildSand_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.Disabled.Border" Color="{StaticResource BeamWall_Bombay_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.Disabled.Foreground" Color="{StaticResource BeamWall_Gray_Color}"/>
<SolidColorBrush x:Key="Button.Static.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Button.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Button.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="Button.Pressed.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Button.Pressed.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Button.Disabled.Background" Color="{StaticResource BeamWall_Glacier_Color}" Opacity="0.5"/>
<SolidColorBrush x:Key="Button.Disabled.Border" Color="{StaticResource BeamWall_Glacier_Color}" Opacity="0.5"/>
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="{StaticResource BeamWall_White_Color}" Opacity="0.5"/>
<SolidColorBrush x:Key="Button.TitleBar.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<LinearGradientBrush x:Key="Button.MainMenu.Background" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="{StaticResource BeamWall_Kashmir_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0.65"/>
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="Button.MainMenu.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Button.General.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Button.PrManagerNew.Background" Color="Transparent"/>
<!--#endregion Colori Button-->
<!--#region Colori ScrollBar-->
<SolidColorBrush x:Key="ScrollBar.Static.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Static.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Static.Glyph" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Static.Thumb" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ScrollBar.MouseOver.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="ScrollBar.MouseOver.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="ScrollBar.MouseOver.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ScrollBar.MouseOver.Thumb" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Pressed.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Pressed.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Pressed.Thumb" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Pressed.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Disabled.Background" Color="{StaticResource BeamWall_LinkWater_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Disabled.Border" Color="{StaticResource BeamWall_LinkWater_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Disabled.Glyph" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Button.Static.Background" Color="{StaticResource BeamWall_White_Color}"/>
<!--#endregion Colori ScrollBar-->
<!--#region Colori ComboBox-->
<SolidColorBrush x:Key="ComboBox.Static.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="ComboBox.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="{StaticResource BeamWall_Bombay_Color}"/>
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="{StaticResource BeamWall_Seagull_Color}"/>
<LinearGradientBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="{StaticResource BeamWall_Selago_Color}" Offset="0.0"/>
<GradientStop Color="{StaticResource BeamWall_HawkesBlue_Color}" Offset="1.0"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="{StaticResource BeamWall_Seagull_Color}"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="{StaticResource BeamWall_CornflowerBlue_Color}"/>
<LinearGradientBrush x:Key="ComboBox.Pressed.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="{StaticResource BeamWall_HawkesBlue_Color}" Offset="0.0"/>
<GradientStop Color="{StaticResource BeamWall_FrenchPass_Color}" Offset="1.0"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="{StaticResource BeamWall_CornflowerBlue_Color}"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="{StaticResource BeamWall_Silver_Color}"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="{StaticResource BeamWall_Silver_Color}"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent"/>
<!--#endregion Colori ComboBox-->
<!--#region Colori Expander-->
<SolidColorBrush x:Key="Expander.Static.Background" Color="Transparent"/>
<SolidColorBrush x:Key="Expander.Static.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Expander.Static.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Expander.Static.Circle.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="Expander.Static.Circle.Fill" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Expander.Static.Arrow.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="Expander.MouseOver.Circle.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Expander.MouseOver.Circle.Fill" Color="{StaticResource BeamWall_AliceBlue_Color}"/>
<SolidColorBrush x:Key="Expander.MouseOver.Arrow.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Expander.Pressed.Circle.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Expander.Pressed.Circle.Fill" Color="{StaticResource BeamWall_PattensBlue_Color}"/>
<SolidColorBrush x:Key="Expander.Pressed.Arrow.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Expander.Disabled.Circle.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}" Opacity="0.5"/>
<SolidColorBrush x:Key="Expander.Disabled.Circle.Fill" Color="{StaticResource BeamWall_Mercury_Color}" Opacity="0.5"/>
<SolidColorBrush x:Key="Expander.Disabled.Arrow.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}" Opacity="0.5"/>
<!--#endregion Colori Expander-->
<!--#region Colori ListBox-->
<SolidColorBrush x:Key="ListBox.Static.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.NewAddFeature.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.NewAddFeatureIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="ListBox.NewAddFeatureIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ListBox.NewAddFeatureNotSelected.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.NewAddFeatureNotSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="ListBox.MacroCustom.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.MacroDefault.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.FeatureManager.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.LeftPanel.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.Strategy.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.StrategyIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="ListBox.StrategyIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ListBox.StrategyNoSelected.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.StrategyNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="ListBox.BTLIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="ListBox.BTLIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ListBox.BTLNoSelected.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.BTLNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTL.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLNoSelected.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="ListBox.BTLPartIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="ListBox.BTLPartIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ListBox.BTLPartNoSelected.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.BTLPartNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="Item.MouseOver.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="Item.MouseOver.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="Item.MouseOver.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Item.SelectedActive.Background" Color="{StaticResource BeamWall_Keppel_Color}"/>
<SolidColorBrush x:Key="Item.SelectedActive.Border" Color="{StaticResource BeamWall_Keppel_Color}"/>
<SolidColorBrush x:Key="Item.SelectedActive.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Item.SelectedInactive.Background" Color="#3DDADADA"/>
<SolidColorBrush x:Key="Item.SelectedInactive.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
<!--#endregion Colori ListBox-->
<!--#region Colori TabItem-->
<LinearGradientBrush x:Key="TabItem.Static.Background" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="0.85"/>
<GradientStop Color="{StaticResource BeamWall_LinkWater_Color}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="TabItem.Static.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="TabItem.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="TabItem.MouseOver.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="TabItem.MouseOver.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<LinearGradientBrush x:Key="TabItem.Selected.Background" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="{StaticResource BeamWall_Kashmir_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0.85"/>
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="TabItem.Selected.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="TabItem.Disabled.Background" Color="{StaticResource BeamWall_Gallery_Color}"/>
<SolidColorBrush x:Key="TabItem.Disabled.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
<!--#endregion Colori TabItem-->
<!--#region Colori TabControl-->
<SolidColorBrush x:Key="TabControl.Static.EgtManageDialog.Background" Color="Transparent"/>
<SolidColorBrush x:Key="TabControl.Static.EgtManageDialog.Border" Color="{StaticResource BeamWall_White_Color}"/>
<LinearGradientBrush x:Key="TabControl.Static.Generic.Background" 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>
<LinearGradientBrush x:Key="TabControl.Optimizer.Background" 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>
<!--#endregion Colori TabControl-->
<!--#region Colori ScrollViewer-->
<LinearGradientBrush x:Key="ScrollViewer.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
<GradientStop Color="{StaticResource BeamWall_Silver_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_Alto_Color}" Offset="0.45"/>
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="1"/>
</LinearGradientBrush>
<!--#endregion Colori ScrollViewer-->
<!--#region Colori Grid-->
<LinearGradientBrush x:Key="Grid.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.65"/>
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="Grid.Static.ExpanderDown.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Grid.Static.ExpanderUp.Background" Color="Transparent"/>
<SolidColorBrush x:Key="Grid.Statistics.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Grid.UserAdmin.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<!--#endregion Colori Grid-->
<!--#region Colori GridSplitter-->
<SolidColorBrush x:Key="GridSplitter.Width.Background" Color="Transparent"/>
<SolidColorBrush x:Key="GridSplitter.Height.Background" Color="Transparent"/>
<!--#endregion Colori GridSplitter-->
<!--#region Colori TreeView-->
<LinearGradientBrush x:Key="TreeView.Static.Background" 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>
<SolidColorBrush x:Key="TreeView.Static.EgtManageDialog.Background" Color="{StaticResource BeamWall_White_Color}"/>
<!--#endregion Colori TreeView-->
<!--#region Colori TextBlock-->
<SolidColorBrush x:Key="TextBlock.Static.First.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="TextBlock.Static.Second.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="TextBlock.Static.Third.Foreground" Color="{StaticResource BeamWall_DarkGray_Color}"/>
<SolidColorBrush x:Key="TextBlock.Static.Fouth.Foreground" Color="{StaticResource BeamWall_Black_Color}"/>
<SolidColorBrush x:Key="TextBlock.UserAdmin.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="TextBlock.StrategyModify.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="TextBlock.CALC_ROT.Foreground" Color="{StaticResource BeamWall_Blue_Color}"/>
<SolidColorBrush x:Key="TextBlock.Prod.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="TextBlock.Prod.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="TextBlock.RawPartList.Foreground" Color="{StaticResource BeamWall_Orange_Color}"/>
<SolidColorBrush x:Key="TextBlock.Error.Foreground" Color="{StaticResource BeamWall_Red_Color}"/>
<SolidColorBrush x:Key="TextBlock.AlternationIndex_0.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="TextBlock.AlternationIndex_1.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="TextBlock.AlternationIndexIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<!--#endregion TextBlock-->
<!--#region Colori StackPanel-->
<SolidColorBrush x:Key="StackPanel.Static.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="StackPanel.BTLTotParts.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="StackPanel.BTLTotTime.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="StackPanel.BTLRemainingTime.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="StackPanel.RawPart.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="StackPanel.Statistics.Background" Color="{StaticResource BeamWall_White_Color}"/>
<!--#endregion Colori StackPanel-->
<!--#region Colori GroupBox-->
<SolidColorBrush x:Key="GroupBox.Static.Border" Color="{StaticResource BeamWall_Geyser_Color}"/>
<SolidColorBrush x:Key="GroupBox.Static.OpenProjec.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="GroupBox.PDFPreview.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="GroupBox.MachinePanel.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<!--#endregion Colori GroupBox-->
<!--#region Colori Border-->
<SolidColorBrush x:Key="Border.Static.GroupBox.First.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.Static.GroupBox.Second.Border" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Border.Static.Optmizer.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Border.Static.EgtManageDialog.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
<SolidColorBrush x:Key="Border.Static.TitleBar.Background" Color="{StaticResource BeamWall_Casper_Color}"/>
<SolidColorBrush x:Key="Border.Static.TitleBar.Border" Color="{StaticResource BeamWall_Casper_Color}"/>
<SolidColorBrush x:Key="Border.Static.AboutBoxV.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="Border.Static.AboutBox.Border" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Border.ButtonTitleBar.Background" Color="Transparent"/>
<SolidColorBrush x:Key="Border.EgwWindow.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
<SolidColorBrush x:Key="Border.ControlTemplete.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Border.ControlTemplete.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<LinearGradientBrush x:Key="Border.WithoutTitleBar.Background" 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>
<SolidColorBrush x:Key="Border.EgtHexItem.Border" Color="{StaticResource BeamWall_Gold_Color}"/>
<SolidColorBrush x:Key="Border.Parameter.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
<SolidColorBrush x:Key="Border.Parameter.Border" Color="{StaticResource BeamWall_Gray_Color}"/>
<SolidColorBrush x:Key="Border.NewAddFeature.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.AlternationIndex.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.ItemContainer.Background" Color="{StaticResource BeamWall_LinkWater_Color}"/>
<SolidColorBrush x:Key="Border.ItemContainer.Border" Color="{StaticResource BeamWall_LinkWater_Color}"/>
<SolidColorBrush x:Key="Border.ItemContainerIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="Border.ItemContainerIsSelected.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="Border.Strategy.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.BTL.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.ForcedStrategyBTL.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.BTLPart.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.TotalTime.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Border.TotalTime.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Border.DoneTime.Background" Color="{StaticResource BeamWall_FruitSalad_Color}"/>
<SolidColorBrush x:Key="Border.DoneTime.Border" Color="{StaticResource BeamWall_FruitSalad_Color}"/>
<SolidColorBrush x:Key="Border.RemainingTime.Background" Color="{StaticResource BeamWall_FuelYellow_Color}"/>
<SolidColorBrush x:Key="Border.RemainingTime.Border" Color="{StaticResource BeamWall_FuelYellow_Color}"/>
<SolidColorBrush x:Key="Border.ProjectType.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Border.ProjectType.Border" Color="{StaticResource BeamWall_DarkGray_Color}"/>
<SolidColorBrush x:Key="Border.AddFeature.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Border.PRC.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Border.Custom.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Border.MacroCustom.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Border.Default.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Border.MacroDefault.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Border.BTLPartManager.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="Border.BTLPartManager.Border" Color="{StaticResource BeamWall_Teal_Color}"/>
<SolidColorBrush x:Key="Border.SetUp.Border" Color="{StaticResource BeamWall_Indigo_Color}"/>
<SolidColorBrush x:Key="Border.TopPanel.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
<SolidColorBrush x:Key="Border.TopPanel.Border" Color="{StaticResource BeamWall_Gray_Color}"/>
<!--#endregion Colori Border-->
<!--#region Colori Rectangle-->
<SolidColorBrush x:Key="Rectangle.Static.Stroke" Color="{StaticResource BeamWall_Black_Color}"/>
<SolidColorBrush x:Key="Rectangle.EgtColorPicker.Stroke" Color="{StaticResource BeamWall_Black_Color}"/>
<!--#endregion Colori Rectangle-->
<!--#region Colori StatusBar-->
<SolidColorBrush x:Key="StatusBar.Static.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
<!--#endregion Colori StatusBar-->
<!--#region Colori DatePicker-->
<SolidColorBrush x:Key="DatePicker.Static.Background" Color="Transparent"/>
<SolidColorBrush x:Key="DatePicker.Static.Border" Color="Transparent"/>
<SolidColorBrush x:Key="DatePickerTextBox.Static.Background" Color="Transparent"/>
<!--#endregion Colori DatePicker-->
<!--#region Colori Calendar-->
<LinearGradientBrush x:Key="Calendar.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_LinkWater_Color}" Offset="0.16"/>
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="Calendar.Static.Border" EndPoint="0.5,1" StartPoint="0.35,0">
<GradientStop Color="{StaticResource BeamWall_LinkWater_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="0.45"/>
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0.75"/>
<GradientStop Color="{StaticResource BeamWall_Kashmir_Color}" Offset="1"/>
</LinearGradientBrush>
<!--#endregion Colori Calendar-->
<!--#region Colori DataGrid-->
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Main.Background" Color="{StaticResource BeamWall_Teal_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Main.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Feature.Background" Color="{StaticResource BeamWall_Keppel_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Feature.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.PParam.Background" Color="{StaticResource BeamWall_Downy_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.PParam.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.RawPart.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.RawPart.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="DataGrid.Static.Background" Color="Transparent"/>
<SolidColorBrush x:Key="DataGrid.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="DataGrid.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="RowDataGrid.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="CellDataGrid.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="RowDataGrid.Selected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="RowDataGrid.Selected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="RowDataGrid.Selected.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="CellDataGrid.Selected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="CellDataGrid.Selected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="CellDataGrid.Selected.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<!--#endregion Colori DataGrid-->
<!--#region Colori OptimizerWindow-->
<LinearGradientBrush x:Key="OptimizerWindow.Static.Background" 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>
<SolidColorBrush x:Key="OptimizerWindow.Static.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="OptimizerWindow.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<!--#endregion Colori OtimizerWindow-->
<!--#region Colori EgtCustomWindow-->
<LinearGradientBrush x:Key="EgtCustomWindow.Static.Background" 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>
<SolidColorBrush x:Key="EgtCustomWindow.Static.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="EgtCustomWindow.Static.TitleBarBorder" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="EgtCustomWindow.Static.TitleBarForeground" Color="{StaticResource BeamWall_White_Color}"/>
<!--#endregion Colori EgtCustomWindow-->
<!--#region Colori EgtFloatingPanel-->
<SolidColorBrush x:Key="EgtFloatingPanel.Static.Background" Color="{StaticResource BeamWall_Gray_Color}"/>
<SolidColorBrush x:Key="EgtFloatingPanel.Static.Border" Color="{StaticResource BeamWall_Gray_Color}"/>
<!--#endregion Colori EgtFloatingPanel-->
<!--#region Colori EgtHexItem-->
<SolidColorBrush x:Key="EgtHexItem.Static.Background" Color="{StaticResource BeamWall_CornflowerBlue_Color}"/>
<SolidColorBrush x:Key="EgtHexItem.Static.Border" Color="{StaticResource BeamWall_Black_Color}"/>
<!--#endregion Colori EgtHexItem-->
<!--#region Colori Ellipse-->
<SolidColorBrush x:Key="Ellipse.Static.Fill" Color="{StaticResource BeamWall_Blue_Color}"/>
<SolidColorBrush x:Key="Ellipse.Parameter.Fill" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Ellipse.ParameterIsChecked.Fill" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Ellipse.UpdateBTL.Fill" Color="{StaticResource BeamWall_Red_Color}"/>
<!--#endregion Colori Ellipse-->
<!--#region Colori ToggleButton-->
<SolidColorBrush x:Key="ToggleButton.Static.Background" Color="Transparent"/>
<!--#endregion Colori ToggleButton-->
<!--#region Colori UniformGrid-->
<SolidColorBrush x:Key="UniformGrid.LeftPanel.Background" Color="{DynamicResource BeamWall_LinkWater_Color}"/>
<!--#endregion UniformGrid-->
<!--#region Colori ToolTip-->
<SolidColorBrush x:Key="ToolTip.PParameters.Background" Color="{DynamicResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="ToolTip.PParameters.Foreground" Color="{DynamicResource BeamWall_White_Color}"/>
<!--#endregion Colori ToolTip-->
</ResourceDictionary>
@@ -1,552 +0,0 @@
<ResourceDictionary 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:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/EgtBEAMWALL.Core;component/Themes/Generic.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--#region Colori per EgtWPFLib5-->
<SolidColorBrush x:Key="TextBox.Static.Border" Color="{StaticResource BeamWall_Bombay_Color}"/>
<!--#endregion Colori per EgtWPFLib5-->
<!--#region Colori Button-->
<SolidColorBrush x:Key="ButtonBasic.Static.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.Static.Border" Color="{StaticResource BeamWall_DoveGray_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.MouseOver.Background" Color="{StaticResource BeamWall_FrenchPass_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.MouseOver.Border" Color="{StaticResource BeamWall_BostonBlue_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.Pressed.Background" Color="{StaticResource BeamWall_TropicalBlue_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.Pressed.Border" Color="{StaticResource BeamWall_Calypso_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.Disabled.Background" Color="{StaticResource BeamWall_WildSand_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.Disabled.Border" Color="{StaticResource BeamWall_Bombay_Color}"/>
<SolidColorBrush x:Key="ButtonBasic.Disabled.Foreground" Color="{StaticResource BeamWall_Gray_Color}"/>
<SolidColorBrush x:Key="Button.Static.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Button.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Button.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="Button.Pressed.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Button.Pressed.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Button.Disabled.Background" Color="{StaticResource BeamWall_Glacier_Color}" Opacity="0.5"/>
<SolidColorBrush x:Key="Button.Disabled.Border" Color="{StaticResource BeamWall_Glacier_Color}" Opacity="0.5"/>
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="{StaticResource BeamWall_White_Color}" Opacity="0.5"/>
<SolidColorBrush x:Key="Button.TitleBar.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<LinearGradientBrush x:Key="Button.MainMenu.Background" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="{StaticResource BeamWall_Kashmir_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0.65"/>
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="Button.MainMenu.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Button.General.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Button.PrManagerNew.Background" Color="Transparent"/>
<!--#endregion Colori Button-->
<!--#region Colori ScrollBar-->
<SolidColorBrush x:Key="ScrollBar.Static.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Static.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Static.Glyph" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Static.Thumb" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ScrollBar.MouseOver.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="ScrollBar.MouseOver.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="ScrollBar.MouseOver.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ScrollBar.MouseOver.Thumb" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Pressed.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Pressed.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Pressed.Thumb" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Pressed.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Disabled.Background" Color="{StaticResource BeamWall_LinkWater_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Disabled.Border" Color="{StaticResource BeamWall_LinkWater_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Disabled.Glyph" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="ScrollBar.Button.Static.Background" Color="{StaticResource BeamWall_White_Color}"/>
<!--#endregion Colori ScrollBar-->
<!--#region Colori ComboBox-->
<SolidColorBrush x:Key="ComboBox.Static.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="ComboBox.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="{StaticResource BeamWall_Bombay_Color}"/>
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="{StaticResource BeamWall_Seagull_Color}"/>
<LinearGradientBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="{StaticResource BeamWall_Selago_Color}" Offset="0.0"/>
<GradientStop Color="{StaticResource BeamWall_HawkesBlue_Color}" Offset="1.0"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="{StaticResource BeamWall_Seagull_Color}"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="{StaticResource BeamWall_CornflowerBlue_Color}"/>
<LinearGradientBrush x:Key="ComboBox.Pressed.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="{StaticResource BeamWall_HawkesBlue_Color}" Offset="0.0"/>
<GradientStop Color="{StaticResource BeamWall_FrenchPass_Color}" Offset="1.0"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="{StaticResource BeamWall_CornflowerBlue_Color}"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="{StaticResource BeamWall_Silver_Color}"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="{StaticResource BeamWall_Silver_Color}"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent"/>
<!--#endregion Colori ComboBox-->
<!--#region Colori Expander-->
<SolidColorBrush x:Key="Expander.Static.Background" Color="Transparent"/>
<SolidColorBrush x:Key="Expander.Static.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Expander.Static.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Expander.Static.Circle.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="Expander.Static.Circle.Fill" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Expander.Static.Arrow.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="Expander.MouseOver.Circle.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Expander.MouseOver.Circle.Fill" Color="{StaticResource BeamWall_AliceBlue_Color}"/>
<SolidColorBrush x:Key="Expander.MouseOver.Arrow.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Expander.Pressed.Circle.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Expander.Pressed.Circle.Fill" Color="{StaticResource BeamWall_PattensBlue_Color}"/>
<SolidColorBrush x:Key="Expander.Pressed.Arrow.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Expander.Disabled.Circle.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}" Opacity="0.5"/>
<SolidColorBrush x:Key="Expander.Disabled.Circle.Fill" Color="{StaticResource BeamWall_Mercury_Color}" Opacity="0.5"/>
<SolidColorBrush x:Key="Expander.Disabled.Arrow.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}" Opacity="0.5"/>
<!--#endregion Colori Expander-->
<!--#region Colori ListBox-->
<SolidColorBrush x:Key="ListBox.Static.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.NewAddFeature.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.NewAddFeatureIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="ListBox.NewAddFeatureIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ListBox.NewAddFeatureNotSelected.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.NewAddFeatureNotSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="ListBox.MacroCustom.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.MacroDefault.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.FeatureManager.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.LeftPanel.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.Strategy.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.StrategyIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="ListBox.StrategyIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ListBox.StrategyNoSelected.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.StrategyNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="ListBox.BTLIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="ListBox.BTLIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ListBox.BTLNoSelected.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.BTLNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTL.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLNoSelected.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="ListBox.BTLPartIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="ListBox.BTLPartIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="ListBox.BTLPartNoSelected.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ListBox.BTLPartNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="Item.MouseOver.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="Item.MouseOver.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="Item.MouseOver.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Item.SelectedActive.Background" Color="{StaticResource BeamWall_Keppel_Color}"/>
<SolidColorBrush x:Key="Item.SelectedActive.Border" Color="{StaticResource BeamWall_Keppel_Color}"/>
<SolidColorBrush x:Key="Item.SelectedActive.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Item.SelectedInactive.Background" Color="#3DDADADA"/>
<SolidColorBrush x:Key="Item.SelectedInactive.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
<!--#endregion Colori ListBox-->
<!--#region Colori TabItem-->
<LinearGradientBrush x:Key="TabItem.Static.Background" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="0.85"/>
<GradientStop Color="{StaticResource BeamWall_LinkWater_Color}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="TabItem.Static.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="TabItem.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="TabItem.MouseOver.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="TabItem.MouseOver.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<LinearGradientBrush x:Key="TabItem.Selected.Background" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="{StaticResource BeamWall_Kashmir_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0.85"/>
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="TabItem.Selected.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="TabItem.Disabled.Background" Color="{StaticResource BeamWall_Gallery_Color}"/>
<SolidColorBrush x:Key="TabItem.Disabled.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
<!--#endregion Colori TabItem-->
<!--#region Colori TabControl-->
<SolidColorBrush x:Key="TabControl.Static.EgtManageDialog.Background" Color="Transparent"/>
<SolidColorBrush x:Key="TabControl.Static.EgtManageDialog.Border" Color="{StaticResource BeamWall_White_Color}"/>
<LinearGradientBrush x:Key="TabControl.Static.Generic.Background" 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>
<LinearGradientBrush x:Key="TabControl.Optimizer.Background" 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>
<!--#endregion Colori TabControl-->
<!--#region Colori ScrollViewer-->
<LinearGradientBrush x:Key="ScrollViewer.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
<GradientStop Color="{StaticResource BeamWall_Silver_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_Alto_Color}" Offset="0.45"/>
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="1"/>
</LinearGradientBrush>
<!--#endregion Colori ScrollViewer-->
<!--#region Colori Grid-->
<LinearGradientBrush x:Key="Grid.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.65"/>
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="Grid.Static.ExpanderDown.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Grid.Static.ExpanderUp.Background" Color="Transparent"/>
<SolidColorBrush x:Key="Grid.Statistics.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Grid.UserAdmin.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<!--#endregion Colori Grid-->
<!--#region Colori GridSplitter-->
<SolidColorBrush x:Key="GridSplitter.Width.Background" Color="Transparent"/>
<SolidColorBrush x:Key="GridSplitter.Height.Background" Color="Transparent"/>
<!--#endregion Colori GridSplitter-->
<!--#region Colori TreeView-->
<LinearGradientBrush x:Key="TreeView.Static.Background" 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>
<SolidColorBrush x:Key="TreeView.Static.EgtManageDialog.Background" Color="{StaticResource BeamWall_White_Color}"/>
<!--#endregion Colori TreeView-->
<!--#region Colori TextBlock-->
<SolidColorBrush x:Key="TextBlock.Static.First.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="TextBlock.Static.Second.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="TextBlock.Static.Third.Foreground" Color="{StaticResource BeamWall_DarkGray_Color}"/>
<SolidColorBrush x:Key="TextBlock.Static.Fouth.Foreground" Color="{StaticResource BeamWall_Black_Color}"/>
<SolidColorBrush x:Key="TextBlock.UserAdmin.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="TextBlock.StrategyModify.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="TextBlock.CALC_ROT.Foreground" Color="{StaticResource BeamWall_Blue_Color}"/>
<SolidColorBrush x:Key="TextBlock.Prod.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="TextBlock.Prod.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="TextBlock.RawPartList.Foreground" Color="{StaticResource BeamWall_Orange_Color}"/>
<SolidColorBrush x:Key="TextBlock.Error.Foreground" Color="{StaticResource BeamWall_Red_Color}"/>
<SolidColorBrush x:Key="TextBlock.AlternationIndex_0.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="TextBlock.AlternationIndex_1.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="TextBlock.AlternationIndexIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<!--#endregion TextBlock-->
<!--#region Colori StackPanel-->
<SolidColorBrush x:Key="StackPanel.Static.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="StackPanel.BTLTotParts.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="StackPanel.BTLTotTime.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="StackPanel.BTLRemainingTime.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="StackPanel.RawPart.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="StackPanel.Statistics.Background" Color="{StaticResource BeamWall_White_Color}"/>
<!--#endregion Colori StackPanel-->
<!--#region Colori GroupBox-->
<SolidColorBrush x:Key="GroupBox.Static.Border" Color="{StaticResource BeamWall_Geyser_Color}"/>
<SolidColorBrush x:Key="GroupBox.Static.OpenProjec.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="GroupBox.PDFPreview.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="GroupBox.MachinePanel.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<!--#endregion Colori GroupBox-->
<!--#region Colori Border-->
<SolidColorBrush x:Key="Border.Static.GroupBox.First.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.Static.GroupBox.Second.Border" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Border.Static.Optmizer.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Border.Static.EgtManageDialog.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
<SolidColorBrush x:Key="Border.Static.TitleBar.Background" Color="{StaticResource BeamWall_Casper_Color}"/>
<SolidColorBrush x:Key="Border.Static.TitleBar.Border" Color="{StaticResource BeamWall_Casper_Color}"/>
<SolidColorBrush x:Key="Border.Static.AboutBoxV.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
<SolidColorBrush x:Key="Border.Static.AboutBox.Border" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Border.ButtonTitleBar.Background" Color="Transparent"/>
<SolidColorBrush x:Key="Border.EgwWindow.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
<SolidColorBrush x:Key="Border.ControlTemplete.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Border.ControlTemplete.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<LinearGradientBrush x:Key="Border.WithoutTitleBar.Background" 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>
<SolidColorBrush x:Key="Border.EgtHexItem.Border" Color="{StaticResource BeamWall_Gold_Color}"/>
<SolidColorBrush x:Key="Border.Parameter.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
<SolidColorBrush x:Key="Border.Parameter.Border" Color="{StaticResource BeamWall_Gray_Color}"/>
<SolidColorBrush x:Key="Border.NewAddFeature.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.AlternationIndex.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.ItemContainer.Background" Color="{StaticResource BeamWall_LinkWater_Color}"/>
<SolidColorBrush x:Key="Border.ItemContainer.Border" Color="{StaticResource BeamWall_LinkWater_Color}"/>
<SolidColorBrush x:Key="Border.ItemContainerIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="Border.ItemContainerIsSelected.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="Border.Strategy.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.BTL.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.ForcedStrategyBTL.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.BTLPart.Border" Color="Transparent"/>
<SolidColorBrush x:Key="Border.TotalTime.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Border.TotalTime.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Border.DoneTime.Background" Color="{StaticResource BeamWall_FruitSalad_Color}"/>
<SolidColorBrush x:Key="Border.DoneTime.Border" Color="{StaticResource BeamWall_FruitSalad_Color}"/>
<SolidColorBrush x:Key="Border.RemainingTime.Background" Color="{StaticResource BeamWall_FuelYellow_Color}"/>
<SolidColorBrush x:Key="Border.RemainingTime.Border" Color="{StaticResource BeamWall_FuelYellow_Color}"/>
<SolidColorBrush x:Key="Border.ProjectType.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="Border.ProjectType.Border" Color="{StaticResource BeamWall_DarkGray_Color}"/>
<SolidColorBrush x:Key="Border.AddFeature.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Border.PRC.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Border.Custom.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Border.MacroCustom.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Border.Default.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Border.MacroDefault.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Border.BTLPartManager.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="Border.BTLPartManager.Border" Color="{StaticResource BeamWall_Teal_Color}"/>
<SolidColorBrush x:Key="Border.SetUp.Border" Color="{StaticResource BeamWall_Indigo_Color}"/>
<SolidColorBrush x:Key="Border.TopPanel.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
<SolidColorBrush x:Key="Border.TopPanel.Border" Color="{StaticResource BeamWall_Gray_Color}"/>
<!--#endregion Colori Border-->
<!--#region Colori Rectangle-->
<SolidColorBrush x:Key="Rectangle.Static.Stroke" Color="{StaticResource BeamWall_Black_Color}"/>
<SolidColorBrush x:Key="Rectangle.EgtColorPicker.Stroke" Color="{StaticResource BeamWall_Black_Color}"/>
<!--#endregion Colori Rectangle-->
<!--#region Colori StatusBar-->
<SolidColorBrush x:Key="StatusBar.Static.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
<!--#endregion Colori StatusBar-->
<!--#region Colori DatePicker-->
<SolidColorBrush x:Key="DatePicker.Static.Background" Color="Transparent"/>
<SolidColorBrush x:Key="DatePicker.Static.Border" Color="Transparent"/>
<SolidColorBrush x:Key="DatePickerTextBox.Static.Background" Color="Transparent"/>
<!--#endregion Colori DatePicker-->
<!--#region Colori Calendar-->
<LinearGradientBrush x:Key="Calendar.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_LinkWater_Color}" Offset="0.16"/>
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="Calendar.Static.Border" EndPoint="0.5,1" StartPoint="0.35,0">
<GradientStop Color="{StaticResource BeamWall_LinkWater_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="0.45"/>
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0.75"/>
<GradientStop Color="{StaticResource BeamWall_Kashmir_Color}" Offset="1"/>
</LinearGradientBrush>
<!--#endregion Colori Calendar-->
<!--#region Colori DataGrid-->
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Main.Background" Color="{StaticResource BeamWall_Teal_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Main.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Feature.Background" Color="{StaticResource BeamWall_Keppel_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Feature.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.PParam.Background" Color="{StaticResource BeamWall_Downy_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.PParam.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.RawPart.Background" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="DataGridColumnHeader.Static.RawPart.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="DataGrid.Static.Background" Color="Transparent"/>
<SolidColorBrush x:Key="DataGrid.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="DataGrid.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="RowDataGrid.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="CellDataGrid.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
<SolidColorBrush x:Key="RowDataGrid.Selected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="RowDataGrid.Selected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="RowDataGrid.Selected.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="CellDataGrid.Selected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<SolidColorBrush x:Key="CellDataGrid.Selected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="CellDataGrid.Selected.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
<!--#endregion Colori DataGrid-->
<!--#region Colori OptimizerWindow-->
<LinearGradientBrush x:Key="OptimizerWindow.Static.Background" 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>
<SolidColorBrush x:Key="OptimizerWindow.Static.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
<SolidColorBrush x:Key="OptimizerWindow.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
<!--#endregion Colori OtimizerWindow-->
<!--#region Colori EgtCustomWindow-->
<LinearGradientBrush x:Key="EgtCustomWindow.Static.Background" 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>
<SolidColorBrush x:Key="EgtCustomWindow.Static.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="EgtCustomWindow.Static.TitleBarBorder" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="EgtCustomWindow.Static.TitleBarForeground" Color="{StaticResource BeamWall_White_Color}"/>
<!--#endregion Colori EgtCustomWindow-->
<!--#region Colori EgtFloatingPanel-->
<SolidColorBrush x:Key="EgtFloatingPanel.Static.Background" Color="{StaticResource BeamWall_Gray_Color}"/>
<SolidColorBrush x:Key="EgtFloatingPanel.Static.Border" Color="{StaticResource BeamWall_Gray_Color}"/>
<!--#endregion Colori EgtFloatingPanel-->
<!--#region Colori EgtHexItem-->
<SolidColorBrush x:Key="EgtHexItem.Static.Background" Color="{StaticResource BeamWall_CornflowerBlue_Color}"/>
<SolidColorBrush x:Key="EgtHexItem.Static.Border" Color="{StaticResource BeamWall_Black_Color}"/>
<!--#endregion Colori EgtHexItem-->
<!--#region Colori Ellipse-->
<SolidColorBrush x:Key="Ellipse.Static.Fill" Color="{StaticResource BeamWall_Blue_Color}"/>
<SolidColorBrush x:Key="Ellipse.Parameter.Fill" Color="{StaticResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="Ellipse.ParameterIsChecked.Fill" Color="{StaticResource BeamWall_Kashmir_Color}"/>
<SolidColorBrush x:Key="Ellipse.UpdateBTL.Fill" Color="{StaticResource BeamWall_Red_Color}"/>
<!--#endregion Colori Ellipse-->
<!--#region Colori ToggleButton-->
<SolidColorBrush x:Key="ToggleButton.Static.Background" Color="Transparent"/>
<!--#endregion Colori ToggleButton-->
<!--#region Colori UniformGrid-->
<SolidColorBrush x:Key="UniformGrid.LeftPanel.Background" Color="{DynamicResource BeamWall_LinkWater_Color}"/>
<!--#endregion UniformGrid-->
<!--#region Colori ToolTip-->
<SolidColorBrush x:Key="ToolTip.PParameters.Background" Color="{DynamicResource BeamWall_Glacier_Color}"/>
<SolidColorBrush x:Key="ToolTip.PParameters.Foreground" Color="{DynamicResource BeamWall_White_Color}"/>
<!--#endregion Colori ToolTip-->
</ResourceDictionary>
File diff suppressed because it is too large Load Diff
@@ -1,11 +0,0 @@
Public Class ThemesDataServiceM
#Region "FIELDS & PROPERTIES"
Public Property Name As String
Public Property Path As String
Public Property AssemblyName As String
#End Region ' Fields & Properties
End Class
@@ -1,101 +0,0 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports System.Resources
Imports System.Windows
Imports EgtUILib
Public Class ThemesDataServiceVM
#Region "FIELDS & PROPERTIES"
Private ReadOnly m_Themes As New ObservableCollection(Of ThemesDataServiceM)()
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New()
ScanResources()
ScanDisk(THEMES_FOLDER)
End Sub
#End Region ' Constructor
#Region "METHODS"
''' <summary>
''' Restiusce il nome derivato dalla cartella
''' </summary>
''' <param name="path"></param>
''' <param name="pathChar"></param>
''' <param name="fileEnding"></param>
''' <returns></returns>
Private Function GetNameFromPath(ByVal path As String, ByVal Optional pathChar As Char = "/"c, ByVal Optional fileEnding As String = "Theme.xaml") As String
Dim name As String = path.Substring(path.LastIndexOf(pathChar) + 1)
name = name.Substring(0, name.Length - fileEnding.Length)
name = Char.ToUpper(name(0)) & If(name.Length > 1, name.Substring(1), "")
Return name
End Function
''' <summary>
''' Ricerca i file dizionario contente il tema
''' </summary>
''' <param name="fileEnding"></param>
Private Sub ScanResources(ByVal Optional fileEnding As String = DICTIONARY_FILENAME)
Dim assembly = System.Reflection.Assembly.GetExecutingAssembly()
Dim resourceNames = assembly.GetManifestResourceNames()
For Each resourceName In resourceNames
Dim [set] As New ResourceSet(assembly.GetManifestResourceStream(resourceName))
For Each item As DictionaryEntry In [set]
Dim fileName As String = item.Key.ToString()
If fileName.ToLower().EndsWith(fileEnding.ToLower()) Then
m_Themes.Add(New ThemesDataServiceM() With {
.Name = GetNameFromPath(fileName),
.Path = "pack://application:,,,/WpfTheme;component/" & fileName
})
End If
Next
Next
End Sub
''' <summary>
''' Ricerca i temi presenti nel programma
''' </summary>
''' <param name="relativePath"></param>
Private Sub ScanDisk(ByVal relativePath As String)
If Directory.Exists(AppDomain.CurrentDomain.BaseDirectory & relativePath) Then
Dim themeFiles = Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory & relativePath, "*" & DICTIONARY_FILENAME, SearchOption.AllDirectories)
For Each fileName In themeFiles
m_Themes.Add(New ThemesDataServiceM() With {
.Name = GetNameFromPath(fileName, "\"c),
.Path = fileName
})
Next
End If
End Sub
''' <summary>
''' Funzione che permette di selezionare e applicare il tema
''' </summary>
''' <param name="theme"></param>
Public Sub SetTheme(ByVal theme As ThemesDataServiceM)
If theme Is Nothing Then
EgtOutLog("Error setting theme: Attempting to set theme to null.")
Return
End If
Try
Dim uri As New Uri($"pack://application:,,,/{theme.AssemblyName};component/{theme.Path}", UriKind.Absolute)
Application.Current.Resources.MergedDictionaries(1).Source = uri
Catch ex As Exception
EgtOutLog("Error setting theme: " & ex.Message)
End Try
End Sub
#End Region ' Methods
End Class
-20
View File
@@ -1,20 +0,0 @@
<Grid x:Class="TitleBar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="6"
Style="{StaticResource TitleBar_Border}"/>
<Image MinWidth="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
Source="/Resources/EgalwareLogo.ico"/>
<ContentControl Grid.Column="1"/>
<TextBlock Grid.Column="2"
Text="{Binding sTitle}"
Style="{StaticResource TitleBar_TextBlock}"/>
</Grid>
@@ -1,41 +0,0 @@
Imports System.Windows
Public Class TitleBar
' Proprietà che permette di attivare e disattivare lo spostamento della finestra
Public Shared ReadOnly TitleProperty As DependencyProperty = DependencyProperty.Register("Title", GetType(String), GetType(TitleBar), New PropertyMetadata(""))
Public Property Title() As Boolean
Get
Return CBool(GetValue(TitleProperty))
End Get
Set(ByVal value As Boolean)
SetValue(TitleProperty, value)
End Set
End Property
' Proprietà che permette di attivare e disattivare lo spostamento della finestra
Public Shared ReadOnly IsMinimizableProperty As DependencyProperty = DependencyProperty.Register("IsMinimizable", GetType(Boolean), GetType(TitleBar), New PropertyMetadata(True))
Public Property IsMinimizable() As Boolean
Get
Return CBool(GetValue(IsMinimizableProperty))
End Get
Set(ByVal value As Boolean)
SetValue(IsMinimizableProperty, value)
End Set
End Property
' Proprietà che permette di attivare e disattivare il bottone di chiusura della finestra
Public Shared ReadOnly IsClosableProperty As DependencyProperty = DependencyProperty.Register("IsClosable", GetType(Boolean), GetType(TitleBar), New PropertyMetadata(True))
Public Property IsClosable() As Boolean
Get
Return CBool(GetValue(IsClosableProperty))
End Get
Set(ByVal value As Boolean)
SetValue(IsClosableProperty, value)
If Not value Then
IsMinimizable = False
End If
End Set
End Property
End Class
+49
View File
@@ -32,4 +32,53 @@ Public Module Configuration
m_bMachConfig = value m_bMachConfig = value
End Sub 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>
Public Sub GetIniFileDirectory()
' Impostazione path radice per i dati
Dim m_sDataRoot As String = System.AppDomain.CurrentDomain.BaseDirectory
If EgtUILib.GetPrivateProfileString(ConstGen.S_DATA, ConstGen.K_DATAROOT, "", m_sDataRoot, m_sDataRoot & "\" & ConstGen.DAT_FILE_NAME) = 0 Then
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
End If
' Impostazione direttorio di configurazione
Dim m_sConfigDir As String = m_sDataRoot & "\" & ConstGen.CONF_DIR
' Impostazione path Ini file
IniFile.m_sIniFile = m_sConfigDir & "\" & Core.ConstIni.INI_FILE_NAME
End Sub
''' <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 End Module
@@ -1,7 +1,7 @@
Imports System.Collections.ObjectModel Imports System.Windows
Imports System.Windows
Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports EgtUILib
Imports System.Collections.ObjectModel
Public Module DimensionsIniFile Public Module DimensionsIniFile
@@ -32,11 +32,6 @@ Public Module DimensionsIniFile
End If End If
Index += 1 Index += 1
End While End While
If GridDimsList.Count = 0 Then
For Ind As Integer = 0 To 4
GridDimsList.Add(New GridDimension(GridName, Ind, 0, New GridLength(1, GridUnitType.Star)))
Next
End If
For Each GridDimsItem In GridDimsList For Each GridDimsItem In GridDimsList
GridDimsItem.GridDimensions = GridDimsList GridDimsItem.GridDimensions = GridDimsList
Next Next
@@ -59,4 +54,8 @@ Public Module DimensionsIniFile
Return WritePrivateProfileString(GridName, Index, sValue, m_sDimensionsIniFile) Return WritePrivateProfileString(GridName, Index, sValue, m_sDimensionsIniFile)
End Function End Function
Private Function GetGridLengthFromIndexAndType(GridDimsList As List(Of GridDimension), Index As Integer, DimType As DimensionType) As GridDimension
Return GridDimsList.FirstOrDefault(Function(x) x.Index = Index And x.DimType = DimType)
End Function
End Module End Module
+1 -2
View File
@@ -5,7 +5,6 @@
WARNING = 2 WARNING = 2
ERROR_ = 3 ERROR_ = 3
COLLISION = 4 COLLISION = 4
SECTION = 5
End Enum End Enum
Public Enum EventType Public Enum EventType
@@ -64,7 +63,7 @@ Public Enum StatusMapOpType
ChangeProdInProdRequest = 16 ChangeProdInProdRequest = 16
OpenPageInViewOptimRequest = 17 OpenPageInViewOptimRequest = 17
MachGroupValidationUpdate = 18 MachGroupValidationUpdate = 18
ChangeProdInOptimizerRequest = 19 ChangeProdInOnlyProdRequest = 19
End Enum End Enum
Public Enum DimensionType Public Enum DimensionType
+21 -26
View File
@@ -1,49 +1,44 @@
<StackPanel x:Class="ViewPanelV" <EgtFloating:EgtFloatingPanel x:Class="ViewPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource BTLPartManager_StackPanel}"> xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
<Button ToolTip="{Binding ZoomAllToolTip}" <Button ToolTip="{Binding ZoomAllToolTip}"
Style="{StaticResource Mach_Button}" Style="{StaticResource ToolBar_Button}"
Command="{Binding ZoomAllCommand}"> Command="{Binding ZoomAllCommand}">
<Image Source="{StaticResource ZoomAll_Image}" <Image Source="/Resources/ViewPanel/ZoomAll.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromTopToolTip}" <Button ToolTip="{Binding LookFromTopToolTip}"
Style="{StaticResource Mach_Button}" Style="{StaticResource ToolBar_Button}"
Command="{Binding TopViewCommand}"> Command="{Binding TopViewCommand}">
<Image Source="{StaticResource LookFromTOP_Image}" <Image Source="/Resources/ViewPanel/LookFromTOP.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromFrontToolTip}" <Button ToolTip="{Binding LookFromFrontToolTip}"
Style="{StaticResource Mach_Button}" Style="{StaticResource ToolBar_Button}"
Command="{Binding FrontViewCommand}"> Command="{Binding FrontViewCommand}">
<Image Source="{StaticResource LookFromFRONT_Image}" <Image Source="/Resources/ViewPanel/LookFromFRONT.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromRightToolTip}" <Button ToolTip="{Binding LookFromRightToolTip}"
Style="{StaticResource Mach_Button}" Style="{StaticResource ToolBar_Button}"
Command="{Binding RightViewCommand}"> Command="{Binding RightViewCommand}">
<Image Source="{StaticResource LookFromRIGHT_Image}" <Image Source="/Resources/ViewPanel/LookFromRIGHT.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromBackToolTip}" <Button ToolTip="{Binding LookFromBackToolTip}"
Style="{StaticResource Mach_Button}" Style="{StaticResource ToolBar_Button}"
Command="{Binding BackViewCommand}"> Command="{Binding BackViewCommand}">
<Image Source="{StaticResource LookFromBACK_Image}" <Image Source="/Resources/ViewPanel/LookFromBACK.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromLeftToolTip}" <Button ToolTip="{Binding LookFromLeftToolTip}"
Style="{StaticResource Mach_Button}" Style="{StaticResource ToolBar_Button}"
Command="{Binding LeftViewCommand}"> Command="{Binding LeftViewCommand}">
<Image Source="{StaticResource LookFromLEFT_Image}" <Image Source="/Resources/ViewPanel/LookFromLEFT.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromIso_SWToolTip}" <Button ToolTip="{Binding LookFromIso_SWToolTip}"
Style="{StaticResource Mach_Button}" Style="{StaticResource ToolBar_Button}"
Command="{Binding IsoViewSWCommand}"> Command="{Binding IsoViewSWCommand}">
<Image Source="{StaticResource LookFromISO_SW_Image}" <Image Source="/Resources/ViewPanel/LookFromISO_SW.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
</StackPanel> </EgtFloating:EgtFloatingPanel>
-1
View File
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="EgwProxy.LiMan" version="1.0.2408.718" targetFramework="net472" /> <package id="EgwProxy.LiMan" version="1.0.2408.718" targetFramework="net472" />
<package id="EgwWPFBaseLib" version="3.1.1.2" targetFramework="net472" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" /> <package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net472" /> <package id="Newtonsoft.Json" version="13.0.4" targetFramework="net472" />
<package id="RestSharp" version="111.2.0" targetFramework="net472" /> <package id="RestSharp" version="111.2.0" targetFramework="net472" />
@@ -409,10 +409,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary> /// <summary>
/// Istanza logger /// Istanza logger
/// </summary> /// </summary>
private NLog.Logger Log = NLog.LogManager private NLog.Logger Log = LogManager.GetCurrentClassLogger();
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
#endregion Private Fields #endregion Private Fields
} }
@@ -146,10 +146,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary> /// <summary>
/// Istanza logger /// Istanza logger
/// </summary> /// </summary>
private NLog.Logger Log = NLog.LogManager private NLog.Logger Log = LogManager.GetCurrentClassLogger();
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
#endregion Private Fields #endregion Private Fields
@@ -257,10 +257,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary> /// <summary>
/// Istanza logger /// Istanza logger
/// </summary> /// </summary>
private NLog.Logger Log = NLog.LogManager private NLog.Logger Log = LogManager.GetCurrentClassLogger();
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
#endregion Private Fields #endregion Private Fields
} }
@@ -187,10 +187,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary> /// <summary>
/// Istanza logger /// Istanza logger
/// </summary> /// </summary>
private NLog.Logger Log = NLog.LogManager private NLog.Logger Log = LogManager.GetCurrentClassLogger();
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
#endregion Private Fields #endregion Private Fields
} }
@@ -809,10 +809,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary> /// <summary>
/// Istanza logger /// Istanza logger
/// </summary> /// </summary>
private NLog.Logger Log = NLog.LogManager private NLog.Logger Log = LogManager.GetCurrentClassLogger();
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
#endregion Private Fields #endregion Private Fields
} }
@@ -461,10 +461,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary> /// <summary>
/// Istanza logger /// Istanza logger
/// </summary> /// </summary>
private NLog.Logger Log = NLog.LogManager private NLog.Logger Log = LogManager.GetCurrentClassLogger();
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
#endregion Private Fields #endregion Private Fields
} }
@@ -1128,10 +1128,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary> /// <summary>
/// Istanza logger /// Istanza logger
/// </summary> /// </summary>
private NLog.Logger Log = NLog.LogManager private NLog.Logger Log = LogManager.GetCurrentClassLogger();
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
#endregion Private Fields #endregion Private Fields
@@ -967,10 +967,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary> /// <summary>
/// Istanza logger /// Istanza logger
/// </summary> /// </summary>
private NLog.Logger Log = NLog.LogManager private NLog.Logger Log = LogManager.GetCurrentClassLogger();
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
#endregion Private Fields #endregion Private Fields
} }
@@ -293,10 +293,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary> /// <summary>
/// Istanza logger /// Istanza logger
/// </summary> /// </summary>
private NLog.Logger Log = NLog.LogManager private NLog.Logger Log = LogManager.GetCurrentClassLogger();
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
#endregion Private Fields #endregion Private Fields
} }
+13 -6
View File
@@ -12,7 +12,7 @@ namespace EgtBEAMWALL.DataLayer
{ {
#region Public Fields #region Public Fields
public static string DATABASE_NAME = "AedificaDb"; public static string DATABASE_NAME = "EgtBwDb";
public static int DATABASE_PROCESS_TIMEOUT = 5; public static int DATABASE_PROCESS_TIMEOUT = 5;
public static string DATABASE_PWD = "viacremasca"; public static string DATABASE_PWD = "viacremasca";
@@ -23,8 +23,6 @@ namespace EgtBEAMWALL.DataLayer
public static string DATABASE_USER = "EgtUser"; public static string DATABASE_USER = "EgtUser";
public static string ZIP_PWD = "viacremasca-viacremasca-viacremasca-viacremasca"; public static string ZIP_PWD = "viacremasca-viacremasca-viacremasca-viacremasca";
public static string NLOG_PATH = "";
#endregion Public Fields #endregion Public Fields
#region Public Properties #region Public Properties
@@ -247,7 +245,7 @@ namespace EgtBEAMWALL.DataLayer
// se nulla metto amster come nKey... // se nulla metto amster come nKey...
masterKey = string.IsNullOrEmpty(masterKey) ? nKey : masterKey; masterKey = string.IsNullOrEmpty(masterKey) ? nKey : masterKey;
DATABASE_SERV = server; DATABASE_SERV = server;
DATABASE_NAME = $"AedificaDb_{masterKey}"; DATABASE_NAME = $"EgtBwDb_{masterKey}";
DATABASE_USER = $"user_{nKey}"; DATABASE_USER = $"user_{nKey}";
DATABASE_PWD = $"pwd_{sKey}"; DATABASE_PWD = $"pwd_{sKey}";
ZIP_PWD = $"{DATABASE_USER}:{DATABASE_PWD}:{DATABASE_USER}:{DATABASE_PWD}"; ZIP_PWD = $"{DATABASE_USER}:{DATABASE_PWD}:{DATABASE_USER}:{DATABASE_PWD}";
@@ -260,9 +258,18 @@ namespace EgtBEAMWALL.DataLayer
/// Aggiorna conf NLog x target DIR /// Aggiorna conf NLog x target DIR
/// </summary> /// </summary>
/// <param name="logDir"></param> /// <param name="logDir"></param>
public static void SetupLogDir(string NLogPath) public static void SetupLogDir(string logDir)
{ {
NLOG_PATH = NLogPath; string appDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string filePath = Path.Combine(appDir, "NLog.config");
// leggo il file NLog
string rawData = File.ReadAllText(filePath);
// sostituzione livello minimo da selezione
rawData = rawData.Replace("${basedir}", logDir);
// ri-scrivo file NLog
File.WriteAllText(filePath, rawData);
} }
#endregion Public Methods #endregion Public Methods
@@ -238,7 +238,7 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>copy $(TargetPath) c:\EgtProg\Aedifica\EgtBEAMWALL.DataLayer.dll</PostBuildEvent> <PostBuildEvent>copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.DataLayer.dll</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Egalware s.r.l.")] [assembly: AssemblyCompany("Egalware s.r.l.")]
[assembly: AssemblyProduct("EgtBEAMWALL.DataLayer")] [assembly: AssemblyProduct("EgtBEAMWALL.DataLayer")]
[assembly: AssemblyCopyright("Copyright © 2020-2026 by Egalware s.r.l.")] [assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [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 // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.1.5.2")] [assembly: AssemblyVersion("2.7.1.1")]
[assembly: AssemblyFileVersion("3.1.5.2")] [assembly: AssemblyFileVersion("2.7.1.1")]
@@ -1,16 +1,11 @@
<Window x:Class="AboutBoxV" <Window x:Class="AboutBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="AboutBox" Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize"
Height="400" ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
Width="360"
WindowStyle="None"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner">
<Border Style="{StaticResource AboutBoxV_Border}"> <Border BorderThickness="2" BorderBrush="LightBlue">
<Grid> <Grid >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/> <ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="5*"/> <ColumnDefinition Width="5*"/>
@@ -29,39 +24,29 @@
<RowDefinition Height="0.35*"/> <RowDefinition Height="0.35*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Grid.Row="1" <Grid Grid.Column="1" Grid.Row="1">
Grid.Column="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/> <ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Grid.Column="1" <Border Name="LogoBrd" Grid.Column="1" Background="White">
Style="{StaticResource AboutBox_Border}"> <Image Source="/Resources/AboutBox/EgalwareLogo.png" Stretch="Uniform"/>
<Image Source="{StaticResource AboutBox_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Border> </Border>
</Grid> </Grid>
<TextBlock Grid.Row="3" <TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
Grid.Column="1" VerticalAlignment="Center" FontSize="18" />
Name="DescriptionLbl" <TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
Style="{StaticResource AboutBox_TextBlock}"/> VerticalAlignment="Center" FontSize="18"/>
<TextBlock Grid.Row="4" <TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
Grid.Column="1" VerticalAlignment="Center" FontSize="12" />
Name="VersionLbl" <TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
Style="{StaticResource AboutBox_TextBlock}"/> VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/>
<TextBlock Grid.Row="5" <Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True"
Grid.Column="1" Margin="100,0"/>
Name="CopyrightLbl"
Style="{StaticResource Copyright_TextBlock}"/>
<TextBox Grid.Row="6"
Grid.Column="1"
Name="InfoLbl"
Style="{StaticResource AboutBox_TextBox}"/>
<Button Grid.Row="8"
Grid.Column="1"
Name="ExitBtn"
Style="{StaticResource AboutBox_Button}"/>
</Grid> </Grid>
</Border> </Border>
</Window> </Window>
@@ -1,13 +1,17 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="AddFeatureWndV" <EgtWPFLib5:EgtCustomWindow x:Class="AddFeatureWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
SizeToContent="WidthAndHeight" WindowStyle="None" ResizeMode="NoResize"
WindowStartupLocation="CenterOwner" SizeToContent="WidthAndHeight"
Title="AddProcess" WindowStartupLocation="CenterOwner"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddProcess"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Style="{StaticResource BlockedWnd_Grid}"> <Grid Margin="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -18,12 +22,14 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border Style="{StaticResource AddFeatureWnd_Border}"> <Border Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2" CornerRadius="4,0,0,4">
<TextBlock Text="{Binding Process_Msg}" <TextBlock Text="{Binding Process_Msg}"
Style="{StaticResource List_TextBlock}"/> Style="{StaticResource ListTextBlock}"/>
</Border> </Border>
<Border Grid.Row="1" <Border Grid.Row="1"
Style="{StaticResource PRCList_Border}"> Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="4,0,0,4"
BorderThickness="2,2,0,2">
<ListBox Grid.Row="1" <ListBox Grid.Row="1"
ItemsSource="{Binding PRCListView}" ItemsSource="{Binding PRCListView}"
SelectedItem="{Binding nSelPRC}" SelectedItem="{Binding nSelPRC}"
@@ -33,21 +39,23 @@
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding ghDesc}" <TextBlock Text="{Binding ghDesc}"
ToolTip="{Binding ghDesc}" ToolTip="{Binding ghDesc}"
TextAlignment="Justify"
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
Style="{StaticResource PRCList_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
</Border> </Border>
<Border Grid.Column="1" <Border Grid.Column="1" Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2">
Style="{StaticResource Custom_Border}">
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding Custom_Msg}" Text="{Binding Custom_Msg}"
Style="{StaticResource List_TextBlock}"/> Style="{StaticResource ListTextBlock}"/>
</Border> </Border>
<Border Grid.Row="1" <Border Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Style="{StaticResource MacroCustomList_Border}"> Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="0"
BorderThickness="0,2,0,2">
<ListBox ItemsSource="{Binding MacroCustomList}" <ListBox ItemsSource="{Binding MacroCustomList}"
SelectedIndex="{Binding nSelMacroCustom}" SelectedIndex="{Binding nSelMacroCustom}"
Style="{StaticResource MacroCustom_ListBox}"> Style="{StaticResource MacroCustom_ListBox}">
@@ -73,14 +81,16 @@
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
</Border> </Border>
<Border Grid.Column="2" <Border Grid.Column="2" Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2" Padding="0,10,0,10" CornerRadius="0,4,4,0">
Style="{StaticResource Default_Border}"> <TextBlock
<TextBlock Text="{Binding Default_Msg}" Text="{Binding Default_Msg}"
Style="{StaticResource List_TextBlock}"/> Style="{StaticResource ListTextBlock}"/>
</Border> </Border>
<Border Grid.Row="1" <Border Grid.Row="1"
Grid.Column="2" Grid.Column="2"
Style="{StaticResource MacroDefaultList_Border}"> Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="0,4,4,0"
BorderThickness="0,2,2,2">
<ListBox ItemsSource="{Binding MacroDefaultList}" <ListBox ItemsSource="{Binding MacroDefaultList}"
SelectedIndex="{Binding nSelMacroDefault}" SelectedIndex="{Binding nSelMacroDefault}"
Style="{StaticResource MacroDefault_ListBox}" Style="{StaticResource MacroDefault_ListBox}"
@@ -88,6 +98,7 @@
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding sMacroName}" <TextBlock Text="{Binding sMacroName}"
TextAlignment="Justify"
Style="{StaticResource MacroDefault_TextBlock}"/> Style="{StaticResource MacroDefault_TextBlock}"/>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
@@ -96,14 +107,14 @@
<UniformGrid Columns="2" <UniformGrid Columns="2"
Grid.Row="2" Grid.Row="2"
Grid.ColumnSpan="3" Grid.ColumnSpan="3"
Style="{StaticResource AddFeatureWnd_UniformGrid}"> Margin="5">
<Button Content="{Binding OK_Msg}" <Button Content="{Binding OK_Msg}"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Cancel_Msg}" <Button Content="{Binding Cancel_Msg}"
IsCancel="True" IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -57,6 +57,8 @@ Public Class AddFeatureWndVM
End Get End Get
End Property End Property
#Region "New Macro OnlyProdPage"
Private m_MacroDefaultList As New ObservableCollection(Of Object) Private m_MacroDefaultList As New ObservableCollection(Of Object)
Public ReadOnly Property MacroDefaultList As ObservableCollection(Of Object) Public ReadOnly Property MacroDefaultList As ObservableCollection(Of Object)
Get Get
@@ -76,6 +78,8 @@ Public Class AddFeatureWndVM
End Set End Set
End Property End Property
#End Region ' New Macro OnlyProdPage
Private m_nSelPRC As PRC = Nothing Private m_nSelPRC As PRC = Nothing
Public Property nSelPRC As PRC Public Property nSelPRC As PRC
Get Get
@@ -314,7 +318,7 @@ Public Class AddFeatureWndVM
If Not IsNothing(m_nSelPRC) AndAlso m_nSelPRC.nPRC > 0 Then If Not IsNothing(m_nSelPRC) AndAlso m_nSelPRC.nPRC > 0 Then
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
Else Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61852), EgtMsg(30007)) MessageBox.Show(EgtMsg(61852), EgtMsg(30007))
End If End If
End Sub End Sub
@@ -1,14 +1,17 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="AddPartWndV" <EgtWPFLib5:EgtCustomWindow x:Class="AddPartWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core" WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight" SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner" WindowStartupLocation="CenterOwner"
Title="AddPartWndV" IsClosable="False"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> IsMinimizable="False"
IsResizable="False"
Title="AddPartWndV"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Style="{StaticResource AddPartWndV_Grid}"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -16,19 +19,19 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource AddPart_Grid}"> <Grid Style="{StaticResource OnlyProdAddPart_Grid}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="Name" <TextBlock Text="Name"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sNAM}" Text="{Binding sNAM}"
Style="{StaticResource NAM_TextBox}"/> Style="{StaticResource NAM_TextBox}"/>
</Grid> </Grid>
<Grid Grid.Row="1" <Grid Grid.Row="1"
Style="{StaticResource AddPartWnd_Grid}"> Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -36,19 +39,19 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="Prod Number" <TextBlock Text="Prod Number"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding nPDN}" Text="{Binding nPDN}"
Style="{StaticResource Dimension_TextBox}"/> Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="2" <TextBlock Grid.Column="2"
Text="Count" Text="Count"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3" <EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding sCNT}" Text="{Binding sCNT}"
Style="{StaticResource Dimension_TextBox}"/> Style="{StaticResource Dimension_TextBox}"/>
</Grid> </Grid>
<Grid Grid.Row="2" <Grid Grid.Row="2"
Style="{StaticResource AddPartWnd_Grid}"> Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -58,19 +61,19 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="W" <TextBlock Text="W"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sW}" Text="{Binding sW}"
Style="{StaticResource Dimension_TextBox}"/> Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="2" <TextBlock Grid.Column="2"
Text="H" Text="H"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3" <EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding sH}" Text="{Binding sH}"
Style="{StaticResource Dimension_TextBox}"/> Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="4" <TextBlock Grid.Column="4"
Text="L" Text="L"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="5" <EgtWPFLib5:EgtTextBox Grid.Column="5"
Text="{Binding sL}" Text="{Binding sL}"
Style="{StaticResource Dimension_TextBox}"/> Style="{StaticResource Dimension_TextBox}"/>
@@ -78,14 +81,14 @@
<UniformGrid Grid.Row="3" <UniformGrid Grid.Row="3"
Columns="2" Columns="2"
Style="{StaticResource AddPartWnd_UniformGrid}"> Margin="0,5,0,5">
<Button Content="Ok" <Button Content="Ok"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="Cancel" <Button Content="Cancel"
IsCancel="True" IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_AddPartWndVM As AddPartWndVM Private WithEvents m_AddPartWndVM As AddPartWndVM
Sub New(Owner As Window, AddPartWndVM As AddPartWndVM) Sub New(Owner As Window, AddPartWndVM As AddPartWndVM)
MyBase.New(Owner)
' This call is required by the designer. ' This call is required by the designer.
InitializeComponent() InitializeComponent()
Me.DataContext = AddPartWndVM Me.DataContext = AddPartWndVM
@@ -165,7 +165,7 @@ Public Class AddPartWndVM
Not IsNothing(m_dH) AndAlso m_dH >= 0 Then Not IsNothing(m_dH) AndAlso m_dH >= 0 Then
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
Else Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61853), EgtMsg(30007)) MessageBox.Show(EgtMsg(61853), EgtMsg(30007))
End If End If
End Sub End Sub
@@ -1,14 +1,16 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="AddRawPartWndV" <EgtWPFLib5:EgtCustomWindow x:Class="AddRawPartWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core" WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight" SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterScreen" WindowStartupLocation="CenterOwner"
Title="AddRawPartWnd" IsClosable="False"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> IsMinimizable="False"
IsResizable="False"
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> Title="AddRawPartWnd"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -18,18 +20,20 @@
SelectedItem="{Binding SelDimension}" SelectedItem="{Binding SelDimension}"
DisplayMemberPath="sDimension" DisplayMemberPath="sDimension"
Visibility="{Binding DimensionsList_Visibility}" Visibility="{Binding DimensionsList_Visibility}"
Style="{StaticResource AddRawPartWnd_ComboBox}"/> Margin="0,0,0,5"
Style="{StaticResource OnlyProd_ComboBox}"/>
<ItemsControl Grid.Row="1" <ItemsControl Grid.Row="1"
ItemsSource="{Binding VariableList}"> ItemsSource="{Binding VariableList}">
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Style="{StaticResource AddPartWnd_Grid}"> <Grid Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="{Binding sMsg}" <TextBlock Text="{Binding sMsg}"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sValue}" Text="{Binding sValue}"
Style="{StaticResource Value_TextBox}"/> Style="{StaticResource Value_TextBox}"/>
@@ -39,17 +43,18 @@
</ItemsControl> </ItemsControl>
<UniformGrid Grid.Row="2" <UniformGrid Grid.Row="2"
Columns="2" Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}"> Margin="0,0,0,5">
<Button Grid.Column="1" <Button Grid.Column="1"
Content="Ok" Content="Ok"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource AddRawPartWnd_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"
Margin="0,0,5,0"/>
<Button Grid.Column="3" <Button Grid.Column="3"
Content="Cancel" Content="Cancel"
IsCancel="True" IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_AddRawPartWndVM As AddRawPartWndVM Private WithEvents m_AddRawPartWndVM As AddRawPartWndVM
Sub New(Owner As Window, AddRawPartWndVM As AddRawPartWndVM) Sub New(Owner As Window, AddRawPartWndVM As AddRawPartWndVM)
MyBase.New(Owner)
' This call is required by the designer. ' This call is required by the designer.
InitializeComponent() InitializeComponent()
Me.DataContext = AddRawPartWndVM Me.DataContext = AddRawPartWndVM
@@ -59,6 +59,7 @@ Public Class AddRawPartWndVM
End Set End Set
End Property End Property
Private m_DimensionsList_Visibility As Visibility
Public ReadOnly Property DimensionsList_Visibility As Visibility Public ReadOnly Property DimensionsList_Visibility As Visibility
Get Get
Return If(m_EditType = EditTypes.ONLY_COMBO OrElse m_EditType = EditTypes.TEXT_AND_COMBO, Visibility.Visible, Visibility.Collapsed) Return If(m_EditType = EditTypes.ONLY_COMBO OrElse m_EditType = EditTypes.TEXT_AND_COMBO, Visibility.Visible, Visibility.Collapsed)
@@ -159,7 +160,7 @@ Public Class AddRawPartWndVM
For Each Variable In m_VariableList For Each Variable In m_VariableList
If (Variable.nType = Variable.VariableType.STRING_ AndAlso IsNothing(Variable.sValue)) OrElse 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 ((Variable.nType = Variable.VariableType.DOUBLE_ OrElse Variable.nType = Variable.VariableType.LENGTH) AndAlso IsNothing(Variable.dValue)) Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, If(m_nProjectType = MachineType.BEAM, EgtMsg(61854), EgtMsg(61855)), EgtMsg(30007)) MessageBox.Show(If(m_nProjectType = MachineType.BEAM, EgtMsg(61854), EgtMsg(61855)), EgtMsg(30007))
Return Return
End If End If
Next Next
@@ -1,16 +1,20 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="AddSectionXMaterialWndV" <EgtWPFLib5:EgtCustomWindow x:Class="AddSectionXMaterialWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core" xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
SizeToContent="WidthAndHeight" xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
WindowStartupLocation="CenterOwner" Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
Title="AddSectionXMaterial" WindowStyle="None" ResizeMode="NoResize"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
<StackPanel Style="{StaticResource AddSectionXMaterialWnd_StackPanel}"> IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddSectionXMaterial">
<StackPanel Margin="5,5,5,0">
<EgtBEAMWALLCORE:EgtDataGrid Width="500" MaxHeight="600" <EgtBEAMWALLCORE:EgtDataGrid Grid.Row="0" Width="500" MaxHeight="600"
ItemsSource="{Binding NewSectionXMaterialList}" ItemsSource="{Binding NewSectionXMaterialList}"
SelectedItem="{Binding SelNewSectionXMaterial}" SelectedItem="{Binding SelNewSectionXMaterial}"
CanUserAddRows="False" CanUserAddRows="False"
@@ -40,7 +44,7 @@
<DataTemplate> <DataTemplate>
<CheckBox IsChecked="{Binding Path=Alias_IsChecked, UpdateSourceTrigger=PropertyChanged}" <CheckBox IsChecked="{Binding Path=Alias_IsChecked, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding Alias_IsEnabled}" IsEnabled="{Binding Alias_IsEnabled}"
Style="{StaticResource Alias_CheckBox}"/> HorizontalAlignment="Center"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
@@ -52,7 +56,7 @@
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle> <DataGridTextColumn.CellStyle>
<Style TargetType="{x:Type DataGridCell}"> <Style TargetType="DataGridCell">
<Setter Property="IsEnabled" Value="{Binding Alias_IsNotChecked}" /> <Setter Property="IsEnabled" Value="{Binding Alias_IsNotChecked}" />
</Style> </Style>
</DataGridTextColumn.CellStyle> </DataGridTextColumn.CellStyle>
@@ -65,7 +69,7 @@
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle> <DataGridTextColumn.CellStyle>
<Style TargetType="{x:Type DataGridCell}"> <Style TargetType="DataGridCell">
<Setter Property="IsEnabled" Value="{Binding Alias_IsNotChecked}" /> <Setter Property="IsEnabled" Value="{Binding Alias_IsNotChecked}" />
</Style> </Style>
</DataGridTextColumn.CellStyle> </DataGridTextColumn.CellStyle>
@@ -91,7 +95,7 @@
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle> <DataGridTextColumn.CellStyle>
<Style TargetType="{x:Type DataGridCell}"> <Style TargetType="DataGridCell">
<Setter Property="IsEnabled" Value="{Binding Alias_IsNotChecked}" /> <Setter Property="IsEnabled" Value="{Binding Alias_IsNotChecked}" />
</Style> </Style>
</DataGridTextColumn.CellStyle> </DataGridTextColumn.CellStyle>
@@ -99,8 +103,7 @@
</DataGrid.Resources> </DataGrid.Resources>
</EgtBEAMWALLCORE:EgtDataGrid> </EgtBEAMWALLCORE:EgtDataGrid>
<Grid Grid.Row="2" <Grid Grid.Row="2" Margin="0,0,0,5">
Style="{StaticResource AddPartWnd_Grid}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -108,17 +111,17 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Grid.Column="1" <Button Content="{Binding Ok_Msg}"
Content="{Binding Ok_Msg}"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Grid.Column="1"
<Button Grid.Column="3" Style="{StaticResource EgtWPFLib5_InputButton}"/>
Content="{Binding Cancel_Msg}" <Button Content="{Binding Cancel_Msg}"
Command="{Binding Cancel_Command}" Command="{Binding Cancel_Command}"
IsCancel="True" IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_AddSectionXMaterialWndVM As AddSectionXMaterialWndVM Private WithEvents m_AddSectionXMaterialWndVM As AddSectionXMaterialWndVM
Sub New(Owner As Window, AddSectionXMaterialWndVM As AddSectionXMaterialWndVM) Sub New(Owner As Window, AddSectionXMaterialWndVM As AddSectionXMaterialWndVM)
MyBase.New(Owner)
' This call is required by the designer. ' This call is required by the designer.
InitializeComponent() InitializeComponent()
Me.DataContext = AddSectionXMaterialWndVM Me.DataContext = AddSectionXMaterialWndVM
+2 -10
View File
@@ -1,17 +1,9 @@
<Application x:Class="Application" <Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary Source="Utility/Dictionary.xaml"/>
<ResourceDictionary.MergedDictionaries>
<!--<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/DarkDictionary.xaml"/>
<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/DefaultDictionary.xaml"/>-->
<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/Generic.xaml"/>
<ResourceDictionary Source="Utility/Dictionary.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources> </Application.Resources>
</Application> </Application>
@@ -1,15 +1,17 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="BTLDataWndV" <EgtWPFLib5:EgtCustomWindow x:Class="BTLDataWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core" xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer" WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight" SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner" WindowStartupLocation="CenterOwner"
IsClosable="True" IsClosable="True"
Title="BTLDataWndV" IsMinimizable="False"
Name="BTLDataWndV" IsResizable="False"
Style="{StaticResource OptimizerWindow.Dialog}"> Title="BTLDataWndV"
Name="BTLDataWndV"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<TabControl> <TabControl>
<TabItem Header="Strategy"> <TabItem Header="Strategy">
@@ -18,19 +20,9 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <ComboBox ItemsSource="{Binding StrategySetupList}" HorizontalAlignment="Center" Margin="0,10,0,10"
<ComboBox ItemsSource="{Binding StrategySetupList}" SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource Strategy_ComboBox}" />
Style="{StaticResource BTLDataWnd_ComboBox}">
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}">
<EventSetter Event="PreviewMouseDown" Handler="ComboBoxItem_PreviewMouseDown"/>
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
<TextBlock Text="{Binding ErrText}"
Style="{StaticResource ErrConfig_TextBlock}"/>
</StackPanel>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -39,32 +31,27 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<OPTIMIZER:ProjectParametersV Grid.RowSpan="2" <OPTIMIZER:ProjectParametersV Grid.RowSpan="2" Margin="0,10,0,0"
Margin="0,10,0,0" Tag="{Binding GeneralParametersList}"
Tag="{Binding GeneralParametersList}"/> IsEnabled="{Binding GeneralParametersIsEnable}"/>
<UniformGrid Grid.Column="1" <UniformGrid Rows="2" Grid.Column="1" Margin="0,0,5,0">
Columns="2" <CheckBox IsChecked="{Binding bSaveGeneralParameters, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource BTLDataWnd_UniformGrid}"> Margin="10,10,0,0" VerticalAlignment="Top" HorizontalAlignment="Center"
<Button Command="{Binding Ok_Command}" Style="{StaticResource OnlyProdFeatureInPartInRawPartList_CheckBox}"/>
<Button Command="{Binding Ok_Command}" VerticalAlignment="Bottom" Margin="0,0,0,5"
ToolTip="{Binding SaveAsToolTip}" ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource OKBTLDataWnd_Button}"> Style="{StaticResource SaveStrategy_Button}">
<Image Source="{StaticResource Ok_Image}" <Image Source="/Resources/NewPage/Ok.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource BTLDataWnd_Button}">
<Image Source="{StaticResource Delete_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</Grid> </Grid>
</TabItem> </TabItem>
<TabItem Header="BTL"> <TabItem Header="BTL">
<UniformGrid Margin="5" <UniformGrid Margin="5"
Columns="6" Columns="6" Rows="7">
Rows="7">
<TextBlock Text="{Binding PROJNUM_MSG}" <TextBlock Text="{Binding PROJNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
@@ -183,4 +170,4 @@
</UniformGrid> </UniformGrid>
</TabItem> </TabItem>
</TabControl> </TabControl>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_BTLDataWndVM As BTLDataWndVM Private WithEvents m_BTLDataWndVM As BTLDataWndVM
Sub New(Owner As Window, BTLDataWndVM As BTLDataWndVM) Sub New(Owner As Window, BTLDataWndVM As BTLDataWndVM)
MyBase.New(Owner)
' This call is required by the designer. ' This call is required by the designer.
InitializeComponent() InitializeComponent()
Me.DataContext = BTLDataWndVM Me.DataContext = BTLDataWndVM
@@ -14,14 +15,4 @@
Me.DialogResult = bDialogResult Me.DialogResult = bDialogResult
End Sub End Sub
Private Sub ComboBoxItem_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
Dim SelStrategy As ComboBoxItem = DirectCast(sender, ComboBoxItem)
If Not IsNothing(Map.refBTLDataWndVM.SelStrategySetup) AndAlso Map.refBTLDataWndVM.SelStrategySetup.Equals(SelStrategy.Content) Then
Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content
Map.refStrategyManagerVM.SelStrategySetup.Read()
Map.refBTLDataWndVM.ReadCustomGeneralParameters(SelStrategy.Content)
Map.refBTLDataWndVM.SelStrategySetup = SelStrategy.Content
End If
End Sub
End Class End Class
+195 -274
View File
@@ -11,8 +11,6 @@ Public Class BTLDataWndVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Private PADLOCK_IMAGE As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Friend Event m_CloseWindow(bDialogResult As Boolean) Friend Event m_CloseWindow(bDialogResult As Boolean)
Private m_StrategySetupList As New ObservableCollection(Of String) Private m_StrategySetupList As New ObservableCollection(Of String)
@@ -22,18 +20,18 @@ Public Class BTLDataWndVM
End Get End Get
End Property End Property
Private m_OldSelStrategySetup As String
Private m_SelStrategySetup As String Private m_SelStrategySetup As String
Public Property SelStrategySetup As String Public Property SelStrategySetup As String
Get Get
Return m_SelStrategySetup Return m_SelStrategySetup
End Get End Get
Set(value As String) Set(value As String)
m_OldSelStrategySetup = m_SelStrategySetup
If m_SelStrategySetup <> value Then If m_SelStrategySetup <> value Then
EgtSetInfo(m_nBTLInfoLayerId, "AISETUP", value)
WriteMainPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, value & ".json")
Map.refStrategyManagerVM.SelStrategySetup.sName = value Map.refStrategyManagerVM.SelStrategySetup.sName = value
Map.refStrategyManagerVM.SelStrategySetup.Read() Map.refStrategyManagerVM.SelStrategySetup.Read()
ReadCustomGeneralParameters(value) Map.refProdManagerVM.Save()
End If End If
m_SelStrategySetup = value m_SelStrategySetup = value
NotifyPropertyChanged(NameOf(SelStrategySetup)) NotifyPropertyChanged(NameOf(SelStrategySetup))
@@ -58,26 +56,43 @@ Public Class BTLDataWndVM
End Set End Set
End Property End Property
Private m_IsBTLDataWnd As Boolean = False Private m_bSaveGeneralParameters As Boolean
Public ReadOnly Property IsBTLDataWnd As Boolean Public Property bSaveGeneralParameters As Boolean
Get Get
Return m_IsBTLDataWnd Return m_bSaveGeneralParameters
End Get End Get
Set(value As Boolean)
m_bSaveGeneralParameters = value
If m_bSaveGeneralParameters Then
SetGeneralParametersIsEnable(True)
Else
SetGeneralParametersIsEnable(False)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
Dim sReadedFiles As String = File.ReadAllText(sGeneralParametersFilePath)
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
m_GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
End If
End If
NotifyPropertyChanged(NameOf(bSaveGeneralParameters))
End Set
End Property End Property
Friend Sub SetIsBTLDataWnd(value As Boolean) Friend Sub SetbSaveGeneralParameters(value As Boolean)
m_IsBTLDataWnd = value m_bSaveGeneralParameters = value
NotifyPropertyChanged(NameOf(IsBTLDataWnd)) NotifyPropertyChanged(NameOf(bSaveGeneralParameters))
End Sub End Sub
Private m_sErrText As String = String.Empty Private m_GeneralParametersIsEnable As Boolean = False
Public ReadOnly Property ErrText As String Public ReadOnly Property GeneralParametersIsEnable As Boolean
Get Get
Return m_sErrText Return m_GeneralParametersIsEnable
End Get End Get
End Property End Property
Friend Sub SetErrText(value As String) Friend Sub SetGeneralParametersIsEnable(value As Boolean)
m_sErrText = value m_GeneralParametersIsEnable = value
NotifyPropertyChanged(NameOf(ErrText)) NotifyPropertyChanged(NameOf(GeneralParametersIsEnable))
End Sub End Sub
#Region "Parametri generici" #Region "Parametri generici"
@@ -142,7 +157,7 @@ Public Class BTLDataWndVM
Public ReadOnly Property nPROJTYPE As BWType Public ReadOnly Property nPROJTYPE As BWType
Get Get
Select Case Map.refMainMenuVM.SelPage Select Case Map.refMainMenuVM.SelPage
Case Pages.OPTIMIZERPAGE Case Pages.ONLYPRODPAGE
Return Map.refProdManagerVM.nProdType Return Map.refProdManagerVM.nProdType
Case Else Case Else
Return BWType.NULL Return BWType.NULL
@@ -554,25 +569,127 @@ Public Class BTLDataWndVM
' Definizione comandi ' Definizione comandi
Private m_cmdOk As ICommand Private m_cmdOk As ICommand
Private m_cmdCancel As ICommand
#End Region ' FIELDS & PROPERTIES #End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
Sub New(nType As BWType) Sub New(nProjId As Integer)
' leggo file default config ' leggo cartella dei setup delle strategie
Map.refMainWindowVM.MainWindowM.GetDefaultConfigDirPath(nType, True) Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(ProjectManagerVM.CurrProd.nType, True)
End Sub Dim AISetupPaths As String() = Directory.GetFiles(AISetupDirPath)
For Each AiSetup In AISetupPaths
m_StrategySetupList.Add(Path.GetFileNameWithoutExtension(AiSetup))
Next
Sub New() ' cerco tra i layer BTLInfo
Map.SetRefBTLDataWndVM(Me) Dim nCurrBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
SetIsBTLDataWnd(True) While nCurrBTLInfoLayerId <> GDB_ID.NULL
' verifico se il layer appartiene al ProjId
Dim nBTLInfoLayerProjId As Integer
EgtGetInfo(nCurrBTLInfoLayerId, BTL_PRT_PROJ, nBTLInfoLayerProjId)
If nBTLInfoLayerProjId = nProjId Then
m_nBTLInfoLayerId = nCurrBTLInfoLayerId
Exit While
End If
nCurrBTLInfoLayerId = EgtGetNextName(nCurrBTLInfoLayerId, BTLINFO)
End While
' leggo parametri Btl ' leggo parametri Btl
ReadBtlParams() ReadBtlParams()
' leggo file default config '' leggo strategia
Map.refMainWindowVM.MainWindowM.GetDefaultConfigDirPath(ProjectManagerVM.CurrProd.nType, True) 'EgtGetInfo(m_nBTLInfoLayerId, "AISETUP", m_SelStrategySetup)
Read(ProjectManagerVM.CurrProd.nType)
' Controllo se presente file default config
Dim sDefaultConfigFile As String = String.Empty
Dim sTrimDefaultConfig As String = String.Empty
If GetMainPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile) <> 0 Then
sTrimDefaultConfig = System.IO.Path.GetFileNameWithoutExtension(sDefaultConfigFile)
m_SelStrategySetup = sTrimDefaultConfig
EgtSetInfo(m_nBTLInfoLayerId, "AISETUP", m_SelStrategySetup)
End If
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
Dim sReadedFiles As String = File.ReadAllText(sGeneralParametersFilePath)
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
m_GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
For Each GenericItem As ProjectParameters In m_GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End If
' Leggo info se presenti
Dim sInfo As String = String.Empty
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
SetbSaveGeneralParameters(True)
SetGeneralParametersIsEnable(True)
Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue
If Not EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue) Then
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
SetbSaveGeneralParameters(False)
SetGeneralParametersIsEnable(False)
Return
End If
Case GetType(DoubleGenericParameter)
SetbSaveGeneralParameters(True)
SetGeneralParametersIsEnable(True)
Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue
If Not EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue) Then
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
SetbSaveGeneralParameters(False)
SetGeneralParametersIsEnable(False)
Return
End If
Case GetType(ComboGenericParameter)
SetbSaveGeneralParameters(True)
SetGeneralParametersIsEnable(True)
Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue
If Not EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue) Then
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
SetbSaveGeneralParameters(False)
SetGeneralParametersIsEnable(False)
Return
End If
Case GetType(StringGenericParameter)
SetbSaveGeneralParameters(True)
SetGeneralParametersIsEnable(True)
Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue
If Not EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue) Then
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
SetbSaveGeneralParameters(False)
SetGeneralParametersIsEnable(False)
Return
End If
Case GetType(ListGenericParameter)
SetbSaveGeneralParameters(True)
SetGeneralParametersIsEnable(True)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
Dim sTmpInfo As String = sInfo
If Not EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo) Then
sInfo = sTmpInfo
SetbSaveGeneralParameters(False)
SetGeneralParametersIsEnable(False)
Return
End If
End If
Next
End Select
Next
End Sub End Sub
#End Region ' CONSTRUCTOR #End Region ' CONSTRUCTOR
@@ -608,223 +725,6 @@ Public Class BTLDataWndVM
EgtGetInfo(m_nBTLInfoLayerId, BTL_GEN_USERATTRIBUTE, m_sUSERATTRIBUTE) EgtGetInfo(m_nBTLInfoLayerId, BTL_GEN_USERATTRIBUTE, m_sUSERATTRIBUTE)
End Sub End Sub
Friend Sub Read(nType As BWType)
m_GeneralParametersList.Clear()
m_StrategySetupList.Clear()
' leggo cartella dei setup delle strategie
Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True)
Dim AISetupPaths As String() = Directory.GetFiles(AISetupDirPath).Where(Function(f) Path.GetExtension(f).ToLower() <> ".ini").ToArray()
For Each AiSetup In AISetupPaths
m_StrategySetupList.Add(Path.GetFileNameWithoutExtension(AiSetup))
Next
' cerco tra i layer BTLInfo
m_nBTLInfoLayerId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
' Leggo parametri generali
Dim sDefaultConfigFile As String = String.Empty
If EgtGetInfo(m_nBTLInfoLayerId, AI_SETUP, sDefaultConfigFile) Then
If m_StrategySetupList.Contains(sDefaultConfigFile) Then
m_SelStrategySetup = sDefaultConfigFile
SetErrText(String.Empty)
Else
SetErrText(EgtMsg(62113) & sDefaultConfigFile & EgtMsg(62114))
End If
ElseIf EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then
m_SelStrategySetup = sDefaultConfigFile
End If
If Not EgtExistsInfo(m_nBTLInfoLayerId, AI_SETUP) AndAlso Not IsNothing(m_SelStrategySetup) Then EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
GetGeneralParamtersList(nType)
Dim sAISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True)
Dim sStrategyConfigurationFilePath As String = sAISetupDirPath & "\" & SelStrategySetup & ".json"
ReadGeneralConfiguration(sStrategyConfigurationFilePath)
' Leggo info se presenti
Dim sInfo As String = String.Empty
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Else
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
End If
Case GetType(DoubleGenericParameter)
Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Else
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
End If
Case GetType(ComboGenericParameter)
Dim sTmpComboValue As String = String.Empty
If Not IsNothing(DirectCast(GeneralParameter, ComboGenericParameter).SelValue) Then
sTmpComboValue = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue
Else
sTmpComboValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList(0).sValue
End If
Dim sTmpValueInfo As String = String.Empty
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpValueInfo)
DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo)
Else
If IsNothing(DirectCast(GeneralParameter, ComboGenericParameter).SelValue) Then
DirectCast(GeneralParameter, ComboGenericParameter).SelValue = New ComboParameter
End If
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
End If
Case GetType(StringGenericParameter)
Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Else
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
End If
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ListGenericParameter).sValue)
Else
DirectCast(GeneralParameter, ListGenericParameter).sValue = sInfo
End If
End If
Next
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End Sub
Friend Sub ReadCustomGeneralParameters(SelStrategySetup As String)
SetErrText(String.Empty)
GetGeneralParamtersList(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sAISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(Map.refStrategyManagerVM.SelStrategyType.Id, False)
Dim sStrategyConfigurationFilePath As String = sAISetupDirPath & "\" & SelStrategySetup & ".json"
ReadGeneralConfiguration(sStrategyConfigurationFilePath)
NotifyPropertyChanged(NameOf(GeneralParametersList))
End Sub
Friend Sub SaveInfoBTL(nType As BWType)
Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True)
Dim sDefaultConfigFile As String = String.Empty
Dim sTmpStrategySetup As String = String.Empty
' Controllo se presente file default config
If IsNothing(m_SelStrategySetup) Then
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then
m_SelStrategySetup = sDefaultConfigFile
EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
Else
' restituisce la lista dei file presenti nella cartella con le relative informazioni
Dim StrategySetupListFile As List(Of FileInfo) = m_StrategySetupList.Where(Function(f) File.Exists(AISetupDirPath & "\" & f & ".json")).
Select(Function(f) New FileInfo(AISetupDirPath & "\" & f & ".json")).
OrderByDescending(Function(fi) fi.LastWriteTime).ToList()
' restituisce l'ultimo file modificato
If StrategySetupListFile.Any() Then
sDefaultConfigFile = Path.GetFileNameWithoutExtension(StrategySetupListFile.First().Name)
End If
sTmpStrategySetup = m_StrategySetupList.FirstOrDefault(Function(x) x = sDefaultConfigFile)
m_SelStrategySetup = sTmpStrategySetup
If Not IsNothing(m_SelStrategySetup) Then EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
End If
End If
SetInfoGeneralParameters()
End Sub
Private Sub SaveInfo()
EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
SetInfoGeneralParameters()
End Sub
Private Sub ReadGeneralConfiguration(sStrategyConfigurationFilePath As String)
If File.Exists(sStrategyConfigurationFilePath) Then
Dim sReadedFile As String = File.ReadAllText(sStrategyConfigurationFilePath)
Dim JsonRoot As CustomJsonRoot = Nothing
Try
JsonRoot = JsonConvert.DeserializeObject(Of CustomJsonRoot)(sReadedFile)
Catch ex As Exception
JsonRoot = Nothing
Return
End Try
For Each ProjectItem In JsonRoot.GENERAL
Dim DefaultProject As ProjectParameters = m_GeneralParametersList.FirstOrDefault(Function(x) x.sName = ProjectItem.sName)
If Not IsNothing(DefaultProject) Then
DefaultProject.ReadConfiguration(ProjectItem, m_GeneralParametersList)
Else
EgtOutLog("Parametro Generale: " & ProjectItem.sName & " non presente")
End If
Next
End If
End Sub
Private Sub GetGeneralParamtersList(nTypeId As BWType)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(nTypeId)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
Dim sReadedFiles As String = File.ReadAllText(sGeneralParametersFilePath)
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
m_GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
UserLevelControl(m_GeneralParametersList)
End If
End Sub
Private Sub UserLevelControl(GeneralParametersList As ObservableCollection(Of ProjectParameters))
For Each GenericItem As ProjectParameters In GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, True, False))
Case UserLevel.ADMINISTRATOR
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, True, False))
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, True, False))
Map.refMainMenuVM.SetUnloackImage(PADLOCK_IMAGE)
End If
End Select
Next
End Sub
Private Sub SetInfoGeneralParameters()
Dim sInfo As String = String.Empty
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, BooleanGenericParameter).bIsBooleanModify)
Case GetType(DoubleGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, DoubleGenericParameter).bIsDoubleModify)
Case GetType(ComboGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, ComboGenericParameter).bIsComboBoxModify)
Case GetType(StringGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, StringGenericParameter).bIsStringModify)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
End If
Next
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, ListGenericParameter).bIsListModify)
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End Sub
#End Region ' METHODS #End Region ' METHODS
#Region "COMMANDS" #Region "COMMANDS"
@@ -841,40 +741,61 @@ Public Class BTLDataWndVM
End Property End Property
Public Sub Ok() Public Sub Ok()
' Messaggio ripristino verifica se presente '' scrivo AISetup
If Not IsNothing(m_OldSelStrategySetup) AndAlso m_SelStrategySetup <> m_OldSelStrategySetup Then 'Dim sOldStrategySetup As String = ""
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62579), EgtMsg(15002), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then 'EgtGetInfo(m_nBTLInfoLayerId, "AISETUP", sOldStrategySetup)
Map.refProjectVM.ResetGeneralParameters() 'If m_SelStrategySetup <> sOldStrategySetup Then
Else ' EgtSetInfo(m_nBTLInfoLayerId, "AISETUP", m_SelStrategySetup)
Return 'End If
End If
Dim sInfo As String = String.Empty
If m_bSaveGeneralParameters Then
For Each GeneralParameter In GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Case GetType(DoubleGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Case GetType(ComboGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
Case GetType(StringGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
End If
Next
End Select
Next
Else
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtRemoveInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(DoubleGenericParameter)
EgtRemoveInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(ComboGenericParameter)
EgtRemoveInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(StringGenericParameter)
EgtRemoveInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtRemoveInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge)
End If
Next
End Select
Next
End If End If
SetIsBTLDataWnd(True) Map.refProdManagerVM.Save()
SaveInfo()
Map.refLeftPanelVM.ResetCalc()
Map.refSceneHostVM.SaveProject()
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
End Sub End Sub
#End Region ' Ok #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()
RaiseEvent m_CloseWindow(False)
End Sub
#End Region ' Cancel
#End Region ' COMMANDS #End Region ' COMMANDS
End Class End Class
@@ -2,48 +2,47 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{StaticResource BTLPartManagerVM}" DataContext="{StaticResource BTLPartManagerVM}"
Style="{StaticResource BTLPartManager_Border}"> CornerRadius="5"
BorderThickness="2"
BorderBrush="{StaticResource BeamWall_Teal}"
Background="{StaticResource BeamWall_FountainBlue}">
<StackPanel Style="{StaticResource PartManager_StackPanel}"> <StackPanel Orientation="Horizontal"
Style="{StaticResource OnlyProdBTLPartManager_StackPanel}">
<Button Command="{Binding CopyPart_Command}" <Button Command="{Binding CopyPart_Command}"
Click="ClosePopUp_Click" Click="ClosePopUp_Click"
ToolTip="{Binding CopyPart_ToolTip}" ToolTip="{Binding CopyPart_ToolTip}"
IsEnabled="{Binding CopyPart_IsEnabled}" IsEnabled="{Binding CopyPart_IsEnabled}"
Style="{StaticResource LP_Button}"> Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="{StaticResource CopyPart_Image}" <Image Source="/Resources/LeftPanel/CopyPart.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
<Button Command="{Binding RemovePart_Command}" <Button Command="{Binding RemovePart_Command}"
Click="ClosePopUp_Click" Click="ClosePopUp_Click"
ToolTip="{Binding RemovePart_ToolTip}" ToolTip="{Binding RemovePart_ToolTip}"
IsEnabled="{Binding RemovePart_IsEnabled}" IsEnabled="{Binding RemovePart_IsEnabled}"
Style="{StaticResource LP_Button}"> Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="{StaticResource Remove_Image}" <Image Source="/Resources/NewPage/Remove.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
<Button ToolTip="{Binding Simulate_ToolTip}" <Button ToolTip="{Binding Simulate_ToolTip}"
Click="ClosePopUp_Click" Click="ClosePopUp_Click"
Command="{Binding Simulate_Command}" Command="{Binding Simulate_Command}"
IsEnabled="{Binding Simulate_IsEnabled}" IsEnabled="{Binding Simulate_IsEnabled}"
Style="{StaticResource LP_Button}"> Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="{StaticResource Simulate_Image}" <Image Source="/Resources/CALCPanel/Simulate.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
<Button ToolTip="{Binding Edit_ToolTip}" <Button ToolTip="{Binding Edit_ToolTip}"
Click="ClosePopUp_Click" Click="ClosePopUp_Click"
Command="{Binding Edit_Command}" Command="{Binding Edit_Command}"
IsEnabled="{Binding Edit_IsEnabled}" IsEnabled="{Binding Edit_IsEnabled}"
Style="{StaticResource LP_Button}"> Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="{StaticResource Edit_Image}" <Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
<Button Command="{Binding ResetCalc_Command}" <Button Command="{Binding ResetCalc_Command}"
Click="ClosePopUp_Click" Click="ClosePopUp_Click"
ToolTip="{Binding ResetCalc_ToolTip}" ToolTip="{Binding ResetCalc_ToolTip}"
IsEnabled="{Binding CALCPanel_IsEnabled}" IsEnabled="{Binding CALCPanel_IsEnabled}"
Style="{StaticResource LP_Button}"> Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="{StaticResource ResetCalc_Image}" <Image Source="/Resources/CALCPanel/ResetCalc.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
</StackPanel> </StackPanel>
@@ -3,8 +3,8 @@
Private Sub ClosePopUp_Click(sender As Object, e As RoutedEventArgs) Private Sub ClosePopUp_Click(sender As Object, e As RoutedEventArgs)
Dim Button As Button = DirectCast(sender, Button) Dim Button As Button = DirectCast(sender, Button)
Dim StackPanel As StackPanel = DirectCast(Button.Parent, StackPanel) Dim StackPanel As StackPanel = DirectCast(Button.Parent, StackPanel)
Dim BTLPartManagerV As BTLPartManagerV = DirectCast(StackPanel.Parent, BTLPartManagerV) Dim OnlyProdBTLPartManagerV As BTLPartManagerV = DirectCast(StackPanel.Parent, BTLPartManagerV)
Dim Popup As Primitives.Popup = DirectCast(BTLPartManagerV.Parent, Primitives.Popup) Dim Popup As Primitives.Popup = DirectCast(OnlyProdBTLPartManagerV.Parent, Primitives.Popup)
If Not IsNothing(Popup) Then If Not IsNothing(Popup) Then
Popup.IsOpen = False Popup.IsOpen = False
@@ -1,15 +1,16 @@
Imports System.IO Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtBEAMWALL.Core Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Optimizer.MainMenuVM
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports Newtonsoft.Json
Public Class BTLPartManagerVM Public Class BTLPartManagerVM
Inherits VMBase Inherits VMBase
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Private PADLOCK_IMAGE As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Private m_BTLPartManager_IsEnabled As Boolean = True Private m_BTLPartManager_IsEnabled As Boolean = True
Public ReadOnly Property BTLPartManager_IsEnabled As Boolean Public ReadOnly Property BTLPartManager_IsEnabled As Boolean
Get Get
@@ -151,6 +152,7 @@ Public Class BTLPartManagerVM
Friend Sub PartShowAllChanged() Friend Sub PartShowAllChanged()
NotifyPropertyChanged(NameOf(CopyPart_IsEnabled)) NotifyPropertyChanged(NameOf(CopyPart_IsEnabled))
'NotifyPropertyChanged(NameOf(RotatePart_IsEnabled))
NotifyPropertyChanged(NameOf(RemovePart_IsEnabled)) NotifyPropertyChanged(NameOf(RemovePart_IsEnabled))
End Sub End Sub
@@ -174,6 +176,103 @@ Public Class BTLPartManagerVM
Map.refMyStatusBarVM.SetOutputMessage(sProgress) Map.refMyStatusBarVM.SetOutputMessage(sProgress)
End Sub End Sub
Private Sub GetGeneralParameters()
' leggo cartella dei setup delle strategie
Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(ProjectManagerVM.CurrProd.nType, True)
Dim AISetupPaths As String() = Directory.GetFiles(AISetupDirPath)
For Each AiSetup In AISetupPaths
Map.refProjectVM.StrategySetupList.Add(Path.GetFileNameWithoutExtension(AiSetup))
Next
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
Dim sReadedFiles As String = File.ReadAllText(sGeneralParametersFilePath)
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
Map.refProjectVM.GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
For Each GenericItem As ProjectParameters In Map.refProjectVM.GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
End Select
Next
NotifyPropertyChanged(NameOf(Map.refProjectVM.GeneralParametersList))
End If
' Leggo info se presenti
Dim sInfo As String = String.Empty
EgtGetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, "AISETUP", Map.refProjectVM.SelStrategySetup)
If IsNothing(Map.refProjectVM.SelStrategySetup) Then
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
EgtGetInfo(nBTLInfoLayerId, "AISETUP", Map.refProjectVM.SelStrategySetup)
End If
For Each GeneralParameter In Map.refProjectVM.GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
Map.refProjectVM.SetbSaveGeneralParameters(True)
Map.refProjectVM.SetGeneralParametersIsEnable(True)
Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue
If Not EgtGetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue) Then
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
Map.refProjectVM.SetbSaveGeneralParameters(False)
Map.refProjectVM.SetGeneralParametersIsEnable(False)
Return
End If
Case GetType(DoubleGenericParameter)
Map.refProjectVM.SetbSaveGeneralParameters(True)
Map.refProjectVM.SetGeneralParametersIsEnable(True)
Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue
If Not EgtGetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue) Then
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
Map.refProjectVM.SetbSaveGeneralParameters(False)
Map.refProjectVM.SetGeneralParametersIsEnable(False)
Return
End If
Case GetType(ComboGenericParameter)
Map.refProjectVM.SetbSaveGeneralParameters(True)
Map.refProjectVM.SetGeneralParametersIsEnable(True)
Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue
If Not EgtGetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue) Then
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
Map.refProjectVM.SetbSaveGeneralParameters(False)
Map.refProjectVM.SetGeneralParametersIsEnable(False)
Return
End If
Case GetType(StringGenericParameter)
Map.refProjectVM.SetbSaveGeneralParameters(True)
Map.refProjectVM.SetGeneralParametersIsEnable(True)
Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue
If Not EgtGetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue) Then
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
Map.refProjectVM.SetbSaveGeneralParameters(False)
Map.refProjectVM.SetGeneralParametersIsEnable(False)
Return
End If
Case GetType(ListGenericParameter)
Map.refProjectVM.SetbSaveGeneralParameters(True)
Map.refProjectVM.SetGeneralParametersIsEnable(True)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
Dim sTmpInfo As String = sInfo
If Not EgtGetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sInfo) Then
sInfo = sTmpInfo
Map.refProjectVM.SetbSaveGeneralParameters(False)
Map.refProjectVM.SetGeneralParametersIsEnable(False)
Return
End If
End If
Next
End Select
Next
End Sub
#End Region ' Methods #End Region ' Methods
#Region "COMMANDS" #Region "COMMANDS"
@@ -196,7 +295,6 @@ Public Class BTLPartManagerVM
' creo copia ' creo copia
Dim NewPart As BTLPartM = SelPart.Copy() Dim NewPart As BTLPartM = SelPart.Copy()
If Not IsNothing(NewPart) Then If Not IsNothing(NewPart) Then
Map.refProjectVM.UpdatePart(NewPart.nPartId)
' selezione ultimo che e' quello appena creato ' selezione ultimo che e' quello appena creato
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1), False, True) Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1), False, True)
End If End If
@@ -217,7 +315,7 @@ Public Class BTLPartManagerVM
Public Sub RemovePartCmd() Public Sub RemovePartCmd()
If IsNothing(ProjectManagerVM.CurrProd) Then Return If IsNothing(ProjectManagerVM.CurrProd) Then Return
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62573), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then If MessageBox.Show(EgtMsg(62573), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 Then If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 Then
Dim CurrSelBTLParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList() Dim CurrSelBTLParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
For RemoveIndex = CurrSelBTLParts.Count - 1 To 0 Step -1 For RemoveIndex = CurrSelBTLParts.Count - 1 To 0 Step -1
@@ -234,7 +332,7 @@ Public Class BTLPartManagerVM
Dim nDuploCount As Integer = 0 Dim nDuploCount As Integer = 0
If EgtDuploCount(BTLPartToDelete.nPartId, nDuploCount) AndAlso nDuploCount > 0 Then If EgtDuploCount(BTLPartToDelete.nPartId, nDuploCount) AndAlso nDuploCount > 0 Then
' avviso che il pezzo non è cancellabile perchè in produzione ' avviso che il pezzo non è cancellabile perchè in produzione
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61929), nDuploCount), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Warning) MessageBox.Show(String.Format(EgtMsg(61929), nDuploCount), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Warning)
Return Return
End If End If
' verifico se rimuovere sezione dalla lista ' verifico se rimuovere sezione dalla lista
@@ -244,7 +342,6 @@ Public Class BTLPartManagerVM
End If End If
' Eseguo cancellazione ' Eseguo cancellazione
EgtBeamSetPart(BTLPartToDelete.nPartId) EgtBeamSetPart(BTLPartToDelete.nPartId)
RemoveScenePart(BTLPartToDelete)
' seleziono elemento precedente ' seleziono elemento precedente
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToDelete) Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToDelete)
Dim FilteredIndex As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.IndexOf(BTLPartToDelete) Dim FilteredIndex As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.IndexOf(BTLPartToDelete)
@@ -272,22 +369,6 @@ Public Class BTLPartManagerVM
End If End If
End Sub End Sub
Private Sub RemoveScenePart(BTLPartToDelete As BTLPartVM)
' Rimuovo pezzo dalla scena
Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(BTLPartToDelete.nPROJ)
If IdAsseBase < 0 Then Return
' Setto il nuovo contesto
EgtSetCurrentContext(Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx())
If EgtBeamGetBuildingIsOn(IdAsseBase) Then EgtBeamShowBuilding(IdAsseBase, False)
Dim DeletePartId As Integer = Map.refSceneShowBuldingVM.MapInfo(BTLPartToDelete.nPartId)
EgtErase(DeletePartId)
Map.refSceneShowBuldingVM.MapInfo.Remove(BTLPartToDelete.nPartId)
EgtBeamShowBuilding(IdAsseBase, True)
EgtZoom(ZM.ALL)
' Ritorno al contesto corrente
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
End Sub
#End Region ' RemovePart #End Region ' RemovePart
#Region "SimulateCommand" #Region "SimulateCommand"
@@ -349,26 +430,13 @@ Public Class BTLPartManagerVM
End Property End Property
Friend Sub Edit() Friend Sub Edit()
Map.refBTLDataWndVM.SetIsBTLDataWnd(False) GetGeneralParameters()
Dim bValuePart As Boolean = False Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Collapsed)
For Each GeneralParam As ProjectParameters In Map.refProjectVM.GeneralParametersList Map.refProjectVM.SetFeatureListVisibility(Visibility.Collapsed)
bValuePart = False
EgtGetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParam.sNameNge & "_FORCED", bValuePart)
If bValuePart Then Exit For
Next
If bValuePart Then
Map.refProjectVM.GetGeneralParameters(bValuePart)
Else
Map.refProjectVM.Read(ProjectManagerVM.CurrProd.nType)
End If
Map.refProjectVM.SetRawPartManagerVisibility(False)
Map.refProjectVM.SetFeatureListVisibility(False)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGER) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGER)
' Disabilito LeftPanel ' Disabilito LeftPanel
Map.refProjectVM.SetLeftPanel_IsEnabled(False) Map.refProjectVM.SetOnlyProdLeftPanel_IsEnabled(False)
Map.refProjectVM.SetLeftPanel_Opacity(0.2) Map.refProjectVM.SetOnlyProdLeftPanel_Opacity(0.2)
End Sub End Sub
#End Region ' Edit #End Region ' Edit
@@ -386,18 +454,9 @@ Public Class BTLPartManagerVM
Public Sub ResetCalc() Public Sub ResetCalc()
If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Return If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Return
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
Map.refCALCPanelVM.SetCalculating(False)
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart
If IsNothing(SelPart) Then Return If IsNothing(SelPart) Then Return
If SelPart.nGlobalState <> CalcStates.NOTCALCULATED Then If SelPart.nGlobalState <> CalcStates.NOTCALCULATED Then
' Resetto info
If MyExecProcessManager.sInfoNgePartList.Count > 0 Then
For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList
Dim sInfoNgePart As String() = InfoNgePart.Split("="c)
EgtRemoveInfo(SelPart.nPartId, sInfoNgePart(0))
Next
End If
SelPart.ResetCalcTotalPart() SelPart.ResetCalcTotalPart()
End If End If
End Sub End Sub
@@ -319,25 +319,21 @@ Public Class BTLFeatureVM
m_BTLFeatureM = BTLFeatureM m_BTLFeatureM = BTLFeatureM
AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
m_BTLPartM = BTLPartM m_BTLPartM = BTLPartM
m_PartM = Nothing
CreatePBTLParamVMList() CreatePBTLParamVMList()
NotifyPropertyChanged(NameOf(Calc_Background)) NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility)) NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter)) NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground)) NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
NotifyPropertyChanged(NameOf(bStrategy_Visibility))
m_MenuList.Add(New MenuItemVm(Me)) m_MenuList.Add(New MenuItemVm(Me))
End Sub End Sub
Sub New(BTLFeatureM As BTLFeatureM, PartM As PartM) Sub New(BTLFeatureM As BTLFeatureM)
m_BTLFeatureM = BTLFeatureM m_BTLFeatureM = BTLFeatureM
m_BTLPartM = Nothing m_BTLPartM = Nothing
m_PartM = PartM
NotifyPropertyChanged(NameOf(Calc_Background)) NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility)) NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter)) NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground)) NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
NotifyPropertyChanged(NameOf(bStrategy_Visibility))
End Sub End Sub
#End Region ' CONSTRUCTOR #End Region ' CONSTRUCTOR
@@ -493,7 +489,7 @@ Public Class BTLFeatureVM
End Property End Property
Public Sub DeleteFeature() Public Sub DeleteFeature()
Map.refFeatureListManagerVM.RemoveFeature() If Map.refMainMenuVM.SelPage = Pages.VIEW Then Map.refFeatureListManagerVM.RemoveFeature()
End Sub End Sub
#End Region ' DeleteFeature #End Region ' DeleteFeature
@@ -571,8 +567,8 @@ Public Class BTLFeatureVM
Public Sub Strategy() Public Sub Strategy()
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.STRATEGYMANAGER) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.STRATEGYMANAGER)
' Disabilito LeftPanel ' Disabilito LeftPanel
Map.refProjectVM.SetLeftPanel_IsEnabled(False) Map.refProjectVM.SetOnlyProdLeftPanel_IsEnabled(False)
Map.refProjectVM.SetLeftPanel_Opacity(0.2) Map.refProjectVM.SetOnlyProdLeftPanel_Opacity(0.2)
Map.refForcedStrategyPanelVM.Init(BTLFeatureM) Map.refForcedStrategyPanelVM.Init(BTLFeatureM)
End Sub End Sub
@@ -591,24 +587,26 @@ Public Class BTLFeatureVM
Friend Sub EditFeature() Friend Sub EditFeature()
If Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then If Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then
'Map.refForcedStrategyBTLVM.Init(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.BTLFeatureM)
Map.refForcedStrategyPanelVM.Init(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.BTLFeatureM) Map.refForcedStrategyPanelVM.Init(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.BTLFeatureM)
End If End If
' se modalità building, la tolgo ' se modalità building, la tolgo
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refShowBeamPanelVM.ShowBuilding_IsChecked = False Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
End If End If
Map.refProjectVM.SetRawPartManagerVisibility(False) Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGERBTL) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGERBTL)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.STRATEGYMANAGERBTL) Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.STRATEGYMANAGERBTL)
Map.refFeatureManagerVM.SetEditIsEnabled()
' Disabilito LeftPanel ' Disabilito LeftPanel
Map.refProjectVM.SetLeftPanel_IsEnabled(False) Map.refProjectVM.SetOnlyProdLeftPanel_IsEnabled(False)
Map.refProjectVM.SetLeftPanel_Opacity(0.2) Map.refProjectVM.SetOnlyProdLeftPanel_Opacity(0.2)
EgtDraw() EgtDraw()
End Sub End Sub
#End Region ' EditFeature #End Region ' EditFeature
#End Region ' COMMANDS #End Region ' COMMANDS
#Region "EVENTS" #Region "EVENTS"
@@ -132,7 +132,7 @@ Public Class BTLParamVM
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
' verifico che sia compreso tra minimo e massimo ' verifico che sia compreso tra minimo e massimo
If dNewValue < m_BTLParamM.dMin OrElse dNewValue > m_BTLParamM.dMax Then If dNewValue < m_BTLParamM.dMin OrElse dNewValue > m_BTLParamM.dMax Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61856), EgtMsg(30007)) MessageBox.Show(EgtMsg(61856), EgtMsg(30007))
NotifyPropertyChanged(NameOf(sValue)) NotifyPropertyChanged(NameOf(sValue))
Return Return
End If End If
@@ -147,9 +147,9 @@ Public Class BTLParamVM
Dim nDoneCnt As Integer = DbControllers.m_ProjController.getCountItemState(ProjectManagerVM.CurrProd.nProdId, nPartId, ItemState.Assigned) Dim nDoneCnt As Integer = DbControllers.m_ProjController.getCountItemState(ProjectManagerVM.CurrProd.nProdId, nPartId, ItemState.Assigned)
' controllo se i pezzi sono lavorati se si messaggio di warning altrimenti messaggio informativo ' controllo se i pezzi sono lavorati se si messaggio di warning altrimenti messaggio informativo
If nDoneCnt > 0 Then If nDoneCnt > 0 Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62555) & nPartId & EgtMsg(62556) & INPROD & EgtMsg(62557), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning) 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 ElseIf INPROD > 0 Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62555) & nPartId & EgtMsg(62558) & INPROD & EgtMsg(62559), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Information) MessageBox.Show("Pezzo " & nPartId & " modificato in " & INPROD & " barra/e grezza/e", EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Information)
End If End If
UpdateParamValue(dNewValue, "") UpdateParamValue(dNewValue, "")
Case Else Case Else
@@ -194,7 +194,7 @@ Public Class BTLParamVM
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
' verifico che sia compreso tra minimo e massimo ' verifico che sia compreso tra minimo e massimo
If dNewValue < m_BTLParamM.dMin OrElse dNewValue > m_BTLParamM.dMax Then If dNewValue < m_BTLParamM.dMin OrElse dNewValue > m_BTLParamM.dMax Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61856), EgtMsg(30007)) MessageBox.Show(EgtMsg(61856), EgtMsg(30007))
NotifyPropertyChanged(NameOf(sDefault)) NotifyPropertyChanged(NameOf(sDefault))
Return Return
End If End If
+138 -264
View File
@@ -10,8 +10,6 @@ Public Class BTLPartVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Private DOWN_IMAGE As String = "pack://application:,,,/Resources/NewPage/down.png"
Private WithEvents m_BTLPartM As BTLPartM Private WithEvents m_BTLPartM As BTLPartM
Public ReadOnly Property BTLPartM As BTLPartM Public ReadOnly Property BTLPartM As BTLPartM
Get Get
@@ -92,7 +90,7 @@ Public Class BTLPartVM
Else Else
Dim MachGroupModel = Nothing Dim MachGroupModel = Nothing
If Not IsNothing(Map.refProdManagerVM) Then If Not IsNothing(Map.refProdManagerVM) Then
MachGroupModel = DbControllers.m_MachGroupController.FindByMachGroupId(ProjectManagerVM.CurrProd.nProdId, nMachgroupId) MachGroupModel = DbControllers.m_MachGroupController.FindByMachGroupId(ProjectManagerVM.CurrProj.nProdId, nMachgroupId)
End If End If
If Not IsNothing(MachGroupModel) AndAlso MachGroupModel.State > ItemState.ND Then If Not IsNothing(MachGroupModel) AndAlso MachGroupModel.State > ItemState.ND Then
bDuploInProduction = True bDuploInProduction = True
@@ -102,14 +100,14 @@ Public Class BTLPartVM
End If End If
Next Next
If bDuploInProduction Then If bDuploInProduction Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62586), "", MessageBoxButton.OK, MessageBoxImage.Exclamation) MessageBox.Show("Impossible change dimension because already in production!", "", MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return False Return False
End If End If
' lo impedisco ' lo impedisco
' avviso che tutti i pezzi verranno tolti dai grezzi e chiedo di confermare ' avviso che tutti i pezzi verranno tolti dai grezzi e chiedo di confermare
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61851), nDuploCount), EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Information) = MessageBoxResult.Yes Then If MessageBox.Show(String.Format(EgtMsg(61851), nDuploCount), EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Information) = MessageBoxResult.Yes Then
MyMachGroupPanelM.DuploSetToDelete(m_BTLPartM.nPartId) MyMachGroupPanelM.DuploSetToDelete(m_BTLPartM.nPartId)
DeleteDuplo_Otmizer(DuploList) DeleteDuplo_OnlyProdPage(DuploList)
Else Else
' reimposto vecchio valore ' reimposto vecchio valore
Return False Return False
@@ -142,7 +140,7 @@ Public Class BTLPartVM
Return True Return True
End Function End Function
Private Sub DeleteDuplo_Otmizer(DuploList As List(Of Integer)) Private Sub DeleteDuplo_OnlyProdPage(DuploList As List(Of Integer))
For Each nDuploId In DuploList For Each nDuploId In DuploList
' recupero grezzo cui appartiene ' recupero grezzo cui appartiene
Dim nRawPartId As Integer = MyMachGroupPanelM.DuploGetRawPart(nDuploId) Dim nRawPartId As Integer = MyMachGroupPanelM.DuploGetRawPart(nDuploId)
@@ -186,10 +184,7 @@ Public Class BTLPartVM
Public Property sL As String Public Property sL As String
Get Get
Dim nOrigGroupId As Integer = nPartId Dim nOrigGroupId As Integer = nPartId
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = Map.refSceneShowBuldingVM.MapInfo(nPartId)
End If
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = GetOrigFrameGroup(nPartId) nOrigGroupId = GetOrigFrameGroup(nPartId)
End If End If
Dim frBeam As New Frame3d Dim frBeam As New Frame3d
@@ -247,10 +242,7 @@ Public Class BTLPartVM
Public Property sW As String Public Property sW As String
Get Get
Dim nOrigGroupId As Integer = nPartId Dim nOrigGroupId As Integer = nPartId
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = Map.refSceneShowBuldingVM.MapInfo(nPartId)
End If
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = GetOrigFrameGroup(nPartId) nOrigGroupId = GetOrigFrameGroup(nPartId)
End If End If
Dim frBeam As New Frame3d Dim frBeam As New Frame3d
@@ -308,10 +300,7 @@ Public Class BTLPartVM
Public Property sH As String Public Property sH As String
Get Get
Dim nOrigGroupId As Integer = nPartId Dim nOrigGroupId As Integer = nPartId
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = Map.refSceneShowBuldingVM.MapInfo(nPartId)
End If
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = GetOrigFrameGroup(nPartId) nOrigGroupId = GetOrigFrameGroup(nPartId)
End If End If
Dim frBeam As New Frame3d Dim frBeam As New Frame3d
@@ -776,7 +765,7 @@ Public Class BTLPartVM
StringToLenAdv(sValArray(1), m_BTLPartM.m_dCamberLen2, True) AndAlso StringToLenAdv(sValArray(1), m_BTLPartM.m_dCamberLen2, True) AndAlso
StringToLenAdv(sValArray(2), m_BTLPartM.m_dCamberLen3, True) AndAlso StringToLenAdv(sValArray(2), m_BTLPartM.m_dCamberLen3, True) AndAlso
StringToLenAdv(sValArray(3), m_BTLPartM.m_dCamberCross3, True) AndAlso StringToLenAdv(sValArray(3), m_BTLPartM.m_dCamberCross3, True) AndAlso
EgtSetInfo(m_BTLPartM.nPartId, BTL_PRT_CAMBER, " SIDE: " & (value + 1) & EgtSetInfo(m_BTLPartM.nPartId, BTL_PRT_CAMBER, "SIDE: " & (value + 1) &
" P01: " & sValArray(0) & " P01: " & sValArray(0) &
" P02: " & sValArray(1) & " P02: " & sValArray(1) &
" P03: " & sValArray(2) & " P03: " & sValArray(2) &
@@ -825,7 +814,7 @@ Public Class BTLPartVM
End Get End Get
Set(value As Integer) Set(value As Integer)
Dim nValue As Integer = IdNameStruct.IdFromInd(value, ocREFSIDEFIXCLAMP) Dim nValue As Integer = IdNameStruct.IdFromInd(value, ocREFSIDEFIXCLAMP)
Dim sValue As String = ocREFSIDEFIXCLAMP(nValue).Name Dim sValue As String = ocREFSIDEFIXCLAMP(nValue).Name '[Enum].GetName(GetType(PartOffset_RefSideFixClamp), nValue)
Dim sValArray() As String = PartOffsetParams.Split(",") Dim sValArray() As String = PartOffsetParams.Split(",")
If sValArray.Count() >= 4 AndAlso If sValArray.Count() >= 4 AndAlso
@@ -854,7 +843,7 @@ Public Class BTLPartVM
End Get End Get
Set(value As String) Set(value As String)
Dim nValue As Integer = IdNameStruct.IdFromInd(SelREFSIDEFIXCLAMP, ocREFSIDEFIXCLAMP) Dim nValue As Integer = IdNameStruct.IdFromInd(SelREFSIDEFIXCLAMP, ocREFSIDEFIXCLAMP)
Dim sValue As String = ocREFSIDEFIXCLAMP(nValue).Name Dim sValue As String = ocREFSIDEFIXCLAMP(nValue).Name '[Enum].GetName(GetType(PartOffset_RefSideFixClamp), nValue)
Dim sValArray() As String = value.Split(",") Dim sValArray() As String = value.Split(",")
If sValArray.Count() >= 4 AndAlso If sValArray.Count() >= 4 AndAlso
@@ -1121,7 +1110,7 @@ Public Class BTLPartVM
End Get End Get
Set(value As Integer) Set(value As Integer)
Dim nValue As Integer = IdNameStruct.IdFromInd(value, ocMATERIALTYPEGRP) Dim nValue As Integer = IdNameStruct.IdFromInd(value, ocMATERIALTYPEGRP)
Dim sValue As String = ocMATERIALTYPEGRP(nValue).Name Dim sValue As String = ocMATERIALTYPEGRP(nValue).Name '[Enum].GetName(GetType(MaterialType), nValue)
If EgtSetInfo(m_BTLPartM.nPartId, BTL_PRT_MATERIALTYPE, sValue & ": " & sMATERIALTYPESPEC) Then If EgtSetInfo(m_BTLPartM.nPartId, BTL_PRT_MATERIALTYPE, sValue & ": " & sMATERIALTYPESPEC) Then
m_BTLPartM.SelMATERIALTYPEGRP = value m_BTLPartM.SelMATERIALTYPEGRP = value
Else Else
@@ -1136,7 +1125,7 @@ Public Class BTLPartVM
End Get End Get
Set(value As String) Set(value As String)
Dim nValue As Integer = IdNameStruct.IdFromInd(SelMATERIALTYPEGRP, ocMATERIALTYPEGRP) Dim nValue As Integer = IdNameStruct.IdFromInd(SelMATERIALTYPEGRP, ocMATERIALTYPEGRP)
Dim sValue As String = ocMATERIALTYPEGRP(nValue).Name Dim sValue As String = ocMATERIALTYPEGRP(nValue).Name '[Enum].GetName(GetType(MaterialType), nValue)
If EgtSetInfo(m_BTLPartM.nPartId, BTL_PRT_MATERIALTYPE, sValue & ": " & value) Then If EgtSetInfo(m_BTLPartM.nPartId, BTL_PRT_MATERIALTYPE, sValue & ": " & value) Then
m_BTLPartM.sMATERIALTYPESPEC = value m_BTLPartM.sMATERIALTYPESPEC = value
Else Else
@@ -1176,7 +1165,7 @@ Public Class BTLPartVM
If nTempADDED >= nINPROD Then If nTempADDED >= nINPROD Then
m_BTLPartM.nADDED = nTempADDED m_BTLPartM.nADDED = nTempADDED
Else Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61857), "", MessageBoxButton.OK, MessageBoxImage.Warning) MessageBox.Show(EgtMsg(61857), "", MessageBoxButton.OK, MessageBoxImage.Warning)
End If End If
End If End If
NotifyPropertyChanged(NameOf(sADDED)) NotifyPropertyChanged(NameOf(sADDED))
@@ -1355,7 +1344,7 @@ Public Class BTLPartVM
Select Case m_BTLPartM.nGlobalState Select Case m_BTLPartM.nGlobalState
Case CalcStates.ERROR_, CalcStates.COLLISION Case CalcStates.ERROR_, CalcStates.COLLISION
Return Brushes.Red Return Brushes.Red
Case CalcStates.WARNING, CalcStates.SECTION Case CalcStates.WARNING
Return Brushes.Orange Return Brushes.Orange
Case CalcStates.INFO, CalcStates.OK Case CalcStates.INFO, CalcStates.OK
Return Brushes.Green Return Brushes.Green
@@ -1390,8 +1379,6 @@ Public Class BTLPartVM
Return "w" Return "w"
Case CalcStates.INFO Case CalcStates.INFO
Return "i" Return "i"
Case CalcStates.SECTION
Return "x"
Case Else Case Else
Return "" Return ""
End Select End Select
@@ -1403,7 +1390,7 @@ Public Class BTLPartVM
Select Case m_BTLPartM.m_nGlobalState Select Case m_BTLPartM.m_nGlobalState
Case CalcStates.ERROR_, CalcStates.COLLISION Case CalcStates.ERROR_, CalcStates.COLLISION
Return Brushes.Red Return Brushes.Red
Case CalcStates.WARNING, CalcStates.SECTION Case CalcStates.WARNING
Return Brushes.Orange Return Brushes.Orange
Case CalcStates.INFO Case CalcStates.INFO
Return Brushes.Green Return Brushes.Green
@@ -1554,9 +1541,11 @@ Public Class BTLPartVM
If Not IsNothing(SelBTLFeatureVM.SelPBTLParam) Then SelBTLFeatureVM.SelPBTLParam = Nothing If Not IsNothing(SelBTLFeatureVM.SelPBTLParam) Then SelBTLFeatureVM.SelPBTLParam = Nothing
' rinfresco bottoni freecontour ' rinfresco bottoni freecontour
m_SelBTLFeatureVM.RefreshFCMBtnVisibility() m_SelBTLFeatureVM.RefreshFCMBtnVisibility()
Map.refStatisticsTimePanelVM.SetViewPage_Visibility(Visibility.Visible)
Map.refStatisticsTimePanelVM.SetMachiningPage_Visibility(Visibility.Collapsed)
' Controlo se nPRC è 900 rendo visibile combobox Variant ' Controlo se nPRC è 900 rendo visibile combobox Variant
If m_SelBTLFeatureVM.nPRC = 900 Then If m_SelBTLFeatureVM.nPRC = 900 Then
Map.refFeatureManagerVM.SetVariant_Visibility(True) Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Visible)
Dim nVariant As Integer = 0 Dim nVariant As Integer = 0
If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then
m_SelBTLFeatureVM.nSelVARIANT = nVariant m_SelBTLFeatureVM.nSelVARIANT = nVariant
@@ -1569,70 +1558,54 @@ Public Class BTLPartVM
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png") Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png")
End If End If
Else Else
Map.refFeatureManagerVM.SetVariant_Visibility(False) Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Collapsed)
End If End If
' Forzo strategia
'Map.refForcedStrategyBTLVM.Init(m_SelBTLFeatureVM.BTLFeatureM)
Map.refForcedStrategyPanelVM.Init(m_SelBTLFeatureVM.BTLFeatureM)
'Else
' EgtDeselectAll()
End If End If
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged() If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
Map.refProdManagerVM.SetBtlImage(DOWN_IMAGE)
Map.refProdManagerVM.SetOpenImage(DOWN_IMAGE)
Map.refProdManagerVM.SetSaveImage(DOWN_IMAGE)
If Not IsNothing(m_SelBTLFeatureVM) Then
SetSelFeatureMsg(EgtMsg(5356) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName)
SetDeselFeatureMsg(EgtMsg(5357) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName)
End If
EgtDraw() EgtDraw()
NotifyPropertyChanged(NameOf(SelBTLFeatureVM)) NotifyPropertyChanged(NameOf(SelBTLFeatureVM))
' se modalità building, la tolgo ' se modalità building, la tolgo
If Not IsNothing(m_SelBTLFeatureVM) AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then If Not IsNothing(m_SelBTLFeatureVM) AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refProjectVM.SetSceneShowBuldingVisibility(False) Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False) Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False) Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(True) Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True) If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
End If End If
End Set End Set
End Property End Property
'Public Property SelBTLFeatureVMOnlyGraph As BTLFeatureVM
Friend Sub SetSelFeature(value As BTLFeatureVM) ' Get
If Not IsNothing(m_PrevSelBTLFeatureVM) Then m_PrevSelBTLFeatureVM.DeselGeomFeature() ' Return m_SelBTLFeatureVM
m_SelBTLFeatureVM = value ' End Get
If Not IsNothing(m_SelBTLFeatureVM) Then ' Set(value As BTLFeatureVM)
m_SelBTLFeatureVM.SelGeomFeature() ' m_SelBTLFeatureVM = value
m_PrevSelBTLFeatureVM = value ' If Not IsNothing(m_SelBTLFeatureVM) Then
Map.refPParameterListVM.SetCurrDraw(DirectCast(m_SelBTLFeatureVM, BTLFeatureVM).sDrawPath) ' m_SelBTLFeatureVM.SelGeomFeature()
' deseleziono i parametri ' ' deseleziono i parametri
If Not IsNothing(SelBTLFeatureVM.SelPBTLParam) Then SelBTLFeatureVM.SelPBTLParam = Nothing ' If Not IsNothing(SelBTLFeatureVM.SelPBTLParam) Then SelBTLFeatureVM.SelPBTLParam = Nothing
' rinfresco bottoni freecontour ' End If
m_SelBTLFeatureVM.RefreshFCMBtnVisibility() ' If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
' Controlo se nPRC è 900 rendo visibile combobox Variant ' EgtResetCurrMachGroup()
If m_SelBTLFeatureVM.nPRC = 900 Then ' ResetSearchFound()
Map.refFeatureManagerVM.SetVariant_Visibility(True) ' Map.refStatisticsTimePanelVM.SetViewPage_Visibility(Visibility.Visible)
Dim nVariant As Integer = 0 ' Map.refStatisticsTimePanelVM.SetMachiningPage_Visibility(Visibility.Collapsed)
If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then ' EgtDraw()
m_SelBTLFeatureVM.nSelVARIANT = nVariant ' NotifyPropertyChanged(NameOf(SelBTLFeatureVM))
End If ' NotifyPropertyChanged(NameOf(SelBTLFeatureVMOnlyGraph))
If m_SelBTLFeatureVM.nSelVARIANT > 0 AndAlso ' ' se modalità building, la tolgo
System.IO.File.Exists(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & "." & m_SelBTLFeatureVM.sDES & ".png") Then ' If Not IsNothing(m_SelBTLFeatureVM) AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
' imposto path disegno da mostrare in BottomPanel ' Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & "." & m_SelBTLFeatureVM.sDES & ".png") ' Map.refShowBeamPanelVM.SetShowBuilding(False)
Else ' End If
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png") ' End Set
End If 'End Property
Else
Map.refFeatureManagerVM.SetVariant_Visibility(False)
End If
End If
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
Map.refProdManagerVM.SetBtlImage(DOWN_IMAGE)
Map.refProdManagerVM.SetOpenImage(DOWN_IMAGE)
Map.refProdManagerVM.SetSaveImage(DOWN_IMAGE)
If Not IsNothing(m_SelBTLFeatureVM) Then
SetSelFeatureMsg(EgtMsg(5356) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName)
SetDeselFeatureMsg(EgtMsg(5357) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName)
End If
EgtDraw()
NotifyPropertyChanged(NameOf(SelBTLFeatureVM))
End Sub
Private m_Calc_PartEnd As Boolean = False Private m_Calc_PartEnd As Boolean = False
Public ReadOnly Property Calc_PartEnd As Boolean Public ReadOnly Property Calc_PartEnd As Boolean
@@ -1676,6 +1649,20 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(bOpenFeatureList)) NotifyPropertyChanged(NameOf(bOpenFeatureList))
End Sub End Sub
Private m_IsSettingBtnOpen As Boolean = False
Public Property IsSettingBtnOpen As Boolean
Get
Return m_IsSettingBtnOpen
End Get
Set(value As Boolean)
m_IsSettingBtnOpen = value
End Set
End Property
Friend Sub SetIsSettingBtnOpen(bIsSettingBtnOpen As Boolean)
m_IsSettingBtnOpen = bIsSettingBtnOpen
NotifyPropertyChanged(NameOf(IsSettingBtnOpen))
End Sub
Public Property IsInverted As Boolean Public Property IsInverted As Boolean
Get Get
Return BTLPartM.nINVERTED = 180 Return BTLPartM.nINVERTED = 180
@@ -1683,13 +1670,6 @@ Public Class BTLPartVM
Set(value As Boolean) Set(value As Boolean)
' eseguo inversione ' eseguo inversione
m_BTLPartM.Inversion(Map.refProjectVM.BTLStructureVM.nPROJTYPE) m_BTLPartM.Inversion(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
' Resetto info
If MyExecProcessManager.sInfoNgePartList.Count > 0 Then
For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList
Dim sInfoNgePart As String() = InfoNgePart.Split("="c)
EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, sInfoNgePart(0))
Next
End If
' setto part e tutte le feature da ricalcolare ' setto part e tutte le feature da ricalcolare
ResetCalcTotalPart() ResetCalcTotalPart()
EgtDraw() EgtDraw()
@@ -1698,14 +1678,6 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(IsInverted)) NotifyPropertyChanged(NameOf(IsInverted))
End Set End Set
End Property End Property
Friend Sub SetInverted(value As Boolean)
' eseguo inversione
m_BTLPartM.Inversion(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
EgtRedraw()
' imposto lock
bLockInversion = True
NotifyPropertyChanged(NameOf(IsInverted))
End Sub
Private m_IsRowEnabled As Boolean = True Private m_IsRowEnabled As Boolean = True
Public ReadOnly Property IsRowEnabled As Boolean Public ReadOnly Property IsRowEnabled As Boolean
@@ -1718,57 +1690,15 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(IsRowEnabled)) NotifyPropertyChanged(NameOf(IsRowEnabled))
End Sub End Sub
Private m_SelFeatureMsg As String = String.Empty
Public ReadOnly Property SelFeatureMsg As String
Get
Return m_SelFeatureMsg
End Get
End Property
Friend Sub SetSelFeatureMsg(value As String)
m_SelFeatureMsg = value
NotifyPropertyChanged(NameOf(SelFeatureMsg))
End Sub
Private m_DeselFeatureMsg As String = String.Empty
Public ReadOnly Property DeselFeatureMsg As String
Get
Return m_DeselFeatureMsg
End Get
End Property
Friend Sub SetDeselFeatureMsg(value As String)
m_DeselFeatureMsg = value
NotifyPropertyChanged(NameOf(DeselFeatureMsg))
End Sub
Public ReadOnly Property bStrategy_Visibility As Visibility
Get
Return m_SelBTLFeatureVM.bStrategy_Visibility
End Get
End Property
Private m_bStrategyModify_Visibility As Visibility = Visibility.Hidden
Public ReadOnly Property StrategyModify_Visibility As Visibility
Get
Return m_bStrategyModify_Visibility
End Get
End Property
Friend Sub SetStrategyModify_Visibility(value As Boolean)
m_bStrategyModify_Visibility = If(value, Visibility.Visible, Visibility.Hidden)
NotifyPropertyChanged(NameOf(StrategyModify_Visibility))
End Sub
' Definizione comandi ' Definizione comandi
Private m_cmdInvert As ICommand Private m_cmdInvert As ICommand
Private m_cmdBackRotation As ICommand Private m_cmdBackRotation As ICommand
Private m_cmdForwardRotation As ICommand Private m_cmdForwardRotation As ICommand
Private m_cmdXRotation As ICommand Private m_cmdXRotation As ICommand
Private m_cmdPartColour As ICommand Private m_cmdPartColour As ICommand
Private m_cmdShowPopUpSettingBtnCmd As ICommand
Private m_cmdVerify As ICommand Private m_cmdVerify As ICommand
Private m_cmdAddToRawPart As ICommand Private m_cmdAddToRawPart As ICommand
Private m_cmdSelectAllFeature As ICommand
Private m_cmdDeselectAllFeature As ICommand
Private m_cmdSelectItemFeature As ICommand
Private m_cmdDeselectItemFeature As ICommand
#Region "MESSAGES" #Region "MESSAGES"
@@ -1784,18 +1714,6 @@ Public Class BTLPartVM
End Get End Get
End Property End Property
Public ReadOnly Property SelectAll_Msg As String
Get
Return EgtMsg(63034)
End Get
End Property
Public ReadOnly Property DeselectAll_Msg As String
Get
Return EgtMsg(63035)
End Get
End Property
Public ReadOnly Property ForwardRotation_ToolTip As String Public ReadOnly Property ForwardRotation_ToolTip As String
Get Get
Return EgtMsg(61997) Return EgtMsg(61997)
@@ -1872,7 +1790,7 @@ Public Class BTLPartVM
AddHandler m_BTLFeatureVMList.CollectionChanged, AddressOf OnBTLFeatureVMListChanged AddHandler m_BTLFeatureVMList.CollectionChanged, AddressOf OnBTLFeatureVMListChanged
End Sub End Sub
Public Sub Rotation(IsPositive As Boolean, SelectedMachineType As MachineType, Optional bRedraw As Boolean = True, Optional dAng As Double = 90, Optional bVerifyDuplo As Boolean = True, Optional bResetCalc As Boolean = True) Public Sub Rotation(IsPositive As Boolean, SelectedMachineType As MachineType, Optional bRedraw As Boolean = True, Optional dAng As Double = 90, Optional bVerifyDuplo As Boolean = True)
Dim OldSection As SectionXMaterial = Section Dim OldSection As SectionXMaterial = Section
If m_BTLPartM.Rotation(IsPositive, SelectedMachineType, bRedraw, dAng) Then If m_BTLPartM.Rotation(IsPositive, SelectedMachineType, bRedraw, dAng) Then
' aggiorno visualizzazione dimensioni ' aggiorno visualizzazione dimensioni
@@ -1880,16 +1798,7 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(sH)) NotifyPropertyChanged(NameOf(sH))
NotifyPropertyChanged(NameOf(sL)) NotifyPropertyChanged(NameOf(sL))
' setto part e tutte le feature da ricalcolare ' setto part e tutte le feature da ricalcolare
If bResetCalc Then ResetCalcTotalPart()
' Resetto info
If MyExecProcessManager.sInfoNgePartList.Count > 0 Then
For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList
Dim sInfoNgePart As String() = InfoNgePart.Split("="c)
EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, sInfoNgePart(0))
Next
End If
ResetCalcTotalPart()
End If
' aggiorno sezioni ' aggiorno sezioni
Map.refProjectVM.BTLStructureVM.UpdateSection(Section, OldSection) Map.refProjectVM.BTLStructureVM.UpdateSection(Section, OldSection)
End If End If
@@ -1909,9 +1818,7 @@ Public Class BTLPartVM
nState = CalcStates.OK nState = CalcStates.OK
Case 22 Case 22
nState = CalcStates.COLLISION nState = CalcStates.COLLISION
Case 17 Case 17, 19
nState = CalcStates.SECTION
Case 19
nState = CalcStates.WARNING nState = CalcStates.WARNING
Case < 0 Case < 0
nState = CalcStates.INFO nState = CalcStates.INFO
@@ -1936,7 +1843,6 @@ Public Class BTLPartVM
m_BTLPartM.nCALC_ROT = 0 m_BTLPartM.nCALC_ROT = 0
m_BTLPartM.nCALC_FALL = 0 m_BTLPartM.nCALC_FALL = 0
m_BTLPartM.sCALC_MSG = "" m_BTLPartM.sCALC_MSG = ""
m_BTLPartM.nCALC_TIME = 0
' aggiorno lista feature in iconcina calcolo ' aggiorno lista feature in iconcina calcolo
BTLFeatureVMList_View.Refresh() BTLFeatureVMList_View.Refresh()
NotifyPropertyChanged(NameOf(Calc_BorderBrush)) NotifyPropertyChanged(NameOf(Calc_BorderBrush))
@@ -2216,7 +2122,7 @@ Public Class BTLPartVM
For Each sPart In ToAddList For Each sPart In ToAddList
sMessage &= " - " & sPart & Environment.NewLine sMessage &= " - " & sPart & Environment.NewLine
Next Next
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sMessage & EgtMsg(61893), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then If MessageBox.Show(sMessage & EgtMsg(61893), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
For Each PartVM In ToAddVM For Each PartVM In ToAddVM
PartVM.AddNewPartToAdded() PartVM.AddNewPartToAdded()
Next Next
@@ -2302,10 +2208,10 @@ Public Class BTLPartVM
ForwardRotation(True) ForwardRotation(True)
End Sub End Sub
Public Sub ForwardRotation(Optional bUpdateSection As Boolean = False, Optional bRedraw As Boolean = True, Optional dAng As Double = 90, Optional bResetCalc As Boolean = True) Public Sub ForwardRotation(Optional bUpdateSection As Boolean = False, Optional bRedraw As Boolean = True)
' salvo sezione impostata ' salvo sezione impostata
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
Rotation(True, Map.refProjectVM.BTLStructureVM.nPROJTYPE, bRedraw, dAng, True, bResetCalc) Rotation(True, Map.refProjectVM.BTLStructureVM.nPROJTYPE, bRedraw)
' imposto lock ' imposto lock
bLockRotation = True bLockRotation = True
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi) ' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
@@ -2381,20 +2287,48 @@ Public Class BTLPartVM
Private Function SelectColor(Col As Color3d, ByRef NewCol As Color3d) As Boolean Private Function SelectColor(Col As Color3d, ByRef NewCol As Color3d) As Boolean
' Creo dialogo colori ' Creo dialogo colori
'Dim ColorDlg As New System.Windows.Forms.ColorDialog With {
' .FullOpen = True,
' .Color = Col.ToColor()
'}
Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With { Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
.Color = Col.ToColor() .Color = Col.ToColor()
} }
' Visualizzo dialogo ' Visualizzo dialogo
If ColorDlg.ShowDialog() = False Then Return False If ColorDlg.ShowDialog() <> Forms.DialogResult.OK Then Return False
' Recupero colore scelto ' Recupero colore scelto
NewCol.FromColor(ColorDlg.Color) NewCol.FromString(ColorDlg.Color.R & "," & ColorDlg.Color.G & "," & ColorDlg.Color.B & "," & ColorDlg.Color.A) 'NewCol.FromColor(ColorDlg.Color)
Return True Return True
End Function End Function
#End Region ' PartColour #End Region ' PartColour
#Region "ShowPopUpSettingBtnCommand"
Public ReadOnly Property ShowPopUpSettingBtnCommand As ICommand
Get
If m_cmdShowPopUpSettingBtnCmd Is Nothing Then
m_cmdShowPopUpSettingBtnCmd = New Command(AddressOf ShowPopUpSettingBtn)
End If
Return m_cmdShowPopUpSettingBtnCmd
End Get
End Property
Public Sub ShowPopUpSettingBtn(ByVal param As Object)
If m_IsSettingBtnOpen Then
SetIsSettingBtnOpen(False)
Else
SetIsSettingBtnOpen(True)
End If
End Sub
#End Region ' ShowPopUpSettingBtnCommand
#Region "Verify" #Region "Verify"
''' <summary>
''' Returns a command that do Open.
''' </summary>
Public ReadOnly Property Verify_Command As ICommand Public ReadOnly Property Verify_Command As ICommand
Get Get
If m_cmdVerify Is Nothing Then If m_cmdVerify Is Nothing Then
@@ -2404,10 +2338,12 @@ Public Class BTLPartVM
End Get End Get
End Property End Property
''' <summary>
''' Execute the Open. This method is invoked by the OpenCommand.
''' </summary>
Friend Sub Verify() Friend Sub Verify()
If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Return If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Return
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetIsRowEnabled(False) Map.refCALCPanelVM.Verify(ProjectType.PROJ)
Map.refCALCPanelVM.Verify(ProjectType.PROJ, CalcIntegration.CmdTypes.CHECKNOSIM)
Return Return
End Sub End Sub
@@ -2415,6 +2351,9 @@ Public Class BTLPartVM
#Region "AddToRawPart" #Region "AddToRawPart"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property AddToRawPart_Command As ICommand Public ReadOnly Property AddToRawPart_Command As ICommand
Get Get
If m_cmdAddToRawPart Is Nothing Then If m_cmdAddToRawPart Is Nothing Then
@@ -2424,6 +2363,9 @@ Public Class BTLPartVM
End Get End Get
End Property End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub AddToRawPart() Public Sub AddToRawPart()
If IsNothing(ProjectManagerVM.CurrProd) Then Return If IsNothing(ProjectManagerVM.CurrProd) Then Return
Dim SelPart As BTLPartVM Dim SelPart As BTLPartVM
@@ -2444,7 +2386,7 @@ Public Class BTLPartVM
If IsNothing(SelMachGroup) Then Return If IsNothing(SelMachGroup) Then Return
' se pareti e piu' di uno selezionato, esco ' se pareti e piu' di uno selezionato, esco
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL And SelParts.Count > 1 Then If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL And SelParts.Count > 1 Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61971), EgtMsg(30007)) MessageBox.Show(EgtMsg(61971), EgtMsg(30007))
Return Return
End If End If
' se MachGroup gia' mandato in produzione, esco ' se MachGroup gia' mandato in produzione, esco
@@ -2463,13 +2405,13 @@ Public Class BTLPartVM
' verifico sezione e materiale ' verifico sezione e materiale
For Each Part In SelParts For Each Part In SelParts
If Part.Section <> BeamMachGroup.Section Then If Part.Section <> BeamMachGroup.Section Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61866), EgtMsg(30007)) MessageBox.Show(EgtMsg(61866), EgtMsg(30007))
Return Return
End If End If
Next Next
' verifico lunghezza totale ' verifico lunghezza totale
If Not VerifyTotLength(BeamMachGroup, SelParts) Then If Not VerifyTotLength(BeamMachGroup, SelParts) Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61867), EgtMsg(30007)) MessageBox.Show(EgtMsg(61867), EgtMsg(30007))
Return Return
End If End If
If AddPartToBeam(BeamMachGroup, SelParts) Then If AddPartToBeam(BeamMachGroup, SelParts) Then
@@ -2487,7 +2429,7 @@ Public Class BTLPartVM
Dim WallMachGroup As MyMachGroupVM = SelMachGroup Dim WallMachGroup As MyMachGroupVM = SelMachGroup
' verifico spessore ' verifico spessore
If SelPart.Section <> WallMachGroup.Section Then If SelPart.Section <> WallMachGroup.Section Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61868), EgtMsg(30007)) MessageBox.Show(EgtMsg(61868), EgtMsg(30007))
Return Return
End If End If
If AddPartToWall(WallMachGroup, SelPart) Then If AddPartToWall(WallMachGroup, SelPart) Then
@@ -2516,8 +2458,6 @@ Public Class BTLPartVM
End Function End Function
Friend Function AddPartToBeam(BeamMachGroup As MyMachGroupVM, PartsToAdd As List(Of BTLPartVM)) As Boolean Friend Function AddPartToBeam(BeamMachGroup As MyMachGroupVM, PartsToAdd As List(Of BTLPartVM)) As Boolean
EgtBeamShowFacesName(False)
EgtBeamShowLoadingSide(False, False)
' ordino i pezzi da aggiungere ' ordino i pezzi da aggiungere
PartsToAdd = PartsToAdd.OrderBy(Function(x) x.dL).ToList() PartsToAdd = PartsToAdd.OrderBy(Function(x) x.dL).ToList()
' creo copie dei pezzi ' creo copie dei pezzi
@@ -2710,90 +2650,6 @@ Public Class BTLPartVM
#End Region ' AddToRawPart #End Region ' AddToRawPart
#Region "SelectAllFeature"
Public ReadOnly Property SelectAllFeature_Command As ICommand
Get
If m_cmdSelectAllFeature Is Nothing Then
m_cmdSelectAllFeature = New Command(AddressOf SelectAllFeature)
End If
Return m_cmdSelectAllFeature
End Get
End Property
Friend Sub SelectAllFeature()
bDOALL = True
NotifyPropertyChanged(NameOf(bDOALL))
End Sub
#End Region ' SelectAllFeature
#Region "DeselectAllFeature"
Public ReadOnly Property DeselectAllFeature_Command As ICommand
Get
If m_cmdDeselectAllFeature Is Nothing Then
m_cmdDeselectAllFeature = New Command(AddressOf DeselectAllFeature)
End If
Return m_cmdDeselectAllFeature
End Get
End Property
Friend Sub DeselectAllFeature()
bDOALL = False
NotifyPropertyChanged(NameOf(bDOALL))
End Sub
#End Region ' DeselectAllFeature
#Region "SelectItemFeature"
Public ReadOnly Property SelectItemFeature_Command As ICommand
Get
If m_cmdSelectItemFeature Is Nothing Then
m_cmdSelectItemFeature = New Command(AddressOf SelectItemFeature)
End If
Return m_cmdSelectItemFeature
End Get
End Property
Friend Sub SelectItemFeature()
For Each ItemFeature As BTLFeatureVM In m_BTLFeatureVMList
If ItemFeature.sName = m_SelBTLFeatureVM.sName Then
ItemFeature.bDO = True
Else
ItemFeature.bDO = False
End If
NotifyPropertyChanged(NameOf(ItemFeature.bDO))
Next
End Sub
#End Region ' SelectItemFeature
#Region "DeselectItemFeature"
Public ReadOnly Property DeselectItemFeature_Command As ICommand
Get
If m_cmdDeselectItemFeature Is Nothing Then
m_cmdDeselectItemFeature = New Command(AddressOf DeselectItemFeature)
End If
Return m_cmdDeselectItemFeature
End Get
End Property
Friend Sub DeselectItemFeature()
For Each ItemFeature As BTLFeatureVM In m_BTLFeatureVMList
If Not ItemFeature.sName = m_SelBTLFeatureVM.sName Then
ItemFeature.bDO = True
Else
ItemFeature.bDO = False
End If
NotifyPropertyChanged(NameOf(ItemFeature.bDO))
Next
End Sub
#End Region ' DeselectItemFeature
#End Region ' COMMANDS #End Region ' COMMANDS
#Region "EVENTS" #Region "EVENTS"
@@ -2828,6 +2684,18 @@ Public Class BTLPartVM
Next Next
End If End If
End Sub End Sub
Private Sub OnBTLQParamVMListChanged(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 OnBTLQParamVMPropertyChanged
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 OnBTLQParamVMPropertyChanged
Next
End If
End Sub
Private Sub OnBTLFeatureVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs) Private Sub OnBTLFeatureVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
Select Case e.PropertyName Select Case e.PropertyName
@@ -2848,6 +2716,12 @@ Public Class BTLPartVM
CalcGlobalUpdate(True) CalcGlobalUpdate(True)
End Select End Select
End Sub End Sub
Private Sub OnBTLQParamVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
Select Case e.PropertyName
Case NameOf(sender.dValue), NameOf(sender.sValue)
CalcGlobalUpdate(True)
End Select
End Sub
#End Region ' EVENTS #End Region ' EVENTS
@@ -13,8 +13,6 @@ Public Class BTLStructureVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Private DOWN_IMAGE As String = "pack://application:,,,/Resources/NewPage/down.png"
' Nome file NGE con i pezzi selezionati per effettuare UpdateBTL ' Nome file NGE con i pezzi selezionati per effettuare UpdateBTL
Friend Const UPDATEBTL_NGE As String = "UpdateBTL.nge" Friend Const UPDATEBTL_NGE As String = "UpdateBTL.nge"
@@ -60,6 +58,64 @@ Public Class BTLStructureVM
m_bOnlySelectItem = value m_bOnlySelectItem = value
End Set End Set
End Property End Property
'Private m_PrevSelectionType As SelectionTypes = SelectionTypes.NULL
'Friend ReadOnly Property PrevSelectionType As SelectionTypes
' Get
' Return m_PrevSelectionType
' End Get
'End Property
'Private m_SelectionType As SelectionTypes = SelectionTypes.NULL
'Friend ReadOnly Property SelectionType As SelectionTypes
' Get
' Return m_SelectionType
' End Get
'End Property
'Friend Sub SetSelectionType(value As SelectionTypes)
' If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE And Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP Then
' ' resetto gruppo di lavorazione corrente
' EgtResetCurrMachGroup()
' End If
' If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
' ' rimuovo selezione da pezzo in MachGroup
' If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup) Then
' If Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then
' Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart = Nothing
' End If
' End If
' End If
' m_PrevSelectionType = m_SelectionType
' If value = m_SelectionType And (Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART Or Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PARTLIST) Then
' For Each BTLPart In m_BTLPartVMList
' BTLPart.SetOpenFeatureList(False)
' Next
' Return
' End If
' m_SelectionType = value
' Select Case m_SelectionType
' Case SelectionTypes.SELECT_
' ' verifico reset mark su tutti i pezzi
' For Each BTLPart In m_BTLPartVMList
' EgtResetMark(BTLPart.nPartId)
' Next
' Case SelectionTypes.HIGHLIGHT
' If m_PrevSelectionType = SelectionTypes.SELECT_ Then
' EgtBeamShowFacesName(False)
' EgtBeamShowLoadingSide(False, False)
' End If
' If Not IsNothing(m_SelBTLPart) Then
' m_SelBTLPart = Nothing
' NotifyPropertyChanged(NameOf(SelBTLPart))
' End If
' ' mostro pezzi selezionati
' Map.refProjectVM.BTLStructureVM.ShowAll(False)
' ' se attivata opzione, li assemblo
' 'Map.refProjectVM.BTLStructureVM.ShowBuilding(If(Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE, Map.refShowBeamPanelVM.ShowBuilding_IsChecked, False), False)
' End Select
' ' aggiornamento grafica
' If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.PartShowAllChanged()
' If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.PartShowAllChanged()
' If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
'End Sub
Private m_SelBTLParts As New PartsObservableCollection(Of BTLPartVM) Private m_SelBTLParts As New PartsObservableCollection(Of BTLPartVM)
Public ReadOnly Property SelBTLParts As PartsObservableCollection(Of BTLPartVM) Public ReadOnly Property SelBTLParts As PartsObservableCollection(Of BTLPartVM)
@@ -112,9 +168,9 @@ Public Class BTLStructureVM
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
ShowBuilding(False, False) ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False) Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetSceneShowBuldingVisibility(False) Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
Map.refProjectVM.SetManagerTabVisibility(True) Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True) If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
End If End If
SceneSelPartSelection() SceneSelPartSelection()
' seleziono pezzo in Db geometrico ' seleziono pezzo in Db geometrico
@@ -123,102 +179,8 @@ Public Class BTLStructureVM
Dim bLoadingSideShow As Boolean = (nPROJTYPE = BWType.BEAM) Dim bLoadingSideShow As Boolean = (nPROJTYPE = BWType.BEAM)
Dim bLeftToRight As Boolean = Not (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE) Dim bLeftToRight As Boolean = Not (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE)
EgtBeamShowLoadingSide(bLoadingSideShow, bLeftToRight) EgtBeamShowLoadingSide(bLoadingSideShow, bLeftToRight)
' trovo ed evidenzio MachGroup e Duplo di questo pezzo ' imposto tipo di grid selezionata
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.PART)
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
Dim bFound As Boolean = False
For Each Part As PartVM In Machgroup.PartVMList
If EgtDuploGetOriginal(Part.nPartId) = BtlPart.nPartId Then
Part.SetSearchFound()
bFound = True
Else
Part.ResetSearchFound()
End If
Next
If bFound Then
Machgroup.SetSearchFound()
Else
Machgroup.ResetSearchFound()
End If
Next
End If
End If
' seleziono la prima feature
If Not IsNothing(BtlPart) AndAlso Not IsNothing(BtlPart.BTLFeatureVMList) AndAlso BtlPart.BTLFeatureVMList.Count > 0 Then SelBTLPart.SelBTLFeatureVM = BtlPart.BTLFeatureVMList(0)
' Mostro le strategie forzate
Dim bValue As Boolean = False
Dim bValueForced As Boolean = False
For Each FeatureParam As BTLFeatureVM In SelBTLPart.BTLFeatureVMList
bValue = False
EgtGetInfo(FeatureParam.nFeatureId, ConstBeam.STRATEGY & FeatureParam.nFeatureId & "_FORCED", bValue)
If bValue Then
SelBTLPart.SetStrategyModify_Visibility(True)
FeatureParam.SetbStrategy_Visibility(True)
End If
For Each StrategySetupParam As StrategySetup In Map.refStrategyManagerVM.StrategySetupList
For Each StrategyFeatureParam As StrategyFeature In StrategySetupParam.StrategyFeatureList
For Each TopologyParam As Topology In StrategyFeatureParam.TopologyList
For Each StrategyParam As Strategy In TopologyParam.StrategyList
For Each Param As StrategyParameter In StrategyParam.ParameterList
bValueForced = False
EgtGetInfo(FeatureParam.nFeatureId, StrategyParam.sStrategyId & "_" & Param.sNameNge & "_FORCED", bValueForced)
If bValueForced Then FeatureParam.SetbStrategy_Visibility(True)
Next
Next
Next
Next
Next
Next
' aggiorno stato selezionato tutto
Map.refShowBeamPanelVM.bShowAll = False
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
EgtZoom(ZM.ALL)
Map.refProdManagerVM.SetBtlImage(DOWN_IMAGE)
Map.refProdManagerVM.SetOpenImage(DOWN_IMAGE)
Map.refProdManagerVM.SetSaveImage(DOWN_IMAGE)
NotifyPropertyChanged(NameOf(SelBTLPart))
If Not bIsReselect AndAlso m_SelBTLParts.Count = 1 Then BtlPart.SetOpenFeatureList(True)
End Sub
Private Sub DeselectBTLPart(BtlPart As BTLPartVM)
' se necessario tolgo solido dal precedentemente selezionato
Configuration.DeselectSolid(BtlPart.nPartId, True)
If m_SelBTLPart Is BtlPart Then
EgtBeamShowFacesName(False)
EgtBeamShowLoadingSide(False, False)
m_SelBTLPart = Nothing
NotifyPropertyChanged(NameOf(SelBTLPart))
End If
' disabilito eventuale feature selezionata
If Not IsNothing(BtlPart.m_SelBTLFeatureVM) Then
BtlPart.SelBTLFeatureVM = Nothing
End If
EgtDraw()
If m_SelBTLParts.Count = 1 Then
m_SelBTLParts(0).SetOpenFeatureList(True)
End If
If BtlPart.bOpenFeatureList Then
BtlPart.SetOpenFeatureList(False)
End If
End Sub
Public Sub SelectBTLPartScene(BtlPart As BTLPartVM, Optional bIsReselect As Boolean = False)
m_SelBTLPart = BtlPart
If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP Then
' resetto gruppo di lavorazione corrente
EgtResetCurrMachGroup()
End If
If Not IsNothing(BtlPart) Then
' gestisco selezione pezzo
EgtBeamShowFacesName(False)
EgtBeamShowLoadingSide(False, False)
Map.refProjectVM.MacroFeature_IsEnabled = True
SceneSelPartSelection()
' seleziono pezzo in Db geometrico
EgtBeamSetPart(BtlPart.nPartId)
EgtBeamShowFacesName(True)
Dim bLoadingSideShow As Boolean = (nPROJTYPE = BWType.BEAM)
Dim bLeftToRight As Boolean = Not (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE)
EgtBeamShowLoadingSide(bLoadingSideShow, bLeftToRight)
' trovo ed evidenzio MachGroup e Duplo di questo pezzo ' trovo ed evidenzio MachGroup e Duplo di questo pezzo
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
Dim MachGroupList As New List(Of MyMachGroupVM) Dim MachGroupList As New List(Of MyMachGroupVM)
@@ -241,11 +203,36 @@ Public Class BTLStructureVM
End If End If
End If End If
' seleziono la prima feature ' seleziono la prima feature
If Not IsNothing(BtlPart) AndAlso Not IsNothing(BtlPart.BTLFeatureVMList) AndAlso BtlPart.BTLFeatureVMList.Count > 0 Then SelBTLPart.SetSelFeature(SelBTLPart.SelBTLFeatureVM) If Not IsNothing(BtlPart) AndAlso Not IsNothing(BtlPart.BTLFeatureVMList) AndAlso BtlPart.BTLFeatureVMList.Count > 0 Then SelBTLPart.SelBTLFeatureVM = BtlPart.BTLFeatureVMList(0)
' aggiorno stato selezionato tutto
Map.refShowBeamPanelVM.bShowAll = False
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False) Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
NotifyPropertyChanged(NameOf(SelBTLPart)) NotifyPropertyChanged(NameOf(SelBTLPart))
If Not bIsReselect AndAlso m_SelBTLParts.Count = 1 Then BtlPart.SetOpenFeatureList(True) If Not bIsReselect AndAlso m_SelBTLParts.Count = 1 Then
BtlPart.SetOpenFeatureList(True)
End If
End Sub
Private Sub DeselectBTLPart(BtlPart As BTLPartVM)
' se necessario tolgo solido dal precedentemente selezionato
Configuration.DeselectSolid(BtlPart.nPartId, True)
If m_SelBTLPart Is BtlPart Then
EgtBeamShowFacesName(False)
EgtBeamShowLoadingSide(False, False)
m_SelBTLPart = Nothing
NotifyPropertyChanged(NameOf(SelBTLPart))
End If
' disabilito eventuale feature selezionata
If Not IsNothing(BtlPart.m_SelBTLFeatureVM) Then
BtlPart.SelBTLFeatureVM = Nothing
End If
EgtDraw()
If m_SelBTLParts.Count = 1 Then
m_SelBTLParts(0).SetOpenFeatureList(True)
End If
If BtlPart.bOpenFeatureList Then
BtlPart.SetOpenFeatureList(False)
End If
End Sub End Sub
Private m_SelBTLPart As BTLPartVM = Nothing Private m_SelBTLPart As BTLPartVM = Nothing
@@ -496,7 +483,7 @@ Public Class BTLStructureVM
Public ReadOnly Property nPROJTYPE As BWType Public ReadOnly Property nPROJTYPE As BWType
Get Get
Select Case Map.refMainMenuVM.SelPage Select Case Map.refMainMenuVM.SelPage
Case Pages.OPTIMIZERPAGE Case Pages.ONLYPRODPAGE
Return Map.refProdManagerVM.nProdType Return Map.refProdManagerVM.nProdType
Case Else Case Else
Return BWType.NULL Return BWType.NULL
@@ -835,7 +822,7 @@ Public Class BTLStructureVM
Public ReadOnly Property Data_ToolTip As String Public ReadOnly Property Data_ToolTip As String
Get Get
Return EgtMsg(61898) Return EgtMsg(61897)
End Get End Get
End Property End Property
@@ -873,19 +860,6 @@ Public Class BTLStructureVM
If BTLStructureM.nAsseBaseId = GDB_ID.NULL Then If BTLStructureM.nAsseBaseId = GDB_ID.NULL Then
Map.refShowBeamPanelVM.SetShowBuilding(False) Map.refShowBeamPanelVM.SetShowBuilding(False)
End If End If
If Not IsNothing(Map.refProdManagerVM.BTLDataWnd) Then
Dim bValue As Boolean = False
Dim bValueForced As Boolean = False
For Each BTLPart As BTLPartVM In m_BTLPartVMList
For Each GeneralParameter As ProjectParameters In Map.refProdManagerVM.BTLDataWnd.GeneralParametersList
bValue = False
bValueForced = False
EgtGetInfo(m_BTLStructureM.nBTLInfoId, GeneralParameter.sNameNge & "_FORCED", bValue)
EgtGetInfo(BTLPart.nPartId, GeneralParameter.sNameNge & "_FORCED", bValueForced)
If bValueForced Then BTLPart.SetStrategyModify_Visibility(True)
Next
Next
End If
End Sub End Sub
#End Region ' Constructor #End Region ' Constructor
@@ -1172,7 +1146,6 @@ Public Class BTLStructureVM
End Function End Function
Friend Sub UpdateSection(NewPartSection As SectionXMaterial, OldPartSection As SectionXMaterial) Friend Sub UpdateSection(NewPartSection As SectionXMaterial, OldPartSection As SectionXMaterial)
Dim tmpSectionList As New List(Of SectionXMaterial)
If IsNothing(BTLPartVMList) Then Return If IsNothing(BTLPartVMList) Then Return
' verifico se era unico con vecchia sezione ' verifico se era unico con vecchia sezione
If Not m_BTLPartVMList.Any(Function(x) x.Section = OldPartSection) Then If Not m_BTLPartVMList.Any(Function(x) x.Section = OldPartSection) Then
@@ -1184,13 +1157,8 @@ Public Class BTLStructureVM
End If End If
' verifico se esiste già nuova sezione ' verifico se esiste già nuova sezione
If Not m_SectionList.Any(Function(x) x = NewPartSection) Then If Not m_SectionList.Any(Function(x) x = NewPartSection) Then
tmpSectionList.Add(NewPartSection) m_SectionList.Add(NewPartSection)
End If End If
Application.Current.Dispatcher.Invoke(Sub()
For Each SectionItem As SectionXMaterial In tmpSectionList
m_SectionList.Add(SectionItem)
Next
End Sub)
End Sub End Sub
' funzione che aggiorna totale tempi a fine calcolo ' funzione che aggiorna totale tempi a fine calcolo
@@ -1272,7 +1240,7 @@ Public Class BTLStructureVM
End Property End Property
Friend Sub Data(nProjId As Integer) Friend Sub Data(nProjId As Integer)
Dim BTLDataWnd As New BTLDataWndV(Application.Current.MainWindow, New BTLDataWndVM()) Dim BTLDataWnd As New BTLDataWndV(Application.Current.MainWindow, New BTLDataWndVM(nProjId))
BTLDataWnd.ShowDialog() BTLDataWnd.ShowDialog()
End Sub End Sub
@@ -1326,8 +1294,8 @@ Public Class BTLStructureVM
Map.refProjectVM.BTLStructureVM.SectionList.Add(NewPartVM.Section) Map.refProjectVM.BTLStructureVM.SectionList.Add(NewPartVM.Section)
End If End If
End If End If
If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then Map.refProjectVM.UpdatePart(nNewPartId)
End If End If
End Sub End Sub
#End Region ' AddPart #End Region ' AddPart
@@ -1347,13 +1315,13 @@ Public Class BTLStructureVM
If IsNothing(CurrProd) Then Return If IsNothing(CurrProd) Then Return
' verifico se progetto modificato, e chiedo se salvare ' verifico se progetto modificato, e chiedo se salvare
If CurrProd.bIsNew Or EgtGetModified() OrElse Map.refCALCPanelVM.IsMachineModified() Then If CurrProd.bIsNew Or EgtGetModified() OrElse Map.refCALCPanelVM.IsMachineModified() Then
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61877), "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) Select Case MessageBox.Show(EgtMsg(61877), "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
Map.refProdManagerVM.Save() Map.refProdManagerVM.Save()
Case MessageBoxResult.Cancel Case MessageBoxResult.Cancel
Return Return
Case Else ' No Case Else ' No
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61892), "", MessageBoxButton.OK, MessageBoxImage.Exclamation) MessageBox.Show(EgtMsg(61892), "", MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return Return
End Select End Select
End If End If
@@ -1382,14 +1350,12 @@ Public Class BTLStructureVM
If bWithDlg Then If bWithDlg Then
' apro finestra scelta file ' apro finestra scelta file
Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With { Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With {
.Title = EgtMsg(61834),
.DefaultExt = ".btl", .DefaultExt = ".btl",
.Filter = "BTL (*.btl)|*.btl" & .Filter = "BTL (*.btl)|*.btl" &
"|BTLX (*.btlx)|*.btlx", "|BTLX (*.btlx)|*.btlx",
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""), .InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
.CheckFileExists = True, .CheckFileExists = True,
.ValidateNames = True} .ValidateNames = True}
If BTLDlg.ShowDialog() Then If BTLDlg.ShowDialog() Then
sFile = BTLDlg.FileName sFile = BTLDlg.FileName
Else Else
@@ -1,13 +1,13 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="BlockedWndV" <EgtWPFLib5:EgtCustomWindow x:Class="BlockedWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding Title}" Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStartupLocation="CenterOwner" Title="{Binding Title}" WindowStartupLocation="CenterOwner"
Height="200" Width="400" Height="200" Width="400">
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -19,8 +19,9 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding Msg_Text}" Text="{Binding Msg_Text}"
Style="{StaticResource Msg_TextBlock}"/> TextAlignment="Center"
<Grid Style="{StaticResource BlockedWnd_Grid}"> Margin="40,0,40,0"/>
<Grid Grid.Row="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -28,18 +29,17 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Grid.Column="1" <Button Grid.Column="1" Content="{Binding Save_Msg}"
Content="{Binding Save_Msg}"
IsDefault="True" IsDefault="True"
Command="{Binding Save_Command}" Command="{Binding Save_Command}"
Visibility="{Binding Buttons_Visibility}" Visibility="{Binding Buttons_Visibility}"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Grid.Column="3" <Button Grid.Column="3" Content="{Binding DoNotSave_Msg}"
Content="{Binding DoNotSave_Msg}"
Command="{Binding DoNotSave_Command}" Command="{Binding DoNotSave_Command}"
Visibility="{Binding Buttons_Visibility}" Visibility="{Binding Buttons_Visibility}"
Style="{StaticResource EgtWPFLib5_Button}"/> Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid> </Grid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_BlockedWndVM As BlockedWndVM Private WithEvents m_BlockedWndVM As BlockedWndVM
Sub New(Owner As Window, BlockedWndVM As BlockedWndVM) Sub New(Owner As Window, BlockedWndVM As BlockedWndVM)
MyBase.New(Owner)
' This call is required by the designer. ' This call is required by the designer.
InitializeComponent() InitializeComponent()
Me.DataContext = BlockedWndVM Me.DataContext = BlockedWndVM
@@ -114,6 +114,9 @@ Public Class BlockedWndVM
#Region "Save" #Region "Save"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property Save_Command As ICommand Public ReadOnly Property Save_Command As ICommand
Get Get
If m_cmdSave Is Nothing Then If m_cmdSave Is Nothing Then
@@ -123,8 +126,12 @@ Public Class BlockedWndVM
End Get End Get
End Property End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub Save() Public Sub Save()
' salvo progetto ' salvo progetto
'Map.refProdManagerVM.Save()
Map.refProdManagerVM.Save() Map.refProdManagerVM.Save()
' mando messaggio di blocco avvenuto ' mando messaggio di blocco avvenuto
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "") DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
@@ -134,6 +141,9 @@ Public Class BlockedWndVM
#Region "DoNotSave" #Region "DoNotSave"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property DoNotSave_Command As ICommand Public ReadOnly Property DoNotSave_Command As ICommand
Get Get
If m_cmdDoNotSave Is Nothing Then If m_cmdDoNotSave Is Nothing Then
@@ -143,6 +153,9 @@ Public Class BlockedWndVM
End Get End Get
End Property End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub DoNotSave() Public Sub DoNotSave()
' mando messaggio di blocco avvenuto ' mando messaggio di blocco avvenuto
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "") DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
+52 -78
View File
@@ -40,6 +40,16 @@ Public Class CALCPanelVM
End Set End Set
End Property End Property
'Private m_VerifyAll_IsEnabled As Boolean = True
'Public Property VerifyAll_IsEnabled As Boolean
' Get
' Return m_VerifyAll_IsEnabled
' End Get
' Set(value As Boolean)
' m_VerifyAll_IsEnabled = value
' End Set
'End Property
Private m_ChooseMachineBtn_Visibility As Boolean = True Private m_ChooseMachineBtn_Visibility As Boolean = True
Public Property ChooseMachineBtn_Visibility As Visibility Public Property ChooseMachineBtn_Visibility As Visibility
Get Get
@@ -95,17 +105,6 @@ Public Class CALCPanelVM
End Set End Set
End Property End Property
Private m_bCalculating As Boolean = False
Friend ReadOnly Property bCalculating As Boolean
Get
Return m_bCalculating
End Get
End Property
Friend Sub SetCalculating(value As Boolean)
m_bCalculating = value
NotifyPropertyChanged(NameOf(bCalculating))
End Sub
' Definizione comandi ' Definizione comandi
Private m_cmdChooseMachine As ICommand Private m_cmdChooseMachine As ICommand
Private m_cmdOk As ICommand Private m_cmdOk As ICommand
@@ -151,7 +150,7 @@ Public Class CALCPanelVM
Private Sub Calc_Ended(sender As Object, e As CalcEndEventArgs) Private Sub Calc_Ended(sender As Object, e As CalcEndEventArgs)
If e.End_ = CalcEndEventArgs.Results.ERROR_ OrElse e.End_ = CalcEndEventArgs.Results.NULL Then If e.End_ = CalcEndEventArgs.Results.ERROR_ OrElse e.End_ = CalcEndEventArgs.Results.NULL Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62540)) MessageBox.Show("Execution error (all processes are disabled)")
End If End If
If e.End_ = CalcEndEventArgs.Results.EDIT Then If e.End_ = CalcEndEventArgs.Results.EDIT Then
Map.refMyStatusBarVM.SetOutputMessage("Editor closed") Map.refMyStatusBarVM.SetOutputMessage("Editor closed")
@@ -162,7 +161,7 @@ Public Class CALCPanelVM
Map.refProdManagerVM.Save() Map.refProdManagerVM.Save()
End If End If
' se modalita' assemblato attiva ' se modalita' assemblato attiva
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
' lo rimonto ' lo rimonto
Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False) Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False)
End If End If
@@ -388,7 +387,6 @@ Public Class CALCPanelVM
If nProgramPage = ProjectType.PROJ Then If nProgramPage = ProjectType.PROJ Then
' aggiorno il pezzo ' aggiorno il pezzo
Dim BTLPart As BTLPartVM = GetBTLPartVMFromBTLPartId(nBarId) Dim BTLPart As BTLPartVM = GetBTLPartVMFromBTLPartId(nBarId)
BTLPart.SetIsRowEnabled(True)
BTLPart.CalcGlobalUpdate() BTLPart.CalcGlobalUpdate()
' lancio aggiornamento tempo su BTL ' lancio aggiornamento tempo su BTL
Map.refProjectVM.BTLStructureVM.CalcGlobalTime() Map.refProjectVM.BTLStructureVM.CalcGlobalTime()
@@ -397,7 +395,6 @@ Public Class CALCPanelVM
For Each Part In Machgroup.PartVMList For Each Part In Machgroup.PartVMList
Part.CalcGlobalUpdate() Part.CalcGlobalUpdate()
Next Next
Machgroup.SetIsRowEnabled(True)
Machgroup.CalcGlobalUpdate() Machgroup.CalcGlobalUpdate()
' lancio aggiornamento tempo su MachgroupPanel ' lancio aggiornamento tempo su MachgroupPanel
Map.refProjectVM.MachGroupPanelVM.CalcGlobalTime() Map.refProjectVM.MachGroupPanelVM.CalcGlobalTime()
@@ -410,6 +407,7 @@ Public Class CALCPanelVM
nLastErr = 25 nLastErr = 25
sLastMsg = "Execution Error" sLastMsg = "Execution Error"
End If End If
End Sub End Sub
Private Shared Function GetVal(sText As String, sKey As String) As Integer? Private Shared Function GetVal(sText As String, sKey As String) As Integer?
@@ -499,7 +497,7 @@ Public Class CALCPanelVM
(nMachType = 3 And Not IsNothing(Map.refProdManagerVM) AndAlso Not IsNothing(ProjectManagerVM.CurrProd)) Then (nMachType = 3 And Not IsNothing(Map.refProdManagerVM) AndAlso Not IsNothing(ProjectManagerVM.CurrProd)) Then
MachineList.Add(Machine) MachineList.Add(Machine)
' Se il nome Macchina coincide setto la macchina selezionata con la macchina associata al progetto ' Se il nome Macchina coincide setto la macchina selezionata con la macchina associata al progetto
If String.Equals(Machine.Name, sMachineName, StringComparison.OrdinalIgnoreCase) Then If Machine.Name = sMachineName Then
SelectedMachine = MachineList(MachineList.IndexOf(Machine)) SelectedMachine = MachineList(MachineList.IndexOf(Machine))
m_OrigSelectedMachine = SelectedMachine m_OrigSelectedMachine = SelectedMachine
End If End If
@@ -532,7 +530,13 @@ Public Class CALCPanelVM
m_OrigSelectedMachine = SelectedMachine m_OrigSelectedMachine = SelectedMachine
End Sub End Sub
Friend Sub Verify(ProgramPage As ProjectType, CmdType As Integer) Friend Sub PartShowAllChanged()
'NotifyPropertyChanged(NameOf(Verify_IsEnabled))
'NotifyPropertyChanged(NameOf(Simulate_IsEnabled))
'NotifyPropertyChanged(NameOf(Edit_IsEnabled))
End Sub
Friend Sub Verify(ProgramPage As ProjectType)
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
Dim ProjType As BWType = ProjectManagerVM.CurrProd.nType Dim ProjType As BWType = ProjectManagerVM.CurrProd.nType
Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing
@@ -548,14 +552,14 @@ Public Class CALCPanelVM
End If End If
Else Else
Dim ExecThread As New Thread(Sub() Dim ExecThread As New Thread(Sub()
VerifyWithEngine(ProgramPage, CmdType) VerifyWithEngine(ProgramPage)
End Sub) End Sub)
ExecThread.Start() ExecThread.Start()
End If End If
End Sub End Sub
Private Sub VerifyProjWithEngine(CurrPart As BTLPartVM, CmdType As Integer) Private Sub VerifyProjWithEngine(CurrPart As BTLPartVM)
If Not CurrPart.bDO Then Return If Not CurrPart.bDO Then Return
Dim Args As New Dictionary(Of String, String) Dim Args As New Dictionary(Of String, String)
Args.Add("BarId", CurrPart.nPartId) Args.Add("BarId", CurrPart.nPartId)
@@ -574,7 +578,7 @@ Public Class CALCPanelVM
Dim sBTLPartFilePath As String = BarPath & "\" & CurrPart.nPDN.ToString() & ".ori.bwe" Dim sBTLPartFilePath As String = BarPath & "\" & CurrPart.nPDN.ToString() & ".ori.bwe"
If File.Exists(sBTLPartFilePath) Then File.Delete(sBTLPartFilePath) If File.Exists(sBTLPartFilePath) Then File.Delete(sBTLPartFilePath)
End If End If
nCmdType = CmdType nCmdType = CalcIntegration.CmdTypes.CHECKNOSIM
End Select End Select
Args.Add("CmdType", nCmdType) Args.Add("CmdType", nCmdType)
Dim ExecEnvironment As EXECENVIRONMENTS = EXECENVIRONMENTS.NULL Dim ExecEnvironment As EXECENVIRONMENTS = EXECENVIRONMENTS.NULL
@@ -584,23 +588,11 @@ Public Class CALCPanelVM
Case BWType.WALL Case BWType.WALL
ExecEnvironment = EXECENVIRONMENTS.WALL ExecEnvironment = EXECENVIRONMENTS.WALL
End Select End Select
' Imposto contesto scena principale
Dim CurrContext As Integer = EgtGetCurrentContext()
Dim MainSceneContext As Integer = Map.refSceneHostVM.MainScene.GetCtx()
If CurrContext <> MainSceneContext Then
EgtSetCurrentContext(MainSceneContext)
End If
Dim Request As New QuestionDTO(1, ExecEnvironment, Args) Dim Request As New QuestionDTO(1, ExecEnvironment, Args)
Request.Args("BarPath") = CreateNewProjectFromPart(CurrPart.nPartId, BarPath) Request.Args("BarPath") = CreateNewProjectFromPart(CurrPart.nPartId, BarPath)
EgtSetCurrentContext(CurrContext)
EgtOutLog("Creato progetto " & CurrPart.nPartId) EgtOutLog("Creato progetto " & CurrPart.nPartId)
If Request.ExecEnvironment <> EXECENVIRONMENTS.NULL Then If Request.ExecEnvironment <> EXECENVIRONMENTS.NULL Then
If Not MyExecProcessManager.ExecProcessManagerList.ContainsKey(Request.ExecEnvironment) Then MyExecProcessManager.ExecProcessManagerList(Request.ExecEnvironment).ArgumentsEnqueue(Request)
EgtOutLog(EgtMsg(62588))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62588), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
Else
MyExecProcessManager.ExecProcessManagerList(Request.ExecEnvironment).ArgumentsEnqueue(Request)
End If
End If End If
End Sub End Sub
@@ -636,27 +628,15 @@ Public Class CALCPanelVM
Case BWType.WALL Case BWType.WALL
ExecEnvironment = EXECENVIRONMENTS.WALL ExecEnvironment = EXECENVIRONMENTS.WALL
End Select End Select
' Imposto contesto scena principale
Dim CurrContext As Integer = EgtGetCurrentContext()
Dim MainSceneContext As Integer = Map.refSceneHostVM.MainScene.GetCtx()
If CurrContext <> MainSceneContext Then
EgtSetCurrentContext(MainSceneContext)
End If
Dim Request As New QuestionDTO(1, ExecEnvironment, Args) Dim Request As New QuestionDTO(1, ExecEnvironment, Args)
Request.Args("BarPath") = CreateNewProjectFromMachGroup(CurrMachGroup.Id, BarPath, CurrMachGroup.nGlobalState) Request.Args("BarPath") = CreateNewProjectFromMachGroup(CurrMachGroup.Id, BarPath, CurrMachGroup.nGlobalState)
EgtSetCurrentContext(CurrContext)
EgtOutLog("Creato progetto " & CurrMachGroup.Id) EgtOutLog("Creato progetto " & CurrMachGroup.Id)
If Request.ExecEnvironment <> EXECENVIRONMENTS.NULL Then If Request.ExecEnvironment <> EXECENVIRONMENTS.NULL Then
If Not MyExecProcessManager.ExecProcessManagerList.ContainsKey(Request.ExecEnvironment) Then MyExecProcessManager.ExecProcessManagerList(Request.ExecEnvironment).ArgumentsEnqueue(Request)
EgtOutLog(EgtMsg(62588))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62588), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
Else
MyExecProcessManager.ExecProcessManagerList(Request.ExecEnvironment).ArgumentsEnqueue(Request)
End If
End If End If
End Sub End Sub
Private Sub VerifyWithEngine(ProgramPage As ProjectType, CmdType As Integer) Private Sub VerifyWithEngine(ProgramPage As ProjectType)
Dim ProjType As BWType = ProjectManagerVM.CurrProd.nType Dim ProjType As BWType = ProjectManagerVM.CurrProd.nType
' lancio calcolo ' lancio calcolo
Dim ExecEnvironment As EXECENVIRONMENTS = EXECENVIRONMENTS.NULL Dim ExecEnvironment As EXECENVIRONMENTS = EXECENVIRONMENTS.NULL
@@ -666,15 +646,9 @@ Public Class CALCPanelVM
Case BWType.WALL Case BWType.WALL
ExecEnvironment = EXECENVIRONMENTS.WALL ExecEnvironment = EXECENVIRONMENTS.WALL
End Select End Select
' Blocco scena dell'assemblato
Map.refSceneShowBuldingVM.SceneShowBulding.Enable(False)
Map.refSceneBuildingVM.SetViewPanel_IsEnable(False)
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = False
Map.refMyStatusBarVM.StartLoading(EgtMsg(62576), False)
Map.refMyStatusBarVM.MaximumValue = 1
If ProgramPage = ProjectType.PROJ Then If ProgramPage = ProjectType.PROJ Then
If Not Map.refProjectVM.BTLStructureVM.SelBTLPart.bDO Then Return If Not Map.refProjectVM.BTLStructureVM.SelBTLPart.bDO Then Return
VerifyProjWithEngine(Map.refProjectVM.BTLStructureVM.SelBTLPart, CmdType) VerifyProjWithEngine(Map.refProjectVM.BTLStructureVM.SelBTLPart)
ElseIf ProgramPage = ProjectType.PROD Then ElseIf ProgramPage = ProjectType.PROD Then
' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra ' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra
If Map.refMachGroupPanelVM.SelectedMachGroup.nProduction_State >= ItemState.Assigned Then Return If Map.refMachGroupPanelVM.SelectedMachGroup.nProduction_State >= ItemState.Assigned Then Return
@@ -765,7 +739,7 @@ Public Class CALCPanelVM
Map.refMyStatusBarVM.SetOutputMessage(sProgress) Map.refMyStatusBarVM.SetOutputMessage(sProgress)
End Sub End Sub
Friend Sub VerifyAll(ProgramPage As ProjectType, CmdType As Integer) Friend Sub VerifyAll(ProgramPage As ProjectType)
Dim ProjType As BWType = ProjectManagerVM.CurrProd.nType Dim ProjType As BWType = ProjectManagerVM.CurrProd.nType
If GetMainPrivateProfileInt(S_GENERAL, "UseCam5", 0) = 1 Then If GetMainPrivateProfileInt(S_GENERAL, "UseCam5", 0) = 1 Then
Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing
@@ -780,32 +754,34 @@ Public Class CALCPanelVM
End If End If
Else Else
Dim ExecThread As New Thread(Sub() Dim ExecThread As New Thread(Sub()
VerifyAllWithEngine(ProgramPage, CmdType) VerifyAllWithEngine(ProgramPage)
End Sub) End Sub)
ExecThread.Start() ExecThread.Start()
End If End If
End Sub End Sub
Private Sub VerifyAllWithEngine(ProgramPage As ProjectType, CmdType As Integer) Private Sub VerifyAllWithEngine(ProgramPage As ProjectType)
Dim QuestionList As New List(Of QuestionDTO) Dim QuestionList As New List(Of QuestionDTO)
' Blocco scena dell'assemblato
Map.refSceneShowBuldingVM.SceneShowBulding.Enable(False)
Map.refSceneBuildingVM.SetViewPanel_IsEnable(False)
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = False
Map.refMyStatusBarVM.StartLoading(EgtMsg(62576), False)
If ProgramPage = ProjectType.PROJ Then If ProgramPage = ProjectType.PROJ Then
Map.refMyStatusBarVM.MaximumValue = Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count
For PartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1 For PartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList(PartIndex).bDO Then Continue For If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList(PartIndex).bDO Then Continue For
VerifyProjWithEngine(Map.refProjectVM.BTLStructureVM.BTLPartVMList(PartIndex), CmdType) VerifyProjWithEngine(Map.refProjectVM.BTLStructureVM.BTLPartVMList(PartIndex))
Next Next
For PartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
Map.refProjectVM.BTLStructureVM.BTLPartVMList(PartIndex).SetIsRowEnabled(True)
Next
Map.refLeftPanelVM.SetCALCPanel_IsEnabled(True)
ElseIf ProgramPage = ProjectType.PROD Then ElseIf ProgramPage = ProjectType.PROD Then
Map.refMyStatusBarVM.MaximumValue = Map.refMachGroupPanelVM.MachGroupVMList.Count
For PartIndex = 0 To Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 For PartIndex = 0 To Map.refMachGroupPanelVM.MachGroupVMList.Count - 1
' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra ' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra
If DirectCast(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex), MyMachGroupVM).nProduction_State >= ItemState.Assigned Then Return If DirectCast(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex), MyMachGroupVM).nProduction_State >= ItemState.Assigned Then Return
VerifyProdWithEngine(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex)) VerifyProdWithEngine(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex))
Next Next
For PartIndex = 0 To Map.refMachGroupPanelVM.MachGroupVMList.Count - 1
DirectCast(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex), MyMachGroupVM).SetIsRowEnabled(True)
Next
Map.refRawPartManagerVM.SetCALCPanel_IsEnabled(True)
End If End If
End Sub End Sub
@@ -888,7 +864,7 @@ Public Class CALCPanelVM
Friend Sub ChooseMachine() Friend Sub ChooseMachine()
' rendo visibile la CmBx per la scelta e il pulsante di conferma solo se il Proj corrente non ha associato alcun Prod ' rendo visibile la CmBx per la scelta e il pulsante di conferma solo se il Proj corrente non ha associato alcun Prod
If ProjectManagerVM.CurrProd.nProjId > 0 Then If ProjectManagerVM.CurrProd.nProjId > 0 Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61929), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation) MessageBox.Show(EgtMsg(61929), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else Else
SetChooseMachine_Visibility(True) SetChooseMachine_Visibility(True)
End If End If
@@ -915,8 +891,13 @@ Public Class CALCPanelVM
' resetto i parametri errori integration ciclando su ogni Part e per ogni Part ogni Feature ' resetto i parametri errori integration ciclando su ogni Part e per ogni Part ogni Feature
Dim ProjId As Integer Dim ProjId As Integer
Dim nPartProjId As Integer Dim nPartProjId As Integer
'Dim TempList As New List(Of BTLPartM)
Dim nPartId As Integer = EgtGetFirstPart() Dim nPartId As Integer = EgtGetFirstPart()
'If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
ProjId = ProjectManagerVM.CurrProd.nProjIdList(0) ProjId = ProjectManagerVM.CurrProd.nProjIdList(0)
'Else
' ProjId = ProjectManagerVM.CurrProj.nProjId
'End If
EgtGetInfo(nPartId, BTL_PRT_PROJ, nPartProjId) EgtGetInfo(nPartId, BTL_PRT_PROJ, nPartProjId)
While nPartId <> GDB_ID.NULL While nPartId <> GDB_ID.NULL
' se devo filtrare un progetto ' se devo filtrare un progetto
@@ -949,8 +930,11 @@ Public Class CALCPanelVM
' verifico che sia una feature ' verifico che sia una feature
Dim nGRP As Integer Dim nGRP As Integer
If EgtGetInfo(nFeatureId, BTL_FTR_GRP, nGRP) AndAlso Not EgtExistsInfo(nFeatureId, BTL_FTR_MAINID) Then If EgtGetInfo(nFeatureId, BTL_FTR_GRP, nGRP) AndAlso Not EgtExistsInfo(nFeatureId, BTL_FTR_MAINID) Then
'EgtRemoveInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE, ITG_PROJ_ERR, ITG_PROD_ERR))
EgtRemoveInfo(nFeatureId, ITG_PROD_ERR) EgtRemoveInfo(nFeatureId, ITG_PROD_ERR)
'EgtRemoveInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE, ITG_PROJ_MSG, ITG_PROD_MSG))
EgtRemoveInfo(nFeatureId, ITG_PROD_MSG) EgtRemoveInfo(nFeatureId, ITG_PROD_MSG)
'EgtRemoveInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE, ITG_PROJ_ROT, ITG_PROD_ROT))
EgtRemoveInfo(nFeatureId, ITG_PROD_ROT) EgtRemoveInfo(nFeatureId, ITG_PROD_ROT)
End If End If
nFeatureId = EgtGetNext(nFeatureId) nFeatureId = EgtGetNext(nFeatureId)
@@ -959,8 +943,9 @@ Public Class CALCPanelVM
End If End If
nPartId = EgtGetNextPart(nPartId) nPartId = EgtGetNextPart(nPartId)
End While End While
' Se OnlyProdPage rimuovo MachGroup
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count > 0 Then If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count > 0 Then
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61779), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then If MessageBox.Show(EgtMsg(61779), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
For Index As Integer = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 To 0 Step -1 For Index As Integer = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 To 0 Step -1
Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Index) Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Index)
CurrMachGroup.DeleteMachGroup() CurrMachGroup.DeleteMachGroup()
@@ -969,17 +954,6 @@ Public Class CALCPanelVM
End If End If
' rigenero struttura BTL ' rigenero struttura BTL
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(ProjId)) Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(ProjId))
For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
Part.ResetCalcTotalPart()
Part.SetStrategyModify_Visibility(False)
For Each Feature As BTLFeatureVM In Part.BTLFeatureVMList
Map.refForcedStrategyPanelVM.ResetForcedStrategy(Feature.nFeatureId)
Next
Next
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
End If
Map.refMyStatusBarVM.RefreshMachName()
End Sub End Sub
#End Region ' Ok #End Region ' Ok
@@ -1,33 +1,32 @@
<StackPanel x:Class="CalcPanelV" <StackPanel x:Class="CalcPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource PartManager_StackPanel}"> Style="{StaticResource OnlyProdPartManager_StackPanel}">
<Button ToolTip="{Binding ChooseMachine_ToolTip}" <Button ToolTip="{Binding ChooseMachine_ToolTip}"
Command="{Binding ChooseMachine_Command}" Command="{Binding ChooseMachine_Command}"
IsEnabled="{Binding CALCPanel_IsEnabled}" IsEnabled="{Binding CALCPanel_IsEnabled}"
Visibility="{Binding ChooseMachineBtn_Visibility}" Visibility="{Binding ChooseMachineBtn_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}"> Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="{StaticResource ChooseMachine_Image}" <Image Source="/Resources/CALCPanel/ChooseMachine.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
<Grid Visibility="{Binding ChooseMachine_Visibility}" <Grid Margin="0,0,5,0" Visibility="{Binding ChooseMachine_Visibility}">
Style="{StaticResource CalcPanel_Grid}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!--Combobox per selezionare la macchina corrente--> <!--Combobox per selezionare la macchina corrente-->
<ComboBox ItemsSource="{Binding Path=MachineList}" <ComboBox Grid.Column="0"
ItemsSource="{Binding Path=MachineList}"
DisplayMemberPath="Name" DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}" SelectedItem="{Binding Path=SelectedMachine}"
SelectedValuePath="Name" SelectedValuePath="Name"
Style="{StaticResource CalcPanel_ComboBox}"/> Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<Button Grid.Column="1" <Button Grid.Column="1"
Content="OK" Content="OK"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
Style="{StaticResource CalcPanel_Button}"/> Style="{StaticResource ToolBarOnlyProdCalcPanel_Button}"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
@@ -1,20 +1,26 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="ChangeMaterialWndV" <EgtWPFLib5:EgtCustomWindow x:Class="ChangeMaterialWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
SizeToContent="WidthAndHeight" Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStartupLocation="CenterOwner" WindowStyle="None" ResizeMode="NoResize"
Title="ChangeMaterialWnd" SizeToContent="WidthAndHeight"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="ChangeMaterialWnd">
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource ChangeMaterialWnd_Grid}"> <Grid HorizontalAlignment="Center"
Grid.Row="0"
Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -24,28 +30,31 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding ProjMaterial_Msg}" <TextBlock Text="{Binding ProjMaterial_Msg}"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox ItemsSource="{Binding ProjMaterialList}"
ItemsSource="{Binding ProjMaterialList}" SelectedItem="{Binding SelProjMaterial}"
SelectedItem="{Binding SelProjMaterial}" Grid.Column="1"
Style="{StaticResource ProjMaterial_ComboBox}"/> Width="150"
Style="{StaticResource FeatureComboBox}"/>
</Grid> </Grid>
<Grid Grid.Row="1" <Grid HorizontalAlignment="Center"
Style="{StaticResource ChangeMaterialWnd_Grid}"> Grid.Row="1"
Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="{Binding WjMaterial_Msg}" <TextBlock Text="{Binding WjMaterial_Msg}"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox ItemsSource="{Binding WhMaterialList}"
ItemsSource="{Binding WhMaterialList}" SelectedItem="{Binding SelWhMaterial}"
SelectedItem="{Binding SelWhMaterial}" Grid.Column="1"
Style="{StaticResource ProjMaterial_ComboBox}"/> Width="150"
Style="{StaticResource FeatureComboBox}"/>
</Grid> </Grid>
<Grid Grid.Row="2" <Grid Grid.Row="2"
Style="{StaticResource AddPartWnd_Grid}"> Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -53,15 +62,15 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Grid.Column="1" <Button Content="{Binding Ok_Msg}"
Content="{Binding Ok_Msg}"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Grid.Column="1"
<Button Grid.Column="3" Style="{StaticResource EgtWPFLib5_InputButton}"/>
Content="{Binding Cancel_Msg}" <Button Content="{Binding Cancel_Msg}"
IsCancel="True" IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid> </Grid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_ChangeMaterialWndVM As ChangeMaterialWndVM Private WithEvents m_ChangeMaterialWndVM As ChangeMaterialWndVM
Sub New(Owner As Window, ChangeMaterialWndVM As ChangeMaterialWndVM) Sub New(Owner As Window, ChangeMaterialWndVM As ChangeMaterialWndVM)
MyBase.New(Owner)
' This call is required by the designer. ' This call is required by the designer.
InitializeComponent() InitializeComponent()
Me.DataContext = ChangeMaterialWndVM Me.DataContext = ChangeMaterialWndVM
@@ -129,7 +129,7 @@ Public Class ChangeMaterialWndVM
Not IsNothing(m_SelWhMaterial) AndAlso m_SelWhMaterial <> "" Then Not IsNothing(m_SelWhMaterial) AndAlso m_SelWhMaterial <> "" Then
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
Else Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61858), EgtMsg(30007)) MessageBox.Show(EgtMsg(61858), EgtMsg(30007))
End If End If
End Sub End Sub
@@ -1,15 +1,18 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="ChangeParameterWndV" <EgtWPFLib5:EgtCustomWindow x:Class="ChangeParameterWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core" Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
SizeToContent="Height" WindowStyle="None" ResizeMode="NoResize"
WindowStartupLocation="CenterOwner" SizeToContent="Height"
Width="300" Width="300"
Title="ChangeParameterWnd" WindowStartupLocation="CenterOwner"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="ChangeParameterWnd">
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/> <ColumnDefinition Width="2*"/>
@@ -27,52 +30,49 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="Process" <TextBlock Text="Process"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding PRCList}" ItemsSource="{Binding PRCList}"
SelectedItem="{Binding SelPRC}" SelectedItem="{Binding SelPRC}"
DisplayMemberPath="ghDesc" DisplayMemberPath="ghDesc"
Style="{StaticResource PRCList_ComboBox}"/> HorizontalAlignment="Stretch"
Style="{StaticResource FeatureComboBox}"/>
<TextBlock Grid.Row="2" <TextBlock Grid.Row="2"
Text="Parameter" Text="Parameter"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<ComboBox Grid.Row="2" <ComboBox Grid.Row="2" Grid.Column="1"
Grid.Column="1"
ItemsSource="{Binding ParamList}" ItemsSource="{Binding ParamList}"
SelectedItem="{Binding SelParam}" SelectedItem="{Binding SelParam}"
DisplayMemberPath="sNameAndDescription" DisplayMemberPath="sNameAndDescription"
Style="{StaticResource PRCList_ComboBox}"/> HorizontalAlignment="Stretch"
Style="{StaticResource FeatureComboBox}"/>
<TextBlock Grid.Row="4" <TextBlock Grid.Row="4"
Text="Actual value" Text="Actual value"
Style="{StaticResource Option_TextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="4" <EgtWPFLib5:EgtTextBox Grid.Row="4" Grid.Column="1"
Grid.Column="1"
Text="{Binding SelParam.sActualValue}" Text="{Binding SelParam.sActualValue}"
Visibility="{Binding SelParam.IsTextBox_Visibility}"/> Visibility="{Binding SelParam.IsTextBox_Visibility}"/>
<CheckBox Grid.Row="4" <CheckBox Grid.Row="4" Grid.Column="1"
Grid.Column="1"
IsChecked="{Binding SelParam.bActualValue}" IsChecked="{Binding SelParam.bActualValue}"
Visibility="{Binding SelParam.IsCheckBox_Visibility}" HorizontalAlignment="Center"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/> VerticalAlignment="Center"
Visibility="{Binding SelParam.IsCheckBox_Visibility}"/>
<TextBlock Grid.Row="6" <TextBlock Grid.Row="6" Text="New Value"
Text="New Value" Style="{StaticResource OptionTextBlock}"/>
Style="{StaticResource Option_TextBlock}"/> <EgtWPFLib5:EgtTextBox Grid.Row="6" Grid.Column="1"
<EgtWPFLib5:EgtTextBox Grid.Row="6"
Grid.Column="1"
Text="{Binding SelParam.sNewValue}" Text="{Binding SelParam.sNewValue}"
Visibility="{Binding SelParam.IsTextBox_Visibility}"/> Visibility="{Binding SelParam.IsTextBox_Visibility}"/>
<CheckBox Grid.Row="6" <CheckBox Grid.Row="6" Grid.Column="1"
Grid.Column="1"
IsChecked="{Binding SelParam.bNewValue}" IsChecked="{Binding SelParam.bNewValue}"
Visibility="{Binding SelParam.IsCheckBox_Visibility}" HorizontalAlignment="Center"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/> VerticalAlignment="Center"
Visibility="{Binding SelParam.IsCheckBox_Visibility}"/>
<Grid Grid.Row="8" <Grid Grid.Row="8" Grid.ColumnSpan="2"
Grid.ColumnSpan="2" Margin="0,0,0,5">
Style="{StaticResource AddPartWnd_Grid}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -80,15 +80,15 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Grid.Column="1" <Button Content="Ok"
Content="Ok"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Grid.Column="1"
<Button Grid.Column="3" Style="{StaticResource EgtWPFLib5_InputButton}"/>
Content="Cancel" <Button Content="Cancel"
IsCancel="True" IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid> </Grid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_ChangeParameterWndVM As ChangeParameterWndVM Private WithEvents m_ChangeParameterWndVM As ChangeParameterWndVM
Sub New(Owner As Window, ChangeParameterWndVM As ChangeParameterWndVM) Sub New(Owner As Window, ChangeParameterWndVM As ChangeParameterWndVM)
MyBase.New(Owner)
' This call is required by the designer. ' This call is required by the designer.
InitializeComponent() InitializeComponent()
Me.DataContext = ChangeParameterWndVM Me.DataContext = ChangeParameterWndVM
@@ -108,7 +108,7 @@ Public Class ChangeParameterWndVM
Not IsNothing(m_SelParam) AndAlso m_SelParam.sName <> "" Then Not IsNothing(m_SelParam) AndAlso m_SelParam.sName <> "" Then
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
Else Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61858), EgtMsg(30007)) MessageBox.Show(EgtMsg(61858), EgtMsg(30007))
End If End If
End Sub End Sub
@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer" xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{DynamicResource ConfigurationPageVM}"> DataContext="{StaticResource ConfigurationPageVM}">
<OPTIMIZER:MachinePanelV DataContext="{Binding MachinePanelVM}"/> <OPTIMIZER:MachinePanelV DataContext="{Binding MachinePanelVM}"/>
@@ -1,10 +1,10 @@
Imports System.Collections.ObjectModel Imports System.Collections.ObjectModel
Imports System.IO Imports System.IO
Imports System.IO.Compression
Imports System.Reflection
Imports EgtBEAMWALL.Core
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports EgtBEAMWALL.Core
Imports MS.Internal
Imports Ionic.Zip
Public Class ConfigurationPageVM Public Class ConfigurationPageVM
Inherits VMBase Inherits VMBase
@@ -17,6 +17,16 @@ Public Class ConfigurationPageVM
PDFEDITOR = 2 PDFEDITOR = 2
End Enum End Enum
Private m_QParametersModified As Boolean = False
Friend ReadOnly Property QParametersModified As Boolean
Get
Return m_QParametersModified
End Get
End Property
Friend Sub ResetQParametersModified()
m_QParametersModified = False
End Sub
Private m_SelConfigSubPage As ConfigSubPages = ConfigSubPages.GENERAL Private m_SelConfigSubPage As ConfigSubPages = ConfigSubPages.GENERAL
Public Property SelConfigSubPage As Integer Public Property SelConfigSubPage As Integer
Get Get
@@ -27,21 +37,21 @@ Public Class ConfigurationPageVM
If m_SelConfigSubPage = ConfigSubPages.GENERAL Then If m_SelConfigSubPage = ConfigSubPages.GENERAL Then
' Controllo se il file CustomConfig Json è stato modificato ' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson() If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetGeneral_Visibility(True) SetGeneral_Visibility(Visibility.Visible)
SetStrategyManager_Visibility(False) SetStrategyManager_Visibility(Visibility.Collapsed)
SetPDFEditor_Visibility(False) SetPDFEditor_Visibility(Visibility.Collapsed)
ElseIf m_SelConfigSubPage = ConfigSubPages.MACHINE Then ElseIf m_SelConfigSubPage = ConfigSubPages.MACHINE Then
' Controllo se il file CustomConfig Json è stato modificato ' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson() If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetGeneral_Visibility(False) SetGeneral_Visibility(Visibility.Collapsed)
SetStrategyManager_Visibility(False) SetStrategyManager_Visibility(Visibility.Collapsed)
SetPDFEditor_Visibility(False) SetPDFEditor_Visibility(Visibility.Collapsed)
ElseIf m_SelConfigSubPage = ConfigSubPages.PDFEDITOR Then ElseIf m_SelConfigSubPage = ConfigSubPages.PDFEDITOR Then
' Controllo se il file CustomConfig Json è stato modificato ' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson() If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetPDFEditor_Visibility(True) SetPDFEditor_Visibility(Visibility.Visible)
SetGeneral_Visibility(False) SetGeneral_Visibility(Visibility.Collapsed)
SetStrategyManager_Visibility(False) SetStrategyManager_Visibility(Visibility.Collapsed)
End If End If
End Set End Set
End Property End Property
@@ -204,8 +214,8 @@ Public Class ConfigurationPageVM
Return m_bGeneral_Visibility Return m_bGeneral_Visibility
End Get End Get
End Property End Property
Friend Sub SetGeneral_Visibility(value As Boolean) Friend Sub SetGeneral_Visibility(value As Visibility)
m_bGeneral_Visibility = If(value, Visibility.Visible, Visibility.Collapsed) m_bGeneral_Visibility = value
NotifyPropertyChanged(NameOf(General_Visibility)) NotifyPropertyChanged(NameOf(General_Visibility))
End Sub End Sub
@@ -215,8 +225,8 @@ Public Class ConfigurationPageVM
Return m_bStrategyManager_Visibility Return m_bStrategyManager_Visibility
End Get End Get
End Property End Property
Friend Sub SetStrategyManager_Visibility(value As Boolean) Friend Sub SetStrategyManager_Visibility(value As Visibility)
m_bStrategyManager_Visibility = If(value, Visibility.Visible, Visibility.Collapsed) m_bStrategyManager_Visibility = value
NotifyPropertyChanged(NameOf(StrategyManager_Visibility)) NotifyPropertyChanged(NameOf(StrategyManager_Visibility))
End Sub End Sub
@@ -226,8 +236,8 @@ Public Class ConfigurationPageVM
Return m_bMachine_Visibility Return m_bMachine_Visibility
End Get End Get
End Property End Property
Friend Sub SetMachine_Visibility(value As Boolean) Friend Sub SetMachine_Visibility(value As Visibility)
m_bMachine_Visibility = If(value, Visibility.Visible, Visibility.Collapsed) m_bMachine_Visibility = value
NotifyPropertyChanged(NameOf(Machine_Visibility)) NotifyPropertyChanged(NameOf(Machine_Visibility))
End Sub End Sub
@@ -237,8 +247,8 @@ Public Class ConfigurationPageVM
Return m_bPDFEditor_Visibility Return m_bPDFEditor_Visibility
End Get End Get
End Property End Property
Friend Sub SetPDFEditor_Visibility(value As Boolean) Friend Sub SetPDFEditor_Visibility(value As Visibility)
m_bPDFEditor_Visibility = If(value, Visibility.Visible, Visibility.Collapsed) m_bPDFEditor_Visibility = value
NotifyPropertyChanged(NameOf(PDFEditor_Visibility)) NotifyPropertyChanged(NameOf(PDFEditor_Visibility))
End Sub End Sub
@@ -248,8 +258,8 @@ Public Class ConfigurationPageVM
Return m_MachineParameter_Visibility Return m_MachineParameter_Visibility
End Get End Get
End Property End Property
Friend Sub SetMachineParameter_Visibility(value As Boolean) Friend Sub SetMachineParameter_Visibility(value As Visibility)
m_MachineParameter_Visibility = If(value, Visibility.Visible, Visibility.Collapsed) m_MachineParameter_Visibility = value
NotifyPropertyChanged(NameOf(MachineParameter_Visibility)) NotifyPropertyChanged(NameOf(MachineParameter_Visibility))
End Sub End Sub
@@ -264,39 +274,6 @@ Public Class ConfigurationPageVM
End Set End Set
End Property End Property
'Private ReadOnly m_ThemesDataService As New ThemesDataServiceVM()
'Private m_Themes As New ObservableCollection(Of ThemesDataServiceM)
'Public Property Themes As ObservableCollection(Of ThemesDataServiceM)
' Get
' Return m_Themes
' End Get
' Set(value As ObservableCollection(Of ThemesDataServiceM))
' If Not m_Themes.Equals(value) Then
' m_Themes = value
' End If
' End Set
'End Property
'Private m_SelectedThema As Integer = 0
'Private m_SelectedTheme As ThemesDataServiceM
'Public Property SelectedTheme As ThemesDataServiceM
' Get
' Return m_SelectedTheme
' End Get
' Set(value As ThemesDataServiceM)
' m_ThemesDataService.SetTheme(value)
' m_SelectedTheme = value
' ' salvo in file ini la scelta del tema corrente
' Dim IndexThema As Integer = Themes.IndexOf(m_SelectedTheme)
' If IndexThema < 0 Then
' IndexThema = 0
' End If
' WriteMainPrivateProfileString(S_GENERAL, K_THEMA, IndexThema.ToString())
' m_SelectedThema = IndexThema
' End Set
'End Property
' Definizione comandi ' Definizione comandi
Private m_cmdSave As ICommand Private m_cmdSave As ICommand
Private m_cmdChooseExternalBackupFolderPath As ICommand Private m_cmdChooseExternalBackupFolderPath As ICommand
@@ -523,59 +500,11 @@ Public Class ConfigurationPageVM
End Get End Get
End Property End Property
Public ReadOnly Property TemaAdvert_Msg As String
Get
Return EgtMsg(110008) ' Il nuovo tema diventerà corrente quando verrà selezionato.
End Get
End Property
Public ReadOnly Property Tema_Msg As String
Get
Return EgtMsg(110009) ' Tema
End Get
End Property
Public ReadOnly Property Import_Msg As String
Get
Return EgtMsg(63042)
End Get
End Property
Public ReadOnly Property Backup_Msg As String
Get
Return EgtMsg(63022)
End Get
End Property
Public ReadOnly Property Restore_Msg As String
Get
Return EgtMsg(63025)
End Get
End Property
Public ReadOnly Property Remainder_Msg As String
Get
Return EgtMsg(63043)
End Get
End Property
Public ReadOnly Property External_Msg As String
Get
Return EgtMsg(63044)
End Get
End Property
Public ReadOnly Property BackupRestore_Msg As String
Get
Return EgtMsg(63045)
End Get
End Property
#End Region ' Messages #End Region ' Messages
#End Region ' Fields & Properties #End Region ' Fields & Properties
#Region "CONSTRUCTOR" #Region "Constructor"
Sub New() Sub New()
' imposto riferimento in Map ' imposto riferimento in Map
@@ -614,13 +543,10 @@ Public Class ConfigurationPageVM
SelReminder = m_ReminderList.FirstOrDefault(Function(x) x.Id = nDefaultReminderFrequency) SelReminder = m_ReminderList.FirstOrDefault(Function(x) x.Id = nDefaultReminderFrequency)
Dim nExternalBackupActive As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_EXTERNALBACKUPACTIVE, 0) Dim nExternalBackupActive As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_EXTERNALBACKUPACTIVE, 0)
m_bExternalBackupActive = nExternalBackupActive > 0 m_bExternalBackupActive = nExternalBackupActive > 0
SetMachineParameter_Visibility(False) SetMachineParameter_Visibility(Visibility.Collapsed)
SetMachine_Visibility(False) SetMachine_Visibility(Visibility.Collapsed)
' Recupero flag per verificare se fare solo l'importazione del btl o anche la verifica ' Recupero flag per verificare se fare solo l'importazione del btl o anche la verifica
m_bVerifyImportBTL_IsChecked = GetMainPrivateProfileInt(S_GENERAL, K_VERIFYIMPORTBTL, 0) <> 0 m_bVerifyImportBTL_IsChecked = GetMainPrivateProfileInt(S_GENERAL, K_VERIFYIMPORTBTL, 0) <> 0
'' imposto il tema
'm_SelectedThema = GetMainPrivateProfileInt(S_GENERAL, K_THEMA, 0)
'LoadThemes()
NotifyPropertyChanged(NameOf(bExternalBackupActive)) NotifyPropertyChanged(NameOf(bExternalBackupActive))
End Sub End Sub
@@ -630,13 +556,18 @@ Public Class ConfigurationPageVM
' funzione che verifica la modifica dei valori in Configurazione e ne chiede il salvataggio ' funzione che verifica la modifica dei valori in Configurazione e ne chiede il salvataggio
Friend Sub VerifyConfigPageModification() Friend Sub VerifyConfigPageModification()
' aggiorno tutti i valori senza verificare modifiche Dim bExitFor = False
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name) Select Case m_SelConfigSubPage
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, SelMeasureUnit.ToString()) Case ConfigSubPages.GENERAL
WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5)) ' aggiorno tutti i valori senza verificare modifiche
WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5)) WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
WriteMainPrivateProfileString(S_PRINTER, K_ENABLE, If(m_bPrintLabel_IsChecked, 1, 0)) WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, SelMeasureUnit.ToString())
Map.refMyMachine.VerifyConfigPageModification() WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5))
WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5))
WriteMainPrivateProfileString(S_PRINTER, K_ENABLE, If(m_bPrintLabel_IsChecked, 1, 0))
Case ConfigSubPages.MACHINE
'Map.refMachinePanelVM.VerifyConfigPageModification()
End Select
End Sub End Sub
' funzione che verifica l'inserimento della password quando si edita un parametro Macchina ' funzione che verifica l'inserimento della password quando si edita un parametro Macchina
@@ -654,43 +585,13 @@ Public Class ConfigurationPageVM
Return False Return False
End Function End Function
'''' <summary>
'''' Seleziona il tema se presente
'''' </summary>
'''' <param name="IndexThema"></param>
'Public Sub SetThema(IndexThema As Integer)
' If m_Themes.Count > 0 Then
' m_ThemesDataService.SetTheme(m_Themes(IndexThema))
' End If
'End Sub
'''' <summary>
'''' Fuzione che carica i temi del dizionario
'''' </summary>
'Private Sub LoadThemes()
' ' Popolo la lista temi
' m_Themes.Add(New ThemesDataServiceM() With {
' .Name = "Default",
' .Path = "Themes/DefaultDictionary.xaml",
' .AssemblyName = "EgtBEAMWALL.Core"
' })
' m_Themes.Add(New ThemesDataServiceM() With {
' .Name = "Dark",
' .Path = "Themes/DarkDictionary.xaml",
' .AssemblyName = "EgtBEAMWALL.Core"
' })
' ' Seleziono elemento in ComboBox
' m_SelectedTheme = m_Themes(m_SelectedThema)
' ' Attivo il tema letto sopra
' SetThema(m_SelectedThema)
'End Sub
#End Region ' Methods #End Region ' Methods
#Region "COMMANDS" #Region "COMMANDS"
#Region "SaveCommand" #Region "SaveCommand"
Public ReadOnly Property SaveCommand As ICommand Public ReadOnly Property SaveCommand As ICommand
Get Get
If m_cmdSave Is Nothing Then If m_cmdSave Is Nothing Then
@@ -724,7 +625,7 @@ Public Class ConfigurationPageVM
.DefaultExt = ".folder", .DefaultExt = ".folder",
.OverwritePrompt = False, .OverwritePrompt = False,
.FileName = "Select this ", .FileName = "Select this ",
.Title = EgtMsg(63039)} .Title = "Backup & Restore File Path"}
If FileDialog.ShowDialog() Then If FileDialog.ShowDialog() Then
m_ExternalBackupFolderPath = Path.GetDirectoryName(FileDialog.FileName) m_ExternalBackupFolderPath = Path.GetDirectoryName(FileDialog.FileName)
WriteMainPrivateProfileString(S_BACKUPANDRESTORE, K_EXTERNALFILEPATH, m_ExternalBackupFolderPath) WriteMainPrivateProfileString(S_BACKUPANDRESTORE, K_EXTERNALFILEPATH, m_ExternalBackupFolderPath)
@@ -808,40 +709,35 @@ Public Class ConfigurationPageVM
Try Try
DataLayer.DbConfig.DataBaseDumpToFile(sBackupZipPath) DataLayer.DbConfig.DataBaseDumpToFile(sBackupZipPath)
Catch ex As Exception Catch ex As Exception
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62103), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) MessageBox.Show(EgtMsg(62103), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
bOk = False bOk = False
End Try End Try
If bOk AndAlso File.Exists(sBackupZipPath) Then If bOk AndAlso File.Exists(sBackupZipPath) Then
If bLoadingWindow Then LoadingWndHelper.UpdateLoadingWnd(ActiveIds.BACKUP, 2, EgtMsg(63024), 15, 100) ' Projects backup If bLoadingWindow Then LoadingWndHelper.UpdateLoadingWnd(ActiveIds.BACKUP, 2, EgtMsg(63024), 15, 100) ' Projects backup
' backup dei progetti correnti ' backup dei progetti correnti
Try Try
Using zipStream As FileStream = New FileStream(sBackupFolder, FileMode.Create) Using zip As New Ionic.Zip.ZipFile(sBackupFolder, Console.Out)
Using archive As ZipArchive = New ZipArchive(zipStream, ZipArchiveMode.Create) zip.AlternateEncodingUsage = ZipOption.Always
Dim dbEntry As ZipArchiveEntry = archive.CreateEntry(Path.GetFileName(sBackupZipPath), CompressionLevel.NoCompression) zip.AlternateEncoding = Text.Encoding.UTF8
Using entryStream = dbEntry.Open() zip.CompressionMethod = CompressionMethod.None
Using fileStream = File.OpenRead(sBackupZipPath) ' aggiungo Db
fileStream.CopyTo(entryStream) zip.AddItem(sBackupZipPath, "")
End Using ' aggiungo cartella progetti
End Using Dim sProjectFolder As String = Map.refMainWindowVM.MainWindowM.sDataDir & "\"
Dim sKey As String = ""
Dim sProjectFolder As String = Map.refMainWindowVM.MainWindowM.sDataDir & "\" EgtGetKeyInfo(sKey)
Dim sKey As String = "" sKey = sKey.Replace(" ", "")
EgtGetKeyInfo(sKey) Dim sUserFolder As String = ""
sKey = sKey.Replace(" ", "") If Not IsNothing(sKey) AndAlso sKey.Length > 11 Then
sUserFolder = sKey.Substring(3, 6)
Dim sUserFolder As String = "" sProjectFolder &= sUserFolder
If Not IsNothing(sKey) AndAlso sKey.Length > 11 Then End If
sUserFolder = sKey.Substring(3, 6) zip.AddItem(sProjectFolder, sUserFolder)
sProjectFolder &= sUserFolder ' salvo lo zip
End If zip.Save()
If Directory.Exists(sProjectFolder) Then
AddDirectoryToZip(archive, sProjectFolder, sUserFolder)
End If
End Using
End Using End Using
Catch ex As Exception Catch ex As Exception
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62103), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) MessageBox.Show(EgtMsg(62103), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
bOk = False bOk = False
End Try End Try
End If End If
@@ -854,7 +750,7 @@ Public Class ConfigurationPageVM
If Directory.Exists(m_ExternalBackupFolderPath) Then If Directory.Exists(m_ExternalBackupFolderPath) Then
CopyForExternalBackup(sBackupFolder, m_ExternalBackupFolderPath) CopyForExternalBackup(sBackupFolder, m_ExternalBackupFolderPath)
Else Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62104), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' External folder does not exist or is not reachable! Copy to external folder impossible! MessageBox.Show(EgtMsg(62104), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' External folder does not exist or is not reachable! Copy to external folder impossible!
End If End If
End If End If
'chiudo finestra di caricamento 'chiudo finestra di caricamento
@@ -871,21 +767,6 @@ Public Class ConfigurationPageVM
End Using End Using
End Sub End Sub
Private Sub AddDirectoryToZip(archive As ZipArchive, folderPath As String, entryRoot As String)
Dim files As String() = Directory.GetFiles(folderPath, "*.*", SearchOption.AllDirectories)
For Each file As String In files
Dim relativePath As String = entryRoot & "\" & file.Substring(folderPath.Length).TrimStart("\"c)
Dim entry As ZipArchiveEntry = archive.CreateEntry(relativePath, CompressionLevel.NoCompression)
Using entryStream = entry.Open()
Using fileStream = System.IO.File.OpenRead(file)
fileStream.CopyTo(entryStream)
End Using
End Using
Next
End Sub
#End Region ' Backup #End Region ' Backup
#Region "Restore" #Region "Restore"
@@ -901,11 +782,11 @@ Public Class ConfigurationPageVM
Public Sub Restore() Public Sub Restore()
' recupero processo del supervisore ' recupero processo del supervisore
Dim sSupervisorName As String = "Aedifica.SupervisorR32" Dim sSupervisorName As String = "EgtBEAMWALL.SupervisorR32"
Dim localProc As Process() = Process.GetProcessesByName(sSupervisorName) Dim localProc As Process() = Process.GetProcessesByName(sSupervisorName)
' verifico che sia chiuso ' verifico che sia chiuso
If localProc.Length > 0 Then If localProc.Length > 0 Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62105), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning) ' Please verify the machine is stoped and close the supervisor before proceding with the restore operation! MessageBox.Show(EgtMsg(62105), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning) ' Please verify the machine is stoped and close the supervisor before proceding with the restore operation!
Return Return
End If End If
m_bRestoreRunning = True m_bRestoreRunning = True
@@ -951,22 +832,22 @@ Public Class ConfigurationPageVM
Next Next
End If End If
If String.IsNullOrEmpty(sRestorePath) Then If String.IsNullOrEmpty(sRestorePath) Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62106), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Restore impossible! Last backup not found! MessageBox.Show(EgtMsg(62106), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Restore impossible! Last backup not found!
m_bRestoreRunning = False m_bRestoreRunning = False
Return Return
End If End If
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(62107), nYear, nMonth, nDay), EgtMsg(15002), MessageBoxButton.OKCancel, MessageBoxImage.Warning) <> MessageBoxResult.OK Then 'Are you sure you want to restore the last backup from {0}\{1}\{2}? If you proceed you will lose actual data! If MessageBox.Show(String.Format(EgtMsg(62107), nYear, nMonth, nDay), EgtMsg(15002), MessageBoxButton.OKCancel, MessageBoxImage.Warning) <> MessageBoxResult.OK Then 'Are you sure you want to restore the last backup from {0}\{1}\{2}? If you proceed you will lose actual data!
m_bRestoreRunning = False m_bRestoreRunning = False
Return Return
End If End If
Dim bDoBackup = False Dim bDoBackup = False
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62108), EgtMsg(15003), MessageBoxButton.YesNoCancel, MessageBoxImage.Information) ' Do you want to do a backup of the current project before proceding with the restore? Select Case MessageBox.Show(EgtMsg(62108), EgtMsg(15003), MessageBoxButton.YesNoCancel, MessageBoxImage.Information) ' Do you want to do a backup of the current project before proceding with the restore?
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
bDoBackup = True bDoBackup = True
Case MessageBoxResult.No Case MessageBoxResult.No
bDoBackup = False bDoBackup = False
Case MessageBoxResult.Cancel Case MessageBoxResult.Cancel
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62109), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning) MessageBox.Show(EgtMsg(62109), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
m_bRestoreRunning = False m_bRestoreRunning = False
Return Return
End Select End Select
@@ -998,12 +879,14 @@ Public Class ConfigurationPageVM
Dim bOk As Boolean = True Dim bOk As Boolean = True
' apro file zip ' apro file zip
Try Try
If Directory.Exists(sRestoreDir) Then Directory.Delete(sRestoreDir, True) Using zip As New Ionic.Zip.ZipFile(sRestorePath, Console.Out)
ZipFile.ExtractToDirectory(sRestorePath, sRestoreDir) ' estraggo file da zip
zip.ExtractAll(sRestoreDir)
End Using
Catch ex1 As Exception Catch ex1 As Exception
EgtOutLog("Error! Impossible importing Recovery file " & sRestorePath & "!") EgtOutLog("Error! Impossible importing Recovery file " & sRestorePath & "!")
EgtOutLog("Exception in zip: " & ex1.ToString()) EgtOutLog("Exception in zip: " & ex1.ToString())
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62110), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Impossible importing Recovery file! MessageBox.Show(EgtMsg(62110), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Impossible importing Recovery file!
bOk = False bOk = False
End Try End Try
Dim sBackupTempPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\DbRestore" Dim sBackupTempPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\DbRestore"
@@ -1013,7 +896,7 @@ Public Class ConfigurationPageVM
Try Try
DataLayer.DbConfig.DataBaseRestoreFromFile(sRestoreDir & "\DbBackup.zip", "", sBackupTempPath) DataLayer.DbConfig.DataBaseRestoreFromFile(sRestoreDir & "\DbBackup.zip", "", sBackupTempPath)
Catch ex As Exception Catch ex As Exception
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62111), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Restore failed! Impossible to restore the backup Database MessageBox.Show(EgtMsg(62111), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Restore failed! Impossible to restore the backup Database
bOk = False bOk = False
End Try End Try
End If End If
@@ -1035,4 +918,200 @@ Public Class ConfigurationPageVM
#End Region ' Commands #End Region ' Commands
End Class End Class
'Public Class MachParam
' Inherits VMBase
' ' table a cui appartiene il parametro
' Private m_nParentTable As Integer
' Friend ReadOnly Property nParentTable As Integer
' Get
' Return m_nParentTable
' End Get
' End Property
' ' indice del parametro
' Private m_nParamIndex As Integer
' Friend ReadOnly Property nParamIndex As Integer
' Get
' Return m_nParamIndex
' End Get
' End Property
' ' tipo della variabile
' Private m_nType As MachParamType
' Friend ReadOnly Property nType As MachParamType
' Get
' Return m_nType
' End Get
' End Property
' ' parametri da struttura
' Private m_sName As String
' Public Property sName As String
' Get
' Return m_sName
' End Get
' Set(value As String)
' m_sName = value
' End Set
' End Property
' ' parametri da geometria
' Private m_IsModifiedValue As Boolean = False
' Private m_dValue As Double
' Private m_sValue As String
' Public Property sValue As String
' Get
' Select Case nType
' Case MachParamType.DOUBLE_
' Return DoubleToString(m_dValue, 3)
' Case MachParamType.LENGTH
' Return LenToString(m_dValue, 3)
' Case Else ' stringhe
' Return m_sValue
' End Select
' Return If(nType = MachParamType.LENGTH, LenToString(m_dValue, 3), DoubleToString(m_dValue, 3))
' End Get
' Set(value As String)
' Dim dNewValue As Double
' ' verifico se valore immesso è diverso dall'originale
' If nParentTable > 0 Then
' ' trasformo valori
' Select Case nType
' Case MachParamType.DOUBLE_
' StringToDoubleAdv(value, dNewValue, True)
' m_IsModifiedValue = Math.Abs(dNewValue - m_dValue) > EPS_SMALL
' Case MachParamType.LENGTH
' StringToLenAdv(value, dNewValue, True)
' m_IsModifiedValue = Math.Abs(dNewValue - m_dValue) > EPS_SMALL
' Case Else
' m_IsModifiedValue = String.Compare(value, m_sValue) <> 0
' End Select
' End If
' ' se valore immesso è diverso e password non inserita
' If m_IsModifiedValue AndAlso Not Map.refConfigurationPageVM.bModifyMachParam Then
' Map.refConfigurationPageVM.bModifyMachParam = Map.refConfigurationPageVM.VerifyConfigPagePassword()
' If Not Map.refConfigurationPageVM.bModifyMachParam Then
' NotifyPropertyChanged(NameOf(sValue))
' m_IsModifiedValue = False
' Return
' End If
' End If
' Select Case nType
' Case MachParamType.DOUBLE_, MachParamType.LENGTH
' UpdateParamValue(dNewValue, "")
' Case Else
' UpdateParamValue(0, value)
' End Select
' If Map.refConfigurationPageVM.bModifyMachParam Then Map.refConfigurationPageVM.VerifyConfigPageModification()
' End Set
' End Property
' Public Property dValue As Double
' Get
' Return m_dValue
' End Get
' Set(value As Double)
' m_dValue = value
' NotifyPropertyChanged(NameOf(sValue))
' End Set
' End Property
' ' descrizione del parametro
' Private m_sDescription As String
' Public Property sDescription As String
' Get
' Return m_sDescription
' End Get
' Set(value As String)
' m_sDescription = value
' End Set
' End Property
' Private Sub StdInit(nParentTable As Integer, nParamIndex As Integer, Type As MachParamType, sName As String, sDescription As String)
' m_nParentTable = nParentTable
' m_nParamIndex = nParamIndex
' m_nType = Type
' m_sName = sName
' m_sDescription = MsgToString(sDescription)
' End Sub
' ' new per double e length
' Sub New(nParentTable As Integer, nParamIndex As Integer, nType As MachParamType, sParamName As String, dValue As Double, sDescription As String)
' StdInit(nParentTable, nParamIndex, nType, sParamName, sDescription)
' m_dValue = dValue 'sValue = DoubleToString(dValue, 3)
' End Sub
' ' new per stringhe
' Sub New(nParentTable As Integer, nParamIndex As Integer, nType As MachParamType, sParamName As String, sDescription As String)
' StdInit(nParentTable, nParamIndex, nType, sParamName, sDescription)
' End Sub
' ' new per parametro vuoto
' Sub New(nType As MachParamType, nParamIndex As Integer, sParamName As String)
' StdInit(Nothing, nParamIndex, nType, sParamName, "")
' End Sub
' Friend Sub UpdateParamValue(dNewValue As Double, sNewValue As String, Optional bDraw As Boolean = True)
' Select Case nType
' Case MachParamType.DOUBLE_, MachParamType.LENGTH
' m_dValue = dNewValue
' Case MachParamType.STRING_
' m_sValue = sNewValue
' End Select
' End Sub
' Public ReadOnly Property IsModified() As Boolean
' Get
' Return m_IsModifiedValue
' End Get
' End Property
' Public Sub IsModifiedReset()
' m_IsModifiedValue = False
' End Sub
'End Class
'Public Class MachTable
' Inherits VMBase
' ' nome della table
' Private m_sName As String
' Public Property sName As String
' Get
' Return m_sName
' End Get
' Set(value As String)
' m_sName = value
' End Set
' End Property
' Private m_MachParamList As New ObservableCollection(Of MachParam)
' Public Property MachParamList As ObservableCollection(Of MachParam)
' Get
' Return m_MachParamList
' End Get
' Set(value As ObservableCollection(Of MachParam))
' m_MachParamList = value
' End Set
' End Property
' Sub New(Name As String, ParamList As ObservableCollection(Of MachParam))
' sName = Name
' MachParamList = ParamList
' End Sub
'End Class
'' Tipo parametro nel file di configurazione Macchina
'Public Enum MachParamType As Integer
' DOUBLE_ = 1
' STRING_ = 2
' COMBO = 3
' LENGTH = 4
' CHECKBOX = 5
'End Enum
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core" xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer" xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{DynamicResource ConfigurationPageVM}"> DataContext="{StaticResource ConfigurationPageVM}">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -13,21 +13,19 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="6*"/> <RowDefinition Height="6*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TabControl Grid.RowSpan="2" <TabControl Grid.RowSpan="2" Grid.ColumnSpan="2"
Grid.ColumnSpan="2"
SelectedIndex="{Binding SelConfigSubPage}" SelectedIndex="{Binding SelConfigSubPage}"
Style="{StaticResource Optimizer_TabControl}"> Style="{StaticResource OnlyProd_TabControl}">
<TabItem> <TabItem>
<TabItem.Header> <TabItem.Header>
<StackPanel Style="{StaticResource ConfigurationProgram_StackPanel}"> <StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding General_Msg}" <TextBlock Text="{Binding General_Msg}"
Style="{StaticResource ConfigurationProgram_TextBlock}"/> FontSize="15"/>
<Button Command="{Binding SaveCommand}" <Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}" ToolTip="{Binding SaveToolTip}"
Visibility="{Binding General_Visibility}" Visibility="{Binding General_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}"> Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="{StaticResource Save_Image}" <Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
</StackPanel> </StackPanel>
</TabItem.Header> </TabItem.Header>
@@ -37,15 +35,14 @@
</TabItem> </TabItem>
<TabItem> <TabItem>
<TabItem.Header> <TabItem.Header>
<StackPanel Style="{StaticResource ConfigurationProgram_StackPanel}"> <StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding PDFEditor_Msg}" <TextBlock Text="{Binding PDFEditor_Msg}"
Style="{StaticResource ConfigurationProgram_TextBlock}"/> FontSize="15"/>
<Button Command="{Binding SaveCommand}" <Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}" ToolTip="{Binding SaveToolTip}"
Visibility="{Binding PDFEditor_Visibility}" Visibility="{Binding PDFEditor_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}"> Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="{StaticResource Save_Image}" <Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
</StackPanel> </StackPanel>
</TabItem.Header> </TabItem.Header>

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