From e76f650ced43ab14f3c637ad5286fe2ae2df49a6 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Tue, 1 Jun 2021 18:30:44 +0200 Subject: [PATCH] Modifica per rendere cambio parametro visibile solo in visualizzatore --- .../InstrumentPanel/InstrumentPanelV.xaml | 3 ++- .../InstrumentPanel/MyInstrumentPanelVM.vb | 5 +++++ EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/InstrumentPanelV.xaml b/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/InstrumentPanelV.xaml index 168a3f29..3cd93da2 100644 --- a/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/InstrumentPanelV.xaml +++ b/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/InstrumentPanelV.xaml @@ -25,7 +25,8 @@ FontWeight="Light" ToolTip="{Binding ChangeParam_ToolTip}" Style="{StaticResource ToolBar_Button}" - Command="{Binding ChangeParameter_Command}"> + Command="{Binding ChangeParameter_Command}" + Visibility="{Binding ChangeParam_Visibility}"> diff --git a/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/MyInstrumentPanelVM.vb b/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/MyInstrumentPanelVM.vb index dd73d5de..cb956c5b 100644 --- a/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/MyInstrumentPanelVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/MyInstrumentPanelVM.vb @@ -7,6 +7,11 @@ Imports EgtBEAMWALL.Core Public Class MyInstrumentPanelVM Inherits InstrumentPanelVM + Public ReadOnly Property ChangeParam_Visibility As Visibility + Get + Return If(Map.refMainMenuVM.SelPage = Pages.VIEW, Visibility.Visible, Visibility.Collapsed) + End Get + End Property ' Definizione comandi Private m_cmdData As ICommand Private m_cmdChangeParameter As ICommand diff --git a/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb b/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb index 25354989..7f38a2b5 100644 --- a/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb @@ -154,6 +154,7 @@ Public Class MainMenuVM Map.refProjectVM.MachGroupPanelVM = Nothing End If Map.refMainWindowVM.NotifyPropertyChanged("nSelTabPage") + Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeParam_Visibility)) Return True End Function @@ -200,6 +201,7 @@ Public Class MainMenuVM Map.refProjectVM.MachGroupPanelVM = Nothing End If Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage)) + Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeParam_Visibility)) Return True End Function