-creato nuovo tipo "tool" in strategie
-ripristinato pulsante statistiche -migliorata gestione machine in config per selezione strategie o parametri macchina
This commit is contained in:
@@ -88,7 +88,6 @@ Public Class MyMachGroupPanelM
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
|
||||
' funzione che restituisce solo i gruppi di lavorazione creati nel nesting
|
||||
Public Shared Function UpdateFromNestingMyMachGroups(MachineList As List(Of Machine)) As List(Of MachGroupM)
|
||||
Dim TempList As New List(Of MachGroupM)
|
||||
|
||||
@@ -1541,6 +1541,8 @@ 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(Visibility.Visible)
|
||||
|
||||
@@ -234,6 +234,9 @@
|
||||
<Compile Include="StatisticsWnd\OptimizerStatisticsWndV.xaml.vb">
|
||||
<DependentUpon>OptimizerStatisticsWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="StatisticsWnd\StatisticsWndV.xaml.vb">
|
||||
<DependentUpon>StatisticsWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Statistics\OnlyProdOptimizerStatisticsV.xaml.vb">
|
||||
<DependentUpon>OnlyProdOptimizerStatisticsV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -737,6 +740,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="StatisticsWnd\StatisticsWndV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Statistics\OnlyProdOptimizerStatisticsV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -41,8 +41,7 @@
|
||||
Foreground="Black"
|
||||
BorderThickness="2"
|
||||
Margin="0,-5,0,0"
|
||||
BorderBrush="{StaticResource BeamWall_Glacier}"
|
||||
Visibility="{Binding ForcedStrategyBTL_Visibility}">
|
||||
BorderBrush="{StaticResource BeamWall_Glacier}">
|
||||
<GroupBox.Header>
|
||||
<TextBlock Text="{Binding SelStrategy.sStrategyName}"
|
||||
FontWeight="Bold"
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtWPFLib5
|
||||
Imports Newtonsoft.Json
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class ForcedStrategyBTLVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Const AUTOMATICSTRATEGYID As String = "AUTOMATIC"
|
||||
|
||||
Private m_StrategyList As New ObservableCollection(Of Strategy)
|
||||
@@ -39,14 +41,18 @@ Public Class ForcedStrategyBTLVM
|
||||
|
||||
Private m_CurrentFeature As BTLFeatureM
|
||||
|
||||
' Definizione Comandi
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdCancel As ICommand
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
Map.SetRefForcedStrategyBTLVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Sub Init(Feature As BTLFeatureM)
|
||||
m_CurrentFeature = Feature
|
||||
LoadStrategyListFromTopology(Feature.nFeatureId, Feature.nPRC, Feature.nSelGRP)
|
||||
@@ -70,15 +76,33 @@ Public Class ForcedStrategyBTLVM
|
||||
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, dValue)
|
||||
DirectCast(Param, DoubleStrategyParameter).SetValue(dValue)
|
||||
Case GetType(ComboStrategyParameter)
|
||||
Dim sValue As String = 0
|
||||
Dim sValue As String = String.Empty
|
||||
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, sValue)
|
||||
Dim ComboStrategyParameter As ComboStrategyParameter = DirectCast(Param, ComboStrategyParameter)
|
||||
Dim SelCombo = ComboStrategyParameter.ComboList.FirstOrDefault(Function(x) x.sValue = sValue)
|
||||
ComboStrategyParameter.SelValue = SelCombo
|
||||
Case GetType(StringStrategyParameter)
|
||||
Dim sValue As String = 0
|
||||
Dim sValue As String = String.Empty
|
||||
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, sValue)
|
||||
DirectCast(Param, StringStrategyParameter).SetValue(sValue)
|
||||
Case GetType(ListStrategyParameter)
|
||||
Dim sValue As String = String.Empty
|
||||
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, sValue)
|
||||
Dim ListStrategyParameter As ListStrategyParameter = DirectCast(Param, ListStrategyParameter)
|
||||
Dim SelValue As ToolParameter = Nothing
|
||||
Dim sTrimValue As String = sValue.TrimEnd(";"c)
|
||||
Dim sTmpValue As String() = sTrimValue.Split(";"c)
|
||||
Dim sSplitValue As String() = Nothing
|
||||
For Each ItemValue As String In sTmpValue
|
||||
sSplitValue = ItemValue.Split(","c)
|
||||
For Each ItemTool As ToolParameter In ListStrategyParameter.ListValue
|
||||
If sSplitValue(0) = ItemTool.sUUID AndAlso sSplitValue(1) = ItemTool.sName Then
|
||||
ItemTool.bIsActive = True
|
||||
SelValue = ListStrategyParameter.ListValue.FirstOrDefault(Function(x) x.sName = ItemTool.sName AndAlso x.sUUID = ItemTool.sUUID)
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
ListStrategyParameter.SelValue = SelValue
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
@@ -94,7 +118,7 @@ Public Class ForcedStrategyBTLVM
|
||||
Dim sReadedFile As String = File.ReadAllText(sAvailableStrategiesFilePath)
|
||||
Dim JsonStrategyFeatureList As List(Of JsonAvailableStrategyFeature) = JsonConvert.DeserializeObject(Of List(Of JsonAvailableStrategyFeature))(sReadedFile)
|
||||
nGRP = CalcBeamPrivateProfileGRP(nGRP)
|
||||
Dim JsonAvailableStrategyFeature As JsonAvailableStrategyFeature = JsonStrategyFeatureList.FirstOrDefault(Function(x) x.nGRP = nGRP AndAlso x.nPRC = nPRC)
|
||||
Dim JsonAvailableStrategyFeature As JsonAvailableStrategyFeature = JsonStrategyFeatureList.FirstOrDefault(Function(x) x.nGrp = nGRP AndAlso x.nPrc = nPRC)
|
||||
If IsNothing(JsonAvailableStrategyFeature) Then Return False
|
||||
Dim JsonAvailableTopology As JsonAvailableTopology = JsonAvailableStrategyFeature.TopologyList.FirstOrDefault(Function(x) x.sName = sTopologyName)
|
||||
If IsNothing(JsonAvailableTopology) Then
|
||||
@@ -120,7 +144,7 @@ Public Class ForcedStrategyBTLVM
|
||||
If File.Exists(sStrategyConfigurationFilePath) Then
|
||||
Dim sReadedFile As String = File.ReadAllText(sStrategyConfigurationFilePath)
|
||||
Dim JsonStrategyFeatureList As List(Of JsonStrategyFeature) = JsonConvert.DeserializeObject(Of List(Of JsonStrategyFeature))(sReadedFile)
|
||||
Dim JsonStrategyFeature As JsonStrategyFeature = JsonStrategyFeatureList.FirstOrDefault(Function(x) x.nGRP = nGRP AndAlso x.nPRC = nPRC)
|
||||
Dim JsonStrategyFeature As JsonStrategyFeature = JsonStrategyFeatureList.FirstOrDefault(Function(x) x.nGrp = nGRP AndAlso x.nPrc = nPRC)
|
||||
If IsNothing(JsonStrategyFeature) Then Return False
|
||||
Dim JsonTopology As JsonTopology = JsonStrategyFeature.TopologyList.FirstOrDefault(Function(x) x.sName = sTopologyName)
|
||||
If IsNothing(JsonTopology) Then Return False
|
||||
@@ -174,6 +198,7 @@ Public Class ForcedStrategyBTLVM
|
||||
EgtRemoveInfo(m_CurrentFeature.nFeatureId, "STRATEGY")
|
||||
Else
|
||||
EgtSetInfo(m_CurrentFeature.nFeatureId, "STRATEGY", SelStrategy.sStrategyId)
|
||||
Dim sInfo As String = String.Empty
|
||||
For Each Param In SelStrategy.ParameterList
|
||||
Select Case Param.GetType()
|
||||
Case GetType(BooleanStrategyParameter)
|
||||
@@ -184,9 +209,19 @@ Public Class ForcedStrategyBTLVM
|
||||
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, ComboStrategyParameter).SelValue.sValue)
|
||||
Case GetType(StringStrategyParameter)
|
||||
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, StringStrategyParameter).sValue)
|
||||
Case GetType(ListStrategyParameter)
|
||||
For Each Item As ToolParameter In DirectCast(Param, ListStrategyParameter).ListValue
|
||||
If Item.bIsActive Then
|
||||
sInfo &= Item.sUUID & "," & Item.sName & ";"
|
||||
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, sInfo)
|
||||
End If
|
||||
Next
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
@@ -45,8 +45,7 @@
|
||||
Foreground="Black"
|
||||
BorderThickness="2"
|
||||
Margin="0,-5,0,0"
|
||||
BorderBrush="{StaticResource BeamWall_Glacier}"
|
||||
Visibility="{Binding ForcedStrategy_Visibility}">
|
||||
BorderBrush="{StaticResource BeamWall_Glacier}">
|
||||
<GroupBox.Header>
|
||||
<TextBlock Text="{Binding SelStrategy.sStrategyName}"
|
||||
FontWeight="Bold"
|
||||
|
||||
@@ -8,6 +8,8 @@ Imports EgtUILib
|
||||
Public Class ForcedStrategyPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Const AUTOMATICSTRATEGYID As String = "AUTOMATIC"
|
||||
|
||||
Private m_StrategyList As New ObservableCollection(Of Strategy)
|
||||
@@ -43,10 +45,18 @@ Public Class ForcedStrategyPanelVM
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdCancel As ICommand
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
Map.SetRefForcedStrategyPanelVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Sub Init(Feature As BTLFeatureM)
|
||||
m_CurrentFeature = Feature
|
||||
LoadStrategyListFromTopology(Feature.nFeatureId, Feature.nPRC, Feature.nSelGRP)
|
||||
@@ -70,15 +80,33 @@ Public Class ForcedStrategyPanelVM
|
||||
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, dValue)
|
||||
DirectCast(Param, DoubleStrategyParameter).SetValue(dValue)
|
||||
Case GetType(ComboStrategyParameter)
|
||||
Dim sValue As String = 0
|
||||
Dim sValue As String = String.Empty
|
||||
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, sValue)
|
||||
Dim ComboStrategyParameter As ComboStrategyParameter = DirectCast(Param, ComboStrategyParameter)
|
||||
Dim SelCombo = ComboStrategyParameter.ComboList.FirstOrDefault(Function(x) x.sValue = sValue)
|
||||
ComboStrategyParameter.SelValue = SelCombo
|
||||
Case GetType(StringStrategyParameter)
|
||||
Dim sValue As Double = 0
|
||||
Dim sValue As String = String.Empty
|
||||
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, sValue)
|
||||
DirectCast(Param, StringStrategyParameter).SetValue(sValue)
|
||||
Case GetType(ListStrategyParameter)
|
||||
Dim sValue As String = String.Empty
|
||||
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, sValue)
|
||||
Dim ListStrategyParameter As ListStrategyParameter = DirectCast(Param, ListStrategyParameter)
|
||||
Dim SelValue As ToolParameter = Nothing
|
||||
Dim sTrimValue As String = sValue.TrimEnd(";"c)
|
||||
Dim sTmpValue As String() = sTrimValue.Split(";"c)
|
||||
Dim sSplitValue As String() = Nothing
|
||||
For Each ItemValue As String In sTmpValue
|
||||
sSplitValue = ItemValue.Split(","c)
|
||||
For Each ItemTool As ToolParameter In ListStrategyParameter.ListValue
|
||||
If sSplitValue(0) = ItemTool.sUUID AndAlso sSplitValue(1) = ItemTool.sName Then
|
||||
ItemTool.bIsActive = True
|
||||
SelValue = ListStrategyParameter.ListValue.FirstOrDefault(Function(x) x.sName = ItemTool.sName AndAlso x.sUUID = ItemTool.sUUID)
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
ListStrategyParameter.SelValue = SelValue
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
@@ -157,6 +185,8 @@ Public Class ForcedStrategyPanelVM
|
||||
Return -1
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Ok_Command"
|
||||
@@ -186,6 +216,7 @@ Public Class ForcedStrategyPanelVM
|
||||
EgtRemoveInfo(m_CurrentFeature.nFeatureId, "STRATEGY")
|
||||
Else
|
||||
EgtSetInfo(m_CurrentFeature.nFeatureId, "STRATEGY", SelStrategy.sStrategyId)
|
||||
Dim sInfo As String = String.Empty
|
||||
For Each Param In SelStrategy.ParameterList
|
||||
Select Case Param.GetType()
|
||||
Case GetType(BooleanStrategyParameter)
|
||||
@@ -196,6 +227,13 @@ Public Class ForcedStrategyPanelVM
|
||||
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, ComboStrategyParameter).SelValue.sValue)
|
||||
Case GetType(StringStrategyParameter)
|
||||
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, StringStrategyParameter).sValue)
|
||||
Case GetType(ListStrategyParameter)
|
||||
For Each Item As ToolParameter In DirectCast(Param, ListStrategyParameter).ListValue
|
||||
If Item.bIsActive Then
|
||||
sInfo &= Item.sUUID & "," & Item.sName & ";"
|
||||
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, sInfo)
|
||||
End If
|
||||
Next
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -23,6 +23,7 @@ Public Class MachinePanelVM
|
||||
If Not IsNothing(value) AndAlso EgtSetCurrMachine(value.Name) Then
|
||||
m_SelectedMachine = value
|
||||
End If
|
||||
CurrentMachine.InitCurrentMachine(DirectCast(value, MyMachine))
|
||||
' crea l'elenco dei parametri della macchina corrente
|
||||
DirectCast(value, MyMachine).CreateMachParams()
|
||||
' Salvo impostazione macchina corrente
|
||||
@@ -69,6 +70,17 @@ Public Class MachinePanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Machine_Visibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property Machine_Visibility As Visibility
|
||||
Get
|
||||
Return m_Machine_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetMachine_Visibility(value As Visibility)
|
||||
m_Machine_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(Machine_Visibility))
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property ToolDBMsg As String
|
||||
@@ -76,22 +88,31 @@ Public Class MachinePanelVM
|
||||
Return EgtMsg(90706)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MachiningDbMsg As String
|
||||
Get
|
||||
Return EgtMsg(90707)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SetUpMsg As String
|
||||
Get
|
||||
Return EgtMsg(90933)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ParameterMachineMsg As String
|
||||
Get
|
||||
Return EgtMsg(61778)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property StrategyMachineMsg As String
|
||||
Get
|
||||
Return EgtMsg(62569)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "ToolTip"
|
||||
@@ -118,8 +139,9 @@ Public Class MachinePanelVM
|
||||
Private m_cmdBeamTable As ICommand
|
||||
Private m_cmdWallTable As ICommand
|
||||
Private m_cmdParameterMachine As ICommand
|
||||
Private m_cmdStrategyMachine As ICommand
|
||||
|
||||
#End Region 'FIELDS & PROPERTIES
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
@@ -132,7 +154,7 @@ Public Class MachinePanelVM
|
||||
MyMachine.MachineListInit(m_sMachinesRoot, MachineList)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
@@ -307,16 +329,37 @@ Public Class MachinePanelVM
|
||||
SetUpWindow.ShowDialog()
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "StrategyMachine"
|
||||
|
||||
Public ReadOnly Property StrategyMachine_Command As ICommand
|
||||
Get
|
||||
If m_cmdStrategyMachine Is Nothing Then
|
||||
m_cmdStrategyMachine = New Command(AddressOf StrategyMachineVisibility)
|
||||
End If
|
||||
Return m_cmdStrategyMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub StrategyMachineVisibility()
|
||||
Map.refStrategyManagerVM.SetStrategyManager_Visibility(Visibility.Visible)
|
||||
SetMachine_Visibility(Visibility.Collapsed)
|
||||
'If Map.refConfigurationPageVM.m_MachineParameter_Visibility Then
|
||||
' Map.refConfigurationPageVM.SetMachineParameter_Visibility(Visibility.Visible)
|
||||
' Map.refConfigurationPageVM.SetMachine_Visibility(Visibility.Visible)
|
||||
'Else
|
||||
' Map.refConfigurationPageVM.SetMachineParameter_Visibility(Visibility.Collapsed)
|
||||
' Map.refConfigurationPageVM.SetMachine_Visibility(Visibility.Collapsed)
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
#End Region ' StrategyMachine
|
||||
|
||||
#Region "ParameterMachine"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ParameterMachine_Command As ICommand
|
||||
Get
|
||||
If m_cmdParameterMachine Is Nothing Then
|
||||
@@ -327,13 +370,15 @@ Public Class MachinePanelVM
|
||||
End Property
|
||||
|
||||
Public Sub ParameterMachineVisibility()
|
||||
If Map.refConfigurationPageVM.m_MachineParameter_Visibility Then
|
||||
Map.refConfigurationPageVM.SetMachineParameter_Visibility(Visibility.Visible)
|
||||
Map.refConfigurationPageVM.SetMachine_Visibility(Visibility.Visible)
|
||||
Else
|
||||
Map.refConfigurationPageVM.SetMachineParameter_Visibility(Visibility.Collapsed)
|
||||
Map.refConfigurationPageVM.SetMachine_Visibility(Visibility.Collapsed)
|
||||
End If
|
||||
SetMachine_Visibility(Visibility.Visible)
|
||||
Map.refStrategyManagerVM.SetStrategyManager_Visibility(Visibility.Collapsed)
|
||||
'If Map.refConfigurationPageVM.m_MachineParameter_Visibility Then
|
||||
' Map.refConfigurationPageVM.SetMachineParameter_Visibility(Visibility.Visible)
|
||||
' Map.refConfigurationPageVM.SetMachine_Visibility(Visibility.Visible)
|
||||
'Else
|
||||
' Map.refConfigurationPageVM.SetMachineParameter_Visibility(Visibility.Collapsed)
|
||||
' Map.refConfigurationPageVM.SetMachine_Visibility(Visibility.Collapsed)
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ParameterMachine
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid Margin="0,0,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -42,8 +42,8 @@
|
||||
ToolTip="{Binding SetUpToolTip}"
|
||||
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"
|
||||
Visibility="{Binding SetUp_Visibility}"/>
|
||||
<Button Content="{Binding ParameterMachineMsg}"
|
||||
ToolTip="{Binding ParameterMachineMsg}"
|
||||
<Button Content="{Binding StrategyMachineMsg}"
|
||||
ToolTip="{Binding StrategyMachineMsg}"
|
||||
Command="{Binding StrategyMachine_Command}"
|
||||
Style="{StaticResource MachineToolBar_ParameterMachineButton}" Width="140"/>
|
||||
<Button Content="{Binding ParameterMachineMsg}"
|
||||
@@ -53,17 +53,78 @@
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<TabControl Grid.Row="1"
|
||||
<local:StrategyManagerV Grid.Row="1" Visibility="{Binding StrategyManager_Visibility}" Height="820" DataContext="{StaticResource StrategyManagerVM}"/>
|
||||
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Visibility="{Binding Machine_Visibility}">
|
||||
<ItemsControl ItemsSource="{Binding SelectedItem.MachTableList, ElementName=SelMachineCombo}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel x:Name="GroupStackPanel" Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<GroupBox Header="{Binding sName}" Width="Auto" VerticalAlignment="Top" Height="820" Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<ItemsControl Name="MachParamsItemsControl" ItemsSource="{Binding MachParamList}" Margin="0,5,0,0">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,0,5,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
ToolTip="{Binding sName}"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Width="150"
|
||||
Style="{StaticResource MachParamTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
|
||||
Width="60"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{Binding sDescription}"
|
||||
ToolTip="{Binding sDescription}"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Width="148"
|
||||
Style="{StaticResource MachParamTextBlock}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</GroupBox>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Button Grid.Row="1"
|
||||
Command="{Binding SaveCommand}"
|
||||
ToolTip="{Binding SaveToolTip}"
|
||||
Visibility="{Binding Machine_Visibility}"
|
||||
Style="{StaticResource SaveMachinePanel_Button}">
|
||||
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<!--<TabControl Grid.Row="1"
|
||||
SelectedIndex="{Binding SelMachineConfigurationPage}">
|
||||
<TabItem Header="EMPTY">
|
||||
</TabItem>
|
||||
--><!--<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>--><!--
|
||||
<TabItem Header="EMPTY" />
|
||||
<TabItem Header="STRATEGIES">
|
||||
<StackPanel>
|
||||
<local:StrategyManagerV DataContext="{StaticResource StrategyManagerVM}"/>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="PARAMETERS">
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ItemsControl ItemsSource="{Binding SelectedItem.MachTableList, ElementName=SelMachineCombo}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
@@ -119,6 +180,6 @@
|
||||
</StackPanel>
|
||||
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</TabControl>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -1933,7 +1933,7 @@ Public Class OnlyProdManagerVM
|
||||
Dim nPartId As Integer = EgtGetFirstPart(GDB_ID.ROOT)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' scrivo in ogni pezzo ProjId
|
||||
EgtSetInfo(nPartId, BTL_PRT_PROJ, 0)
|
||||
EgtSetInfo(nPartId, BTL_PRT_PROJ, ProjectManagerVM.CurrProd.nProjId)
|
||||
' scrivo Id negli outline
|
||||
Dim nPRId As Integer = 1
|
||||
Dim nOutlineLayer As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
|
||||
@@ -1952,7 +1952,7 @@ Public Class OnlyProdManagerVM
|
||||
End While
|
||||
' scrivo info proj e type su layer BtlInfo
|
||||
Dim nBTLInfoLayer As Integer = EgtGetLastNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
EgtSetInfo(nBTLInfoLayer, BTL_PRT_PROJ, 0)
|
||||
EgtSetInfo(nBTLInfoLayer, BTL_PRT_PROJ, ProjectManagerVM.CurrProd.nProjId)
|
||||
EgtSetInfo(nBTLInfoLayer, BTL_GEN_PROJTYPE, nType)
|
||||
|
||||
' rileggo la struttura BTL del progetto corrente per non avere quella del contesto temporaneo ancora presente
|
||||
|
||||
@@ -43,6 +43,11 @@
|
||||
<StackPanel Grid.Column="4"
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Right">
|
||||
<Button Command="{Binding Visualization_Command}"
|
||||
ToolTip="{Binding Statistics_Msg}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
<Image Source="/Resources/InstrumentPanel/Vis.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding Optimizer_Command}"
|
||||
ToolTip="{Binding Statistics_Msg}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
|
||||
@@ -320,6 +320,7 @@ Public Class ProjectVM
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione Comandi
|
||||
Private m_cmdVisualization As ICommand
|
||||
Private m_cmdOptimizer As ICommand
|
||||
Private m_cmdParameter As ICommand
|
||||
Private m_cmdBack As ICommand
|
||||
@@ -493,6 +494,30 @@ Public Class ProjectVM
|
||||
|
||||
#Region "COMMAND"
|
||||
|
||||
#Region "Visualization"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Open.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Visualization_Command As ICommand
|
||||
Get
|
||||
If m_cmdVisualization Is Nothing Then
|
||||
m_cmdVisualization = New Command(AddressOf Visualization)
|
||||
End If
|
||||
Return m_cmdVisualization
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
''' </summary>
|
||||
Friend Sub Visualization()
|
||||
Dim StatisticsWndV As New StatisticsWndV(Application.Current.MainWindow, New StatisticsVM())
|
||||
StatisticsWndV.ShowDialog()
|
||||
End Sub
|
||||
|
||||
#End Region ' Visualization
|
||||
|
||||
#Region "Ottimization"
|
||||
|
||||
''' <summary>
|
||||
|
||||
@@ -10,11 +10,7 @@ Public Class StatisticsTimePanelVM
|
||||
Private m_ViewPage_Visibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property ViewPage_Visibility As Visibility
|
||||
Get
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
Return Visibility.Visible
|
||||
Else
|
||||
Return m_ViewPage_Visibility
|
||||
End If
|
||||
Return m_ViewPage_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetViewPage_Visibility(value As Visibility)
|
||||
@@ -25,11 +21,7 @@ Public Class StatisticsTimePanelVM
|
||||
Private m_MachiningPage_Visibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property MachiningPage_Visibility As Visibility
|
||||
Get
|
||||
If Map.refMainMenuVM.SelPage = Pages.MACHINING Then
|
||||
Return Visibility.Visible
|
||||
Else
|
||||
Return m_MachiningPage_Visibility
|
||||
End If
|
||||
Return m_MachiningPage_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetMachiningPage_Visibility(value As Visibility)
|
||||
|
||||
@@ -332,6 +332,17 @@ Public Class JsonDefaultStrategyParameter
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sSubType As String
|
||||
Public Property sSubType As String
|
||||
Get
|
||||
Return m_sSubType
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sSubType = value
|
||||
NotifyPropertyChanged(NameOf(sSubType))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sMessageId As String
|
||||
Public Property sMessageId As String
|
||||
Get
|
||||
@@ -370,13 +381,14 @@ Public Class JsonDefaultStrategyParameter
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
<JsonConstructor>
|
||||
Sub New(sName As String, sNameNge As String, sValue As String, sDescriptionShort As String, sDescriptionLong As String, sType As String, sMessageId As String, sMinUserLevel As Integer)
|
||||
Sub New(sName As String, sNameNge As String, sValue As String, sDescriptionShort As String, sDescriptionLong As String, sType As String, sSubType As String, sMessageId As String, sMinUserLevel As Integer)
|
||||
m_sName = sName
|
||||
m_sNameNge = sNameNge
|
||||
m_sValue = sValue
|
||||
m_sDescriptionShort = sDescriptionShort
|
||||
m_sDescriptionLong = sDescriptionLong
|
||||
m_sType = sType
|
||||
m_sSubType = sSubType
|
||||
m_sMessageId = sMessageId
|
||||
m_sMinUserLevel = sMinUserLevel
|
||||
End Sub
|
||||
@@ -393,7 +405,10 @@ Public Class JsonDefaultStrategyParameter
|
||||
m_sValue = DirectCast(StrategyParameter, ComboStrategyParameter).SelValue.sValue
|
||||
Case GetType(StringStrategyParameter)
|
||||
m_sValue = DirectCast(StrategyParameter, StringStrategyParameter).sValue
|
||||
Case GetType(ListStrategyParameter)
|
||||
m_sValue = DirectCast(StrategyParameter, ListStrategyParameter).SelValue.sName
|
||||
End Select
|
||||
m_sSubType = StrategyParameter.sSubType
|
||||
m_sDescriptionShort = StrategyParameter.sDescriptionShort
|
||||
m_sDescriptionLong = StrategyParameter.sDescriptionLong
|
||||
m_sMessageId = StrategyParameter.sMessageId
|
||||
@@ -418,15 +433,14 @@ Public Class JsonDefaultStrategyParameter
|
||||
Next
|
||||
DirectCast(StrategyParameter, ComboStrategyParameter).SetSelValue(m_sValue)
|
||||
Case "tool"
|
||||
' Da sistemare!!!
|
||||
StrategyParameter = New DoubleStrategyParameter()
|
||||
DirectCast(StrategyParameter, DoubleStrategyParameter).SetValue(m_sValue)
|
||||
StrategyParameter = New ListStrategyParameter(m_sSubType)
|
||||
Case "s"
|
||||
StrategyParameter = New StringStrategyParameter()
|
||||
DirectCast(StrategyParameter, StringStrategyParameter).SetValue(m_sValue)
|
||||
End Select
|
||||
StrategyParameter.sName = m_sName
|
||||
StrategyParameter.sNameNge = m_sNameNge
|
||||
StrategyParameter.sSubType = m_sSubType
|
||||
StrategyParameter.sDescriptionShort = m_sDescriptionShort
|
||||
StrategyParameter.sDescriptionLong = m_sDescriptionLong
|
||||
StrategyParameter.sMessageId = m_sMessageId
|
||||
|
||||
@@ -246,21 +246,34 @@ Public Class JsonStrategyParameter
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sSubType As String
|
||||
Public Property sSubType As String
|
||||
Get
|
||||
Return m_sSubType
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sSubType = value
|
||||
NotifyPropertyChanged(NameOf(sSubType))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Fields & Propeties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
<JsonConstructor>
|
||||
Sub New(sName As String, sNameNge As String, sValue As String, sType As String)
|
||||
Sub New(sName As String, sNameNge As String, sValue As String, sType As String, sSubType As String)
|
||||
m_sName = sName
|
||||
m_sNameNge = sNameNge
|
||||
m_sValue = sValue
|
||||
m_sType = sType
|
||||
m_sSubType = sSubType
|
||||
End Sub
|
||||
|
||||
Sub New(StrategyParameter As StrategyParameter)
|
||||
m_sName = StrategyParameter.sName
|
||||
m_sNameNge = StrategyParameter.sNameNge
|
||||
m_sSubType = StrategyParameter.sSubType
|
||||
Select Case StrategyParameter.GetType()
|
||||
Case GetType(BooleanStrategyParameter)
|
||||
m_sValue = If(DirectCast(StrategyParameter, BooleanStrategyParameter).bValue, "true", "false")
|
||||
@@ -270,6 +283,8 @@ Public Class JsonStrategyParameter
|
||||
m_sValue = DirectCast(StrategyParameter, ComboStrategyParameter).SelValue.sValue
|
||||
Case GetType(StringStrategyParameter)
|
||||
m_sValue = DirectCast(StrategyParameter, StringStrategyParameter).sValue
|
||||
Case GetType(ListStrategyParameter)
|
||||
m_sValue = DirectCast(StrategyParameter, ListStrategyParameter).SelValue.sName
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -54,6 +54,40 @@
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
</UniformGrid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type Optmizer:ListStrategyParameter}">
|
||||
<UniformGrid Columns="2"
|
||||
Margin="5,5,5,0">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,5,0">
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<Button Content="Deselect All"
|
||||
VerticalAlignment="Top"
|
||||
Width="100"
|
||||
Command="{Binding DeselectAllCommand}"
|
||||
Style="{StaticResource MachineToolBar_ParameterMachineButton}"/>
|
||||
</StackPanel>
|
||||
<ListBox ItemsSource="{Binding ListValue}"
|
||||
SelectedItem="{Binding SelValue}"
|
||||
Margin="10,0,0,0"
|
||||
BorderThickness="0.5"
|
||||
Height="300"
|
||||
Foreground="Black"
|
||||
Style="{StaticResource MacroDefault_ListBox}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Style="{StaticResource StackPanel_List}">
|
||||
<CheckBox IsChecked="{Binding bIsActive, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource FreeContourInput_CheckBox}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</UniformGrid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
@@ -1,11 +1,11 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtWPFLib5
|
||||
Imports Newtonsoft.Json
|
||||
Imports System.ComponentModel
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports System.ComponentModel
|
||||
Imports System.Globalization
|
||||
Imports EgtWPFLib5
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class StrategyManagerVM
|
||||
Inherits VMBase
|
||||
@@ -126,6 +126,17 @@ Public Class StrategyManagerVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_StrategyManager_Visibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property StrategyManager_Visibility As Visibility
|
||||
Get
|
||||
Return m_StrategyManager_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetStrategyManager_Visibility(value As Visibility)
|
||||
m_StrategyManager_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(StrategyManager_Visibility))
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property SaveToolTip As String
|
||||
@@ -152,7 +163,6 @@ Public Class StrategyManagerVM
|
||||
Private m_AddSelectedStrategyCommand As ICommand
|
||||
Private m_RemoveSelectedStrategyCommand As ICommand
|
||||
Private m_NewCommand As ICommand
|
||||
Private m_OpenCommand As ICommand
|
||||
Private m_SaveCommand As ICommand
|
||||
Private m_OpenFileNameCustomConfigCommand As ICommand
|
||||
Private m_MoveUpSelectedStrategyCommand As ICommand
|
||||
@@ -176,6 +186,7 @@ Public Class StrategyManagerVM
|
||||
Case MachineType.BOTH
|
||||
m_SelStrategyType = m_StrategyTypeList.FirstOrDefault(Function(x) x.Id = BWType.BEAM)
|
||||
End Select
|
||||
Update()
|
||||
NotifyPropertyChanged(NameOf(StrategyType_Visibility))
|
||||
' Assegno riferimento funzione per aggiornare elemento selezionato dall'albero
|
||||
Topology.refUpdateSelTreeItem = AddressOf UpdateSelTreeItem
|
||||
@@ -520,7 +531,7 @@ Public Class StrategySetup
|
||||
Dim sReadedFile As String = File.ReadAllText(sStrategyConfigurationFilePath)
|
||||
Dim JsonStrategyFeatureList As List(Of JsonStrategyFeature) = JsonConvert.DeserializeObject(Of List(Of JsonStrategyFeature))(sReadedFile)
|
||||
For Each Feature In JsonStrategyFeatureList
|
||||
Dim DefaultFeature As StrategyFeature = m_StrategyFeatureList.FirstOrDefault(Function(x) x.nPRC = Feature.nPRC AndAlso x.nGRP = Feature.nGRP)
|
||||
Dim DefaultFeature As StrategyFeature = m_StrategyFeatureList.FirstOrDefault(Function(x) x.nPrc = Feature.nPrc AndAlso x.nGrp = Feature.nGrp)
|
||||
' gestire caso non venga trovata perchè non esiste più in default??'
|
||||
If Not IsNothing(DefaultFeature) Then
|
||||
For Each Topology In Feature.TopologyList
|
||||
@@ -639,8 +650,8 @@ Public Class StrategyFeature
|
||||
Sub New(JsonStrategyFeature As JsonAvailableStrategyFeature)
|
||||
If IsNothing(JsonStrategyFeature) Then Return
|
||||
m_sName = JsonStrategyFeature.sName
|
||||
m_nPrc = JsonStrategyFeature.nPRC
|
||||
m_nGrp = JsonStrategyFeature.nGRP
|
||||
m_nPrc = JsonStrategyFeature.nPrc
|
||||
m_nGrp = JsonStrategyFeature.nGrp
|
||||
m_TopologyList = New ObservableCollection(Of Topology)(JsonStrategyFeature.TopologyList.Select(Function(jsonTopology) New Topology(jsonTopology)))
|
||||
NotifyPropertyChanged(NameOf(TopologyList))
|
||||
End Sub
|
||||
@@ -766,7 +777,7 @@ Public Class Topology
|
||||
Sub New(JsonTopology As JsonAvailableTopology)
|
||||
If IsNothing(JsonTopology) Then Return
|
||||
m_sName = JsonTopology.sName
|
||||
m_StrategyList = New ObservableCollection(Of Strategy)(JsonTopology.StrategyList.Select(Function(jsonStrategy) New Strategy(Me, jsonStrategy)))
|
||||
m_StrategyList = New ObservableCollection(Of Strategy)(JsonTopology.StrategyList.Select(Function(jsonStrategy) New Strategy(jsonStrategy)))
|
||||
m_AvailableStrategyList_View = New ListCollectionView(StrategyList)
|
||||
m_AvailableStrategyList_View.Filter = AddressOf AvailableStrategyFilter
|
||||
m_ActiveStrategyList_View = New ListCollectionView(StrategyList)
|
||||
@@ -811,8 +822,6 @@ Public Class Strategy
|
||||
|
||||
#Region "FIELDS & PROPETIES"
|
||||
|
||||
Private m_ParentTopology As Topology
|
||||
|
||||
Private m_sStrategyId As String
|
||||
Public Property sStrategyId As String
|
||||
Get
|
||||
@@ -880,8 +889,7 @@ Public Class Strategy
|
||||
|
||||
End Sub
|
||||
|
||||
Sub New(ParentTopology As Topology, JsonStrategy As JsonAvailableStrategy)
|
||||
m_ParentTopology = ParentTopology
|
||||
Sub New(JsonStrategy As JsonAvailableStrategy)
|
||||
If IsNothing(JsonStrategy) Then Return
|
||||
m_sStrategyId = JsonStrategy.sStrategyId
|
||||
ReadConfigurationStrategyJson()
|
||||
@@ -921,6 +929,8 @@ Public Class Strategy
|
||||
DirectCast(DefaultParameter, ComboStrategyParameter).SetSelValue(Parameter.sValue)
|
||||
Case GetType(StringStrategyParameter)
|
||||
DirectCast(DefaultParameter, StringStrategyParameter).SetValue(Parameter.sValue)
|
||||
Case GetType(ListStrategyParameter)
|
||||
DirectCast(DefaultParameter, ListStrategyParameter).SetSelValue(Parameter.sValue)
|
||||
End Select
|
||||
End If
|
||||
Next
|
||||
@@ -944,8 +954,6 @@ Public MustInherit Class StrategyParameter
|
||||
|
||||
#Region "FIELDS & PROPETIES"
|
||||
|
||||
Private m_ParentStrategy As Strategy
|
||||
|
||||
Private m_sName As String
|
||||
Public Property sName As String
|
||||
Get
|
||||
@@ -968,6 +976,17 @@ Public MustInherit Class StrategyParameter
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sSubType As String
|
||||
Public Property sSubType As String
|
||||
Get
|
||||
Return m_sSubType
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sSubType = value
|
||||
NotifyPropertyChanged(NameOf(sSubType))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sDescriptionShort As String
|
||||
Public Property sDescriptionShort As String
|
||||
Get
|
||||
@@ -1024,6 +1043,7 @@ Public MustInherit Class StrategyParameter
|
||||
If IsNothing(JsonGenericParameter) Then Return
|
||||
m_sName = JsonGenericParameter.sName
|
||||
m_sNameNge = JsonGenericParameter.sNameNge
|
||||
m_sSubType = JsonGenericParameter.sSubType
|
||||
m_sDescriptionShort = JsonGenericParameter.sDescriptionShort
|
||||
m_sDescriptionLong = JsonGenericParameter.sDescriptionLong
|
||||
m_sMessageId = JsonGenericParameter.sMessageId
|
||||
@@ -1077,15 +1097,19 @@ Public Class BooleanStrategyParameter
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Overrides Function Serialize() As JsonStrategyParameter
|
||||
Dim sValue As String = "false"
|
||||
If bValue Then
|
||||
sValue = "true"
|
||||
End If
|
||||
Dim JsonStrategyParameter As New JsonStrategyParameter(sName, sNameNge, sValue, "b")
|
||||
Dim JsonStrategyParameter As New JsonStrategyParameter(sName, sNameNge, sValue, "b", If(Not String.IsNullOrEmpty(sSubType), sSubType, ""))
|
||||
Return JsonStrategyParameter
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
Public Class DoubleStrategyParameter
|
||||
@@ -1143,11 +1167,15 @@ Public Class DoubleStrategyParameter
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Overrides Function Serialize() As JsonStrategyParameter
|
||||
Dim JsonStrategyParameter As New JsonStrategyParameter(sName, sNameNge, sValue, "d")
|
||||
Dim JsonStrategyParameter As New JsonStrategyParameter(sName, sNameNge, sValue, "d", If(Not String.IsNullOrEmpty(sSubType), sSubType, ""))
|
||||
Return JsonStrategyParameter
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
Public Class StringStrategyParameter
|
||||
@@ -1187,11 +1215,15 @@ Public Class StringStrategyParameter
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Overrides Function Serialize() As JsonStrategyParameter
|
||||
Dim JsonStrategyParameter As New JsonStrategyParameter(sName, sNameNge, sValue, "s")
|
||||
Dim JsonStrategyParameter As New JsonStrategyParameter(sName, sNameNge, sValue, "s", If(Not String.IsNullOrEmpty(sSubType), sSubType, ""))
|
||||
Return JsonStrategyParameter
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ComboStrategyParameter
|
||||
@@ -1240,11 +1272,125 @@ Public Class ComboStrategyParameter
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Overrides Function Serialize() As JsonStrategyParameter
|
||||
Dim JsonStrategyParameter As New JsonStrategyParameter(sName, sNameNge, m_SelValue.sValue, "combo")
|
||||
Dim JsonStrategyParameter As New JsonStrategyParameter(sName, sNameNge, m_SelValue.sValue, "combo", If(Not String.IsNullOrEmpty(sSubType), sSubType, ""))
|
||||
Return JsonStrategyParameter
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ListStrategyParameter
|
||||
Inherits StrategyParameter
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private m_ListValue As New List(Of ToolParameter)
|
||||
Public Property ListValue As List(Of ToolParameter)
|
||||
Get
|
||||
Return m_ListValue
|
||||
End Get
|
||||
Set(value As List(Of ToolParameter))
|
||||
m_ListValue = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SelValue As ToolParameter
|
||||
Public Property SelValue As ToolParameter
|
||||
Get
|
||||
Return m_SelValue
|
||||
End Get
|
||||
Set(value As ToolParameter)
|
||||
m_SelValue = value
|
||||
NotifyPropertyChanged(NameOf(SelValue))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetSelValue(sValue As String)
|
||||
Dim sTrimValue As String = sValue.TrimEnd(";"c)
|
||||
Dim sTmpValue As String() = sTrimValue.Split(";"c)
|
||||
Dim sSplitValue As String()
|
||||
For Each ItemValue As String In sTmpValue
|
||||
sSplitValue = ItemValue.Split(","c)
|
||||
For Each ItemTool As ToolParameter In m_ListValue
|
||||
If sSplitValue(0) = ItemTool.sUUID AndAlso sSplitValue(1) = ItemTool.sName Then
|
||||
ItemTool.bIsActive = True
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdDeselectAll As ICommand
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(sSubType As String)
|
||||
' Recupero lista utensili per sottotipo
|
||||
Dim nSubType As Integer = 0
|
||||
Dim nType As Integer = 0
|
||||
Dim sName As String = String.Empty
|
||||
Dim sUUID As String = String.Empty
|
||||
Dim sInfo As String = String.Empty
|
||||
|
||||
StringToInt(sSubType, nSubType)
|
||||
Dim bNext As Boolean = EgtTdbGetFirstTool(nSubType, sName, nType)
|
||||
While bNext
|
||||
EgtTdbSetCurrTool(sName)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.UUID, sUUID)
|
||||
m_ListValue.Add(New ToolParameter(sUUID, sName))
|
||||
bNext = EgtTdbGetNextTool(nSubType, sName, nType)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Overrides Function Serialize() As JsonStrategyParameter
|
||||
Dim sInfo As String = String.Empty
|
||||
If Not IsNothing(sSubType) Then
|
||||
For Each ItemTool As ToolParameter In m_ListValue
|
||||
If ItemTool.bIsActive Then
|
||||
sInfo &= ItemTool.sUUID & "," & ItemTool.sName & ";"
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Dim JsonStrategyParameter As New JsonStrategyParameter(sName, sNameNge, sInfo, "tool", If(Not String.IsNullOrEmpty(sSubType), sSubType, ""))
|
||||
Return JsonStrategyParameter
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "DeselectAllCommand"
|
||||
|
||||
Public ReadOnly Property DeselectAllCommand As ICommand
|
||||
Get
|
||||
If m_cmdDeselectAll Is Nothing Then
|
||||
m_cmdDeselectAll = New Command(AddressOf DeselectAll)
|
||||
End If
|
||||
Return m_cmdDeselectAll
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub DeselectAll()
|
||||
If Not IsNothing(sSubType) Then
|
||||
For Each ItemTool As ToolParameter In m_ListValue
|
||||
ItemTool.bIsActive = False
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' DeselectAllCommand
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
|
||||
'----------- Classe che fa riferimento ai parametri delle Scelte -----------
|
||||
@@ -1318,6 +1464,57 @@ Public Class ComboParameter
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ToolParameter
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELD & PROPERTIES"
|
||||
|
||||
Private m_bIsActive As Boolean
|
||||
Public Property bIsActive As Boolean
|
||||
Get
|
||||
Return m_bIsActive
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsActive = value
|
||||
NotifyPropertyChanged(NameOf(bIsActive))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sName As String
|
||||
Public Property sName As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sName = value
|
||||
NotifyPropertyChanged(NameOf(sName))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sUUID As String
|
||||
Public Property sUUID As String
|
||||
Get
|
||||
Return m_sUUID
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sUUID = value
|
||||
NotifyPropertyChanged(NameOf(sUUID))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(sUUID As String, sName As String)
|
||||
m_sUUID = sUUID
|
||||
m_sName = sName
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
End Class
|
||||
|
||||
Public Class StrategyTypeToFocusableConverter
|
||||
Implements IValueConverter
|
||||
|
||||
|
||||
@@ -20,6 +20,15 @@
|
||||
Width="400"
|
||||
Margin="5"/>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Progetto"
|
||||
TextWrapping="Wrap"
|
||||
Margin="5"/>
|
||||
<ComboBox ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
DisplayMemberPath="sBTLFileName"/>
|
||||
</StackPanel>
|
||||
|
||||
<EgtBEAMWALLCORE:EgtDataGrid Grid.Row="1" Width="400" MaxHeight="600"
|
||||
ItemsSource="{Binding BTLPartList}"
|
||||
SelectedItem="{Binding SelBTLPart}"
|
||||
|
||||
@@ -40,6 +40,26 @@ Public Class UpdateBTLWndVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ProjectList As New ObservableCollection(Of ProjFileM)
|
||||
Public Property ProjectList As ObservableCollection(Of ProjFileM)
|
||||
Get
|
||||
Return m_ProjectList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of ProjFileM))
|
||||
m_ProjectList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SelProject As ProjFileM
|
||||
Public Property SelProject As ProjFileM
|
||||
Get
|
||||
Return m_SelProject
|
||||
End Get
|
||||
Set(value As ProjFileM)
|
||||
m_SelProject = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
|
||||
@@ -98,6 +118,13 @@ Public Class UpdateBTLWndVM
|
||||
GetPrivateProfileColumns(S_UPDATEBTLPARTLIST, UpdateBTLColumns)
|
||||
' carica la lista dei Part importati
|
||||
BTLPartList = New ObservableCollection(Of BTLPartToUpdate)(InputBTLPartList)
|
||||
' Carico lista nomi progetti
|
||||
If ProjectManagerVM.CurrProd.nProjIdList.Count > 0 Then
|
||||
For Each ItemProj As Integer In ProjectManagerVM.CurrProd.nProjIdList
|
||||
Dim TempProj As ProjFileM = DbControllers.m_ProjController.FindByProjIdConv(ItemProj)
|
||||
m_ProjectList.Add(TempProj)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Reference in New Issue
Block a user