-sistemato caricamento assemblato
-aggiunto immagine topologia -sistemata vista tabella tblpartlist
This commit is contained in:
@@ -284,3 +284,19 @@ Class FractionHeightConverter
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Class ExpanderWidthConverter
|
||||
Implements IValueConverter
|
||||
|
||||
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||
If TypeOf value IsNot Double Then Return ""
|
||||
Dim dListBoxHeight As Double = CDbl(value)
|
||||
Return Math.Floor(dListBoxHeight - 20)
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<EgtBEAMWALL:ProjIdToBtlFileName x:Key="ProjIdToBtlFileName"/>
|
||||
<EgtBEAMWALL:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<EgtBEAMWALL:FractionHeightConverter x:Key="FractionHeightConverter"/>
|
||||
<EgtBEAMWALL:ExpanderWidthConverter x:Key="ExpanderWidthConverter"/>
|
||||
<sys:Double x:Key="FeatureWrapPanelHeight">0.6</sys:Double>
|
||||
</UserControl.Resources>
|
||||
<EgtBEAMWALLCORE:EgtDataGrid ItemsSource="{Binding Tag.BTLPartVMList,
|
||||
@@ -33,7 +34,6 @@
|
||||
VirtualizingPanel.CacheLength="10"
|
||||
VirtualizingPanel.CacheLengthUnit="Pixel"
|
||||
RowBackground="{StaticResource BeamWall_BLackSqueeze}"
|
||||
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
Style="{StaticResource DataGrid_OnlyProd}">
|
||||
<DataGrid.InputBindings>
|
||||
@@ -49,7 +49,7 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="True"
|
||||
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:EgtDataGrid}}}">
|
||||
Width="{Binding ActualWidth, Converter={StaticResource ExpanderWidthConverter}, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:EgtDataGrid}}}">
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Path=Name}"
|
||||
@@ -77,7 +77,6 @@
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/ProjectManager/UpdateBTL.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<Expander.Content>
|
||||
|
||||
@@ -320,7 +320,7 @@ Public Class MainMenuVM
|
||||
End Sub
|
||||
|
||||
Private Function InitCONFIG() As Boolean
|
||||
EgtSetCurrMachine(Map.refMachinePanelVM.SelectedMachine.Name)
|
||||
If Not IsNothing(Map.refMachinePanelVM.SelectedMachine) Then EgtSetCurrMachine(Map.refMachinePanelVM.SelectedMachine.Name)
|
||||
Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
|
||||
Map.refMainMenuVM.NotifyPropertyChanged(NameOf(Map.refMainMenuVM.SendFeedbackIsEnabled))
|
||||
Return True
|
||||
|
||||
@@ -517,6 +517,12 @@ Public Class OnlyProdManagerVM
|
||||
' Aggiorno titolo
|
||||
Map.refMainWindowVM.UpdateTitle()
|
||||
SetDefaultConfigFile()
|
||||
' Aggiungo a ButtonBuildingList i BTL
|
||||
Map.refSceneBuildingVM.ButtonBuildingList.Clear()
|
||||
For Each ItemProd As Integer In ProjectManagerVM.CurrProd.nProjIdList
|
||||
Dim TempProj As ProjFileM = DbControllers.m_ProjController.FindByProjIdConv(ItemProd)
|
||||
Map.refSceneBuildingVM.ButtonBuildingList.Add(New ButtonBuildingItem(ItemProd, m_nListProjAsseBase(ItemProd), TempProj.sBTLFileName))
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -731,12 +737,6 @@ Public Class OnlyProdManagerVM
|
||||
Wall.Rotation(True, Map.refProjectVM.BTLStructureVM.nPROJTYPE, True, 180, False)
|
||||
Next
|
||||
End If
|
||||
' Aggiungo a ButtonBuildingList i BTL
|
||||
Map.refSceneBuildingVM.ButtonBuildingList.Clear()
|
||||
For Each ItemProd As Integer In ProjectManagerVM.CurrProd.nProjIdList
|
||||
Dim TempProj As ProjFileM = DbControllers.m_ProjController.FindByProjIdConv(ItemProd)
|
||||
Map.refSceneBuildingVM.ButtonBuildingList.Add(New ButtonBuildingItem(ItemProd, m_nListProjAsseBase(ItemProd), TempProj.sBTLFileName))
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -895,10 +895,8 @@ Public Class OnlyProdManagerVM
|
||||
Part.CalcBTLPartVolume()
|
||||
Next
|
||||
' Aggiungo a ButtonBuildingList i BTL
|
||||
For Each ItemProd As Integer In ProjectManagerVM.CurrProd.nProjIdList
|
||||
Dim TempProj As ProjFileM = DbControllers.m_ProjController.FindByProjIdConv(ItemProd)
|
||||
Map.refSceneBuildingVM.ButtonBuildingList.Add(New ButtonBuildingItem(ItemProd, m_nListProjAsseBase(ItemProd), TempProj.sBTLFileName))
|
||||
Next
|
||||
Dim TempProj As ProjFileM = DbControllers.m_ProjController.FindByProjIdConv(nProjId)
|
||||
Map.refSceneBuildingVM.ButtonBuildingList.Add(New ButtonBuildingItem(nProjId, m_nListProjAsseBase(nProjId), TempProj.sBTLFileName))
|
||||
'Map.refProjectVM.SetOnlyProdOptimizePanel_Visibility(Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
||||
'Map.refPartManagerVM.LockVisibilityUpdate()
|
||||
'LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 3, EgtMsg(63006), 70, 100) ' Loading graphics
|
||||
@@ -1012,10 +1010,8 @@ Public Class OnlyProdManagerVM
|
||||
Map.refProjectVM.BTLStructureVM.AddPart(nProjId)
|
||||
' Aggiungo a ButtonBuildingList i BTL
|
||||
Map.refSceneBuildingVM.ButtonBuildingList.Clear()
|
||||
For Each ItemProd As Integer In ProjectManagerVM.CurrProd.nProjIdList
|
||||
Dim TempProj As ProjFileM = DbControllers.m_ProjController.FindByProjIdConv(ItemProd)
|
||||
Map.refSceneBuildingVM.ButtonBuildingList.Add(New ButtonBuildingItem(ItemProd, m_nListProjAsseBase(ItemProd), TempProj.sBTLFileName))
|
||||
Next
|
||||
Dim TempProj As ProjFileM = DbControllers.m_ProjController.FindByProjIdConv(nProjId)
|
||||
Map.refSceneBuildingVM.ButtonBuildingList.Add(New ButtonBuildingItem(nProjId, m_nListProjAsseBase(nProjId), TempProj.sBTLFileName))
|
||||
Map.refMainWindowVM.UpdateTitle()
|
||||
NotifyPropertyChanged(NameOf(MruFileNames))
|
||||
Return True
|
||||
@@ -1173,7 +1169,6 @@ Public Class OnlyProdManagerVM
|
||||
Map.refMainWindowVM.UpdateTitle()
|
||||
' refresh lista mru
|
||||
NotifyPropertyChanged(NameOf(MruFileNames))
|
||||
Dim xy = MruFileNames
|
||||
' aggiorno nome macchina in statusbar
|
||||
Map.refMyStatusBarVM.RefreshMachName()
|
||||
' Aggiungo a ButtonBuildingList i BTL
|
||||
|
||||
@@ -223,8 +223,8 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TabControl BorderThickness="0"
|
||||
Margin="0,-3.8,0,-2"
|
||||
SelectedIndex="{Binding SelFeatureManagerTab}">
|
||||
Margin="0,-4,0,-2"
|
||||
SelectedIndex="{Binding SelFeatureManagerTab}" Grid.RowSpan="2">
|
||||
<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
@@ -238,7 +238,9 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtBEAMWALL:OnlyProdFeatureInPartInRawPartListV DataContext="{StaticResource FeatureInPartInRawPartListVM}"
|
||||
<Border Grid.ColumnSpan="3" Style="{StaticResource OnlyProdPage_Border}"
|
||||
Visibility="{Binding DataContext.FeatureList_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}"/>
|
||||
<EgtBEAMWALL:OnlyProdFeatureInPartInRawPartListV DataContext="{StaticResource FeatureInPartInRawPartListVM}" Margin="5"
|
||||
Tag="{Binding DataContext.MachGroupPanelVM.SelectedMachGroup.SelPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}"
|
||||
Visibility="{Binding DataContext.FeatureList_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}"/>
|
||||
<StackPanel Orientation="Vertical"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Imports System.IO
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtBEAMWALL.Optimizer.MainMenuVM
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
@@ -106,6 +106,17 @@ Public Class JsonAvailableTopology
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sImage As String
|
||||
Public Property sImage As String
|
||||
Get
|
||||
Return m_sImage
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sImage = value
|
||||
NotifyPropertyChanged(NameOf(sImage))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_StrategyList As New ObservableCollection(Of JsonAvailableStrategy)
|
||||
Public Property StrategyList As ObservableCollection(Of JsonAvailableStrategy)
|
||||
Get
|
||||
@@ -128,6 +139,7 @@ Public Class JsonAvailableTopology
|
||||
|
||||
Sub New(Topology As Topology)
|
||||
m_sName = Topology.sName
|
||||
m_sImage = Topology.sImage
|
||||
For Each Strategy In Topology.StrategyList
|
||||
m_StrategyList.Add(New JsonAvailableStrategy(Strategy))
|
||||
Next
|
||||
@@ -136,7 +148,8 @@ Public Class JsonAvailableTopology
|
||||
#End Region ' Constructor
|
||||
|
||||
Friend Function Deserialize(StrategyType As BWType) As Topology
|
||||
Dim Topology As New Topology() With {.sName = m_sName}
|
||||
Dim Topology As New Topology() With {.sName = m_sName,
|
||||
.sImage = m_sImage}
|
||||
For StrategyIndex = 0 To StrategyList.Count - 1
|
||||
Topology.StrategyList.Add(StrategyList(StrategyIndex).Deserialize(StrategyType, StrategyIndex))
|
||||
Next
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
<Optimizer:StrategyV Grid.Column="1"
|
||||
Grid.RowSpan="2"/>
|
||||
|
||||
|
||||
<GroupBox Grid.Column="2"
|
||||
Foreground="Black"
|
||||
BorderThickness="2"
|
||||
@@ -124,8 +124,24 @@
|
||||
<Optimizer:ParameterStrategyV Tag="{Binding SelTreeItem.SelParamStrategy}"/>
|
||||
</GroupBox>
|
||||
|
||||
<StackPanel Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Width="600"/>
|
||||
<Border Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Margin="2,2,2,0"
|
||||
Style="{StaticResource OnlyProdPage_Border}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding SelTreeItem.sName}"
|
||||
FontWeight="Bold" Margin="0,10,0,0"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<Image Grid.Row="1" Source="{Binding SelTreeItem.sImage}" Stretch="Uniform" Margin="5,0,0,0"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
@@ -87,6 +87,13 @@ Public Class StrategyManagerVM
|
||||
''' </summary>
|
||||
''' <param name="Item">Elemento dell'albero</param>
|
||||
Friend Sub UpdateSelTreeItem(Item As Topology)
|
||||
Dim ImageRoot As String = String.Empty
|
||||
Dim TmpImage As String = String.Empty
|
||||
If Not File.Exists(Item.sImage) Then
|
||||
ImageRoot = If(m_SelStrategyType.Id = BWType.BEAM, Map.refMainWindowVM.MainWindowM.sBeamRoot, Map.refMainWindowVM.MainWindowM.sWallRoot) & "\Images\"
|
||||
TmpImage = ImageRoot & Item.sImage
|
||||
Item.sImage = TmpImage
|
||||
End If
|
||||
m_SelTreeItem = Item
|
||||
NotifyPropertyChanged(NameOf(SelTreeItem))
|
||||
End Sub
|
||||
@@ -861,6 +868,17 @@ Public Class Topology
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sImage As String
|
||||
Public Property sImage As String
|
||||
Get
|
||||
Return m_sImage
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sImage = value
|
||||
NotifyPropertyChanged(NameOf(sImage))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bIsSelected As Boolean
|
||||
Public Property IsSelected As Boolean
|
||||
Get
|
||||
@@ -949,6 +967,7 @@ Public Class Topology
|
||||
Sub New(JsonTopology As JsonAvailableTopology)
|
||||
If IsNothing(JsonTopology) Then Return
|
||||
m_sName = JsonTopology.sName
|
||||
m_sImage = JsonTopology.sImage
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user