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.Windows
Imports EgtUILib
Imports EgtWPFLib5
Public Class BTLFeatureM
@@ -219,6 +220,17 @@ Public Class BTLFeatureM
End Set
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"
Public ReadOnly Property Name_Msg As String
@@ -360,10 +372,20 @@ Public Class BTLFeatureM
RaiseEvent PBTLParamAdded(Me, New BTLParamAddedEventArgs(BTLparamM))
End If
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)
Return New List(Of BTLParamM)(m_PBTLParamMList)
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
Public Sub CreateFeatureParams(NewBTLFeature As BTLFeatureM)
@@ -389,11 +411,12 @@ Public Class BTLFeatureM
TempList.Add(NewBTLParam)
ParamIndex += 1
End While
NewBTLFeature.QBTLParamMList = TempList
End Sub
' funzione che legge il valore corrente del parametro
Public Function ReadFeatureParams() As Boolean
Return ReadFeatureParams(m_PBTLParamMList)
Return ReadFeatureParams(m_PBTLParamMList) And ReadFeatureParams(m_QBTLParamMList)
End Function
Private Function ReadFeatureParams(ParamList As List(Of BTLParamM)) As Boolean
Dim bToRecalc As Boolean = False
@@ -478,9 +501,13 @@ Public Class BTLFeatureM
Return True
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
Public Function SetDefaultValues() As Boolean
Return SetDefaultValues(m_PBTLParamMList)
Return SetDefaultValues(m_PBTLParamMList) And SetDefaultValues(m_QBTLParamMList)
End Function
Private Function SetDefaultValues(ParamList As List(Of Core.BTLParamM)) As Boolean
' leggo valore parametro da struttura geometrica
@@ -517,6 +544,16 @@ Public Class BTLFeatureM
vPar = vTempPar
sPar = If(String.IsNullOrEmpty(sTempPar), " ", sTempPar)
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
End Function
@@ -537,6 +574,10 @@ Public Class BTLFeatureM
frNewRef, vNewParP, sNewPar, vNewParQ, nCrvId, nCrv2Id, bUpdate)
Dim bOk As Boolean = nFeatureId <> GDB_ID.NULL
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)
SetFeatureId(nFeatureId)
' imposto modificato per copie
@@ -544,7 +585,7 @@ Public Class BTLFeatureM
bOk = True
Else
' 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,
Me.frFRAME, vPar, sPar, vParQ, nCrvId, nCrv2Id)
SetFeatureId(nFeatureId)
+2 -4
View File
@@ -958,9 +958,7 @@ Public Class BTLPartM
NewBTLPart.nState = CalcStates.OK
Case 22
NewBTLPart.nState = CalcStates.COLLISION
Case 17
NewBTLPart.nState = CalcStates.SECTION
Case 19
Case 17, 19
NewBTLPart.nState = CalcStates.WARNING
Case < 0
NewBTLPart.nState = CalcStates.INFO
@@ -1061,7 +1059,7 @@ Public Class BTLPartM
' ripristino inversione
Inversion(SelectedMachineType)
End If
If bRedraw Then EgtRedraw()
If bRedraw Then EgtDraw()
Return bOk
End Function
@@ -13,7 +13,6 @@ Public Class BTLFeatureVM
End Get
End Property
Protected m_BTLPartM As BTLPartM
Protected m_PartM As PartM
Public ReadOnly Property nFeatureId As Integer
Get
@@ -210,23 +209,6 @@ Public Class BTLFeatureVM
End Set
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"
Sub New()
@@ -1,14 +1,15 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="BeamMachiningsWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
WindowStyle="None"
Width="500" Height="450"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="False"
Title="{Binding Title}"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<EgtWPFLib5:EgtCustomWindow x:Class="BeamMachiningsWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
Title="{Binding Title}"
WindowStyle="None" ResizeMode="NoResize"
Width="500" Height="450"
IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
@@ -21,9 +22,9 @@
SelectedItem="{Binding SelMachining}"
IsSynchronizedWithCurrentItem="True"
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"
ItemsSource="{Binding TableRowList}"
@@ -40,7 +41,7 @@
AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
Style="{StaticResource Optimizer_DataGrid}">
Style="{StaticResource DataGrid_OnlyProd}">
<DataGrid.RowStyle>
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
@@ -67,14 +68,14 @@
<DataGridCheckBoxColumn x:Key="colON" Binding="{Binding OnPar, UpdateSourceTrigger=PropertyChanged}"
CellStyle="{StaticResource DataGridCheckBoxColumn_Style}">
<DataGridCheckBoxColumn.Header>
<TextBlock Text="{Binding Path=DataContext.OnHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"/>
<TextBlock Text="{Binding Path=DataContext.OnHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridCheckBoxColumn.Header>
</DataGridCheckBoxColumn>
<!--Colonna Name-->
<DataGridTemplateColumn x:Key="colNAME">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.NameHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"/>
<TextBlock Text="{Binding Path=DataContext.NameHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
@@ -95,7 +96,7 @@
<!--Colonna Style-->
<DataGridTemplateColumn x:Key="colTYPE">
<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.CellEditingTemplate>
<DataTemplate>
@@ -132,29 +133,29 @@
Command="{Binding MoveRowUp_Command}"
Grid.Column="0"
Margin="0,0,2.5,0"
Style="{StaticResource EgtWPFLib5_Button}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="\/"
Command="{Binding MoveRowDown_Command}"
Grid.Column="1"
Margin="2.5,0,2.5,0"
Style="{StaticResource EgtWPFLib5_Button}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding AddRowMsg}"
Command="{Binding AddRow_Command}"
Grid.Column="2"
Margin="2.5,0,2.5,0"
Style="{StaticResource EgtWPFLib5_Button}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding DeleteRowMsg}"
Command="{Binding DeleteRow_Command}"
Grid.Column="3"
Margin="2.5,0,2.5,0"
Style="{StaticResource EgtWPFLib5_Button}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding SaveMsg}"
Command="{Binding Save_Command}"
Grid.Column="4"
Margin="2.5,0,0,0"
Style="{StaticResource EgtWPFLib5_Button}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_BeamMachiningsWindowVM As MyBeamMachiningsWindowVM
Sub New(Owner As System.Windows.Window, BeamMachiningsWindowVM As MyBeamMachiningsWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = BeamMachiningsWindowVM
@@ -25,7 +25,6 @@ Public Module CalcIntegration
EDIT = 7
CHECKNOSIM = 8
TOPOLOGY = 9
FLIP_ROT = 10
OPENTOOLDB = 11 ' Non utilizzato
OPENMACHINIGDB = 12 ' Non utilizzato
End Enum
@@ -220,7 +219,6 @@ Public Module CalcIntegration
' se sono in simulazione
If bIsSimulation Then
Dim sOriPath As String = Path.ChangeExtension(vBar(0).sBarPath, ".ori.bwe")
If String.IsNullOrWhiteSpace(sOriPath) Then Return
' se file modificato a mano
If File.GetLastWriteTime(sOriPath) < File.GetLastWriteTime(vBar(0).sBarPath) Then
' 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
Return sMachGroupFilePath
End If
'If EgtSaveObjToFile(nMachGroupId, sMachGroupFilePath, NGE.CMPTEXT) Then
' Return sMachGroupFilePath
'End If
Return String.Empty
End Function
@@ -8,38 +8,41 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</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}"
Style="{StaticResource Warehouse_GroupBox}">
<UniformGrid Rows="2"
Style="{StaticResource General_UniformGrid}">
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}"
SelectedItem="{Binding SelectedLanguage}"
DisplayMemberPath="Name"
Style="{StaticResource General_ComboBox}"/>
<TextBlock Text="{Binding LanguageAdvert_Msg}"
Style="{StaticResource General_TextBlock}"/>
Margin="0,0,0,5"
Foreground="{StaticResource BeamWall_Corduroy}">
<UniformGrid Rows="2" Margin="3,3,3,3">
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
Margin="0,0,0,5" Style="{StaticResource OnlyProd_ComboBox}" />
<TextBlock Text="{Binding LanguageAdvert_Msg}" TextWrapping="Wrap"
TextAlignment="Center"/>
</UniformGrid>
</GroupBox>
<UniformGrid Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}">
<TextBlock Text="{Binding MMUnits_Msg}"
Style="{StaticResource MMUnits_TextBlock}"/>
Margin="0,0,0,5">
<TextBlock Text="{Binding MMUnits_Msg}" VerticalAlignment="Center" Foreground="{StaticResource BeamWall_Corduroy}"/>
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
SelectedIndex="{Binding SelMeasureUnit}"
Style="{StaticResource UnitMeasureList_ComboBox}"/>
SelectedIndex="{Binding SelMeasureUnit}" Height="25"
Margin="0,5,0,0" Style="{StaticResource OnlyProd_ComboBox}" />
</UniformGrid>
<GroupBox Header="{Binding Nesting_Msg}"
Style="{StaticResource Warehouse_GroupBox}">
Margin="0,0,0,5"
Foreground="{StaticResource BeamWall_Corduroy}">
<StackPanel>
<UniformGrid Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}">
Margin="0,0,0,5">
<TextBlock Text="{Binding SectionTime_Msg}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding SectionTime, UpdateSourceTrigger=Explicit}"/>
</UniformGrid>
<UniformGrid Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}">
Margin="0,0,0,5">
<TextBlock Grid.Row="1" Text="{Binding PartTime_Msg}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1"
@@ -48,14 +51,13 @@
</StackPanel>
</GroupBox>
<UniformGrid Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}">
<TextBlock Text="{Binding PrintLabel_Msg}"
Style="{StaticResource MMUnits_TextBlock}"/>
Margin="0,0,0,5">
<TextBlock Text="{Binding PrintLabel_Msg}" VerticalAlignment="Center" Foreground="{StaticResource BeamWall_Corduroy}"/>
<CheckBox IsChecked="{Binding bPrintLabel_IsChecked}"
Style="{StaticResource General_CheckBox}"/>
Margin="0,5,0,0"/>
</UniformGrid>
<GroupBox Header="{Binding BackupRestore_Msg}"
Style="{StaticResource Optimizer_GroupBox}">
<GroupBox Header="Backup And Restore"
Foreground="{StaticResource BeamWall_Corduroy}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@@ -63,76 +65,66 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Style="{StaticResource General_Grid}">
<Grid Margin="0,2,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<CheckBox x:Name="ExternalBackup_CheckBox"
IsChecked="{Binding bExternalBackupActive}"
Style="{StaticResource PParameters_CheckBox}"/>
VerticalAlignment="Center"/>
<TextBlock Grid.Column="1"
Text="{Binding External_Msg}"
Style="{StaticResource Ext_TextBlock}"/>
Text="External file path:"
VerticalAlignment="Center"/>
</Grid>
<Grid Grid.Row="1"
Style="{StaticResource General_Grid}">
Margin="0,2,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox Text="{Binding ExternalBackupFolderPath}"
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
Style="{StaticResource General_TextBox}"/>
Margin="0,0,2.5,0"/>
<Button Grid.Column="1"
Content="..."
Foreground="{StaticResource BeamWall_White}"
Width="20"
Height="20"
Command="{Binding ChooseExternalBackupFolderPath_Command}"
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
Style="{StaticResource General_Button}"/>
Margin="2.5,0,0,0"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Remainder_Msg}"/>
<TextBlock Text="Reminder Frequency"/>
<ComboBox Grid.Column="1"
ItemsSource="{Binding ReminderList}"
SelectedItem="{Binding SelReminder}"
Style="{StaticResource GeneralConfiguration_ComboBox}" />
Margin="0,0,0,5" Style="{StaticResource OnlyProd_ComboBox}" />
</Grid>
<StackPanel Grid.Row="3"
Style="{StaticResource PartManager_StackPanel}">
<Button Content="{Binding Backup_Msg}"
Orientation="Horizontal">
<Button Content="Backup"
Command="{Binding Backup_Command}"
Style="{StaticResource MovePartInRawPartWnd_Button}"/>
<Button Content="{Binding Restore_Msg}"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"
Margin="0,0,5,0"/>
<Button Content="Restore"
Command="{Binding Restore_Command}"
Style="{StaticResource EgtWPFLib5_Button}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</StackPanel>
</Grid>
</GroupBox>
<!--<UniformGrid Columns="2"
Style="{StaticResource GeneralConfiguration_UniformGrid}">
<TextBlock Text="{Binding Import_Msg}"
Style="{StaticResource MMUnits_TextBlock}"/>
<UniformGrid Columns="2"
Margin="0,5,0,0">
<TextBlock Text="Importa BTL con verifica" VerticalAlignment="Center" Foreground="{StaticResource BeamWall_Corduroy}"/>
<CheckBox IsChecked="{Binding bVerifyImportBTL_IsChecked}"
Style="{StaticResource General_CheckBox}"/>
Margin="0,5,0,0"/>
</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>
</Grid>
@@ -14,36 +14,30 @@
</Grid.RowDefinitions>
<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"/>
</GroupBox>
</StackPanel>
<StackPanel Grid.Row="1"
Visibility="{Binding MachineParameter_Visibility}"
Style="{StaticResource PartManager_StackPanel}">
<StackPanel Grid.Row="1" Orientation="Horizontal" Visibility="{Binding MachineParameter_Visibility}">
<ItemsControl ItemsSource="{Binding ConfigMachTableList}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel x:Name="GroupStackPanel"
Style="{StaticResource PartManager_StackPanel}"/>
<StackPanel x:Name="GroupStackPanel" Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<GroupBox Header="{Binding sName}"
Style="{StaticResource MachineParam_GroupBox}">
<ItemsControl Name="MachParamsItemsControl"
ItemsSource="{Binding MachParamList}"
Style="{StaticResource MachinePanel_ItemsControl}">
<GroupBox Header="{Binding sName}" Width="Auto" VerticalAlignment="Top" Height="Auto" Foreground="{StaticResource BeamWall_Corduroy}">
<ItemsControl Name="MachParamsItemsControl" ItemsSource="{Binding MachParamList}" Margin="0,5,0,0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Style="{StaticResource Project_WrapPanel}"/>
<WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Style="{StaticResource MachParam_Grid}">
<Grid Margin="0,0,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
@@ -51,14 +45,18 @@
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
ToolTip="{Binding sName}"
Style="{StaticResource MachinePanel_TextBlock}"/>
TextWrapping="WrapWithOverflow"
Width="150"
Style="{StaticResource MachParamTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Style="{StaticResource MachineConfiguration_TextBox}"/>
Width="60"/>
<TextBlock Grid.Column="2"
Text="{Binding sDescription}"
ToolTip="{Binding sDescription}"
Style="{StaticResource Description_TextBlock}"/>
TextWrapping="WrapWithOverflow"
Width="148"
Style="{StaticResource MachParamTextBlock}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
@@ -74,8 +72,7 @@
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding Machine_Visibility}"
Style="{StaticResource SaveMachinePanel_Button}">
<Image Source="{StaticResource Save_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</Grid>
-3
View File
@@ -309,7 +309,4 @@
' parametri modifica percorsi free contour
Public Const PATH_SIDEANGLAYER As String = "SideAngLayer"
' Strategia
Public Const AI_SETUP As String = "AISETUP"
Public Const STRATEGY As String = "STRATEGY"
End Module
@@ -1,7 +1,10 @@
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_NEWOPENPROJFILEDLG_PROD As String = "DG_NewOpenProjectFileDialog_PROD"
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_WALL As String = "DG_PartInRawPartList_WALL"
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_PARTINRAWPARTLIST_SUPERVISOR As String = "DG_PartInRawPartList_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_OPTIMIZERSTATISTICS As String = "DG_OptimizerStatistics"
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_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_MDICOMMANDS As String = "DG_MDICommands"
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 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_OPTIMIZER As String = "LeftPanel_Optimizer"
Public Const TOPPANEL_OPTIMIZER As String = "TopPanel_Optimizer"
Public Const LEFTPANEL_SUPERVISOR As String = "LeftPanel_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
+4 -9
View File
@@ -19,7 +19,7 @@ Public Module ConstGen
Public Const K_DATAROOT As String = "DataRoot"
' 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 K_LOCKID As String = "LockId"
Public Const K_KEY As String = "Key"
@@ -35,7 +35,7 @@ Public Module ConstGen
CONFIG = 3
INPUTS = 4
OUTPUTS = 5
OPTIMIZERPAGE = 6
ONLYPRODPAGE = 6
CONFIGPROGRAM = 7
End Enum
@@ -57,8 +57,8 @@ Public Module ConstGen
End Enum
' File di log generale
Public Const VWOPTGENLOG_FILE_NAME As String = "Aedifica.OptimizerLog#.txt"
Public Const SUPGENLOG_FILE_NAME As String = "Aedifica.SupervisorLog#.txt"
Public Const VWOPTGENLOG_FILE_NAME As String = "EgtBEAMWALL.OptimizerLog#.txt"
Public Const SUPGENLOG_FILE_NAME As String = "EgtBEAMWALL.SupervisorLog#.txt"
' Sottodirettorio di configurazione
Public Const CONF_DIR As String = "Config"
@@ -90,8 +90,6 @@ Public Module ConstGen
Public Const MACHINES_DFL_DIR As String = "Machines"
' Sottodirettorio di default per 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
Public Const SETUP_LUA As String = "SetUp.lua"
' Nome eseguibile per stampa
@@ -110,7 +108,4 @@ Public Module ConstGen
Public Const CUSTOMERCONFIG_FILE As String = "CustomerConfig"
' File contenente i parametri generali
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
+2 -6
View File
@@ -13,8 +13,7 @@
Public Module ConstIni
Public Const INI_FILE_NAME As String = "Aedifica.ini"
Public Const CONFIG_FILE_NAME As String = "Config.ini"
Public Const INI_FILE_NAME As String = "EgtBEAMWALL.ini"
Public Const K_NETKEY As String = "NetKey"
Public Const K_MAXCAMINST As String = "MaxCamInstances"
@@ -57,7 +56,6 @@ Public Module ConstIni
Public Const K_CALCPATH As String = "CalcPath"
Public Const K_BEAMBASEDIR As String = "BaseDir"
Public Const K_BEAMBWEEXEC As String = "BweExec"
Public Const K_FLIPROTEXEC As String = "FlipRotExec"
Public Const S_WALL As String = "Wall"
Public Const S_WALLNEW As String = "WallNew"
@@ -109,7 +107,6 @@ Public Module ConstIni
Public Const S_WAREHOUSE As String = "Warehouse"
Public Const K_TYPE As String = "Type"
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_IMAGE As String = "Image_Checked"
@@ -121,6 +118,7 @@ Public Module ConstIni
Public Const K_EXTERNALFILEPATH As String = "ExternalFilePath"
Public Const K_REMINDERFREQUENCY As String = "ReminderFrequency"
Public Const K_ONLYPROD As String = "OnlyProd"
Public Const K_MODIFYSETUP As String = "ModifySetup"
Public Const K_MACHCONFIG As String = "MachConfig"
@@ -136,6 +134,4 @@ Public Module ConstIni
Public Const K_DEFAULTCONFIG As String = "DefaultConfiguration"
Public Const K_VERIFYIMPORTBTL As String = "VerifyImportBTL"
Public Const K_THEMA As String = "Thema"
End Module
+9 -19
View File
@@ -56,9 +56,6 @@
<Reference Include="EgwProxy.LiMan, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EgwProxy.LiMan.1.0.2408.718\lib\EgwProxy.LiMan.dll</HintPath>
</Reference>
<Reference Include="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">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
@@ -119,6 +116,10 @@
<Import Include="System.Xml.Linq" />
</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="CALCPanel\CalcEditEndEventArgs.vb" />
<Compile Include="ConfigurationPage\Machine_ConfigurationPageV.xaml.vb">
@@ -182,10 +183,6 @@
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml.vb">
<DependentUpon>OpenProjectFileDialogV.xaml</DependentUpon>
</Compile>
<Compile Include="OptmizerWindow\OptimizerWindow.vb" />
<Compile Include="TitleBar\TitleBarV.xaml.vb">
<DependentUpon>TitleBarV.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\Configuration.vb" />
<Compile Include="ProjectFileVM\ProdItem.vb" />
<Compile Include="Utility\DimensionsIniFile.vb" />
@@ -257,6 +254,10 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Page Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ConfigurationPage\Machine_ConfigurationPageV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -301,23 +302,12 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</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">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</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" />
</ItemGroup>
<ItemGroup>
@@ -326,6 +316,6 @@
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>copy $(TargetPath) c:\EgtProg\Aedifica\EgtBEAMWALL.Core.dll</PostBuildEvent>
<PostBuildEvent>copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.Core.dll</PostBuildEvent>
</PropertyGroup>
</Project>
@@ -1,218 +1,268 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="EgtColorPickerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
Title="{Binding sTitle}"
WindowStartupLocation="CenterOwner"
SizeToContent="WidthAndHeight"
ShowInTaskbar="False"
Width="750" Height="450"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
<EgtWPFLib5:EgtCustomWindow x:Class="EgtColorPickerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding sTitle}"
WindowStartupLocation="CenterOwner"
SizeToContent="WidthAndHeight"
WindowStyle="None" ResizeMode="NoResize"
IsMinimizable="False" ShowInTaskbar="False"
Width="750" Height="450"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<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>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TabControl>
<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}"
<ListBox ItemsSource="{Binding CustomColors}"
SelectedItem="{Binding SelCustomColor}"
Style="{StaticResource CustomerColor_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>
<Grid Grid.Row="2"
Style="{StaticResource CurrColor_Grid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Style="{StaticResource AddColor_Grid}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Rectangle Fill="{Binding CurrColor}"
Style="{StaticResource CurrColor_Rectangle}"/>
<Button Grid.Row="1"
x:Name="SaveColor"
HorizontalAlignment="Center"
Background="Transparent"
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>
<Grid Grid.Row="2"
Margin="0,20,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Margin="0,10,5,0"
HorizontalAlignment="Left">
<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}"
Command="{Binding SaveColor_Command}"
Style="{StaticResource EgtColorPicker_TextButton}"/>
</Grid>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Red_Msg}"
Style="{StaticResource RedColor_TextBlock}"/>
<TextBox Grid.Column="1"
Style="{StaticResource LeftPanel_TextButton}"/>
</Grid>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Red_Msg}"
Margin="0,10,5,0"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
HorizontalAlignment="Right"
Margin="0,5,5,0"
IsReadOnly="False"
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource RedColor_TextBox}"/>
<TextBlock Grid.Row="1"
Style="{StaticResource ColorPicker_TextBox}"/>
<TextBlock Grid.Row="1"
Text="{Binding Green_Msg}"
Style="{StaticResource GreenColor_TextBlock}"/>
<TextBox Grid.Column="1"
Margin="5,5,5,0"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Grid.Row="1"
HorizontalAlignment="Right"
Margin="5,5,5,0"
IsReadOnly="False"
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource GreenColor_TextBox}"/>
<TextBlock Grid.Row="2"
Style="{StaticResource ColorPicker_TextBox}"/>
<TextBlock Grid.Row="2"
Text="{Binding Blu_Msg}"
Style="{StaticResource GreenColor_TextBlock}"/>
<TextBox Grid.Row="2"
Grid.Column="1"
Margin="5,5,5,0"
HorizontalAlignment="Right"
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}"
Style="{StaticResource GreenColor_TextBox}"/>
<TextBlock Grid.Row="3"
Style="{StaticResource ColorPicker_TextBox}"/>
<TextBlock Grid.Row="3"
Text="{Binding Hexadecimal_Msg}"
Style="{StaticResource GreenColor_TextBlock}"/>
<TextBox Grid.Row="3"
Grid.Column="1"
Margin="5,5,5,0"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Grid.Row="3"
HorizontalAlignment="Right"
Margin="5,5,5,0"
Text="{Binding Hexadecimal}"
Style="{StaticResource GreenColor_TextBox}"/>
</Grid>
Style="{StaticResource ColorPicker_TextBox}"/>
</Grid>
</Grid>
</Grid>
<UniformGrid Grid.Row="2"
</Grid>
<UniformGrid Grid.Row="2"
Rows="1"
Style="{StaticResource EgtColorPicker_UniformGrid}">
<Button IsDefault="True"
Margin="10,10,10,0">
<Button IsDefault="True"
Content="OK"
Command="{Binding Ok_Command}"
Style="{StaticResource EgtColorPicker_HalfRound_Button}"/>
<Button Content="Cancel"
Margin="2.5,0,2.5,0"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
Style="{StaticResource EgtColorPicker_HalfRound_Button}"/>
</UniformGrid>
Margin="2.5,0,2.5,0"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</UniformGrid>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -1,5 +1,6 @@
Imports EgtWPFLib5
Imports System.Windows
Imports System.Windows.Forms
Public Class EgtColorPickerV
@@ -7,7 +8,7 @@ Public Class EgtColorPickerV
Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM
Private Shadows DialogResult As Boolean
Private Shadows DialogResult As DialogResult
Public Property CustomColors As Integer()
Get
@@ -34,6 +35,7 @@ Public Class EgtColorPickerV
#Region "CONTRUCTORS"
Sub New(Owner As Window, EtgColorPickerVM As EgtColorPickerVM)
MyBase.New(Owner)
InitializeComponent()
Me.DataContext = EtgColorPickerVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
@@ -44,7 +46,7 @@ Public Class EgtColorPickerV
#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.Close()
End Sub
@@ -57,7 +59,7 @@ Public Class EgtColorPickerV
''' Apre una finestra EgtColorPicker
''' </summary>
''' <returns></returns>
Public Overloads Function ShowDialog() As Boolean
Public Overloads Function ShowDialog() As DialogResult
MyBase.ShowDialog()
Return Me.DialogResult
End Function
@@ -64,7 +64,7 @@ Public Class EgtDataGrid
newItems(index).InitColumn(col)
context.Columns.Add(col)
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
Next
@@ -159,7 +159,7 @@ Public Class EgtDataGrid
Me.Columns(e.NewStartingIndex).DisplayIndex = e.NewStartingIndex
End If
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
Next
End If
@@ -1,22 +1,22 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="EgtManageFileDialogV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
Title="{Binding sTitle}"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="False"
Height="650" Width="1000"
Style="{StaticResource OptimizerWindow.Dialog}">
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
<EgtWPFLib5:EgtCustomWindow x:Class="EgtManageFileDialogV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding sTitle}"
WindowStartupLocation="CenterOwner"
WindowStyle="None" ResizeMode="NoResize"
IsMinimizable="False" ShowInTaskbar="False"
Height="500" Width="800"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
@@ -24,50 +24,48 @@
</Grid.ColumnDefinitions>
<Button Command="{Binding GoBack_Command}"
Style="{StaticResource RightPanel_Button}">
<Image Source="{DynamicResource Restore_Image}"
<Image Source="\Resources\EgtDialog\Restore.png"
Style="{StaticResource Button_Image}"/>
</Button>
<TextBlock Grid.Column="1"
Margin="5"
Text="{Binding sSelPath}"
Style="{StaticResource EgtManageDialog_TextBlock}"/>
HorizontalAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
<ComboBox Grid.Column="2"
HorizontalAlignment="Right"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding ViewModeList}"
SelectedItem="{Binding SelViewMode}"
Style="{StaticResource EgtManageDialog_ComboBox}">
<ComboBox.ItemTemplate>
<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>
Margin="2.5,5,2.5,5"
Style="{StaticResource RightPanel_ComboBox}"/>
</Grid>
<Grid Grid.Row="1"
Style="{StaticResource AddRawPartWnd_Grid}">
Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="4*"/>
</Grid.ColumnDefinitions>
<TreeView x:Name="FileTree"
ItemsSource="{Binding RootList}"
Style="{StaticResource EgtManageDialog_TreeView}">
Margin="10"
FontSize="15"
BorderBrush="White">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:EgtFolder}"
ItemsSource="{Binding TreeItemList_View}">
<StackPanel Style="{StaticResource PartManager_StackPanel}">
<StackPanel Orientation="Horizontal">
<Image Source="{Binding sIconSource}"
Height="15"
Style="{StaticResource Button_Image}"/>
<TextBlock Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</StackPanel>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtItem}">
<StackPanel Style="{StaticResource PartManager_StackPanel}">
<StackPanel Orientation="Horizontal">
<Image Source="{Binding sIconSource}"
Height="15"
Style="{StaticResource Button_Image}"/>
<TextBlock Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
@@ -82,27 +80,34 @@
</TreeView.ItemContainerStyle>
</TreeView>
<TabControl Grid.Column="1"
SelectedIndex="{Binding nSelTab}"
Style="{StaticResource EgtManageDialog_TabControl}">
Background="Transparent"
BorderBrush="White"
BorderThickness="0"
SelectedIndex="{Binding nSelTab}">
<TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TabControl.ItemContainerStyle>
<TabItem Header="LISTBOX">
<ListBox Grid.Row="1"
x:Name="FileList"
<ListBox x:Name="FileList"
Grid.Row="1"
Margin="5,5,5,5"
BorderBrush="White"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
SelectedItem="{Binding ItemSelected, Mode=TwoWay}">
<ListBox.Resources>
<DataTemplate x:Key="ListTemplateView"
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<Grid Style="{StaticResource EgtManageDialog_Grid}">
<Grid Margin="5,5,5,0"
Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Height="15"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding sName}"
@@ -111,7 +116,9 @@
</DataTemplate>
<DataTemplate x:Key="TilesTemplateView"
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<Grid Style="{StaticResource EgtDirectory_Grid}">
<Grid Margin="5,5,5,0"
Height="50"
Width="250">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
@@ -120,19 +127,26 @@
Style="{StaticResource Button_Image}"/>
<UniformGrid Grid.Column="1"
Rows="3"
Style="{StaticResource EgtManageDialog_UniformGrid}">
<TextBlock Text="{Binding sName}"
Style="{StaticResource Info_TextBlock}"/>
<TextBlock Text="{Binding ghTypeItem}"
Style="{StaticResource Info_TextBlock}"/>
<TextBlock Text="{Binding sDimension}"
Style="{StaticResource Info_TextBlock}"/>
Margin="2.5,0,2.5,5">
<TextBlock TextAlignment="Left"
Text="{Binding sName}"
HorizontalAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
Text="{Binding ghTypeItem}"
HorizontalAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
Text="{Binding sDimension}"
HorizontalAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
</Grid>
</DataTemplate>
<DataTemplate x:Key="ContentTemplateView"
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<Grid Style="{StaticResource ContentTemplate_Grid}">
<Grid Margin="5,5,5,0"
Height="50">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
@@ -147,23 +161,32 @@
Style="{StaticResource Button_Image}"/>
<UniformGrid Grid.Column="1"
Rows="2"
Style="{StaticResource EgtManageDialog_UniformGrid}">
<TextBlock Text="{Binding sName}"
Style="{StaticResource Info_TextBlock}"/>
<TextBlock Text="{Binding ghTypeItem}"
Style="{StaticResource Info_TextBlock}"/>
Margin="2.5,0,2.5,5">
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding ghTypeItem}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
<UniformGrid Grid.Column="2"
Rows="2"
Style="{StaticResource EgtManageDialog_UniformGrid}">
<TextBlock Text="{Binding sLastModifyDate}"
Style="{StaticResource Info_TextBlock}"/>
<TextBlock Text="{Binding sDimension}"
Style="{StaticResource Info_TextBlock}"/>
Margin="2.5,0,2.5,5">
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding sLastModifyDate}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding sDimension}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
</Grid>
<Border Grid.Row="1"
Style="{StaticResource EgtManageDialog_Border}"/>
BorderThickness="1"
BorderBrush="LightGray"/>
</Grid>
</DataTemplate>
</ListBox.Resources>
@@ -173,13 +196,13 @@
<ContentControl.Style>
<Style TargetType="{x:Type ContentControl}">
<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}" />
</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}" />
</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}" />
</DataTrigger>
</Style.Triggers>
@@ -196,42 +219,40 @@
</ListBox.ItemContainerStyle>
<ListBox.Style>
<Style TargetType="{x:Type ListBox}">
<Setter Property="BorderBrush" Value="{StaticResource BeamWall_White}"/>
<Setter Property="IsSynchronizedWithCurrentItem" Value="True"/>
<Setter Property="Margin" Value="5"/>
<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">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<WrapPanel Style="{StaticResource Project_WrapPanel}"/>
<WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</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">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<WrapPanel Style="{StaticResource ProjectH_WrapPanel}"/>
<WrapPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</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">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Style="{StaticResource EgtManageDialog_StackPanel}"/>
<StackPanel Orientation="Vertical"
HorizontalAlignment="Stretch"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
@@ -252,13 +273,25 @@
SelectedItem="{Binding ItemSelected}"
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource Optimizer_DataGrid}">
Style="{StaticResource DataGrid_OnlyProd}">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="Background" Value="{StaticResource BeamWall_Teal}"/>
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="15"/>
<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>
<DataGridTemplateColumn Width="5*">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
HorizontalAlignment="Left"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
@@ -269,77 +302,115 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Style="{StaticResource Source_Image}"/>
Margin="2.5,0,2.5,0"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding sName}"
Style="{StaticResource NameImage_TextBlock}"/>
VerticalAlignment="Center"
Margin="2.5,0,0,0"/>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding sLastModifyDate}"
Width="2*"
ElementStyle="{StaticResource DataGrid_TextBlock}">
Width="2*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
HorizontalAlignment="Left"/>
</DataTemplate>
</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 Binding="{Binding ghTypeItem}"
Width="1*"
ElementStyle="{StaticResource DataGrid_TextBlock}">
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
HorizontalAlignment="Left"/>
</DataTemplate>
</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 Binding="{Binding sDimension}"
Width="1*"
ElementStyle="{StaticResource DataGridR_TextBlock}">
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
HorizontalAlignment="Left"/>
</DataTemplate>
</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>
</DataGrid.Columns>
<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>
</TabItem>
</TabControl>
</Grid>
<Grid Grid.Row="2"
Style="{StaticResource AddRawPartWnd_Grid}">
Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding FileName_Msg}"
Style="{StaticResource FileName_TextBlock}"/>
<TextBlock Margin="5,5,5,5"
Text="{Binding FileName_Msg}"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Margin="2.5,2.5,2.5,5"
TextAlignment="Left"
HorizontalAlignment="Stretch"
Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Style="{StaticResource SaveFileName_TextBox}"/>
Style="{StaticResource ParameterList_TextBox}"/>
<ComboBox Grid.Column="2"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding FilterList}"
SelectedItem="{Binding SelFilter, Mode=OneWayToSource}"
DisplayMemberPath="sNameExstension"
Style="{StaticResource FilterList_ComboBox}"/>
HorizontalAlignment="Right"
Margin="10,2.5,2.5,5"
Style="{StaticResource RightPanel_ComboBox}"/>
</Grid>
<UniformGrid Grid.Row="3"
Rows="1"
Style="{StaticResource Command_UniformGrid}">
Margin="2.5,0,2.5,0">
<Button IsDefault="True"
Content="OK"
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"
Command="{Binding Cancel_Command}"
Style="{StaticResource EgtManageDialogCancel_HalfRound_Button}"/>
HorizontalAlignment="Left"
Margin="2.5,0,0,0"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</UniformGrid>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -1,6 +1,6 @@
Imports System.Windows.Input
Imports EgtWPFLib5
Imports System.Windows
Imports EgtWPFLib5
Imports System.Windows.Forms
Imports System.Windows.Input
Public Class EgtManageFileDialogV
@@ -8,7 +8,7 @@ Public Class EgtManageFileDialogV
Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM
Private Shadows DialogResult As Boolean
Private Shadows DialogResult As DialogResult
''' <summary>
''' Stringa che specifica il titolo da mostrare
@@ -31,15 +31,6 @@ Public Class EgtManageFileDialogV
End Set
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
Get
Return m_EgtManageFileDialogVM.sInitialDirectory
@@ -112,31 +103,32 @@ Public Class EgtManageFileDialogV
End Set
End Property
#End Region ' Fields & Properties
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(Owner As Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
Sub New(Owner As System.Windows.Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
MyBase.New(Owner)
InitializeComponent()
Me.DataContext = EgtManageFileDialogVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_EgtManageFileDialogVM = EgtManageFileDialogVM
End Sub
#End Region ' Constructor
#End Region
#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.Close()
End Sub
#End Region ' Events
#End Region
#Region "METHODS"
Public Overloads Function ShowDialog() As Boolean
Public Overloads Function ShowDialog() As DialogResult
MyBase.ShowDialog()
Return Me.DialogResult
End Function
@@ -145,6 +137,6 @@ Public Class EgtManageFileDialogV
m_EgtManageFileDialogVM.MouseDoubleClick()
End Sub
#End Region ' Methods
#End Region ' METHODS
End Class
@@ -1,32 +1,34 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="EgtMessageBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
Title="{Binding sTitle}"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="False"
Style="{StaticResource OptimizerWindow.Dialog}">
<Grid Style="{StaticResource EgtMessageBox_Grid}">
<EgtWPFLib5:EgtCustomWindow x:Class="EgtMessageBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding sTitle}"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
WindowStyle="None" ResizeMode="NoResize"
IsMinimizable="False" ShowInTaskbar="False"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="2.5,2.5,2.5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Style="{StaticResource MessageBox_Grid}">
<Grid Margin="20,20,20,20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"/>
<Image Source="{Binding sIconSource}"
Margin="0,0,0,0"/>
<TextBlock Grid.Column="1"
Text="{Binding sMessage}"
Style="{StaticResource EgtMessageBox_TextBlock}"/>
Margin="5,0,5,0"
Style="{StaticResource DialogWindow_TextBlock}"/>
</Grid>
<ItemsControl Grid.Row="1"
ItemsSource="{Binding ButtonList}"
Style="{StaticResource EgtMessageBox_ItemsControl}">
HorizontalAlignment="Center">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1"/>
@@ -37,9 +39,11 @@
<Button IsDefault="{Binding bIsDefault}"
Content="{Binding sMessage}"
Command="{Binding Command_Command}"
Style="{StaticResource EgtColorPicker_HalfRound_Button}"/>
Margin="2.5,0,2.5,0"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -14,6 +14,7 @@ Public Class EgtMessageBoxV
#Region "CONTRUCTORS"
Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = EgtMessageBoxVM
@@ -99,7 +100,7 @@ Public Class EgtMessageBoxV
#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.Close()
End Sub
+2 -2
View File
@@ -214,7 +214,7 @@ Public Class NewMachGroupPanelVM
Dim m_MessageBoxResult As MessageBoxResult
If MachGroupVMList.Count = 1 Then
'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
Case MessageBoxResult.Yes
' cancello il gruppo corrente e ne creo uno nuovo con lo stesso nome
@@ -228,7 +228,7 @@ Public Class NewMachGroupPanelVM
End Select
Else
'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
Case MessageBoxResult.Yes
' cancello quello selezionato (ovvero il corrente)
@@ -1,5 +1,4 @@
Imports System.Threading
Imports System.Threading.Tasks
Imports System.Windows.Threading
Public Module LoadingWndHelper
+15 -9
View File
@@ -8,7 +8,7 @@
ResizeMode="NoResize" WindowStyle="None"
IsClosable="False" IsMinimizable="False"
WindowStartupLocation="Manual" ShowInTaskbar="False">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
@@ -23,27 +23,33 @@
</Grid.RowDefinitions>
<TextBlock Grid.Row="1"
Text="{Binding TotText_Msg}"
Style="{StaticResource MessageBox_TextBlock}"/>
TextAlignment="Center"/>
<TextBlock Grid.Row="2"
Text="{Binding StepText_Msg}"
Visibility="{Binding StepText_Visibility}"
Style="{StaticResource MessageBox_TextBlock}"/>
TextAlignment="Center"
Visibility="{Binding StepText_Visibility}"/>
<Grid Grid.Row="3"
Visibility="{Binding StepProgress_Visibility}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Style="{StaticResource EgtManageDialog_Grid}"/>
<Grid Height="20"/>
<ProgressBar Grid.Row="1"
Value="{Binding StepProgress_Value}"
Style="{StaticResource NestingRunningWndV_ProgressBar}"/>
Minimum="0"
Maximum="100"
Value="{Binding StepProgress_Value}"
Height="20"
Margin="40,0,40,0"/>
</Grid>
<ProgressBar Grid.Row="5"
Minimum="0"
Maximum="100"
Value="{Binding TotProgress_Value}"
Style="{StaticResource NestingRunningWndV_ProgressBar}"/>
Height="20"
Margin="40,0,40,0"/>
<TextBlock Grid.Row="7"
Text="{Binding TotProgress_Msg}"
Style="{StaticResource MessageBox_TextBlock}"/>
TextAlignment="Center"/>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -214,6 +214,7 @@ Public Class MyMachGroupPanelM
Dim DuploArray() As Integer
Dim RotArray(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()
' recupero ROT (gradi) e FLIP (0/1) per non perderli
For Duploindex = 0 To DuploArray.Length - 1
@@ -223,6 +224,8 @@ Public Class MyMachGroupPanelM
EgtGetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex))
If FlipArray(Duploindex) <> 0 Then FlipArray(Duploindex) = 180
If nBWType = BWType.WALL Then
' salvo parametri Q
QArray(Duploindex) = New Dictionary(Of String, Dictionary(Of String, String))
' ciclo sugli outline
nOutlineLayer = EgtGetFirstNameInGroup(DuploArray(Duploindex), OUTLINE)
If nOutlineLayer <> GDB_ID.NULL Then
@@ -245,10 +248,42 @@ Public Class MyMachGroupPanelM
nPRId = nGlobPRId
nGlobPRId += 1
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
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
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
Next
' aggiornamento dei Duplo
@@ -258,6 +293,50 @@ Public Class MyMachGroupPanelM
' ripristino info rot e flip
EgtSetInfo(DuploArray(Duploindex), MGR_PRT_ROT, RotArray(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
End Sub
@@ -538,7 +538,6 @@ Public MustInherit Class MyMachGroupVM
MyMachGroupM.nCALC_ROT = 0
MyMachGroupM.nCALC_FALL = 0
MyMachGroupM.sCALC_MSG = ""
MyMachGroupM.nCALC_TIME = 0
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
-11
View File
@@ -195,14 +195,9 @@ Public MustInherit Class PartVM
Return m_SelFeatureVM
End Get
Set(value As BTLFeatureVM)
If Not IsNothing(m_SelFeatureVM) Then
Dim OldSelFeatureVM As BTLFeatureVM = m_SelFeatureVM
EgtResetMark(OldSelFeatureVM.nFeatureId)
End If
m_SelFeatureVM = value
If Not IsNothing(m_SelFeatureVM) Then
DirectCast(m_SelFeatureVM, BTLFeatureVM).SelGeomFeature()
EgtSetMark(m_SelFeatureVM.nFeatureId)
Else
EgtDeselectAll()
End If
@@ -483,12 +478,6 @@ Public MustInherit Class PartVM
End Get
End Property
Public ReadOnly Property ButtonIsEnabled As Boolean
Get
Return m_PartM.nProductionState < ItemState.Assigned
End Get
End Property
#End Region ' Supervisor
' definizione comandi
@@ -8,34 +8,35 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Style="{StaticResource CalcPanel_Grid}">
<Grid Margin="0,0,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<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 Grid.Column="1"
ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
Style="{StaticResource CalcPanel_ComboBox}"/>
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
</Grid>
<StackPanel Grid.Column="1"
Style="{StaticResource MachinePanel_StackPanel}">
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Content="{Binding ToolDBMsg}"
ToolTip="{Binding ToolDBToolTip}"
Command="{Binding ToolDbCommand}"
Style="{StaticResource GeneralConfiguration_Button}"/>
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Content="{Binding SetUpMsg}"
Command="{Binding SetUpCommand}"
ToolTip="{Binding SetUpToolTip}"
Style="{StaticResource GeneralConfiguration_Button}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"
Visibility="{Binding SetUp_Visibility}"/>
<Button Content="{Binding ParameterMachineMsg}"
ToolTip="{Binding ParameterMachineMsg}"
Command="{Binding ParameterMachine_Command}"
Style="{StaticResource ParameterMachine_Button}"/>
Style="{StaticResource MachineToolBar_ParameterMachineButton}" Width="140"/>
</StackPanel>
</Grid>
@@ -1,23 +1,24 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="MachiningDbWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
Title="{Binding Title}"
TitleBarHeight="30"
WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<EgtWPFLib5:EgtCustomWindow x:Class="MachiningDbWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding Title}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
CloseCommand="{Binding CloseMachiningsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<EgtBEAMWALLCORE:OptimizerWindow.InputBindings>
<EgtWPFLib5:EgtCustomWindow.InputBindings>
<KeyBinding Key="Escape" Command="{Binding ReloadMachiningCommand}"
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"/>
</EgtBEAMWALLCORE:OptimizerWindow.InputBindings>
</EgtWPFLib5:EgtCustomWindow.InputBindings>
<EgtBEAMWALLCORE:OptimizerWindow.Resources>
<EgtWPFLib5:EgtCustomWindow.Resources>
<EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
</EgtBEAMWALLCORE:OptimizerWindow.Resources>
</EgtWPFLib5:EgtCustomWindow.Resources>
<Grid>
<Grid.ColumnDefinitions>
@@ -33,28 +34,37 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<UniformGrid Columns="3">
<Button Content="{Binding NewMsg}"
Command="{Binding NewCommand}"
<UniformGrid Grid.Row="0" Columns="3">
<Button Content="{Binding NewMsg}" Command="{Binding NewCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
Style="{StaticResource MachiningDB_Button}"/>
<Button Content="{Binding SaveMsg}"
Command="{Binding SaveCommand}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding SaveMsg}" Command="{Binding SaveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
Style="{StaticResource MachiningDB_Button}"/>
<Button Content="{Binding RemoveMsg}"
Command="{Binding RemoveCommand}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding RemoveMsg}" Command="{Binding RemoveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
Style="{StaticResource MachiningDB_Button}"/>
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</UniformGrid>
<TreeView Grid.Row="1"
Name="MachiningsTreeView"
ItemsSource="{Binding Path=MachiningsList}"
Style="{StaticResource MachiningDB_TreeView}">
<TreeView Name="MachiningsTreeView" Grid.Row="1"
ItemsSource="{Binding Path=MachiningsList}">
<TreeView.Style>
<Style TargetType="{x:Type TreeView}">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.35,0">
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
</TreeView.Style>
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
@@ -62,63 +72,57 @@
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
</Style>
</TreeView.ItemContainerStyle>
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}"
ItemsSource="{Binding Items}">
<Grid Style="{StaticResource MachiningDB_Grid}">
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}" ItemsSource="{Binding Items}">
<Grid Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding PictureString}"
Style="{StaticResource MachiningDB_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding Name}"
Style="{StaticResource MachiningDB_TextBlock}"/>
<Ellipse Grid.Column="2"
Fill="{Binding FamilyColor}"
Style="{StaticResource SetUp_Ellipse}"/>
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
</Grid>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}">
<Grid Style="{StaticResource MachiningDB_Grid}">
<Grid Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1"
Text="{Binding NamePar}"
Style="{StaticResource MachiningDB_TextBlock}"/>
<Ellipse Grid.Column="2"
Fill="{Binding ToolColor}"
Style="{StaticResource SetUp_Ellipse}"/>
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
<TextBlock Grid.Column="1" Text="{Binding NamePar}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
</Grid>
</DataTemplate>
</TreeView.Resources>
</TreeView>
<UniformGrid Grid.Row="2"
Columns="3">
<Button Content="{Binding ImportMsg}"
Command="{Binding ImportCommand}"
Style="{StaticResource MachiningDB_Button}"/>
<Button Content="{Binding ExportMsg}"
Command="{Binding ExportCommand}"
Style="{StaticResource MachiningDB_Button}"/>
<Button Content="{Binding ResetMsg}"
Command="{Binding ReloadMachiningCommand}"
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"
Style="{StaticResource MachiningDB_Button}"/>
<UniformGrid Grid.Row="2" Columns="3">
<Button Content="{Binding ImportMsg}" Command="{Binding ImportCommand}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding ExportMsg}" Command="{Binding ExportCommand}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
<Button Content="{Binding ResetMsg}" Command="{Binding ReloadMachiningCommand}"
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}" Height="30"
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
</UniformGrid>
</Grid>
<ContentControl Grid.Column="1"
Grid.ColumnSpan="2"
Content="{Binding Path=ParamPageV}"/>
<ContentControl Content="{Binding Path=ParamPageV}" Grid.Column="1" Grid.ColumnSpan="2"/>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -6,6 +6,7 @@ Public Class MachiningDbWindowV
Private WithEvents m_MachiningDbWindowVM As MachiningDbWindowVM
Sub New(Owner As System.Windows.Window, MachiningDbWindowVM As MachiningDbWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = MachiningDbWindowVM
@@ -13,7 +14,7 @@ Public Class MachiningDbWindowV
m_MachiningDbWindowVM = MachiningDbWindowVM
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.DialogResult = bDialogResult
Me.Close()
+5 -8
View File
@@ -1,7 +1,6 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
Imports System.Windows
' General Information about an assembly is controlled through the following
' 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
#If DEBUG Then
<Assembly: AssemblyTitle("Aedifica.Core Debug AnyCPU")>
<Assembly: AssemblyTitle("EgtBEAMWALL.Core Debug AnyCPU")>
#Else
<Assembly: AssemblyTitle("Aedifica.Core Release AnyCPU")>
<Assembly: AssemblyTitle("EgtBEAMWALL.Core Release AnyCPU")>
#End If
<Assembly: AssemblyDescription("")>
<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: 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
<Assembly: Guid("632ea0b1-10e2-4f07-8b1b-d9371ef8392e")>
<Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
' Version information for an assembly consists of the following four values:
'
' Major Version
@@ -38,5 +35,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.5.2")>
<Assembly: AssemblyFileVersion("3.1.5.2")>
<Assembly: AssemblyVersion("2.7.1.1")>
<Assembly: AssemblyFileVersion("2.7.1.1")>
@@ -1,19 +1,19 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="NewOpenProjectFileDialogV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
Title="{Binding Title}"
ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
MinHeight="500" MinWidth="500"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<EgtWPFLib5:EgtCustomWindow x:Class="NewOpenProjectFileDialogV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
Title="{Binding Title}"
Style="{StaticResource OnlyProd_EgtCustomWindow}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
IsClosable="False"
MinHeight="500" MinWidth="500"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<EgtBEAMWALLCORE:OptimizerWindow.Resources>
<EgtWPFLib5:EgtCustomWindow.Resources>
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
</EgtBEAMWALLCORE:OptimizerWindow.Resources>
</EgtWPFLib5:EgtCustomWindow.Resources>
<Grid>
<Grid.RowDefinitions>
@@ -24,7 +24,7 @@
<GroupBox Header="{Binding Filters_Msg}"
Visibility="{Binding Filters_Visibility}"
Style="{StaticResource NewOpenProjectFile_GroupBox}">
Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@@ -40,28 +40,30 @@
SelectedIndex="{Binding SelBTLDateType}"
Style="{StaticResource BTLDateTypeList_ComboBox}"/>
<StackPanel Grid.Column="1"
Style="{StaticResource PartManager_StackPanel}">
Orientation="Horizontal">
<ComboBox ItemsSource="{Binding DayTypeList}"
SelectedIndex="{Binding SelDayType}"
Style="{StaticResource DayTypeList_ComboBox}"/>
<StackPanel Visibility="{Binding Date_Visibility}"
Style="{StaticResource PartManager_StackPanel}">
<StackPanel Orientation="Horizontal"
Visibility="{Binding Date_Visibility}">
<TextBlock Text="{Binding From_Msg}"
Style="{StaticResource Filter_TextBlock}"/>
<DatePicker SelectedDate="{Binding dtStartDate}"
CalendarStyle="{StaticResource Filter_Calendar}"
Style="{StaticResource Filter_DatePicker}"/>
Style="{StaticResource Filter_TextBlock}"
Foreground="{StaticResource BeamWall_Corduroy}"/>
<DatePicker SelectedDate="{Binding dtStartDate}"
Style="{StaticResource Filter_DatePicker}"
CalendarStyle="{StaticResource Filter_Calendar}"/>
<TextBlock Text="{Binding To_Msg}"
Style="{StaticResource Filter_TextBlock}"/>
<DatePicker SelectedDate="{Binding dtEndDate}"
CalendarStyle="{StaticResource Filter_Calendar}"
Style="{StaticResource Filter_DatePicker}"/>
Style="{StaticResource Filter_TextBlock}"
Foreground="{StaticResource BeamWall_Corduroy}"/>
<DatePicker SelectedDate="{Binding dtEndDate}"
Style="{StaticResource Filter_DatePicker}"
CalendarStyle="{StaticResource Filter_Calendar}"/>
</StackPanel>
</StackPanel>
<CheckBox Grid.Column="2"
IsChecked="{Binding bViewArchived}"
Content="{Binding ViewArchived_Msg}"
Style="{StaticResource PParameters_CheckBox}"/>
VerticalAlignment="Center"/>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
@@ -71,40 +73,42 @@
</Grid.ColumnDefinitions>
<ComboBox ItemsSource="{Binding FilterTypeList}"
SelectedItem="{Binding SelFilterType}"
Style="{StaticResource NewOpenProjectFile_ComboBox}"/>
Width="105"
Margin="5"
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding SearchText}"
Visibility="{Binding SearchText_Visibility}"
Style="{StaticResource NewSearchText_TextBox}"/>
<StackPanel Grid.Column="2"
Style="{StaticResource PartManager_StackPanel}">
Orientation="Horizontal">
<TextBlock Text="{Binding Rows_Msg}"
Style="{StaticResource Option_TextBlock}"/>
Style="{StaticResource OptionTextBlock}"
Foreground="{StaticResource BeamWall_Corduroy}"/>
<ComboBox ItemsSource="{Binding RowQuantityList}"
SelectedIndex="{Binding SelRowQuantity}"
Style="{StaticResource OpenProjectFileDialog_ComboBox}"/>
Style="{StaticResource OnyProd_FeatureComboBox}"/>
</StackPanel>
</Grid>
</Grid>
</GroupBox>
<Border Grid.Row="1"
Style="{StaticResource NewOpenProjectFileDialog_Border}"/>
<Border Grid.Row="1" Style="{StaticResource OnlyProdPage_Border}" Margin="1"/>
<EgwWPFBaseLib:EgwDataGrid Grid.Row="1"
x:Name="MainDataGrid"
ItemsSource="{Binding ProjectList}"
SelectedItem="{Binding SelProject}"
SelectionMode="Single"
Margin="5"
ColumnLayouts="{Binding ProdColumns}"
RowDetailsVisibilityMode="Visible"
CellEditEnding="MainDataGrid_CellEditEnding"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource Optimizer_DataGrid}"
CellStyle="{StaticResource CellDataGrid_NewOpenProject}">
<EgtBEAMWALLCORE:EgtDataGrid Grid.Row="1"
x:Name="MainDataGrid"
ItemsSource="{Binding ProjectList}"
SelectedItem="{Binding SelProject}"
SelectionMode="Single"
Margin="5"
BindingColumns="{Binding ProdColumns}"
RowDetailsVisibilityMode="Visible"
CellEditEnding="MainDataGrid_CellEditEnding"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource DataGrid_OnlyProd}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
<DataGrid.Resources>
<!-- ProdId -->
<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}}}"/>
<ToggleButton Grid.Column="1"
IsChecked="{Binding Path=DataContext.bIsEditNameActive,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
Style="{StaticResource Small_ToggleButton}">
<Image Source="{StaticResource Edit_Image}"
Style="{StaticResource Lock_Image}"/>
Style="{StaticResource ToolBar_SmallToggleButton}">
<Image Source="\Resources\CalcPanel\Edit.png"
Style="{StaticResource LockImage}"/>
</ToggleButton>
</Grid>
</DataGridTextColumn.Header>
@@ -148,7 +152,7 @@
<DataGridTemplateColumn x:Key="colARCHIVED">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Image Source="{StaticResource Archived_Image}"
<Image Source="\Resources\OpenProjectFileDialog\Archived.png"
Visibility="{Binding Archived_Visibility}"
Style="{StaticResource Archived_Image}"/>
</DataTemplate>
@@ -167,7 +171,7 @@
</DataGrid.RowStyle>
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<ItemsControl ItemsSource="{Binding ProjFileList}" HorizontalAlignment="Left" Margin="50,-1,0,0"
<ItemsControl ItemsSource="{Binding ProjFileList}"
Style="{StaticResource ProjFileList_ItemsControl}">
<ItemsControl.ItemTemplate>
<DataTemplate>
@@ -180,11 +184,12 @@
<RowDefinition Height="1"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Grid.ColumnSpan="2"
<Grid Grid.Row="0"
Grid.ColumnSpan="2"
Style="{StaticResource Gray_Grid}"/>
<Grid Grid.Column="1"
Grid.Row="1"
Style="{StaticResource NewOpenProjectFile_Grid}">
Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
@@ -202,8 +207,8 @@
<TextBlock Grid.Row="1"
Text="{Binding Path=DataContext.ListName_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
Style="{StaticResource OpenWnd_TextBlock}"/>
<TextBlock Grid.Row="1"
Grid.Column="1"
<TextBlock Grid.Column="1"
Grid.Row="1"
Text="{Binding sListName}"/>
<TextBlock Grid.Column="2"
Text="{Binding Path=DataContext.ExportDate_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
@@ -217,28 +222,26 @@
</ItemsControl>
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</EgwWPFBaseLib:EgwDataGrid>
</EgtBEAMWALLCORE:EgtDataGrid>
<UniformGrid Grid.Row="2"
Columns="4"
Style="{StaticResource AddRawPartWnd_UniformGrid}">
<Button Name="OpenBtn"
IsDefault="True"
<UniformGrid Columns="4" Grid.Row="2"
Margin="0,0,0,5">
<Button IsDefault="True" Name="OpenBtn"
Content="{Binding Open_Msg}"
Style="{DynamicResource EgtWPFLib5_Button}"/>
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Archive_Msg}"
Command="{Binding Archive_Command}"
IsEnabled="{Binding bArchived_IsEnabled}"
Style="{DynamicResource EgtWPFLib5_Button}"/>
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Delete_Msg}"
Command="{Binding Delete_Command}"
IsEnabled="{Binding bDelete_IsEnabled}"
Style="{DynamicResource EgtWPFLib5_Button}"/>
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Command="{Binding Cancel_Command}"
Content="{Binding Cancel_Msg}"
Style="{DynamicResource EgtWPFLib5_Button}"/>
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -41,30 +41,40 @@ Public MustInherit Class NewOpenProjectFileDialogVM
Friend Event m_CloseWindow(bDialogResult As Boolean)
Protected m_ProdColumns As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
Public Property ProdColumns As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
Protected m_ProdColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property ProdColumns As ObservableCollection(Of EgtDataGridColumn)
Get
Return m_ProdColumns
End Get
Set(value As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout))
Set(value As ObservableCollection(Of EgtDataGridColumn))
m_ProdColumns = value
End Set
End Property
Private m_colProdFile_Name As EgwWPFBaseLib.ColumnLayout
Public ReadOnly Property colProdFile_Name As EgwWPFBaseLib.ColumnLayout
Private m_colProdFile_Name As EgtDataGridColumn
Public ReadOnly Property colProdFile_Name As EgtDataGridColumn
Get
Return m_colProdFile_Name
End Get
End Property
Private m_colArchived_Name As EgwWPFBaseLib.ColumnLayout
Public ReadOnly Property colArchived_Name As EgwWPFBaseLib.ColumnLayout
Private m_colArchived_Name As EgtDataGridColumn
Public ReadOnly Property colArchived_Name As EgtDataGridColumn
Get
Return m_colArchived_Name
End Get
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_sFilter As String
@@ -378,9 +388,9 @@ Public MustInherit Class NewOpenProjectFileDialogVM
Set(value As Boolean)
m_bViewArchived = value
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_VIEWARCHIVED, If(bViewArchived, 1, 0))
If Not IsNothing(m_colArchived_Name) Then
m_colArchived_Name.IsVisible = value
RefreshProjectList()
If Not IsNothing( m_colArchived_Name) Then
m_colArchived_Name.Visible = value
RefreshProjectList()
End If
End Set
End Property
@@ -541,8 +551,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
ProdItem.m_delIsModifiedSetUp = AddressOf SetIsEditNameActive
' carico colonne
LoadColumns()
m_colProdFile_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Key = COL_NAME)
m_colArchived_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Key = COL_ARCHIVED)
m_colProdFile_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_NAME)
m_colArchived_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_ARCHIVED)
' leggo valori per filtri
m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0)
Select Case m_SelDayType
@@ -579,7 +589,7 @@ Public MustInherit Class NewOpenProjectFileDialogVM
Protected Sub LoadColumns()
' 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
m_BTLDateTypeList = New List(Of String)({CreateDate_Msg})
m_SelBTLDateType = BTLDateTypes.CREATEDATE
@@ -591,14 +601,29 @@ Public MustInherit Class NewOpenProjectFileDialogVM
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 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
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
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
AllFilesInDir = Directory.EnumerateFiles(SelProject.ProdFileVM.sProdDirPath)
Else
@@ -1,19 +1,18 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="OpenProjectFileDialogV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
Title="{Binding Title}"
ResizeMode="NoResize" TitleBarHeight="30"
WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
MinHeight="500" MinWidth="500"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Style="{StaticResource OptimizerWindow.Dialog}">
<EgtWPFLib5:EgtCustomWindow x:Class="OpenProjectFileDialogV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
Title="{Binding Title}"
Style="{StaticResource OnlyProd_EgtCustomWindow}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
MinHeight="500" MinWidth="500"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<EgtBEAMWALLCORE:OptimizerWindow.Resources>
<EgtWPFLib5:EgtCustomWindow.Resources>
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
</EgtBEAMWALLCORE:OptimizerWindow.Resources>
</EgtWPFLib5:EgtCustomWindow.Resources>
<Grid>
<Grid.RowDefinitions>
@@ -23,8 +22,9 @@
</Grid.RowDefinitions>
<GroupBox Header="Filters"
Margin="5"
Visibility="{Binding Filters_Visibility}"
Style="{StaticResource OpenProjectFile_GroupBox}">
BorderBrush="{StaticResource BeamWall_RegentStBlue}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@@ -37,24 +37,28 @@
</Grid.ColumnDefinitions>
<ComboBox ItemsSource="{Binding BTLDateTypeList}"
SelectedIndex="{Binding SelBTLDateType}"
Style="{StaticResource NewOpenProjectFile_ComboBox}"/>
<StackPanel Grid.Column="1"
Style="{StaticResource PartManager_StackPanel}">
Width="105"
Margin="5"
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<ComboBox ItemsSource="{Binding DayTypeList}"
SelectedIndex="{Binding SelDayType}"
Style="{StaticResource OpenProjectFile_ComboBox}"/>
<StackPanel Visibility="{Binding Date_Visibility}"
Style="{StaticResource PartManager_StackPanel}">
Width="105"
Margin="0,0,2.5,0"
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<StackPanel Orientation="Horizontal" Visibility="{Binding Date_Visibility}">
<TextBlock Text="{Binding From_Msg}"
Style="{StaticResource Filter_TextBlock}"/>
<DatePicker SelectedDate="{Binding dtStartDate}"
CalendarStyle="{StaticResource Filter_Calendar}"
Style="{StaticResource Filter_DatePicker}"/>
Style="{StaticResource Filter_TextBlock}"
Foreground="{StaticResource BeamWall_Corduroy}"/>
<DatePicker SelectedDate="{Binding dtStartDate}"
Style="{StaticResource Filter_DatePicker}"
CalendarStyle="{StaticResource Filter_Calendar}"/>
<TextBlock Text="{Binding To_Msg}"
Style="{StaticResource Filter_TextBlock}"/>
<DatePicker SelectedDate="{Binding dtEndDate}"
CalendarStyle="{StaticResource Filter_Calendar}"
Style="{StaticResource Filter_DatePicker}"/>
Style="{StaticResource Filter_TextBlock}"
Foreground="{StaticResource BeamWall_Corduroy}"/>
<DatePicker SelectedDate="{Binding dtEndDate}"
Style="{StaticResource Filter_DatePicker}"
CalendarStyle="{StaticResource Filter_Calendar}"/>
</StackPanel>
</StackPanel>
</Grid>
@@ -66,37 +70,41 @@
</Grid.ColumnDefinitions>
<ComboBox ItemsSource="{Binding FilterTypeList}"
SelectedItem="{Binding SelFilterType}"
Style="{StaticResource NewOpenProjectFile_ComboBox}"/>
Width="105"
Margin="5"
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding SearchText}"
Margin="5"
Visibility="{Binding SearchText_Visibility}"
Style="{StaticResource NewSearchText_TextBox}"/>
<StackPanel Grid.Column="2"
Style="{StaticResource PartManager_StackPanel}">
Orientation="Horizontal">
<TextBlock Text="Rows"
Style="{StaticResource Option_TextBlock}"/>
Style="{StaticResource OptionTextBlock}"
Foreground="{StaticResource BeamWall_Corduroy}"/>
<ComboBox ItemsSource="{Binding RowQuantityList}"
SelectedIndex="{Binding SelRowQuantity}"
Style="{StaticResource RowQTY_ComboBox}"/>
Width="55"
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
</StackPanel>
</Grid>
</Grid>
</GroupBox>
<Border Grid.Row="1"
Style="{StaticResource NewOpenProjectFileDialog_Border}"/>
<Border Grid.Row="1" Style="{StaticResource OnlyProdPage_Border}" Margin="1"/>
<EgwWPFBaseLib:EgwDataGrid Grid.Row="1"
ItemsSource="{Binding ProjectList}"
SelectedItem="{Binding SelProject}"
SelectionMode="Single"
Margin="5"
ColumnLayouts="{Binding ProjectColumns}"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource Optimizer_DataGrid}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
<EgtBEAMWALLCORE:EgtDataGrid Grid.Row="1"
ItemsSource="{Binding ProjectList}"
SelectedItem="{Binding SelProject}"
SelectionMode="Single"
Margin="5"
BindingColumns="{Binding ProjectColumns}"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource DataGrid_OnlyProd}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
<DataGrid.RowStyle>
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
<Setter Property="IsEnabled" Value="{Binding bIsEnabled}"/>
@@ -104,14 +112,14 @@
</Style>
</DataGrid.RowStyle>
<DataGrid.Resources>
<!-- ProjId --><!--
<!-- ProjId -->
<DataGridTextColumn x:Key="colPROJID" Binding="{Binding sProjId}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>-->
</DataGridTextColumn>
<!-- ProdId -->
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
<DataGridTextColumn.HeaderTemplate>
@@ -120,14 +128,14 @@
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!-- Project Name --><!--
<!-- Project Name -->
<DataGridTextColumn x:Key="colPROJNAME" Binding="{Binding sDescription}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>-->
</DataGridTextColumn>
<!-- BTL FileName -->
<DataGridTextColumn x:Key="colBTLNAME" Binding="{Binding sBTLFileName}">
<DataGridTextColumn.HeaderTemplate>
@@ -136,22 +144,22 @@
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!-- ListName --><!--
<!-- ListName -->
<DataGridTextColumn x:Key="colLISTNAME" Binding="{Binding sListName}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.ListName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>-->
<!-- Exported date --><!--
</DataGridTextColumn>
<!-- Exported date -->
<DataGridTextColumn x:Key="colEXPDATE" Binding="{Binding dtExportDate}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.ExportDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>-->
</DataGridTextColumn>
<!-- Creation date -->
<DataGridTextColumn x:Key="colCRTDATE" Binding="{Binding dtCreateDate}">
<DataGridTextColumn.Header>
@@ -164,30 +172,27 @@
<TextBlock Text="{Binding Path=DataContext.Machine_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<!-- Name (per Prod) --><!--
<!-- Name (per Prod) -->
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataGridTextColumn.Header>
</DataGridTextColumn>-->
</DataGridTextColumn>
</DataGrid.Resources>
</EgwWPFBaseLib:EgwDataGrid>
</EgtBEAMWALLCORE:EgtDataGrid>
<UniformGrid Grid.Row="2"
Columns="3"
Style="{StaticResource AddRawPartWnd_UniformGrid}">
<Button Name="OpenBtn"
IsDefault="True"
<UniformGrid Columns="3" Grid.Row="2" Margin="0,0,0,5">
<Button IsDefault="True" Name="OpenBtn"
Content="{Binding Open_Msg}"
Style="{DynamicResource EgtWPFLib5_Button}"/>
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Delete_Msg}"
Command="{Binding Delete_Command}"
Style="{DynamicResource EgtWPFLib5_Button}"/>
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button IsCancel="True"
Content="{Binding Cancel_Msg}"
Style="{DynamicResource EgtWPFLib5_Button}"/>
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -69,8 +69,6 @@ Public Class OpenProjectFileDialogV
End Sub
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
End Sub
@@ -42,12 +42,12 @@ Public MustInherit Class OpenProjectFileDialogVM
Protected m_GoToProd As Boolean = False
Protected m_ProjectColumns As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
Public Property ProjectColumns As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
Protected m_ProjectColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property ProjectColumns As ObservableCollection(Of EgtDataGridColumn)
Get
Return m_ProjectColumns
End Get
Set(value As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout))
Set(value As ObservableCollection(Of EgtDataGridColumn))
m_ProjectColumns = value
End Set
End Property
@@ -408,8 +408,6 @@ Public MustInherit Class OpenProjectFileDialogVM
#End Region ' FIELDS & PROPERTIES
Sub New()
' carico colonne
LoadColumns()
' leggo valori per filtri
m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0)
Select Case m_SelDayType
@@ -443,28 +441,51 @@ Public MustInherit Class OpenProjectFileDialogVM
Public Overridable Sub RefreshProjectList()
End Sub
Protected Sub LoadColumns()
' carico le colonne della datagrid
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, 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))
Protected Sub LoadColumns(ProjectType As ProjectType)
If ProjectType = ProjectType.PROJ Then
' carico le colonne della datagrid
GetPrivateProfileColumns(S_OPENPROJFILEDLG_PROJ, ProjectColumns)
' carico campi su cui eseguire il filtro di ricerca
m_BTLDateTypeList = New List(Of String)({CreateDate_Msg, ExportDate_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.LISTNAME, ListName_Msg),
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
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
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
AllFilesInDir = Directory.EnumerateFiles(SelProject.sProdDirPath)
Else
@@ -480,13 +501,25 @@ Public MustInherit Class OpenProjectFileDialogVM
Protected Function ProjectFilter(Proj As Object) As Boolean
Dim bProjectOk As Boolean = True
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
If m_ProjectType = ProjectType.PROJ Then
Dim CurrProj As ProjFileVM = DirectCast(Proj, ProjFileVM)
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
(m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not SearchDate.Contains(CurrProj.dtExportDate.Date)) OrElse
(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.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
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
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
@@ -1,7 +1,7 @@
Imports System.Collections.ObjectModel
Imports System.Windows
Imports EgtUILib
Imports System.Windows
Imports EgtWPFLib5
Imports EgtUILib
Imports System.Collections.ObjectModel
Public Module DimensionsIniFile
@@ -32,11 +32,6 @@ Public Module DimensionsIniFile
End If
Index += 1
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
GridDimsItem.GridDimensions = GridDimsList
Next
@@ -59,4 +54,8 @@ Public Module DimensionsIniFile
Return WritePrivateProfileString(GridName, Index, sValue, m_sDimensionsIniFile)
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
+1 -2
View File
@@ -5,7 +5,6 @@
WARNING = 2
ERROR_ = 3
COLLISION = 4
SECTION = 5
End Enum
Public Enum EventType
@@ -64,7 +63,7 @@ Public Enum StatusMapOpType
ChangeProdInProdRequest = 16
OpenPageInViewOptimRequest = 17
MachGroupValidationUpdate = 18
ChangeProdInOptimizerRequest = 19
ChangeProdInOnlyProdRequest = 19
End Enum
Public Enum DimensionType
+21 -26
View File
@@ -1,49 +1,44 @@
<StackPanel x:Class="ViewPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource BTLPartManager_StackPanel}">
<EgtFloating:EgtFloatingPanel x:Class="ViewPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
<Button ToolTip="{Binding ZoomAllToolTip}"
Style="{StaticResource Mach_Button}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding ZoomAllCommand}">
<Image Source="{StaticResource ZoomAll_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<Image Source="/Resources/ViewPanel/ZoomAll.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromTopToolTip}"
Style="{StaticResource Mach_Button}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding TopViewCommand}">
<Image Source="{StaticResource LookFromTOP_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<Image Source="/Resources/ViewPanel/LookFromTOP.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromFrontToolTip}"
Style="{StaticResource Mach_Button}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding FrontViewCommand}">
<Image Source="{StaticResource LookFromFRONT_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<Image Source="/Resources/ViewPanel/LookFromFRONT.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromRightToolTip}"
Style="{StaticResource Mach_Button}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding RightViewCommand}">
<Image Source="{StaticResource LookFromRIGHT_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<Image Source="/Resources/ViewPanel/LookFromRIGHT.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromBackToolTip}"
Style="{StaticResource Mach_Button}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding BackViewCommand}">
<Image Source="{StaticResource LookFromBACK_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<Image Source="/Resources/ViewPanel/LookFromBACK.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromLeftToolTip}"
Style="{StaticResource Mach_Button}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding LeftViewCommand}">
<Image Source="{StaticResource LookFromLEFT_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<Image Source="/Resources/ViewPanel/LookFromLEFT.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromIso_SWToolTip}"
Style="{StaticResource Mach_Button}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding IsoViewSWCommand}">
<Image Source="{StaticResource LookFromISO_SW_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<Image Source="/Resources/ViewPanel/LookFromISO_SW.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</EgtFloating:EgtFloatingPanel>
-1
View File
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<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="Newtonsoft.Json" version="13.0.4" targetFramework="net472" />
<package id="RestSharp" version="111.2.0" targetFramework="net472" />
@@ -409,10 +409,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary>
/// Istanza logger
/// </summary>
private NLog.Logger Log = NLog.LogManager
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
private NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
@@ -146,10 +146,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary>
/// Istanza logger
/// </summary>
private NLog.Logger Log = NLog.LogManager
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
private NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
@@ -257,10 +257,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary>
/// Istanza logger
/// </summary>
private NLog.Logger Log = NLog.LogManager
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
private NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
@@ -187,10 +187,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary>
/// Istanza logger
/// </summary>
private NLog.Logger Log = NLog.LogManager
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
private NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
@@ -809,10 +809,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary>
/// Istanza logger
/// </summary>
private NLog.Logger Log = NLog.LogManager
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
private NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
@@ -461,10 +461,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary>
/// Istanza logger
/// </summary>
private NLog.Logger Log = NLog.LogManager
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
private NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
@@ -1128,10 +1128,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary>
/// Istanza logger
/// </summary>
private NLog.Logger Log = NLog.LogManager
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
private NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
@@ -967,10 +967,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary>
/// Istanza logger
/// </summary>
private NLog.Logger Log = NLog.LogManager
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
private NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
@@ -293,10 +293,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// <summary>
/// Istanza logger
/// </summary>
private NLog.Logger Log = NLog.LogManager
.Setup()
.LoadConfigurationFromFile(DbConfig.NLOG_PATH + @"\NLog.config")
.GetCurrentClassLogger();
private NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
+13 -6
View File
@@ -12,7 +12,7 @@ namespace EgtBEAMWALL.DataLayer
{
#region Public Fields
public static string DATABASE_NAME = "AedificaDb";
public static string DATABASE_NAME = "EgtBwDb";
public static int DATABASE_PROCESS_TIMEOUT = 5;
public static string DATABASE_PWD = "viacremasca";
@@ -23,8 +23,6 @@ namespace EgtBEAMWALL.DataLayer
public static string DATABASE_USER = "EgtUser";
public static string ZIP_PWD = "viacremasca-viacremasca-viacremasca-viacremasca";
public static string NLOG_PATH = "";
#endregion Public Fields
#region Public Properties
@@ -247,7 +245,7 @@ namespace EgtBEAMWALL.DataLayer
// se nulla metto amster come nKey...
masterKey = string.IsNullOrEmpty(masterKey) ? nKey : masterKey;
DATABASE_SERV = server;
DATABASE_NAME = $"AedificaDb_{masterKey}";
DATABASE_NAME = $"EgtBwDb_{masterKey}";
DATABASE_USER = $"user_{nKey}";
DATABASE_PWD = $"pwd_{sKey}";
ZIP_PWD = $"{DATABASE_USER}:{DATABASE_PWD}:{DATABASE_USER}:{DATABASE_PWD}";
@@ -260,9 +258,18 @@ namespace EgtBEAMWALL.DataLayer
/// Aggiorna conf NLog x target DIR
/// </summary>
/// <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
@@ -238,7 +238,7 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy $(TargetPath) c:\EgtProg\Aedifica\EgtBEAMWALL.DataLayer.dll</PostBuildEvent>
<PostBuildEvent>copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.DataLayer.dll</PostBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Egalware s.r.l.")]
[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: AssemblyCulture("")]
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.1.5.2")]
[assembly: AssemblyFileVersion("3.1.5.2")]
[assembly: AssemblyVersion("2.7.1.1")]
[assembly: AssemblyFileVersion("2.7.1.1")]
@@ -1,16 +1,11 @@
<Window x:Class="AboutBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="AboutBox"
Height="400"
Width="360"
WindowStyle="None"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner">
Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
<Border Style="{StaticResource AboutBoxV_Border}">
<Grid>
<Border BorderThickness="2" BorderBrush="LightBlue">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="5*"/>
@@ -29,39 +24,29 @@
<RowDefinition Height="0.35*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="1"
Grid.Column="1">
<Grid Grid.Column="1" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="1"
Style="{StaticResource AboutBox_Border}">
<Image Source="{StaticResource AboutBox_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<Border Name="LogoBrd" Grid.Column="1" Background="White">
<Image Source="/Resources/AboutBox/EgalwareLogo.png" Stretch="Uniform"/>
</Border>
</Grid>
<TextBlock Grid.Row="3"
Grid.Column="1"
Name="DescriptionLbl"
Style="{StaticResource AboutBox_TextBlock}"/>
<TextBlock Grid.Row="4"
Grid.Column="1"
Name="VersionLbl"
Style="{StaticResource AboutBox_TextBlock}"/>
<TextBlock Grid.Row="5"
Grid.Column="1"
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}"/>
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18" />
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="12" />
<TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/>
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True"
Margin="100,0"/>
</Grid>
</Border>
</Window>
@@ -1,13 +1,17 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="AddFeatureWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
Title="AddProcess"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<EgtWPFLib5:EgtCustomWindow x:Class="AddFeatureWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddProcess"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Style="{StaticResource BlockedWnd_Grid}">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
@@ -18,12 +22,14 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</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}"
Style="{StaticResource List_TextBlock}"/>
Style="{StaticResource ListTextBlock}"/>
</Border>
<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"
ItemsSource="{Binding PRCListView}"
SelectedItem="{Binding nSelPRC}"
@@ -33,21 +39,23 @@
<DataTemplate>
<TextBlock Text="{Binding ghDesc}"
ToolTip="{Binding ghDesc}"
TextAlignment="Justify"
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
Style="{StaticResource PRCList_TextBlock}"/>
Style="{StaticResource OptionTextBlock}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
<Border Grid.Column="1"
Style="{StaticResource Custom_Border}">
<Border Grid.Column="1" Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2">
<TextBlock Grid.Column="1"
Text="{Binding Custom_Msg}"
Style="{StaticResource List_TextBlock}"/>
Text="{Binding Custom_Msg}"
Style="{StaticResource ListTextBlock}"/>
</Border>
<Border Grid.Row="1"
Grid.Column="1"
Style="{StaticResource MacroCustomList_Border}">
Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="0"
BorderThickness="0,2,0,2">
<ListBox ItemsSource="{Binding MacroCustomList}"
SelectedIndex="{Binding nSelMacroCustom}"
Style="{StaticResource MacroCustom_ListBox}">
@@ -73,14 +81,16 @@
</ListBox.ItemTemplate>
</ListBox>
</Border>
<Border Grid.Column="2"
Style="{StaticResource Default_Border}">
<TextBlock Text="{Binding Default_Msg}"
Style="{StaticResource List_TextBlock}"/>
<Border Grid.Column="2" Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2" Padding="0,10,0,10" CornerRadius="0,4,4,0">
<TextBlock
Text="{Binding Default_Msg}"
Style="{StaticResource ListTextBlock}"/>
</Border>
<Border Grid.Row="1"
Grid.Column="2"
Style="{StaticResource MacroDefaultList_Border}">
Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="0,4,4,0"
BorderThickness="0,2,2,2">
<ListBox ItemsSource="{Binding MacroDefaultList}"
SelectedIndex="{Binding nSelMacroDefault}"
Style="{StaticResource MacroDefault_ListBox}"
@@ -88,6 +98,7 @@
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding sMacroName}"
TextAlignment="Justify"
Style="{StaticResource MacroDefault_TextBlock}"/>
</DataTemplate>
</ListBox.ItemTemplate>
@@ -96,14 +107,14 @@
<UniformGrid Columns="2"
Grid.Row="2"
Grid.ColumnSpan="3"
Style="{StaticResource AddFeatureWnd_UniformGrid}">
Margin="5">
<Button Content="{Binding OK_Msg}"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Cancel_Msg}"
IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -57,6 +57,8 @@ Public Class AddFeatureWndVM
End Get
End Property
#Region "New Macro OnlyProdPage"
Private m_MacroDefaultList As New ObservableCollection(Of Object)
Public ReadOnly Property MacroDefaultList As ObservableCollection(Of Object)
Get
@@ -76,6 +78,8 @@ Public Class AddFeatureWndVM
End Set
End Property
#End Region ' New Macro OnlyProdPage
Private m_nSelPRC As PRC = Nothing
Public Property nSelPRC As PRC
Get
@@ -314,7 +318,7 @@ Public Class AddFeatureWndVM
If Not IsNothing(m_nSelPRC) AndAlso m_nSelPRC.nPRC > 0 Then
RaiseEvent m_CloseWindow(True)
Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61852), EgtMsg(30007))
MessageBox.Show(EgtMsg(61852), EgtMsg(30007))
End If
End Sub
@@ -1,14 +1,17 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="AddPartWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
Title="AddPartWndV"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<EgtWPFLib5:EgtCustomWindow x:Class="AddPartWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddPartWndV"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Style="{StaticResource AddPartWndV_Grid}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
@@ -16,19 +19,19 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Style="{StaticResource AddPart_Grid}">
<Grid Style="{StaticResource OnlyProdAddPart_Grid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Name"
Style="{StaticResource Option_TextBlock}"/>
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sNAM}"
Style="{StaticResource NAM_TextBox}"/>
</Grid>
<Grid Grid.Row="1"
Style="{StaticResource AddPartWnd_Grid}">
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
@@ -36,19 +39,19 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Prod Number"
Style="{StaticResource Option_TextBlock}"/>
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding nPDN}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="2"
Text="Count"
Style="{StaticResource Option_TextBlock}"/>
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding sCNT}"
Style="{StaticResource Dimension_TextBox}"/>
</Grid>
<Grid Grid.Row="2"
Style="{StaticResource AddPartWnd_Grid}">
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
@@ -58,19 +61,19 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="W"
Style="{StaticResource Option_TextBlock}"/>
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sW}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="2"
Text="H"
Style="{StaticResource Option_TextBlock}"/>
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding sH}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="4"
Text="L"
Style="{StaticResource Option_TextBlock}"/>
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="5"
Text="{Binding sL}"
Style="{StaticResource Dimension_TextBox}"/>
@@ -78,14 +81,14 @@
<UniformGrid Grid.Row="3"
Columns="2"
Style="{StaticResource AddPartWnd_UniformGrid}">
Margin="0,5,0,5">
<Button Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="Cancel"
IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_AddPartWndVM As AddPartWndVM
Sub New(Owner As Window, AddPartWndVM As AddPartWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = AddPartWndVM
@@ -165,7 +165,7 @@ Public Class AddPartWndVM
Not IsNothing(m_dH) AndAlso m_dH >= 0 Then
RaiseEvent m_CloseWindow(True)
Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61853), EgtMsg(30007))
MessageBox.Show(EgtMsg(61853), EgtMsg(30007))
End If
End Sub
@@ -1,14 +1,16 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="AddRawPartWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterScreen"
Title="AddRawPartWnd"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
<EgtWPFLib5:EgtCustomWindow x:Class="AddRawPartWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddRawPartWnd"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
@@ -18,18 +20,20 @@
SelectedItem="{Binding SelDimension}"
DisplayMemberPath="sDimension"
Visibility="{Binding DimensionsList_Visibility}"
Style="{StaticResource AddRawPartWnd_ComboBox}"/>
Margin="0,0,0,5"
Style="{StaticResource OnlyProd_ComboBox}"/>
<ItemsControl Grid.Row="1"
ItemsSource="{Binding VariableList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Style="{StaticResource AddPartWnd_Grid}">
<Grid Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sMsg}"
Style="{StaticResource Option_TextBlock}"/>
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sValue}"
Style="{StaticResource Value_TextBox}"/>
@@ -39,17 +43,18 @@
</ItemsControl>
<UniformGrid Grid.Row="2"
Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}">
Margin="0,0,0,5">
<Button Grid.Column="1"
Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource AddRawPartWnd_Button}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"
Margin="0,0,5,0"/>
<Button Grid.Column="3"
Content="Cancel"
IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_AddRawPartWndVM As AddRawPartWndVM
Sub New(Owner As Window, AddRawPartWndVM As AddRawPartWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = AddRawPartWndVM
@@ -59,6 +59,7 @@ Public Class AddRawPartWndVM
End Set
End Property
Private m_DimensionsList_Visibility As Visibility
Public ReadOnly Property DimensionsList_Visibility As Visibility
Get
Return If(m_EditType = EditTypes.ONLY_COMBO OrElse m_EditType = EditTypes.TEXT_AND_COMBO, Visibility.Visible, Visibility.Collapsed)
@@ -159,7 +160,7 @@ Public Class AddRawPartWndVM
For Each Variable In m_VariableList
If (Variable.nType = Variable.VariableType.STRING_ AndAlso IsNothing(Variable.sValue)) OrElse
((Variable.nType = Variable.VariableType.DOUBLE_ OrElse Variable.nType = Variable.VariableType.LENGTH) AndAlso IsNothing(Variable.dValue)) Then
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
End If
Next
@@ -1,16 +1,20 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="AddSectionXMaterialWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
Title="AddSectionXMaterial"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<StackPanel Style="{StaticResource AddSectionXMaterialWnd_StackPanel}">
<EgtWPFLib5:EgtCustomWindow x:Class="AddSectionXMaterialWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddSectionXMaterial">
<StackPanel Margin="5,5,5,0">
<EgtBEAMWALLCORE:EgtDataGrid Width="500" MaxHeight="600"
<EgtBEAMWALLCORE:EgtDataGrid Grid.Row="0" Width="500" MaxHeight="600"
ItemsSource="{Binding NewSectionXMaterialList}"
SelectedItem="{Binding SelNewSectionXMaterial}"
CanUserAddRows="False"
@@ -40,7 +44,7 @@
<DataTemplate>
<CheckBox IsChecked="{Binding Path=Alias_IsChecked, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding Alias_IsEnabled}"
Style="{StaticResource Alias_CheckBox}"/>
HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@@ -52,7 +56,7 @@
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<Style TargetType="DataGridCell">
<Setter Property="IsEnabled" Value="{Binding Alias_IsNotChecked}" />
</Style>
</DataGridTextColumn.CellStyle>
@@ -65,7 +69,7 @@
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<Style TargetType="DataGridCell">
<Setter Property="IsEnabled" Value="{Binding Alias_IsNotChecked}" />
</Style>
</DataGridTextColumn.CellStyle>
@@ -91,7 +95,7 @@
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<Style TargetType="DataGridCell">
<Setter Property="IsEnabled" Value="{Binding Alias_IsNotChecked}" />
</Style>
</DataGridTextColumn.CellStyle>
@@ -99,8 +103,7 @@
</DataGrid.Resources>
</EgtBEAMWALLCORE:EgtDataGrid>
<Grid Grid.Row="2"
Style="{StaticResource AddPartWnd_Grid}">
<Grid Grid.Row="2" Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
@@ -108,17 +111,17 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1"
Content="{Binding Ok_Msg}"
<Button Content="{Binding Ok_Msg}"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/>
<Button Grid.Column="3"
Content="{Binding Cancel_Msg}"
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding Cancel_Msg}"
Command="{Binding Cancel_Command}"
IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/>
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</StackPanel>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_AddSectionXMaterialWndVM As AddSectionXMaterialWndVM
Sub New(Owner As Window, AddSectionXMaterialWndVM As AddSectionXMaterialWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = AddSectionXMaterialWndVM
+2 -10
View File
@@ -1,17 +1,9 @@
<Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary>
<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>
<ResourceDictionary Source="Utility/Dictionary.xaml"/>
</Application.Resources>
</Application>
@@ -1,15 +1,17 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="BTLDataWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="True"
Title="BTLDataWndV"
Name="BTLDataWndV"
Style="{StaticResource OptimizerWindow.Dialog}">
<EgtWPFLib5:EgtCustomWindow x:Class="BTLDataWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="True"
IsMinimizable="False"
IsResizable="False"
Title="BTLDataWndV"
Name="BTLDataWndV"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<TabControl>
<TabItem Header="Strategy">
@@ -18,19 +20,9 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<ComboBox ItemsSource="{Binding StrategySetupList}"
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
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>
<ComboBox ItemsSource="{Binding StrategySetupList}" HorizontalAlignment="Center" Margin="0,10,0,10"
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource Strategy_ComboBox}" />
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@@ -39,32 +31,27 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<OPTIMIZER:ProjectParametersV Grid.RowSpan="2"
Margin="0,10,0,0"
Tag="{Binding GeneralParametersList}"/>
<UniformGrid Grid.Column="1"
Columns="2"
Style="{StaticResource BTLDataWnd_UniformGrid}">
<Button Command="{Binding Ok_Command}"
<OPTIMIZER:ProjectParametersV Grid.RowSpan="2" Margin="0,10,0,0"
Tag="{Binding GeneralParametersList}"
IsEnabled="{Binding GeneralParametersIsEnable}"/>
<UniformGrid Rows="2" Grid.Column="1" Margin="0,0,5,0">
<CheckBox IsChecked="{Binding bSaveGeneralParameters, UpdateSourceTrigger=PropertyChanged}"
Margin="10,10,0,0" VerticalAlignment="Top" HorizontalAlignment="Center"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_CheckBox}"/>
<Button Command="{Binding Ok_Command}" VerticalAlignment="Bottom" Margin="0,0,0,5"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource OKBTLDataWnd_Button}">
<Image Source="{StaticResource Ok_Image}"
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}"/>
Style="{StaticResource SaveStrategy_Button}">
<Image Source="/Resources/NewPage/Ok.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Grid>
</Grid>
</TabItem>
<TabItem Header="BTL">
<UniformGrid Margin="5"
Columns="6"
Rows="7">
Columns="6" Rows="7">
<TextBlock Text="{Binding PROJNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
@@ -183,4 +170,4 @@
</UniformGrid>
</TabItem>
</TabControl>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_BTLDataWndVM As BTLDataWndVM
Sub New(Owner As Window, BTLDataWndVM As BTLDataWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = BTLDataWndVM
@@ -14,14 +15,4 @@
Me.DialogResult = bDialogResult
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
+195 -274
View File
@@ -11,8 +11,6 @@ Public Class BTLDataWndVM
#Region "FIELDS & PROPERTIES"
Private PADLOCK_IMAGE As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Friend Event m_CloseWindow(bDialogResult As Boolean)
Private m_StrategySetupList As New ObservableCollection(Of String)
@@ -22,18 +20,18 @@ Public Class BTLDataWndVM
End Get
End Property
Private m_OldSelStrategySetup As String
Private m_SelStrategySetup As String
Public Property SelStrategySetup As String
Get
Return m_SelStrategySetup
End Get
Set(value As String)
m_OldSelStrategySetup = m_SelStrategySetup
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.Read()
ReadCustomGeneralParameters(value)
Map.refProdManagerVM.Save()
End If
m_SelStrategySetup = value
NotifyPropertyChanged(NameOf(SelStrategySetup))
@@ -58,26 +56,43 @@ Public Class BTLDataWndVM
End Set
End Property
Private m_IsBTLDataWnd As Boolean = False
Public ReadOnly Property IsBTLDataWnd As Boolean
Private m_bSaveGeneralParameters As Boolean
Public Property bSaveGeneralParameters As Boolean
Get
Return m_IsBTLDataWnd
Return m_bSaveGeneralParameters
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
Friend Sub SetIsBTLDataWnd(value As Boolean)
m_IsBTLDataWnd = value
NotifyPropertyChanged(NameOf(IsBTLDataWnd))
Friend Sub SetbSaveGeneralParameters(value As Boolean)
m_bSaveGeneralParameters = value
NotifyPropertyChanged(NameOf(bSaveGeneralParameters))
End Sub
Private m_sErrText As String = String.Empty
Public ReadOnly Property ErrText As String
Private m_GeneralParametersIsEnable As Boolean = False
Public ReadOnly Property GeneralParametersIsEnable As Boolean
Get
Return m_sErrText
Return m_GeneralParametersIsEnable
End Get
End Property
Friend Sub SetErrText(value As String)
m_sErrText = value
NotifyPropertyChanged(NameOf(ErrText))
Friend Sub SetGeneralParametersIsEnable(value As Boolean)
m_GeneralParametersIsEnable = value
NotifyPropertyChanged(NameOf(GeneralParametersIsEnable))
End Sub
#Region "Parametri generici"
@@ -142,7 +157,7 @@ Public Class BTLDataWndVM
Public ReadOnly Property nPROJTYPE As BWType
Get
Select Case Map.refMainMenuVM.SelPage
Case Pages.OPTIMIZERPAGE
Case Pages.ONLYPRODPAGE
Return Map.refProdManagerVM.nProdType
Case Else
Return BWType.NULL
@@ -554,25 +569,127 @@ Public Class BTLDataWndVM
' Definizione comandi
Private m_cmdOk As ICommand
Private m_cmdCancel As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New(nType As BWType)
' leggo file default config
Map.refMainWindowVM.MainWindowM.GetDefaultConfigDirPath(nType, True)
End Sub
Sub New(nProjId As Integer)
' 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
m_StrategySetupList.Add(Path.GetFileNameWithoutExtension(AiSetup))
Next
Sub New()
Map.SetRefBTLDataWndVM(Me)
SetIsBTLDataWnd(True)
' cerco tra i layer BTLInfo
Dim nCurrBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
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
ReadBtlParams()
' leggo file default config
Map.refMainWindowVM.MainWindowM.GetDefaultConfigDirPath(ProjectManagerVM.CurrProd.nType, True)
Read(ProjectManagerVM.CurrProd.nType)
'' leggo strategia
'EgtGetInfo(m_nBTLInfoLayerId, "AISETUP", m_SelStrategySetup)
' 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 Region ' CONSTRUCTOR
@@ -608,223 +725,6 @@ Public Class BTLDataWndVM
EgtGetInfo(m_nBTLInfoLayerId, BTL_GEN_USERATTRIBUTE, m_sUSERATTRIBUTE)
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
#Region "COMMANDS"
@@ -841,40 +741,61 @@ Public Class BTLDataWndVM
End Property
Public Sub Ok()
' Messaggio ripristino verifica se presente
If Not IsNothing(m_OldSelStrategySetup) AndAlso m_SelStrategySetup <> m_OldSelStrategySetup Then
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62579), EgtMsg(15002), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
Map.refProjectVM.ResetGeneralParameters()
Else
Return
End If
'' scrivo AISetup
'Dim sOldStrategySetup As String = ""
'EgtGetInfo(m_nBTLInfoLayerId, "AISETUP", sOldStrategySetup)
'If m_SelStrategySetup <> sOldStrategySetup Then
' EgtSetInfo(m_nBTLInfoLayerId, "AISETUP", m_SelStrategySetup)
'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
SetIsBTLDataWnd(True)
SaveInfo()
Map.refLeftPanelVM.ResetCalc()
Map.refSceneHostVM.SaveProject()
Map.refProdManagerVM.Save()
RaiseEvent m_CloseWindow(True)
End Sub
#End Region ' Ok
#Region "Cancel"
Public ReadOnly Property Cancel_Command As ICommand
Get
If m_cmdCancel Is Nothing Then
m_cmdCancel = New Command(AddressOf Cancel)
End If
Return m_cmdCancel
End Get
End Property
Public Sub Cancel()
RaiseEvent m_CloseWindow(False)
End Sub
#End Region ' Cancel
#End Region ' COMMANDS
End Class
@@ -2,48 +2,47 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
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}"
Click="ClosePopUp_Click"
ToolTip="{Binding CopyPart_ToolTip}"
IsEnabled="{Binding CopyPart_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="{StaticResource CopyPart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/CopyPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemovePart_Command}"
Click="ClosePopUp_Click"
ToolTip="{Binding RemovePart_ToolTip}"
IsEnabled="{Binding RemovePart_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="{StaticResource Remove_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/NewPage/Remove.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Simulate_ToolTip}"
Click="ClosePopUp_Click"
Command="{Binding Simulate_Command}"
IsEnabled="{Binding Simulate_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="{StaticResource Simulate_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/CALCPanel/Simulate.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Edit_ToolTip}"
Click="ClosePopUp_Click"
Command="{Binding Edit_Command}"
IsEnabled="{Binding Edit_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="{StaticResource Edit_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ResetCalc_Command}"
Click="ClosePopUp_Click"
ToolTip="{Binding ResetCalc_ToolTip}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="{StaticResource ResetCalc_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/CALCPanel/ResetCalc.png" Stretch="Uniform"/>
</Button>
</StackPanel>
@@ -3,8 +3,8 @@
Private Sub ClosePopUp_Click(sender As Object, e As RoutedEventArgs)
Dim Button As Button = DirectCast(sender, Button)
Dim StackPanel As StackPanel = DirectCast(Button.Parent, StackPanel)
Dim BTLPartManagerV As BTLPartManagerV = DirectCast(StackPanel.Parent, BTLPartManagerV)
Dim Popup As Primitives.Popup = DirectCast(BTLPartManagerV.Parent, Primitives.Popup)
Dim OnlyProdBTLPartManagerV As BTLPartManagerV = DirectCast(StackPanel.Parent, BTLPartManagerV)
Dim Popup As Primitives.Popup = DirectCast(OnlyProdBTLPartManagerV.Parent, Primitives.Popup)
If Not IsNothing(Popup) Then
Popup.IsOpen = False
@@ -1,15 +1,16 @@
Imports System.IO
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Optimizer.MainMenuVM
Imports EgtUILib
Imports EgtWPFLib5
Imports Newtonsoft.Json
Public Class BTLPartManagerVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Private PADLOCK_IMAGE As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Private m_BTLPartManager_IsEnabled As Boolean = True
Public ReadOnly Property BTLPartManager_IsEnabled As Boolean
Get
@@ -151,6 +152,7 @@ Public Class BTLPartManagerVM
Friend Sub PartShowAllChanged()
NotifyPropertyChanged(NameOf(CopyPart_IsEnabled))
'NotifyPropertyChanged(NameOf(RotatePart_IsEnabled))
NotifyPropertyChanged(NameOf(RemovePart_IsEnabled))
End Sub
@@ -174,6 +176,103 @@ Public Class BTLPartManagerVM
Map.refMyStatusBarVM.SetOutputMessage(sProgress)
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
#Region "COMMANDS"
@@ -196,7 +295,6 @@ Public Class BTLPartManagerVM
' creo copia
Dim NewPart As BTLPartM = SelPart.Copy()
If Not IsNothing(NewPart) Then
Map.refProjectVM.UpdatePart(NewPart.nPartId)
' selezione ultimo che e' quello appena creato
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1), False, True)
End If
@@ -217,7 +315,7 @@ Public Class BTLPartManagerVM
Public Sub RemovePartCmd()
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
Dim CurrSelBTLParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
For RemoveIndex = CurrSelBTLParts.Count - 1 To 0 Step -1
@@ -234,7 +332,7 @@ Public Class BTLPartManagerVM
Dim nDuploCount As Integer = 0
If EgtDuploCount(BTLPartToDelete.nPartId, nDuploCount) AndAlso nDuploCount > 0 Then
' 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
End If
' verifico se rimuovere sezione dalla lista
@@ -244,7 +342,6 @@ Public Class BTLPartManagerVM
End If
' Eseguo cancellazione
EgtBeamSetPart(BTLPartToDelete.nPartId)
RemoveScenePart(BTLPartToDelete)
' seleziono elemento precedente
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToDelete)
Dim FilteredIndex As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.IndexOf(BTLPartToDelete)
@@ -272,22 +369,6 @@ Public Class BTLPartManagerVM
End If
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
#Region "SimulateCommand"
@@ -349,26 +430,13 @@ Public Class BTLPartManagerVM
End Property
Friend Sub Edit()
Map.refBTLDataWndVM.SetIsBTLDataWnd(False)
Dim bValuePart As Boolean = False
For Each GeneralParam As ProjectParameters In Map.refProjectVM.GeneralParametersList
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)
GetGeneralParameters()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetFeatureListVisibility(Visibility.Collapsed)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGER)
' Disabilito LeftPanel
Map.refProjectVM.SetLeftPanel_IsEnabled(False)
Map.refProjectVM.SetLeftPanel_Opacity(0.2)
Map.refProjectVM.SetOnlyProdLeftPanel_IsEnabled(False)
Map.refProjectVM.SetOnlyProdLeftPanel_Opacity(0.2)
End Sub
#End Region ' Edit
@@ -386,18 +454,9 @@ Public Class BTLPartManagerVM
Public Sub ResetCalc()
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
If IsNothing(SelPart) Then Return
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()
End If
End Sub
@@ -319,25 +319,21 @@ Public Class BTLFeatureVM
m_BTLFeatureM = BTLFeatureM
AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
m_BTLPartM = BTLPartM
m_PartM = Nothing
CreatePBTLParamVMList()
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
NotifyPropertyChanged(NameOf(bStrategy_Visibility))
m_MenuList.Add(New MenuItemVm(Me))
End Sub
Sub New(BTLFeatureM As BTLFeatureM, PartM As PartM)
Sub New(BTLFeatureM As BTLFeatureM)
m_BTLFeatureM = BTLFeatureM
m_BTLPartM = Nothing
m_PartM = PartM
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
NotifyPropertyChanged(NameOf(bStrategy_Visibility))
End Sub
#End Region ' CONSTRUCTOR
@@ -493,7 +489,7 @@ Public Class BTLFeatureVM
End Property
Public Sub DeleteFeature()
Map.refFeatureListManagerVM.RemoveFeature()
If Map.refMainMenuVM.SelPage = Pages.VIEW Then Map.refFeatureListManagerVM.RemoveFeature()
End Sub
#End Region ' DeleteFeature
@@ -571,8 +567,8 @@ Public Class BTLFeatureVM
Public Sub Strategy()
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.STRATEGYMANAGER)
' Disabilito LeftPanel
Map.refProjectVM.SetLeftPanel_IsEnabled(False)
Map.refProjectVM.SetLeftPanel_Opacity(0.2)
Map.refProjectVM.SetOnlyProdLeftPanel_IsEnabled(False)
Map.refProjectVM.SetOnlyProdLeftPanel_Opacity(0.2)
Map.refForcedStrategyPanelVM.Init(BTLFeatureM)
End Sub
@@ -591,24 +587,26 @@ Public Class BTLFeatureVM
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
'Map.refForcedStrategyBTLVM.Init(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.BTLFeatureM)
Map.refForcedStrategyPanelVM.Init(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.BTLFeatureM)
End If
' se modalità building, la tolgo
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refShowBeamPanelVM.ShowBuilding_IsChecked = False
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
End If
Map.refProjectVM.SetRawPartManagerVisibility(False)
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGERBTL)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.STRATEGYMANAGERBTL)
Map.refFeatureManagerVM.SetEditIsEnabled()
' Disabilito LeftPanel
Map.refProjectVM.SetLeftPanel_IsEnabled(False)
Map.refProjectVM.SetLeftPanel_Opacity(0.2)
Map.refProjectVM.SetOnlyProdLeftPanel_IsEnabled(False)
Map.refProjectVM.SetOnlyProdLeftPanel_Opacity(0.2)
EgtDraw()
End Sub
#End Region ' EditFeature
#End Region ' COMMANDS
#Region "EVENTS"
@@ -132,7 +132,7 @@ Public Class BTLParamVM
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
' verifico che sia compreso tra minimo e massimo
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))
Return
End If
@@ -147,9 +147,9 @@ Public Class BTLParamVM
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
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
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
UpdateParamValue(dNewValue, "")
Case Else
@@ -194,7 +194,7 @@ Public Class BTLParamVM
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
' verifico che sia compreso tra minimo e massimo
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))
Return
End If
+138 -264
View File
@@ -10,8 +10,6 @@ Public Class BTLPartVM
#Region "FIELDS & PROPERTIES"
Private DOWN_IMAGE As String = "pack://application:,,,/Resources/NewPage/down.png"
Private WithEvents m_BTLPartM As BTLPartM
Public ReadOnly Property BTLPartM As BTLPartM
Get
@@ -92,7 +90,7 @@ Public Class BTLPartVM
Else
Dim MachGroupModel = Nothing
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
If Not IsNothing(MachGroupModel) AndAlso MachGroupModel.State > ItemState.ND Then
bDuploInProduction = True
@@ -102,14 +100,14 @@ Public Class BTLPartVM
End If
Next
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
End If
' lo impedisco
' 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)
DeleteDuplo_Otmizer(DuploList)
DeleteDuplo_OnlyProdPage(DuploList)
Else
' reimposto vecchio valore
Return False
@@ -142,7 +140,7 @@ Public Class BTLPartVM
Return True
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
' recupero grezzo cui appartiene
Dim nRawPartId As Integer = MyMachGroupPanelM.DuploGetRawPart(nDuploId)
@@ -186,10 +184,7 @@ Public Class BTLPartVM
Public Property sL As String
Get
Dim nOrigGroupId As Integer = nPartId
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then
nOrigGroupId = Map.refSceneShowBuldingVM.MapInfo(nPartId)
End If
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = GetOrigFrameGroup(nPartId)
End If
Dim frBeam As New Frame3d
@@ -247,10 +242,7 @@ Public Class BTLPartVM
Public Property sW As String
Get
Dim nOrigGroupId As Integer = nPartId
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then
nOrigGroupId = Map.refSceneShowBuldingVM.MapInfo(nPartId)
End If
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = GetOrigFrameGroup(nPartId)
End If
Dim frBeam As New Frame3d
@@ -308,10 +300,7 @@ Public Class BTLPartVM
Public Property sH As String
Get
Dim nOrigGroupId As Integer = nPartId
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then
nOrigGroupId = Map.refSceneShowBuldingVM.MapInfo(nPartId)
End If
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = GetOrigFrameGroup(nPartId)
End If
Dim frBeam As New Frame3d
@@ -776,7 +765,7 @@ Public Class BTLPartVM
StringToLenAdv(sValArray(1), m_BTLPartM.m_dCamberLen2, True) AndAlso
StringToLenAdv(sValArray(2), m_BTLPartM.m_dCamberLen3, 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) &
" P02: " & sValArray(1) &
" P03: " & sValArray(2) &
@@ -825,7 +814,7 @@ Public Class BTLPartVM
End Get
Set(value As Integer)
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(",")
If sValArray.Count() >= 4 AndAlso
@@ -854,7 +843,7 @@ Public Class BTLPartVM
End Get
Set(value As String)
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(",")
If sValArray.Count() >= 4 AndAlso
@@ -1121,7 +1110,7 @@ Public Class BTLPartVM
End Get
Set(value As Integer)
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
m_BTLPartM.SelMATERIALTYPEGRP = value
Else
@@ -1136,7 +1125,7 @@ Public Class BTLPartVM
End Get
Set(value As String)
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
m_BTLPartM.sMATERIALTYPESPEC = value
Else
@@ -1176,7 +1165,7 @@ Public Class BTLPartVM
If nTempADDED >= nINPROD Then
m_BTLPartM.nADDED = nTempADDED
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
NotifyPropertyChanged(NameOf(sADDED))
@@ -1355,7 +1344,7 @@ Public Class BTLPartVM
Select Case m_BTLPartM.nGlobalState
Case CalcStates.ERROR_, CalcStates.COLLISION
Return Brushes.Red
Case CalcStates.WARNING, CalcStates.SECTION
Case CalcStates.WARNING
Return Brushes.Orange
Case CalcStates.INFO, CalcStates.OK
Return Brushes.Green
@@ -1390,8 +1379,6 @@ Public Class BTLPartVM
Return "w"
Case CalcStates.INFO
Return "i"
Case CalcStates.SECTION
Return "x"
Case Else
Return ""
End Select
@@ -1403,7 +1390,7 @@ Public Class BTLPartVM
Select Case m_BTLPartM.m_nGlobalState
Case CalcStates.ERROR_, CalcStates.COLLISION
Return Brushes.Red
Case CalcStates.WARNING, CalcStates.SECTION
Case CalcStates.WARNING
Return Brushes.Orange
Case CalcStates.INFO
Return Brushes.Green
@@ -1554,9 +1541,11 @@ Public Class BTLPartVM
If Not IsNothing(SelBTLFeatureVM.SelPBTLParam) Then SelBTLFeatureVM.SelPBTLParam = Nothing
' rinfresco bottoni freecontour
m_SelBTLFeatureVM.RefreshFCMBtnVisibility()
Map.refStatisticsTimePanelVM.SetViewPage_Visibility(Visibility.Visible)
Map.refStatisticsTimePanelVM.SetMachiningPage_Visibility(Visibility.Collapsed)
' Controlo se nPRC è 900 rendo visibile combobox Variant
If m_SelBTLFeatureVM.nPRC = 900 Then
Map.refFeatureManagerVM.SetVariant_Visibility(True)
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Visible)
Dim nVariant As Integer = 0
If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then
m_SelBTLFeatureVM.nSelVARIANT = nVariant
@@ -1569,70 +1558,54 @@ Public Class BTLPartVM
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png")
End If
Else
Map.refFeatureManagerVM.SetVariant_Visibility(False)
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Collapsed)
End If
' Forzo strategia
'Map.refForcedStrategyBTLVM.Init(m_SelBTLFeatureVM.BTLFeatureM)
Map.refForcedStrategyPanelVM.Init(m_SelBTLFeatureVM.BTLFeatureM)
'Else
' EgtDeselectAll()
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))
' se modalità building, la tolgo
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.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
End If
End Set
End Property
Friend Sub SetSelFeature(value As BTLFeatureVM)
If Not IsNothing(m_PrevSelBTLFeatureVM) Then m_PrevSelBTLFeatureVM.DeselGeomFeature()
m_SelBTLFeatureVM = value
If Not IsNothing(m_SelBTLFeatureVM) Then
m_SelBTLFeatureVM.SelGeomFeature()
m_PrevSelBTLFeatureVM = value
Map.refPParameterListVM.SetCurrDraw(DirectCast(m_SelBTLFeatureVM, BTLFeatureVM).sDrawPath)
' deseleziono i parametri
If Not IsNothing(SelBTLFeatureVM.SelPBTLParam) Then SelBTLFeatureVM.SelPBTLParam = Nothing
' rinfresco bottoni freecontour
m_SelBTLFeatureVM.RefreshFCMBtnVisibility()
' Controlo se nPRC è 900 rendo visibile combobox Variant
If m_SelBTLFeatureVM.nPRC = 900 Then
Map.refFeatureManagerVM.SetVariant_Visibility(True)
Dim nVariant As Integer = 0
If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then
m_SelBTLFeatureVM.nSelVARIANT = nVariant
End If
If m_SelBTLFeatureVM.nSelVARIANT > 0 AndAlso
System.IO.File.Exists(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & "." & m_SelBTLFeatureVM.sDES & ".png") Then
' imposto path disegno da mostrare in BottomPanel
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & "." & m_SelBTLFeatureVM.sDES & ".png")
Else
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png")
End If
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
'Public Property SelBTLFeatureVMOnlyGraph As BTLFeatureVM
' Get
' Return m_SelBTLFeatureVM
' End Get
' Set(value As BTLFeatureVM)
' m_SelBTLFeatureVM = value
' If Not IsNothing(m_SelBTLFeatureVM) Then
' m_SelBTLFeatureVM.SelGeomFeature()
' ' deseleziono i parametri
' If Not IsNothing(SelBTLFeatureVM.SelPBTLParam) Then SelBTLFeatureVM.SelPBTLParam = Nothing
' End If
' If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
' EgtResetCurrMachGroup()
' ResetSearchFound()
' Map.refStatisticsTimePanelVM.SetViewPage_Visibility(Visibility.Visible)
' Map.refStatisticsTimePanelVM.SetMachiningPage_Visibility(Visibility.Collapsed)
' EgtDraw()
' NotifyPropertyChanged(NameOf(SelBTLFeatureVM))
' NotifyPropertyChanged(NameOf(SelBTLFeatureVMOnlyGraph))
' ' se modalità building, la tolgo
' If Not IsNothing(m_SelBTLFeatureVM) AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
' Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
' Map.refShowBeamPanelVM.SetShowBuilding(False)
' End If
' End Set
'End Property
Private m_Calc_PartEnd As Boolean = False
Public ReadOnly Property Calc_PartEnd As Boolean
@@ -1676,6 +1649,20 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(bOpenFeatureList))
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
Get
Return BTLPartM.nINVERTED = 180
@@ -1683,13 +1670,6 @@ Public Class BTLPartVM
Set(value As Boolean)
' eseguo inversione
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
ResetCalcTotalPart()
EgtDraw()
@@ -1698,14 +1678,6 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(IsInverted))
End Set
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
Public ReadOnly Property IsRowEnabled As Boolean
@@ -1718,57 +1690,15 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(IsRowEnabled))
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
Private m_cmdInvert As ICommand
Private m_cmdBackRotation As ICommand
Private m_cmdForwardRotation As ICommand
Private m_cmdXRotation As ICommand
Private m_cmdPartColour As ICommand
Private m_cmdShowPopUpSettingBtnCmd As ICommand
Private m_cmdVerify 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"
@@ -1784,18 +1714,6 @@ Public Class BTLPartVM
End Get
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
Get
Return EgtMsg(61997)
@@ -1872,7 +1790,7 @@ Public Class BTLPartVM
AddHandler m_BTLFeatureVMList.CollectionChanged, AddressOf OnBTLFeatureVMListChanged
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
If m_BTLPartM.Rotation(IsPositive, SelectedMachineType, bRedraw, dAng) Then
' aggiorno visualizzazione dimensioni
@@ -1880,16 +1798,7 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(sH))
NotifyPropertyChanged(NameOf(sL))
' setto part e tutte le feature da ricalcolare
If bResetCalc 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(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, sInfoNgePart(0))
Next
End If
ResetCalcTotalPart()
End If
ResetCalcTotalPart()
' aggiorno sezioni
Map.refProjectVM.BTLStructureVM.UpdateSection(Section, OldSection)
End If
@@ -1909,9 +1818,7 @@ Public Class BTLPartVM
nState = CalcStates.OK
Case 22
nState = CalcStates.COLLISION
Case 17
nState = CalcStates.SECTION
Case 19
Case 17, 19
nState = CalcStates.WARNING
Case < 0
nState = CalcStates.INFO
@@ -1936,7 +1843,6 @@ Public Class BTLPartVM
m_BTLPartM.nCALC_ROT = 0
m_BTLPartM.nCALC_FALL = 0
m_BTLPartM.sCALC_MSG = ""
m_BTLPartM.nCALC_TIME = 0
' aggiorno lista feature in iconcina calcolo
BTLFeatureVMList_View.Refresh()
NotifyPropertyChanged(NameOf(Calc_BorderBrush))
@@ -2216,7 +2122,7 @@ Public Class BTLPartVM
For Each sPart In ToAddList
sMessage &= " - " & sPart & Environment.NewLine
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
PartVM.AddNewPartToAdded()
Next
@@ -2302,10 +2208,10 @@ Public Class BTLPartVM
ForwardRotation(True)
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
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
bLockRotation = True
' 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
' 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 {
.Color = Col.ToColor()
}
' Visualizzo dialogo
If ColorDlg.ShowDialog() = False Then Return False
If ColorDlg.ShowDialog() <> Forms.DialogResult.OK Then Return False
' 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
End Function
#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"
''' <summary>
''' Returns a command that do Open.
''' </summary>
Public ReadOnly Property Verify_Command As ICommand
Get
If m_cmdVerify Is Nothing Then
@@ -2404,10 +2338,12 @@ Public Class BTLPartVM
End Get
End Property
''' <summary>
''' Execute the Open. This method is invoked by the OpenCommand.
''' </summary>
Friend Sub Verify()
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, CalcIntegration.CmdTypes.CHECKNOSIM)
Map.refCALCPanelVM.Verify(ProjectType.PROJ)
Return
End Sub
@@ -2415,6 +2351,9 @@ Public Class BTLPartVM
#Region "AddToRawPart"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property AddToRawPart_Command As ICommand
Get
If m_cmdAddToRawPart Is Nothing Then
@@ -2424,6 +2363,9 @@ Public Class BTLPartVM
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub AddToRawPart()
If IsNothing(ProjectManagerVM.CurrProd) Then Return
Dim SelPart As BTLPartVM
@@ -2444,7 +2386,7 @@ Public Class BTLPartVM
If IsNothing(SelMachGroup) Then Return
' se pareti e piu' di uno selezionato, esco
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
End If
' se MachGroup gia' mandato in produzione, esco
@@ -2463,13 +2405,13 @@ Public Class BTLPartVM
' verifico sezione e materiale
For Each Part In SelParts
If Part.Section <> BeamMachGroup.Section Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61866), EgtMsg(30007))
MessageBox.Show(EgtMsg(61866), EgtMsg(30007))
Return
End If
Next
' verifico lunghezza totale
If Not VerifyTotLength(BeamMachGroup, SelParts) Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61867), EgtMsg(30007))
MessageBox.Show(EgtMsg(61867), EgtMsg(30007))
Return
End If
If AddPartToBeam(BeamMachGroup, SelParts) Then
@@ -2487,7 +2429,7 @@ Public Class BTLPartVM
Dim WallMachGroup As MyMachGroupVM = SelMachGroup
' verifico spessore
If SelPart.Section <> WallMachGroup.Section Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61868), EgtMsg(30007))
MessageBox.Show(EgtMsg(61868), EgtMsg(30007))
Return
End If
If AddPartToWall(WallMachGroup, SelPart) Then
@@ -2516,8 +2458,6 @@ Public Class BTLPartVM
End Function
Friend Function AddPartToBeam(BeamMachGroup As MyMachGroupVM, PartsToAdd As List(Of BTLPartVM)) As Boolean
EgtBeamShowFacesName(False)
EgtBeamShowLoadingSide(False, False)
' ordino i pezzi da aggiungere
PartsToAdd = PartsToAdd.OrderBy(Function(x) x.dL).ToList()
' creo copie dei pezzi
@@ -2710,90 +2650,6 @@ Public Class BTLPartVM
#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
#Region "EVENTS"
@@ -2828,6 +2684,18 @@ Public Class BTLPartVM
Next
End If
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)
Select Case e.PropertyName
@@ -2848,6 +2716,12 @@ Public Class BTLPartVM
CalcGlobalUpdate(True)
End Select
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
@@ -13,8 +13,6 @@ Public Class BTLStructureVM
#Region "FIELDS & PROPERTIES"
Private DOWN_IMAGE As String = "pack://application:,,,/Resources/NewPage/down.png"
' Nome file NGE con i pezzi selezionati per effettuare UpdateBTL
Friend Const UPDATEBTL_NGE As String = "UpdateBTL.nge"
@@ -60,6 +58,64 @@ Public Class BTLStructureVM
m_bOnlySelectItem = value
End Set
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)
Public ReadOnly Property SelBTLParts As PartsObservableCollection(Of BTLPartVM)
@@ -112,9 +168,9 @@ Public Class BTLStructureVM
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
End If
SceneSelPartSelection()
' seleziono pezzo in Db geometrico
@@ -123,102 +179,8 @@ Public Class BTLStructureVM
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
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
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)
' imposto tipo di grid selezionata
Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.PART)
' trovo ed evidenzio MachGroup e Duplo di questo pezzo
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
Dim MachGroupList As New List(Of MyMachGroupVM)
@@ -241,11 +203,36 @@ Public Class BTLStructureVM
End If
End If
' 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)
EgtZoom(ZM.ALL)
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
Private m_SelBTLPart As BTLPartVM = Nothing
@@ -496,7 +483,7 @@ Public Class BTLStructureVM
Public ReadOnly Property nPROJTYPE As BWType
Get
Select Case Map.refMainMenuVM.SelPage
Case Pages.OPTIMIZERPAGE
Case Pages.ONLYPRODPAGE
Return Map.refProdManagerVM.nProdType
Case Else
Return BWType.NULL
@@ -835,7 +822,7 @@ Public Class BTLStructureVM
Public ReadOnly Property Data_ToolTip As String
Get
Return EgtMsg(61898)
Return EgtMsg(61897)
End Get
End Property
@@ -873,19 +860,6 @@ Public Class BTLStructureVM
If BTLStructureM.nAsseBaseId = GDB_ID.NULL Then
Map.refShowBeamPanelVM.SetShowBuilding(False)
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 Region ' Constructor
@@ -1172,7 +1146,6 @@ Public Class BTLStructureVM
End Function
Friend Sub UpdateSection(NewPartSection As SectionXMaterial, OldPartSection As SectionXMaterial)
Dim tmpSectionList As New List(Of SectionXMaterial)
If IsNothing(BTLPartVMList) Then Return
' verifico se era unico con vecchia sezione
If Not m_BTLPartVMList.Any(Function(x) x.Section = OldPartSection) Then
@@ -1184,13 +1157,8 @@ Public Class BTLStructureVM
End If
' verifico se esiste già nuova sezione
If Not m_SectionList.Any(Function(x) x = NewPartSection) Then
tmpSectionList.Add(NewPartSection)
m_SectionList.Add(NewPartSection)
End If
Application.Current.Dispatcher.Invoke(Sub()
For Each SectionItem As SectionXMaterial In tmpSectionList
m_SectionList.Add(SectionItem)
Next
End Sub)
End Sub
' funzione che aggiorna totale tempi a fine calcolo
@@ -1272,7 +1240,7 @@ Public Class BTLStructureVM
End Property
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()
End Sub
@@ -1326,8 +1294,8 @@ Public Class BTLStructureVM
Map.refProjectVM.BTLStructureVM.SectionList.Add(NewPartVM.Section)
End If
End If
If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then Map.refProjectVM.UpdatePart(nNewPartId)
End If
End Sub
#End Region ' AddPart
@@ -1347,13 +1315,13 @@ Public Class BTLStructureVM
If IsNothing(CurrProd) Then Return
' verifico se progetto modificato, e chiedo se salvare
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
Map.refProdManagerVM.Save()
Case MessageBoxResult.Cancel
Return
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
End Select
End If
@@ -1382,14 +1350,12 @@ Public Class BTLStructureVM
If bWithDlg Then
' apro finestra scelta file
Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With {
.Title = EgtMsg(61834),
.DefaultExt = ".btl",
.Filter = "BTL (*.btl)|*.btl" &
"|BTLX (*.btlx)|*.btlx",
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
.CheckFileExists = True,
.ValidateNames = True}
If BTLDlg.ShowDialog() Then
sFile = BTLDlg.FileName
Else
@@ -1,13 +1,13 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="BlockedWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
Title="{Binding Title}"
WindowStartupLocation="CenterOwner"
Height="200" Width="400"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<EgtWPFLib5:EgtCustomWindow x:Class="BlockedWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
Title="{Binding Title}" WindowStartupLocation="CenterOwner"
Height="200" Width="400">
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
@@ -19,8 +19,9 @@
</Grid.RowDefinitions>
<TextBlock Grid.Row="1"
Text="{Binding Msg_Text}"
Style="{StaticResource Msg_TextBlock}"/>
<Grid Style="{StaticResource BlockedWnd_Grid}">
TextAlignment="Center"
Margin="40,0,40,0"/>
<Grid Grid.Row="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
@@ -28,18 +29,17 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1"
Content="{Binding Save_Msg}"
<Button Grid.Column="1" Content="{Binding Save_Msg}"
IsDefault="True"
Command="{Binding Save_Command}"
Visibility="{Binding Buttons_Visibility}"
Style="{StaticResource EgtWPFLib5_Button}"/>
<Button Grid.Column="3"
Content="{Binding DoNotSave_Msg}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Grid.Column="3" Content="{Binding DoNotSave_Msg}"
Command="{Binding DoNotSave_Command}"
Visibility="{Binding Buttons_Visibility}"
Style="{StaticResource EgtWPFLib5_Button}"/>
</Grid>
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_BlockedWndVM As BlockedWndVM
Sub New(Owner As Window, BlockedWndVM As BlockedWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = BlockedWndVM
@@ -114,6 +114,9 @@ Public Class BlockedWndVM
#Region "Save"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property Save_Command As ICommand
Get
If m_cmdSave Is Nothing Then
@@ -123,8 +126,12 @@ Public Class BlockedWndVM
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub Save()
' salvo progetto
'Map.refProdManagerVM.Save()
Map.refProdManagerVM.Save()
' mando messaggio di blocco avvenuto
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
@@ -134,6 +141,9 @@ Public Class BlockedWndVM
#Region "DoNotSave"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property DoNotSave_Command As ICommand
Get
If m_cmdDoNotSave Is Nothing Then
@@ -143,6 +153,9 @@ Public Class BlockedWndVM
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub DoNotSave()
' mando messaggio di blocco avvenuto
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
+52 -78
View File
@@ -40,6 +40,16 @@ Public Class CALCPanelVM
End Set
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
Public Property ChooseMachineBtn_Visibility As Visibility
Get
@@ -95,17 +105,6 @@ Public Class CALCPanelVM
End Set
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
Private m_cmdChooseMachine As ICommand
Private m_cmdOk As ICommand
@@ -151,7 +150,7 @@ Public Class CALCPanelVM
Private Sub Calc_Ended(sender As Object, e As CalcEndEventArgs)
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
If e.End_ = CalcEndEventArgs.Results.EDIT Then
Map.refMyStatusBarVM.SetOutputMessage("Editor closed")
@@ -162,7 +161,7 @@ Public Class CALCPanelVM
Map.refProdManagerVM.Save()
End If
' 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
Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False)
End If
@@ -388,7 +387,6 @@ Public Class CALCPanelVM
If nProgramPage = ProjectType.PROJ Then
' aggiorno il pezzo
Dim BTLPart As BTLPartVM = GetBTLPartVMFromBTLPartId(nBarId)
BTLPart.SetIsRowEnabled(True)
BTLPart.CalcGlobalUpdate()
' lancio aggiornamento tempo su BTL
Map.refProjectVM.BTLStructureVM.CalcGlobalTime()
@@ -397,7 +395,6 @@ Public Class CALCPanelVM
For Each Part In Machgroup.PartVMList
Part.CalcGlobalUpdate()
Next
Machgroup.SetIsRowEnabled(True)
Machgroup.CalcGlobalUpdate()
' lancio aggiornamento tempo su MachgroupPanel
Map.refProjectVM.MachGroupPanelVM.CalcGlobalTime()
@@ -410,6 +407,7 @@ Public Class CALCPanelVM
nLastErr = 25
sLastMsg = "Execution Error"
End If
End Sub
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
MachineList.Add(Machine)
' 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))
m_OrigSelectedMachine = SelectedMachine
End If
@@ -532,7 +530,13 @@ Public Class CALCPanelVM
m_OrigSelectedMachine = SelectedMachine
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
Dim ProjType As BWType = ProjectManagerVM.CurrProd.nType
Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing
@@ -548,14 +552,14 @@ Public Class CALCPanelVM
End If
Else
Dim ExecThread As New Thread(Sub()
VerifyWithEngine(ProgramPage, CmdType)
VerifyWithEngine(ProgramPage)
End Sub)
ExecThread.Start()
End If
End Sub
Private Sub VerifyProjWithEngine(CurrPart As BTLPartVM, CmdType As Integer)
Private Sub VerifyProjWithEngine(CurrPart As BTLPartVM)
If Not CurrPart.bDO Then Return
Dim Args As New Dictionary(Of String, String)
Args.Add("BarId", CurrPart.nPartId)
@@ -574,7 +578,7 @@ Public Class CALCPanelVM
Dim sBTLPartFilePath As String = BarPath & "\" & CurrPart.nPDN.ToString() & ".ori.bwe"
If File.Exists(sBTLPartFilePath) Then File.Delete(sBTLPartFilePath)
End If
nCmdType = CmdType
nCmdType = CalcIntegration.CmdTypes.CHECKNOSIM
End Select
Args.Add("CmdType", nCmdType)
Dim ExecEnvironment As EXECENVIRONMENTS = EXECENVIRONMENTS.NULL
@@ -584,23 +588,11 @@ Public Class CALCPanelVM
Case BWType.WALL
ExecEnvironment = EXECENVIRONMENTS.WALL
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)
Request.Args("BarPath") = CreateNewProjectFromPart(CurrPart.nPartId, BarPath)
EgtSetCurrentContext(CurrContext)
EgtOutLog("Creato progetto " & CurrPart.nPartId)
If Request.ExecEnvironment <> EXECENVIRONMENTS.NULL Then
If Not MyExecProcessManager.ExecProcessManagerList.ContainsKey(Request.ExecEnvironment) Then
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
MyExecProcessManager.ExecProcessManagerList(Request.ExecEnvironment).ArgumentsEnqueue(Request)
End If
End Sub
@@ -636,27 +628,15 @@ Public Class CALCPanelVM
Case BWType.WALL
ExecEnvironment = EXECENVIRONMENTS.WALL
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)
Request.Args("BarPath") = CreateNewProjectFromMachGroup(CurrMachGroup.Id, BarPath, CurrMachGroup.nGlobalState)
EgtSetCurrentContext(CurrContext)
EgtOutLog("Creato progetto " & CurrMachGroup.Id)
If Request.ExecEnvironment <> EXECENVIRONMENTS.NULL Then
If Not MyExecProcessManager.ExecProcessManagerList.ContainsKey(Request.ExecEnvironment) Then
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
MyExecProcessManager.ExecProcessManagerList(Request.ExecEnvironment).ArgumentsEnqueue(Request)
End If
End Sub
Private Sub VerifyWithEngine(ProgramPage As ProjectType, CmdType As Integer)
Private Sub VerifyWithEngine(ProgramPage As ProjectType)
Dim ProjType As BWType = ProjectManagerVM.CurrProd.nType
' lancio calcolo
Dim ExecEnvironment As EXECENVIRONMENTS = EXECENVIRONMENTS.NULL
@@ -666,15 +646,9 @@ Public Class CALCPanelVM
Case BWType.WALL
ExecEnvironment = EXECENVIRONMENTS.WALL
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 Not Map.refProjectVM.BTLStructureVM.SelBTLPart.bDO Then Return
VerifyProjWithEngine(Map.refProjectVM.BTLStructureVM.SelBTLPart, CmdType)
VerifyProjWithEngine(Map.refProjectVM.BTLStructureVM.SelBTLPart)
ElseIf ProgramPage = ProjectType.PROD Then
' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra
If Map.refMachGroupPanelVM.SelectedMachGroup.nProduction_State >= ItemState.Assigned Then Return
@@ -765,7 +739,7 @@ Public Class CALCPanelVM
Map.refMyStatusBarVM.SetOutputMessage(sProgress)
End Sub
Friend Sub VerifyAll(ProgramPage As ProjectType, CmdType As Integer)
Friend Sub VerifyAll(ProgramPage As ProjectType)
Dim ProjType As BWType = ProjectManagerVM.CurrProd.nType
If GetMainPrivateProfileInt(S_GENERAL, "UseCam5", 0) = 1 Then
Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing
@@ -780,32 +754,34 @@ Public Class CALCPanelVM
End If
Else
Dim ExecThread As New Thread(Sub()
VerifyAllWithEngine(ProgramPage, CmdType)
VerifyAllWithEngine(ProgramPage)
End Sub)
ExecThread.Start()
End If
End Sub
Private Sub VerifyAllWithEngine(ProgramPage As ProjectType, CmdType As Integer)
Private Sub VerifyAllWithEngine(ProgramPage As ProjectType)
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
Map.refMyStatusBarVM.MaximumValue = Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count
For PartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
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
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
Map.refMyStatusBarVM.MaximumValue = Map.refMachGroupPanelVM.MachGroupVMList.Count
For PartIndex = 0 To Map.refMachGroupPanelVM.MachGroupVMList.Count - 1
' 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
VerifyProdWithEngine(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex))
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 Sub
@@ -888,7 +864,7 @@ Public Class CALCPanelVM
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
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
SetChooseMachine_Visibility(True)
End If
@@ -915,8 +891,13 @@ Public Class CALCPanelVM
' resetto i parametri errori integration ciclando su ogni Part e per ogni Part ogni Feature
Dim ProjId As Integer
Dim nPartProjId As Integer
'Dim TempList As New List(Of BTLPartM)
Dim nPartId As Integer = EgtGetFirstPart()
'If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
ProjId = ProjectManagerVM.CurrProd.nProjIdList(0)
'Else
' ProjId = ProjectManagerVM.CurrProj.nProjId
'End If
EgtGetInfo(nPartId, BTL_PRT_PROJ, nPartProjId)
While nPartId <> GDB_ID.NULL
' se devo filtrare un progetto
@@ -949,8 +930,11 @@ Public Class CALCPanelVM
' verifico che sia una feature
Dim nGRP As Integer
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, 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, If(Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE, ITG_PROJ_ROT, ITG_PROD_ROT))
EgtRemoveInfo(nFeatureId, ITG_PROD_ROT)
End If
nFeatureId = EgtGetNext(nFeatureId)
@@ -959,8 +943,9 @@ Public Class CALCPanelVM
End If
nPartId = EgtGetNextPart(nPartId)
End While
' Se OnlyProdPage rimuovo MachGroup
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
Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Index)
CurrMachGroup.DeleteMachGroup()
@@ -969,17 +954,6 @@ Public Class CALCPanelVM
End If
' rigenero struttura BTL
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 Region ' Ok
@@ -1,33 +1,32 @@
<StackPanel x:Class="CalcPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource PartManager_StackPanel}">
Style="{StaticResource OnlyProdPartManager_StackPanel}">
<Button ToolTip="{Binding ChooseMachine_ToolTip}"
Command="{Binding ChooseMachine_Command}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Visibility="{Binding ChooseMachineBtn_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="{StaticResource ChooseMachine_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<Image Source="/Resources/CALCPanel/ChooseMachine.png" Stretch="Uniform"/>
</Button>
<Grid Visibility="{Binding ChooseMachine_Visibility}"
Style="{StaticResource CalcPanel_Grid}">
<Grid Margin="0,0,5,0" Visibility="{Binding ChooseMachine_Visibility}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!--Combobox per selezionare la macchina corrente-->
<ComboBox ItemsSource="{Binding Path=MachineList}"
<ComboBox Grid.Column="0"
ItemsSource="{Binding Path=MachineList}"
DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}"
SelectedValuePath="Name"
Style="{StaticResource CalcPanel_ComboBox}"/>
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<Button Grid.Column="1"
Content="OK"
Command="{Binding Ok_Command}"
Style="{StaticResource CalcPanel_Button}"/>
Style="{StaticResource ToolBarOnlyProdCalcPanel_Button}"/>
</Grid>
</StackPanel>
@@ -1,20 +1,26 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="ChangeMaterialWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
Title="ChangeMaterialWnd"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<EgtWPFLib5:EgtCustomWindow x:Class="ChangeMaterialWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="ChangeMaterialWnd">
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Style="{StaticResource ChangeMaterialWnd_Grid}">
<Grid HorizontalAlignment="Center"
Grid.Row="0"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
@@ -24,28 +30,31 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding ProjMaterial_Msg}"
Style="{StaticResource Option_TextBlock}"/>
<ComboBox Grid.Column="1"
ItemsSource="{Binding ProjMaterialList}"
SelectedItem="{Binding SelProjMaterial}"
Style="{StaticResource ProjMaterial_ComboBox}"/>
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding ProjMaterialList}"
SelectedItem="{Binding SelProjMaterial}"
Grid.Column="1"
Width="150"
Style="{StaticResource FeatureComboBox}"/>
</Grid>
<Grid Grid.Row="1"
Style="{StaticResource ChangeMaterialWnd_Grid}">
<Grid HorizontalAlignment="Center"
Grid.Row="1"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding WjMaterial_Msg}"
Style="{StaticResource Option_TextBlock}"/>
<ComboBox Grid.Column="1"
ItemsSource="{Binding WhMaterialList}"
SelectedItem="{Binding SelWhMaterial}"
Style="{StaticResource ProjMaterial_ComboBox}"/>
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding WhMaterialList}"
SelectedItem="{Binding SelWhMaterial}"
Grid.Column="1"
Width="150"
Style="{StaticResource FeatureComboBox}"/>
</Grid>
<Grid Grid.Row="2"
Style="{StaticResource AddPartWnd_Grid}">
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
@@ -53,15 +62,15 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1"
Content="{Binding Ok_Msg}"
<Button Content="{Binding Ok_Msg}"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/>
<Button Grid.Column="3"
Content="{Binding Cancel_Msg}"
IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/>
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding Cancel_Msg}"
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_ChangeMaterialWndVM As ChangeMaterialWndVM
Sub New(Owner As Window, ChangeMaterialWndVM As ChangeMaterialWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ChangeMaterialWndVM
@@ -129,7 +129,7 @@ Public Class ChangeMaterialWndVM
Not IsNothing(m_SelWhMaterial) AndAlso m_SelWhMaterial <> "" Then
RaiseEvent m_CloseWindow(True)
Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61858), EgtMsg(30007))
MessageBox.Show(EgtMsg(61858), EgtMsg(30007))
End If
End Sub
@@ -1,15 +1,18 @@
<EgtBEAMWALLCORE:OptimizerWindow x:Class="ChangeParameterWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
SizeToContent="Height"
WindowStartupLocation="CenterOwner"
Width="300"
Title="ChangeParameterWnd"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<EgtWPFLib5:EgtCustomWindow x:Class="ChangeParameterWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="Height"
Width="300"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="ChangeParameterWnd">
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
@@ -27,52 +30,49 @@
</Grid.RowDefinitions>
<TextBlock Text="Process"
Style="{StaticResource Option_TextBlock}"/>
Style="{StaticResource OptionTextBlock}"/>
<ComboBox Grid.Column="1"
ItemsSource="{Binding PRCList}"
SelectedItem="{Binding SelPRC}"
DisplayMemberPath="ghDesc"
Style="{StaticResource PRCList_ComboBox}"/>
HorizontalAlignment="Stretch"
Style="{StaticResource FeatureComboBox}"/>
<TextBlock Grid.Row="2"
Text="Parameter"
Style="{StaticResource Option_TextBlock}"/>
<ComboBox Grid.Row="2"
Grid.Column="1"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox Grid.Row="2" Grid.Column="1"
ItemsSource="{Binding ParamList}"
SelectedItem="{Binding SelParam}"
DisplayMemberPath="sNameAndDescription"
Style="{StaticResource PRCList_ComboBox}"/>
HorizontalAlignment="Stretch"
Style="{StaticResource FeatureComboBox}"/>
<TextBlock Grid.Row="4"
Text="Actual value"
Style="{StaticResource Option_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="4"
Grid.Column="1"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="4" Grid.Column="1"
Text="{Binding SelParam.sActualValue}"
Visibility="{Binding SelParam.IsTextBox_Visibility}"/>
<CheckBox Grid.Row="4"
Grid.Column="1"
<CheckBox Grid.Row="4" Grid.Column="1"
IsChecked="{Binding SelParam.bActualValue}"
Visibility="{Binding SelParam.IsCheckBox_Visibility}"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="{Binding SelParam.IsCheckBox_Visibility}"/>
<TextBlock Grid.Row="6"
Text="New Value"
Style="{StaticResource Option_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="6"
Grid.Column="1"
<TextBlock Grid.Row="6" Text="New Value"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="6" Grid.Column="1"
Text="{Binding SelParam.sNewValue}"
Visibility="{Binding SelParam.IsTextBox_Visibility}"/>
<CheckBox Grid.Row="6"
Grid.Column="1"
<CheckBox Grid.Row="6" Grid.Column="1"
IsChecked="{Binding SelParam.bNewValue}"
Visibility="{Binding SelParam.IsCheckBox_Visibility}"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="{Binding SelParam.IsCheckBox_Visibility}"/>
<Grid Grid.Row="8"
Grid.ColumnSpan="2"
Style="{StaticResource AddPartWnd_Grid}">
<Grid Grid.Row="8" Grid.ColumnSpan="2"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
@@ -80,15 +80,15 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1"
Content="Ok"
<Button Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/>
<Button Grid.Column="3"
Content="Cancel"
IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/>
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="Cancel"
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
</EgtBEAMWALLCORE:OptimizerWindow>
</EgtWPFLib5:EgtCustomWindow>
@@ -3,6 +3,7 @@
Private WithEvents m_ChangeParameterWndVM As ChangeParameterWndVM
Sub New(Owner As Window, ChangeParameterWndVM As ChangeParameterWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ChangeParameterWndVM
@@ -108,7 +108,7 @@ Public Class ChangeParameterWndVM
Not IsNothing(m_SelParam) AndAlso m_SelParam.sName <> "" Then
RaiseEvent m_CloseWindow(True)
Else
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61858), EgtMsg(30007))
MessageBox.Show(EgtMsg(61858), EgtMsg(30007))
End If
End Sub
@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{DynamicResource ConfigurationPageVM}">
DataContext="{StaticResource ConfigurationPageVM}">
<OPTIMIZER:MachinePanelV DataContext="{Binding MachinePanelVM}"/>
@@ -1,10 +1,10 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports System.IO.Compression
Imports System.Reflection
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtBEAMWALL.Core
Imports MS.Internal
Imports Ionic.Zip
Public Class ConfigurationPageVM
Inherits VMBase
@@ -17,6 +17,16 @@ Public Class ConfigurationPageVM
PDFEDITOR = 2
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
Public Property SelConfigSubPage As Integer
Get
@@ -27,21 +37,21 @@ Public Class ConfigurationPageVM
If m_SelConfigSubPage = ConfigSubPages.GENERAL Then
' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetGeneral_Visibility(True)
SetStrategyManager_Visibility(False)
SetPDFEditor_Visibility(False)
SetGeneral_Visibility(Visibility.Visible)
SetStrategyManager_Visibility(Visibility.Collapsed)
SetPDFEditor_Visibility(Visibility.Collapsed)
ElseIf m_SelConfigSubPage = ConfigSubPages.MACHINE Then
' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetGeneral_Visibility(False)
SetStrategyManager_Visibility(False)
SetPDFEditor_Visibility(False)
SetGeneral_Visibility(Visibility.Collapsed)
SetStrategyManager_Visibility(Visibility.Collapsed)
SetPDFEditor_Visibility(Visibility.Collapsed)
ElseIf m_SelConfigSubPage = ConfigSubPages.PDFEDITOR Then
' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetPDFEditor_Visibility(True)
SetGeneral_Visibility(False)
SetStrategyManager_Visibility(False)
SetPDFEditor_Visibility(Visibility.Visible)
SetGeneral_Visibility(Visibility.Collapsed)
SetStrategyManager_Visibility(Visibility.Collapsed)
End If
End Set
End Property
@@ -204,8 +214,8 @@ Public Class ConfigurationPageVM
Return m_bGeneral_Visibility
End Get
End Property
Friend Sub SetGeneral_Visibility(value As Boolean)
m_bGeneral_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
Friend Sub SetGeneral_Visibility(value As Visibility)
m_bGeneral_Visibility = value
NotifyPropertyChanged(NameOf(General_Visibility))
End Sub
@@ -215,8 +225,8 @@ Public Class ConfigurationPageVM
Return m_bStrategyManager_Visibility
End Get
End Property
Friend Sub SetStrategyManager_Visibility(value As Boolean)
m_bStrategyManager_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
Friend Sub SetStrategyManager_Visibility(value As Visibility)
m_bStrategyManager_Visibility = value
NotifyPropertyChanged(NameOf(StrategyManager_Visibility))
End Sub
@@ -226,8 +236,8 @@ Public Class ConfigurationPageVM
Return m_bMachine_Visibility
End Get
End Property
Friend Sub SetMachine_Visibility(value As Boolean)
m_bMachine_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
Friend Sub SetMachine_Visibility(value As Visibility)
m_bMachine_Visibility = value
NotifyPropertyChanged(NameOf(Machine_Visibility))
End Sub
@@ -237,8 +247,8 @@ Public Class ConfigurationPageVM
Return m_bPDFEditor_Visibility
End Get
End Property
Friend Sub SetPDFEditor_Visibility(value As Boolean)
m_bPDFEditor_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
Friend Sub SetPDFEditor_Visibility(value As Visibility)
m_bPDFEditor_Visibility = value
NotifyPropertyChanged(NameOf(PDFEditor_Visibility))
End Sub
@@ -248,8 +258,8 @@ Public Class ConfigurationPageVM
Return m_MachineParameter_Visibility
End Get
End Property
Friend Sub SetMachineParameter_Visibility(value As Boolean)
m_MachineParameter_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
Friend Sub SetMachineParameter_Visibility(value As Visibility)
m_MachineParameter_Visibility = value
NotifyPropertyChanged(NameOf(MachineParameter_Visibility))
End Sub
@@ -264,39 +274,6 @@ Public Class ConfigurationPageVM
End Set
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
Private m_cmdSave As ICommand
Private m_cmdChooseExternalBackupFolderPath As ICommand
@@ -523,59 +500,11 @@ Public Class ConfigurationPageVM
End Get
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 ' Fields & Properties
#Region "CONSTRUCTOR"
#Region "Constructor"
Sub New()
' imposto riferimento in Map
@@ -614,13 +543,10 @@ Public Class ConfigurationPageVM
SelReminder = m_ReminderList.FirstOrDefault(Function(x) x.Id = nDefaultReminderFrequency)
Dim nExternalBackupActive As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_EXTERNALBACKUPACTIVE, 0)
m_bExternalBackupActive = nExternalBackupActive > 0
SetMachineParameter_Visibility(False)
SetMachine_Visibility(False)
SetMachineParameter_Visibility(Visibility.Collapsed)
SetMachine_Visibility(Visibility.Collapsed)
' 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
'' imposto il tema
'm_SelectedThema = GetMainPrivateProfileInt(S_GENERAL, K_THEMA, 0)
'LoadThemes()
NotifyPropertyChanged(NameOf(bExternalBackupActive))
End Sub
@@ -630,13 +556,18 @@ Public Class ConfigurationPageVM
' funzione che verifica la modifica dei valori in Configurazione e ne chiede il salvataggio
Friend Sub VerifyConfigPageModification()
' aggiorno tutti i valori senza verificare modifiche
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, SelMeasureUnit.ToString())
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))
Map.refMyMachine.VerifyConfigPageModification()
Dim bExitFor = False
Select Case m_SelConfigSubPage
Case ConfigSubPages.GENERAL
' aggiorno tutti i valori senza verificare modifiche
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, SelMeasureUnit.ToString())
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
' funzione che verifica l'inserimento della password quando si edita un parametro Macchina
@@ -654,43 +585,13 @@ Public Class ConfigurationPageVM
Return False
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
#Region "COMMANDS"
#Region "SaveCommand"
Public ReadOnly Property SaveCommand As ICommand
Get
If m_cmdSave Is Nothing Then
@@ -724,7 +625,7 @@ Public Class ConfigurationPageVM
.DefaultExt = ".folder",
.OverwritePrompt = False,
.FileName = "Select this ",
.Title = EgtMsg(63039)}
.Title = "Backup & Restore File Path"}
If FileDialog.ShowDialog() Then
m_ExternalBackupFolderPath = Path.GetDirectoryName(FileDialog.FileName)
WriteMainPrivateProfileString(S_BACKUPANDRESTORE, K_EXTERNALFILEPATH, m_ExternalBackupFolderPath)
@@ -808,40 +709,35 @@ Public Class ConfigurationPageVM
Try
DataLayer.DbConfig.DataBaseDumpToFile(sBackupZipPath)
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
End Try
If bOk AndAlso File.Exists(sBackupZipPath) Then
If bLoadingWindow Then LoadingWndHelper.UpdateLoadingWnd(ActiveIds.BACKUP, 2, EgtMsg(63024), 15, 100) ' Projects backup
' backup dei progetti correnti
Try
Using zipStream As FileStream = New FileStream(sBackupFolder, FileMode.Create)
Using archive As ZipArchive = New ZipArchive(zipStream, ZipArchiveMode.Create)
Dim dbEntry As ZipArchiveEntry = archive.CreateEntry(Path.GetFileName(sBackupZipPath), CompressionLevel.NoCompression)
Using entryStream = dbEntry.Open()
Using fileStream = File.OpenRead(sBackupZipPath)
fileStream.CopyTo(entryStream)
End Using
End Using
Dim sProjectFolder As String = Map.refMainWindowVM.MainWindowM.sDataDir & "\"
Dim sKey As String = ""
EgtGetKeyInfo(sKey)
sKey = sKey.Replace(" ", "")
Dim sUserFolder As String = ""
If Not IsNothing(sKey) AndAlso sKey.Length > 11 Then
sUserFolder = sKey.Substring(3, 6)
sProjectFolder &= sUserFolder
End If
If Directory.Exists(sProjectFolder) Then
AddDirectoryToZip(archive, sProjectFolder, sUserFolder)
End If
End Using
Using zip As New Ionic.Zip.ZipFile(sBackupFolder, Console.Out)
zip.AlternateEncodingUsage = ZipOption.Always
zip.AlternateEncoding = Text.Encoding.UTF8
zip.CompressionMethod = CompressionMethod.None
' aggiungo Db
zip.AddItem(sBackupZipPath, "")
' aggiungo cartella progetti
Dim sProjectFolder As String = Map.refMainWindowVM.MainWindowM.sDataDir & "\"
Dim sKey As String = ""
EgtGetKeyInfo(sKey)
sKey = sKey.Replace(" ", "")
Dim sUserFolder As String = ""
If Not IsNothing(sKey) AndAlso sKey.Length > 11 Then
sUserFolder = sKey.Substring(3, 6)
sProjectFolder &= sUserFolder
End If
zip.AddItem(sProjectFolder, sUserFolder)
' salvo lo zip
zip.Save()
End Using
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
End Try
End If
@@ -854,7 +750,7 @@ Public Class ConfigurationPageVM
If Directory.Exists(m_ExternalBackupFolderPath) Then
CopyForExternalBackup(sBackupFolder, m_ExternalBackupFolderPath)
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
'chiudo finestra di caricamento
@@ -871,21 +767,6 @@ Public Class ConfigurationPageVM
End Using
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
#Region "Restore"
@@ -901,11 +782,11 @@ Public Class ConfigurationPageVM
Public Sub Restore()
' recupero processo del supervisore
Dim sSupervisorName As String = "Aedifica.SupervisorR32"
Dim sSupervisorName As String = "EgtBEAMWALL.SupervisorR32"
Dim localProc As Process() = Process.GetProcessesByName(sSupervisorName)
' verifico che sia chiuso
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
End If
m_bRestoreRunning = True
@@ -951,22 +832,22 @@ Public Class ConfigurationPageVM
Next
End If
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
Return
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
Return
End If
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
bDoBackup = True
Case MessageBoxResult.No
bDoBackup = False
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
Return
End Select
@@ -998,12 +879,14 @@ Public Class ConfigurationPageVM
Dim bOk As Boolean = True
' apro file zip
Try
If Directory.Exists(sRestoreDir) Then Directory.Delete(sRestoreDir, True)
ZipFile.ExtractToDirectory(sRestorePath, sRestoreDir)
Using zip As New Ionic.Zip.ZipFile(sRestorePath, Console.Out)
' estraggo file da zip
zip.ExtractAll(sRestoreDir)
End Using
Catch ex1 As Exception
EgtOutLog("Error! Impossible importing Recovery file " & sRestorePath & "!")
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
End Try
Dim sBackupTempPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\DbRestore"
@@ -1013,7 +896,7 @@ Public Class ConfigurationPageVM
Try
DataLayer.DbConfig.DataBaseRestoreFromFile(sRestoreDir & "\DbBackup.zip", "", sBackupTempPath)
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
End Try
End If
@@ -1035,4 +918,200 @@ Public Class ConfigurationPageVM
#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:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{DynamicResource ConfigurationPageVM}">
DataContext="{StaticResource ConfigurationPageVM}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
@@ -13,21 +13,19 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="6*"/>
</Grid.RowDefinitions>
<TabControl Grid.RowSpan="2"
Grid.ColumnSpan="2"
<TabControl Grid.RowSpan="2" Grid.ColumnSpan="2"
SelectedIndex="{Binding SelConfigSubPage}"
Style="{StaticResource Optimizer_TabControl}">
Style="{StaticResource OnlyProd_TabControl}">
<TabItem>
<TabItem.Header>
<StackPanel Style="{StaticResource ConfigurationProgram_StackPanel}">
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding General_Msg}"
Style="{StaticResource ConfigurationProgram_TextBlock}"/>
FontSize="15"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding General_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="{StaticResource Save_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>
@@ -37,15 +35,14 @@
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Style="{StaticResource ConfigurationProgram_StackPanel}">
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding PDFEditor_Msg}"
Style="{StaticResource ConfigurationProgram_TextBlock}"/>
FontSize="15"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding PDFEditor_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="{StaticResource Save_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>

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