-sistemato forza strategie

-aggiornato visualizzazione parametri strategie
This commit is contained in:
Demetrio Cassarino
2025-10-01 10:00:53 +02:00
parent afae12547e
commit 6e0ae88f72
23 changed files with 428 additions and 342 deletions
@@ -637,7 +637,8 @@ Public Class BTLFeatureVM
''' </summary>
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.refForcedStrategyBTLVM.Init(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.BTLFeatureM)
Map.refForcedStrategyPanelVM.Init(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.BTLFeatureM)
End If
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Collapsed)
'Map.refProjectVM.SetStrategyManagerVisibility(Visibility.Visible)
@@ -1561,7 +1561,8 @@ Public Class BTLPartVM
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Collapsed)
End If
' Forzo strategia
Map.refForcedStrategyBTLVM.Init(m_SelBTLFeatureVM.BTLFeatureM)
'Map.refForcedStrategyBTLVM.Init(m_SelBTLFeatureVM.BTLFeatureM)
Map.refForcedStrategyPanelVM.Init(m_SelBTLFeatureVM.BTLFeatureM)
'Else
' EgtDeselectAll()
End If
@@ -7,63 +7,4 @@
<EgtBEAMWALL:OnlyProdMachinePanelV DataContext="{Binding MachinePanelVM}"/>
<!--<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="6*"/>
</Grid.RowDefinitions>
<TabControl Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2"
SelectedIndex="{Binding SelConfigSubPage}"
Style="{StaticResource OnlyProd_TabControl}">
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding General_Msg}"
FontSize="15"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding General_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALLCORE:OnlyProdGeneral_ConfigurationPageV/>
</TabItem.Content>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding Machine_Msg}"
FontSize="15"/>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALL:OnlyProdMachinePanelV DataContext="{Binding MachinePanelVM}"/>
</TabItem.Content>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding PDFEditor_Msg}"
FontSize="15"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding PDFEditor_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALL:OnlyProdPDFEditorV/>
</TabItem.Content>
</TabItem>
</TabControl>
</Grid>-->
</DockPanel>
@@ -150,7 +150,6 @@
<Compile Include="ForcedStrategyBTL\ForcedStrategyBTLV.xaml.vb">
<DependentUpon>ForcedStrategyBTLV.xaml</DependentUpon>
</Compile>
<Compile Include="ForcedStrategyBTL\ForcedStrategyBTLVM.vb" />
<Compile Include="ForcedStrategyPanel\ForcedStrategyPanelV.xaml.vb">
<DependentUpon>ForcedStrategyPanelV.xaml</DependentUpon>
</Compile>
@@ -1127,6 +1126,21 @@
<ItemGroup>
<Resource Include="Resources\NewPage\padlock.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\padlock-unlock.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\play.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\add.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\diskette.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\pezzo.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.OptimizerR32.exe
@@ -1,7 +1,6 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Optimizer.StrategyManagerVM
Imports EgtUILib
Imports EgtWPFLib5
Imports Newtonsoft.Json
@@ -82,10 +81,36 @@ Public Class ForcedStrategyBTLVM
NotifyPropertyChanged(NameOf(AdminFontWeight))
End Sub
Private m_CurrentFeature As BTLFeatureM
Private m_UnloackImage As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Public ReadOnly Property UnloackImage As String
Get
Return m_UnloackImage
End Get
End Property
Friend Sub SetUnloackImage(value As String)
m_UnloackImage = value
NotifyPropertyChanged(NameOf(UnloackImage))
End Sub
' Definizione Comandi
Private m_UnlockAllCommand As ICommand
Private m_bUnlockAllIsChecked As Boolean = False
Public Property UnlockAllIsChecked As Boolean
Get
Return m_bUnlockAllIsChecked
End Get
Set(value As Boolean)
m_bUnlockAllIsChecked = value
If m_bUnlockAllIsChecked Then
Map.refStrategyManagerVM.UnlockAll(m_SelStrategy)
SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock-unlock.png")
Else
Map.refStrategyManagerVM.LockAll(m_SelStrategy)
SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
NotifyPropertyChanged(NameOf(UnlockAllIsChecked))
End Set
End Property
Private m_CurrentFeature As BTLFeatureM
#Region "Messages"
@@ -95,7 +120,7 @@ Public Class ForcedStrategyBTLVM
End Get
End Property
Public ReadOnly Property AdminMsg As String
Public ReadOnly Property AdvanceMsg As String
Get
Return EgtMsg(61749)
End Get
@@ -286,35 +311,4 @@ Public Class ForcedStrategyBTLVM
#End Region ' Methods
#Region "COMMANDS"
#Region "UnlockAllCommand"
Public ReadOnly Property UnlockAllCommand As ICommand
Get
If m_UnlockAllCommand Is Nothing Then
m_UnlockAllCommand = New Command(AddressOf UnlockAll)
End If
Return m_UnlockAllCommand
End Get
End Property
''' <summary>
''' Funzione sblocca tutti paramatri delle strategie con una password
''' </summary>
Public Sub UnlockAll()
Map.refStrategyManagerVM.UnLockParameter(m_SelStrategy)
For Each Param As StrategyParameter In m_SelStrategy.ParameterList
If Param.sMinUserLevel >= UserLevel.MEDIUM Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10
SetUserAdmin_IsChecked(True)
Map.refStrategyManagerVM.UserLevelVisibility(Param, Visibility.Visible)
End If
Next
End Sub
#End Region ' UnlockAllCommand
#End Region ' Commands
End Class
@@ -1,7 +1,6 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Optimizer.StrategyManagerVM
Imports EgtUILib
Imports EgtWPFLib5
Imports Newtonsoft.Json
@@ -82,12 +81,40 @@ Public Class ForcedStrategyPanelVM
NotifyPropertyChanged(NameOf(AdminFontWeight))
End Sub
Private m_UnloackImage As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Public ReadOnly Property UnloackImage As String
Get
Return m_UnloackImage
End Get
End Property
Friend Sub SetUnloackImage(value As String)
m_UnloackImage = value
NotifyPropertyChanged(NameOf(UnloackImage))
End Sub
Private m_bUnlockAllIsChecked As Boolean = False
Public Property UnlockAllIsChecked As Boolean
Get
Return m_bUnlockAllIsChecked
End Get
Set(value As Boolean)
m_bUnlockAllIsChecked = value
If m_bUnlockAllIsChecked Then
Map.refStrategyManagerVM.UnlockAll(m_SelStrategy)
SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock-unlock.png")
Else
Map.refStrategyManagerVM.LockAll(m_SelStrategy)
SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
NotifyPropertyChanged(NameOf(UnlockAllIsChecked))
End Set
End Property
Private m_CurrentFeature As BTLFeatureM
' Definizione Comandi
Private m_cmdOk As ICommand
Private m_cmdCancel As ICommand
Private m_UnlockAllCommand As ICommand
#Region "Messages"
@@ -97,7 +124,7 @@ Public Class ForcedStrategyPanelVM
End Get
End Property
Public ReadOnly Property AdminMsg As String
Public ReadOnly Property AdvanceMsg As String
Get
Return EgtMsg(61749)
End Get
@@ -245,6 +272,47 @@ Public Class ForcedStrategyPanelVM
Return -1
End Function
Friend Sub ForcedStrategy()
' cancello precedenti valori
Dim sPrecStrategyID As String = ""
EgtGetInfo(m_CurrentFeature.nFeatureId, "STRATEGY", sPrecStrategyID)
If Not String.IsNullOrWhiteSpace(sPrecStrategyID) Then
Dim PrecInfo As String() = {}
EgtGetAllInfo(m_CurrentFeature.nFeatureId, PrecInfo)
Dim PrecStrategyInfo As String() = PrecInfo.Where(Function(x) x.StartsWith(sPrecStrategyID)).ToArray()
For Each Info In PrecStrategyInfo
EgtRemoveInfo(m_CurrentFeature.nFeatureId, Info.Split("="c)(0))
Next
End If
If Not IsNothing(m_SelStrategy) Then
If m_SelStrategy.sStrategyId = AUTOMATICSTRATEGYID Then
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)
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, BooleanStrategyParameter).bValue)
Case GetType(DoubleStrategyParameter)
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, DoubleStrategyParameter).sValue)
Case GetType(ComboStrategyParameter)
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
#Region "COMMANDS"
@@ -261,42 +329,43 @@ Public Class ForcedStrategyPanelVM
End Property
Public Sub Ok()
' cancello precedenti valori
Dim sPrecStrategyID As String = ""
EgtGetInfo(m_CurrentFeature.nFeatureId, "STRATEGY", sPrecStrategyID)
If Not String.IsNullOrWhiteSpace(sPrecStrategyID) Then
Dim PrecInfo As String() = {}
EgtGetAllInfo(m_CurrentFeature.nFeatureId, PrecInfo)
Dim PrecStrategyInfo As String() = PrecInfo.Where(Function(x) x.StartsWith(sPrecStrategyID)).ToArray()
For Each Info In PrecStrategyInfo
EgtRemoveInfo(m_CurrentFeature.nFeatureId, Info.Split("="c)(0))
Next
End If
If m_SelStrategy.sStrategyId = AUTOMATICSTRATEGYID Then
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)
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, BooleanStrategyParameter).bValue)
Case GetType(DoubleStrategyParameter)
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, DoubleStrategyParameter).sValue)
Case GetType(ComboStrategyParameter)
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
'' cancello precedenti valori
'Dim sPrecStrategyID As String = ""
'EgtGetInfo(m_CurrentFeature.nFeatureId, "STRATEGY", sPrecStrategyID)
'If Not String.IsNullOrWhiteSpace(sPrecStrategyID) Then
' Dim PrecInfo As String() = {}
' EgtGetAllInfo(m_CurrentFeature.nFeatureId, PrecInfo)
' Dim PrecStrategyInfo As String() = PrecInfo.Where(Function(x) x.StartsWith(sPrecStrategyID)).ToArray()
' For Each Info In PrecStrategyInfo
' EgtRemoveInfo(m_CurrentFeature.nFeatureId, Info.Split("="c)(0))
' Next
'End If
'If m_SelStrategy.sStrategyId = AUTOMATICSTRATEGYID Then
' 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)
' EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, BooleanStrategyParameter).bValue)
' Case GetType(DoubleStrategyParameter)
' EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, DoubleStrategyParameter).sValue)
' Case GetType(ComboStrategyParameter)
' 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
ForcedStrategy()
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
' Abilito LeftPanel
Map.refProjectVM.SetOnlyProdLeftPanel_IsEnabled(True)
@@ -325,33 +394,6 @@ Public Class ForcedStrategyPanelVM
#End Region ' Cancel_Command
#Region "UnlockAllCommand"
Public ReadOnly Property UnlockAllCommand As ICommand
Get
If m_UnlockAllCommand Is Nothing Then
m_UnlockAllCommand = New Command(AddressOf UnlockAll)
End If
Return m_UnlockAllCommand
End Get
End Property
''' <summary>
''' Funzione sblocca tutti paramatri delle strategie con una password
''' </summary>
Public Sub UnlockAll()
Map.refStrategyManagerVM.UnLockParameter(m_SelStrategy)
For Each Param As StrategyParameter In m_SelStrategy.ParameterList
If Param.sMinUserLevel >= UserLevel.MEDIUM Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10
SetUserAdmin_IsChecked(True)
Map.refStrategyManagerVM.UserLevelVisibility(Param, Visibility.Visible)
End If
Next
End Sub
#End Region ' UnlockAllCommand
#End Region ' Commands
End Class
@@ -100,7 +100,8 @@ Public Class FeatureListVM
End Property
Public Sub Ok()
Map.refForcedStrategyBTLVM.ForcedStrategy()
'Map.refForcedStrategyBTLVM.ForcedStrategy()
Map.refForcedStrategyPanelVM.ForcedStrategy()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Visible)
Map.refProjectVM.SetStrategyManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
@@ -385,6 +385,9 @@
SelectedItem="{Binding SelBTLFeatureVM, UpdateSourceTrigger=PropertyChanged}"
PreviewMouseWheel="ListBox_PreviewMouseWheel"
Grid.IsSharedSizeScope="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:EgtDataGrid}}}"
Style="{StaticResource BTL_ListBox}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
@@ -139,7 +139,8 @@ Public Class PParameterListVM
End Property
Public Sub Ok()
Map.refForcedStrategyBTLVM.ForcedStrategy()
'Map.refForcedStrategyBTLVM.ForcedStrategy()
Map.refForcedStrategyPanelVM.ForcedStrategy()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Visible)
Map.refProjectVM.SetStrategyManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
@@ -209,6 +209,8 @@ Public Class MainMenuVM
EgtSetCurrMachine(Map.refMachinePanelVM.SelectedMachine.Name)
Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
Map.refMainMenuVM.NotifyPropertyChanged(NameOf(Map.refMainMenuVM.SendFeedbackIsEnabled))
Map.refStrategyManagerVM.UserAdmin_IsChecked = False
Map.refStrategyManagerVM.SetUnloackImage("pack://application:,,,/Resources/NewPAge/padlock.png")
Return True
End Function
@@ -6,10 +6,11 @@
Style="{StaticResource OnlyProdPartManager_StackPanel}">
<!--Barra superiore dei comandi-->
<Button Content="START"
Command="{Binding ShowPopUpStartBtnCommand}"
Name="StartBtn" Width="50" Margin="0,0,2.5,0"
Style="{StaticResource ToolBarOnlyProdManagerNew_Button}"/>
<Button Command="{Binding ShowPopUpStartBtnCommand}"
Name="StartBtn" Margin="0,0,2.5,0"
Style="{StaticResource ToolBarOnlyProdManagerNew_Button}">
<Image Source="/Resources/NewPage/play.png" Stretch="Uniform"/>
</Button>
<Popup IsOpen="{Binding IsStartBtnOpen}"
AllowsTransparency="True"
PopupAnimation="Scroll"
@@ -52,10 +53,11 @@
</StackPanel>
</Popup>
<Button Content="SAVE"
Command="{Binding ShowPopUpSaveBtnCommand}"
Name="SaveBtn" Width="40" Margin="0,0,2.5,0"
Style="{StaticResource ToolBarOnlyProdManagerNew_Button}"/>
<Button Command="{Binding ShowPopUpSaveBtnCommand}"
Name="SaveBtn" Margin="0,0,2.5,0"
Style="{StaticResource ToolBarOnlyProdManagerNew_Button}">
<Image Source="/Resources/NewPage/diskette.png" Stretch="Uniform"/>
</Button>
<Popup IsOpen="{Binding IsSaveBtnOpen}"
AllowsTransparency="True"
PopupAnimation="Scroll"
@@ -75,10 +77,11 @@
</StackPanel>
</Popup>
<Button Content="ADD"
Command="{Binding ShowPopUpBtlBtnCommand}"
<Button Command="{Binding ShowPopUpBtlBtnCommand}"
Name="BtlBtn"
Style="{StaticResource ToolBarOnlyProdManagerNew_Button}"/>
Style="{StaticResource ToolBarOnlyProdManagerNew_Button}">
<Image Source="/Resources/NewPage/add.png" Stretch="Uniform"/>
</Button>
<Popup IsOpen="{Binding IsBtlBtnOpen}"
AllowsTransparency="True"
PopupAnimation="Scroll"
@@ -6,52 +6,51 @@
IsEnabled="{Binding PartManager_IsEnabled}"
Style="{StaticResource OnlyProdPartManager_Grid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border Style="{StaticResource OnlyProdQty_Border}">
<UniformGrid Columns="4"
Margin="10,0,15,0">
<TextBlock Text="BTL Qty"
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
<TextBlock Text="{Binding Tag.sCNT,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}},
UpdateSourceTrigger=Explicit}"
Style="{StaticResource OnlyProdCNT_TextBlock}"/>
<TextBlock Text="Added Qty"
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sADDED,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}},
UpdateSourceTrigger=Explicit}"
Style="{StaticResource Qty_TextBox}"/>
</UniformGrid>
</Border>
<Border Grid.Column="1"
Style="{StaticResource OnlyProdDimension_Border}">
<UniformGrid Columns="6"
Margin="0,5,20,5">
<TextBlock Text="W"
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sW,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}},
UpdateSourceTrigger=Explicit}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Text="H"
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sH,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}},
UpdateSourceTrigger=Explicit}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Text="L"
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sL,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}},
UpdateSourceTrigger=Explicit}"
Style="{StaticResource Dimension_TextBox}"/>
</UniformGrid>
</Border>
<UniformGrid Columns="2">
<TextBlock Text="BTL Qty"
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
<TextBlock Text="{Binding Tag.sCNT,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}},
UpdateSourceTrigger=Explicit}"
Style="{StaticResource OnlyProdCNT_TextBlock}"/>
</UniformGrid>
<UniformGrid Grid.Row="1" Columns="2">
<TextBlock Text="Added Qty"
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sADDED,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}},
UpdateSourceTrigger=Explicit}"
Style="{StaticResource Qty_TextBox}"/>
</UniformGrid>
<UniformGrid Grid.Row="2" Columns="2">
<TextBlock Text="W"
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sW,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}},
UpdateSourceTrigger=Explicit}"
Style="{StaticResource Dimension_TextBox}"/>
</UniformGrid>
<UniformGrid Grid.Row="3" Columns="2">
<TextBlock Text="H"
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sH,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}},
UpdateSourceTrigger=Explicit}"
Style="{StaticResource Dimension_TextBox}"/>
</UniformGrid>
<UniformGrid Grid.Row="4" Columns="2">
<TextBlock Text="L"
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sL,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}},
UpdateSourceTrigger=Explicit}"
Style="{StaticResource Dimension_TextBox}"/>
</UniformGrid>
</Grid>
@@ -110,27 +110,39 @@
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border Grid.RowSpan="2" Grid.ColumnSpan="2" Style="{StaticResource OnlyProdPage_Border}"/>
<Border Grid.RowSpan="2" Grid.ColumnSpan="3" Style="{StaticResource OnlyProdPage_Border}"/>
<EgtBEAMWALL:OnlyProdPartManagerV DataContext="{StaticResource PartManagerVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}"/>
<Border Grid.Column="1"
Height="70"
Background="{StaticResource BeamWall_Glacier}">
<Button Command="{Binding Parameter_Command}"
ToolTip="{Binding Parameters_ToolTip}" Margin="0,2.5,10,2.5"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/InstrumentPanel/Analyze.png" Stretch="Uniform"/>
</Button>
<Border Grid.Row="1" Grid.RowSpan="2" Margin="10,5,10,5" Style="{StaticResource OnlyProdPage_Border}">
<EgtBEAMWALL:OnlyProdPartManagerV DataContext="{StaticResource PartManagerVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}"/>
</Border>
<Button Grid.Row="1"
Grid.Column="1"
<Border Grid.ColumnSpan="2" Margin="10,5,10,5" Background="{StaticResource BeamWall_Glacier}" Style="{StaticResource OnlyProdPage_Border}">
<TextBlock Grid.ColumnSpan="2"
Text="{Binding BTLStructureVM.SelBTLPart.sNAM}"
VerticalAlignment="Center"
Foreground="{StaticResource BeamWall_White}"
Style="{StaticResource Macro_TextBlock}"/>
</Border>
<Button Grid.Column="2"
Command="{Binding Parameter_Command}"
ToolTip="{Binding Parameters_ToolTip}" Margin="10"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/InstrumentPanel/Analyze.png" Stretch="Uniform"/>
</Button>
<Image Grid.RowSpan="2"
Grid.Column="1" Margin="5"
Source="/Resources/NewPage/pezzo.png" Stretch="Uniform"/>
<Button Grid.Row="2"
Grid.Column="3"
VerticalAlignment="Bottom" Margin="10"
Command="{Binding Back_Command}"
ToolTip="{Binding Back_Msg}"
@@ -220,7 +232,7 @@
</TabItem>
<TabItem Header="STRATEGYMANAGERBTL" Visibility="{Binding DataContext.StrategyManagerVisibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}">
<TabItem.Content>
<EgtBEAMWALL:ForcedStrategyBTLV DataContext="{StaticResource ForcedStrategyBTLVM}"/>
<EgtBEAMWALL:ForcedStrategyBTLV DataContext="{StaticResource ForcedStrategyPanelVM}"/>
</TabItem.Content>
</TabItem>
</TabControl>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 B

@@ -10,39 +10,47 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
Margin="0,5,0,10">
<ComboBox ItemsSource="{Binding StrategyTypeList}"
SelectedItem="{Binding SelStrategyType}"
Visibility="{Binding StrategyType_Visibility}"
Style="{StaticResource Strategy_ComboBox}"
Margin="0,0,10,0"/>
<ComboBox ItemsSource="{Binding StrategySetupList}"
SelectedItem="{Binding SelStrategySetup}"
DisplayMemberPath="sName"
Style="{StaticResource Strategy_ComboBox}"/>
<Button Command="{Binding New_Command}"
ToolTip="{Binding NewToolTip}"
Margin="10,0,10,0"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="/Resources/ProjectManager/New.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding OpenFileNameCustomConfigCommand}"
ToolTip="{Binding SaveAsToolTip}"
Margin="10,0,10,0"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="/Resources/NewPage/+.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="{Binding SaveImage}" Stretch="Uniform"/>
</Button>
</StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
Margin="0,5,0,5">
<ComboBox ItemsSource="{Binding StrategyTypeList}"
SelectedItem="{Binding SelStrategyType}"
Visibility="{Binding StrategyType_Visibility}"
Style="{StaticResource Strategy_ComboBox}"
Margin="0,0,10,0"/>
<ComboBox ItemsSource="{Binding StrategySetupList}"
SelectedItem="{Binding SelStrategySetup}"
DisplayMemberPath="sName"
Style="{StaticResource Strategy_ComboBox}"/>
<Button Command="{Binding New_Command}"
ToolTip="{Binding NewToolTip}"
Margin="10,0,10,0"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="/Resources/ProjectManager/New.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding OpenFileNameCustomConfigCommand}"
ToolTip="{Binding SaveAsToolTip}"
Margin="10,0,10,0"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="/Resources/NewPage/+.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="{Binding SaveImage}" Stretch="Uniform"/>
</Button>
</StackPanel>
<Optimizer:UserAdminV Grid.Column="1"
HorizontalAlignment="Right"
Tag="{Binding SelTreeItem.SelParamStrategy}"/>
</Grid>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
@@ -52,11 +60,13 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Grid.RowSpan="3"
<Border Grid.RowSpan="2"
Style="{StaticResource OnlyProdPage_Border}">
<TreeView BorderThickness="0"
Width="300"
Height="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"
ItemsSource="{Binding SelStrategySetup.StrategyFeatureList}">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type Optimizer:StrategyFeature}"
@@ -93,12 +103,9 @@
</Border>
<Optimizer:StrategyV Grid.Column="1"
Grid.RowSpan="3"/>
<Optimizer:UserAdminV Grid.Column="2" Tag="{Binding SelTreeItem.SelParamStrategy}"/>
Grid.RowSpan="2"/>
<GroupBox Grid.Row="1"
Grid.Column="2"
<GroupBox Grid.Column="2"
Foreground="Black"
BorderThickness="2"
Margin="0,-11,0,0"
@@ -111,7 +118,7 @@
<Optimizer:ParameterStrategyV Tag="{Binding SelTreeItem.SelParamStrategy}"/>
</GroupBox>
<StackPanel Grid.Row="2"
<StackPanel Grid.Row="1"
Grid.Column="2"
Width="600"/>
</Grid>
@@ -3,7 +3,6 @@ Imports System.ComponentModel
Imports System.Globalization
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Optimizer.StrategyManagerVM
Imports EgtUILib
Imports EgtWPFLib5
Imports Newtonsoft.Json
@@ -14,9 +13,9 @@ Public Class StrategyManagerVM
#Region "FIELDS & PROPERTIES"
Public Enum UserLevel As Integer
BASE = 1
MEDIUM = 5
FULL = 10
USER = 1
ADVANCED = 5
ADMINISTRATOR = 10
End Enum
Private m_StrategyTypeList As New List(Of IdNameStruct)({New IdNameStruct(BWType.BEAM, "Beam"), New IdNameStruct(BWType.WALL, "Wall")})
@@ -36,7 +35,6 @@ Public Class StrategyManagerVM
' deseleziono eventuale strategia selezionata
If Not IsNothing(m_SelTreeItem) Then
m_SelTreeItem.IsSelected = False
'SelTreeItem = Nothing
End If
End Set
End Property
@@ -58,7 +56,6 @@ Public Class StrategyManagerVM
If Not IsNothing(m_SelTreeItem) Then
m_SelTreeItem.IsSelected = False
m_SelTreeItem.StrategyList.Clear()
'SelTreeItem = Nothing
End If
m_SelStrategySetup = value
m_SelStrategySetup.Read()
@@ -162,7 +159,9 @@ Public Class StrategyManagerVM
End Get
Set(value As Boolean)
m_bUserAdmin_IsChecked = value
ShowParamStrategy(m_SelTreeItem.SelParamStrategy)
If Not IsNothing(m_SelTreeItem) Then
ShowParamStrategy(m_SelTreeItem.SelParamStrategy)
End If
NotifyPropertyChanged(NameOf(UserAdmin_IsChecked))
End Set
End Property
@@ -204,6 +203,35 @@ Public Class StrategyManagerVM
NotifyPropertyChanged(NameOf(bOK))
End Sub
Private m_UnloackImage As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Public ReadOnly Property UnloackImage As String
Get
Return m_UnloackImage
End Get
End Property
Friend Sub SetUnloackImage(value As String)
m_UnloackImage = value
NotifyPropertyChanged(NameOf(UnloackImage))
End Sub
Private m_bUnlockAllIsChecked As Boolean = False
Public Property UnlockAllIsChecked As Boolean
Get
Return m_bUnlockAllIsChecked
End Get
Set(value As Boolean)
m_bUnlockAllIsChecked = value
If m_bUnlockAllIsChecked Then
UnlockAll(m_SelTreeItem.SelParamStrategy)
SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock-unlock.png")
Else
LockAll(m_SelTreeItem.SelParamStrategy)
SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
NotifyPropertyChanged(NameOf(UnlockAllIsChecked))
End Set
End Property
#Region "Messages"
Public ReadOnly Property SaveToolTip As String
@@ -230,7 +258,7 @@ Public Class StrategyManagerVM
End Get
End Property
Public ReadOnly Property AdminMsg As String
Public ReadOnly Property AdvanceMsg As String
Get
Return EgtMsg(61749)
End Get
@@ -248,7 +276,6 @@ Public Class StrategyManagerVM
Private m_MoveDownSelectedStrategyCommand As ICommand
Private m_cmdOk As ICommand
Private m_cmdCancel As ICommand
Private m_UnlockAllCommand As ICommand
#End Region ' Field & Properties
@@ -325,19 +352,20 @@ Public Class StrategyManagerVM
Friend Sub ShowParamStrategy(Strategy As Strategy)
SetAdminFontWeight(If(m_bUserAdmin_IsChecked, FontWeights.Bold, FontWeights.Normal))
SetUserFontWeight(If(m_bUserAdmin_IsChecked, FontWeights.Normal, FontWeights.Bold))
For Each Param As StrategyParameter In m_SelTreeItem.SelParamStrategy.ParameterList
For Each Param As StrategyParameter In Strategy.ParameterList
Select Case Param.sMinUserLevel
Case UserLevel.MEDIUM
Case UserLevel.ADVANCED
UserLevelVisibility(Param, If(m_bUserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case Else
If Not m_bUserAdmin_IsChecked Then
UserLevelVisibility(Param, If(Param.sMinUserLevel = UserLevel.BASE, Visibility.Visible, Visibility.Collapsed))
UserLevelVisibility(Param, If(Param.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
SetUnloackImage("pack://application:,,,/Resources/NewPAge/padlock.png")
End If
End Select
Next
End Sub
Friend Sub UnLockParameter(Strategy As Strategy)
Friend Sub UnLockParameter()
Dim InputPwdWndVM As New InputPwdWndVM()
Dim InputPwdWnd As New OnlyProdInputPwdWndV(Application.Current.MainWindow, InputPwdWndVM)
Dim sPwdIni As String = String.Empty
@@ -366,6 +394,33 @@ Public Class StrategyManagerVM
End If
End Sub
''' <summary>
''' Funzione sblocca tutti paramatri delle strategie con una password
''' </summary>
Public Sub UnlockAll(Strategy As Strategy)
UnLockParameter()
For Each Param As StrategyParameter In Strategy.ParameterList
If Param.sMinUserLevel >= UserLevel.ADVANCED Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10
Map.refStrategyManagerVM.SetUserAdmin_IsChecked(True)
UserLevelVisibility(Param, Visibility.Visible)
End If
Next
End Sub
''' <summary>
''' Funzione blocca tutti paramatri delle strategie con una password
''' </summary>
Public Sub LockAll(Strategy As Strategy)
For Each Param As StrategyParameter In Strategy.ParameterList
If Param.sMinUserLevel >= UserLevel.ADVANCED Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10
Map.refStrategyManagerVM.SetUserAdmin_IsChecked(False)
UserLevelVisibility(Param, Visibility.Collapsed)
End If
Next
End Sub
#End Region ' Methods
#Region "COMMANDS"
@@ -606,33 +661,6 @@ Public Class StrategyManagerVM
#End Region ' Cancel_Command
#Region "UnlockAllCommand"
Public ReadOnly Property UnlockAllCommand As ICommand
Get
If m_UnlockAllCommand Is Nothing Then
m_UnlockAllCommand = New Command(AddressOf UnlockAll)
End If
Return m_UnlockAllCommand
End Get
End Property
''' <summary>
''' Funzione sblocca tutti paramatri delle strategie con una password
''' </summary>
Public Sub UnlockAll()
UnLockParameter(m_SelTreeItem.SelParamStrategy)
For Each Param As StrategyParameter In m_SelTreeItem.SelParamStrategy.ParameterList
If Param.sMinUserLevel >= UserLevel.MEDIUM Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10
Map.refStrategyManagerVM.SetUserAdmin_IsChecked(True)
UserLevelVisibility(Param, Visibility.Visible)
End If
Next
End Sub
#End Region ' UnlockAllCommand
#End Region ' Commands
End Class
@@ -1,8 +1,7 @@
<Grid x:Class="UserAdminV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
HorizontalAlignment="Right"
Margin="0,0,0,10">
HorizontalAlignment="Right">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
@@ -19,16 +18,15 @@
IsChecked="{Binding UserAdmin_IsChecked}"
Style="{StaticResource Parameter_ToggleButton}"/>
<TextBlock Grid.Column="2"
Text="{Binding AdminMsg}"
Text="{Binding AdvanceMsg}"
HorizontalAlignment="Left"
TextWrapping="WrapWithOverflow"
Margin="5,0,5,0"
FontWeight="{Binding AdminFontWeight}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<Button Grid.Column="3"
Margin="0,0,10,0"
Command="{Binding UnlockAllCommand}"
Style="{StaticResource OnlyProdToolBarInverted_SmallButton}">
<Image Source="/Resources/NewPage/padlock.png" Stretch="Uniform"/>
</Button>
<ToggleButton Grid.Column="3"
IsChecked="{Binding UnlockAllIsChecked}"
Style="{StaticResource Unlock_ToggleButton}">
<Image Source="{Binding UnloackImage}" Stretch="Uniform"/>
</ToggleButton>
</Grid>
+44 -5
View File
@@ -53,7 +53,7 @@
<EgtBEAMWALL:SpecialPanelVM x:Key="SpecialPanelVM"/>
<EgtBEAMWALL:StrategyManagerVM x:Key="StrategyManagerVM"/>
<EgtBEAMWALL:ForcedStrategyPanelVM x:Key="ForcedStrategyPanelVM"/>
<EgtBEAMWALL:ForcedStrategyBTLVM x:Key="ForcedStrategyBTLVM"/>
<!--<EgtBEAMWALL:ForcedStrategyBTLVM x:Key="ForcedStrategyBTLVM"/>-->
<!--#endregion Panel ViewModel-->
@@ -410,7 +410,7 @@
<!-- TextBlock New Page -->
<Style x:Key="OptionTextBlock_OnlyProd" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{StaticResource BeamWall_Corduroy}"/>
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
@@ -3020,6 +3020,44 @@
</Setter>
</Style>
<Style x:Key="Unlock_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="20"/>
<Setter Property="Width" Value="20"/>
<Setter Property="Margin" Value="0,0,10,0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="border" CornerRadius="3" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Button.IsDefaulted" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource ButtonBasic.Static.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
<Setter Property="OpacityMask" Value="#54707070"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#endregion ToggleButton Style-->
<!--#region TextBox-->
@@ -3677,9 +3715,10 @@
<!--#region Grid-->
<Style x:Key="OnlyProdPartManager_Grid" TargetType="{x:Type Grid}">
<Setter Property="Background" Value="{StaticResource BeamWall_Glacier}"/>
<Setter Property="Height" Value="70"/>
<Setter Property="Margin" Value="0,10,0,10"/>
<!--<Setter Property="Background" Value="{StaticResource BeamWall_White}"/>-->
<!--<Setter Property="Height" Value="70"/>-->
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Margin" Value="10,10,0,10"/>
</Style>
<Style x:Key="OnlyProdAddPart_Grid" TargetType="{x:Type Grid}">
+11 -11
View File
@@ -35,7 +35,7 @@ Module Map
Private m_refSpecialPanelVM As SpecialPanelVM
Private m_refStrategyManagerVM As StrategyManagerVM
Private m_refForcedStrategyPanelVM As ForcedStrategyPanelVM
Private m_refForcedStrategyBTLVM As ForcedStrategyBTLVM
'Private m_refForcedStrategyBTLVM As ForcedStrategyBTLVM
#Region "Get"
@@ -261,11 +261,11 @@ Module Map
End Get
End Property
Public ReadOnly Property refForcedStrategyBTLVM As ForcedStrategyBTLVM
Get
Return m_refForcedStrategyBTLVM
End Get
End Property
'Public ReadOnly Property refForcedStrategyBTLVM As ForcedStrategyBTLVM
' Get
' Return m_refForcedStrategyBTLVM
' End Get
'End Property
#End Region ' Get
@@ -451,10 +451,10 @@ Module Map
Return Not IsNothing(m_refForcedStrategyPanelVM)
End Function
Friend Function SetRefForcedStrategyBTLVM(ForcedStrategyBTLVM As ForcedStrategyBTLVM) As Boolean
m_refForcedStrategyBTLVM = ForcedStrategyBTLVM
Return Not IsNothing(m_refForcedStrategyBTLVM)
End Function
'Friend Function SetRefForcedStrategyBTLVM(ForcedStrategyBTLVM As ForcedStrategyBTLVM) As Boolean
' m_refForcedStrategyBTLVM = ForcedStrategyBTLVM
' Return Not IsNothing(m_refForcedStrategyBTLVM)
'End Function
#End Region ' Set
@@ -483,7 +483,7 @@ Module Map
Not IsNothing(m_refBTLPartManagerVM) AndAlso Not IsNothing(m_refRawPartManagerVM) AndAlso
Not IsNothing(m_refFeatureListManagerVM) AndAlso Not IsNothing(m_refSpecialPanelVM) AndAlso
Not IsNothing(m_refStrategyManagerVM) AndAlso Not IsNothing(m_refForcedStrategyPanelVM) AndAlso
Not IsNothing(m_refForcedStrategyBTLVM) AndAlso LibMap.EndInit()
LibMap.EndInit()
End Function
#End Region ' Init