From 34fa0909ab04096a26a602142ebd8b6bd6da80e5 Mon Sep 17 00:00:00 2001 From: Demetrio Cassarino Date: Wed, 20 Nov 2024 08:10:50 +0100 Subject: [PATCH] =?UTF-8?q?-aggiunto=20pulsante=20per=20info=20gi=C3=A0=20?= =?UTF-8?q?presenti=20-aggiunto=20selezione=20in=20scena=20e=20apertura=20?= =?UTF-8?q?in=20albero=20-sitemato=20accensione=20luce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Base/TreeView/TreeViewItemBase.vb | 28 ++- .../InfoExpander/InfoExpanderV.xaml | 2 +- .../InputExpander/InputExpanderV.xaml | 78 ++++++-- .../InputExpander/InputExpanderVM.vb | 177 +++++++++++++++++- .../ManageLayerExpander/LayerTreeView.vb | 2 +- .../ManageLayerExpanderV.xaml | 26 +-- .../ManageLayerExpanderVM.vb | 2 +- Project/ProjectVM.vb | 45 +++-- StructureDataForMessenger.vb | 110 +++++++++++ 9 files changed, 424 insertions(+), 46 deletions(-) diff --git a/Base/TreeView/TreeViewItemBase.vb b/Base/TreeView/TreeViewItemBase.vb index eba277f..495a4da 100644 --- a/Base/TreeView/TreeViewItemBase.vb +++ b/Base/TreeView/TreeViewItemBase.vb @@ -1,5 +1,7 @@ Imports System.Collections.ObjectModel Imports System.ComponentModel +Imports EgtUILib +Imports EgtUILib.EgtInterface ' Classe che definisce un elemento di base del TreeView Public Class TreeViewItemBase @@ -31,7 +33,7 @@ Public Class TreeViewItemBase End Set End Property - Private m_isExpanded As Boolean + Friend m_isExpanded As Boolean Public Property IsExpanded As Boolean Get Return m_isExpanded @@ -39,6 +41,25 @@ Public Class TreeViewItemBase Set(value As Boolean) If (value <> m_isExpanded) Then m_isExpanded = value + If Not Map.refProjectVM.bSelObjOnScene Then + Dim m_onldObjTreeOldId As Integer = Map.refManageLayerExpanderVM.m_nObjTreeOldId + If Not m_isExpanded Then + Else + For Each Item As LayerTreeViewItem In Map.refManageLayerExpanderVM.LayerList + For Each LayerItem As LayerTreeViewItem In Item.Items + If m_isExpanded = LayerItem.m_isExpanded Then + If m_onldObjTreeOldId = LayerItem.Id Then + Map.refProjectVM.SetLastInteger(LayerItem.Id) + Map.refProjectVM.ExecuteCommand(Controller.CMD.DESELECTPARTLAYEROBJ) + Else + Map.refManageLayerExpanderVM.SelectIdInObjTree(LayerItem.Id) + 'Map.refProjectVM.ExecuteCommand(Controller.CMD.SETCURRPARTLAYER) + End If + End If + Next + Next + End If + End If NotifyPropertyChanged("IsExpanded") End If End Set @@ -92,6 +113,7 @@ Public Class InheritableTreeViewItem Implements INotifyPropertyChanged Friend m_Name As String + Public Property Name As String Get Return m_Name @@ -195,7 +217,6 @@ Public Class ParentItem Inherits TreeViewItemBase Private m_sPictureString As String - Private m_Items As ObservableCollection(Of ChildItem) Public Property PictureString As String Get @@ -209,6 +230,7 @@ Public Class ParentItem End Set End Property + Private m_Items As ObservableCollection(Of ChildItem) Public Property Items As ObservableCollection(Of ChildItem) Get Return m_Items @@ -255,4 +277,4 @@ Public Class ChildItem MyBase.New(Name, IsSelected, IsExpanded, IsActive) End Sub -End Class +End Class \ No newline at end of file diff --git a/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderV.xaml b/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderV.xaml index 734f7c4..723305f 100644 --- a/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderV.xaml +++ b/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderV.xaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> + Style="{StaticResource ExpanderStyle}"> diff --git a/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml b/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml index 2002e5e..d94ce2d 100644 --- a/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml +++ b/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml @@ -1,9 +1,11 @@  + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:EgtCAM5="clr-namespace:EgtCAM5" + xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"> + Style="{StaticResource ExpanderStyle}">