Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 34fa0909ab | |||
| a662d1dca2 | |||
| e5a32f9c21 |
@@ -1,5 +1,7 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports System.ComponentModel
|
Imports System.ComponentModel
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
|
||||||
' Classe che definisce un elemento di base del TreeView
|
' Classe che definisce un elemento di base del TreeView
|
||||||
Public Class TreeViewItemBase
|
Public Class TreeViewItemBase
|
||||||
@@ -31,7 +33,7 @@ Public Class TreeViewItemBase
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_isExpanded As Boolean
|
Friend m_isExpanded As Boolean
|
||||||
Public Property IsExpanded As Boolean
|
Public Property IsExpanded As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_isExpanded
|
Return m_isExpanded
|
||||||
@@ -39,6 +41,25 @@ Public Class TreeViewItemBase
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If (value <> m_isExpanded) Then
|
If (value <> m_isExpanded) Then
|
||||||
m_isExpanded = value
|
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")
|
NotifyPropertyChanged("IsExpanded")
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -92,6 +113,7 @@ Public Class InheritableTreeViewItem
|
|||||||
Implements INotifyPropertyChanged
|
Implements INotifyPropertyChanged
|
||||||
|
|
||||||
Friend m_Name As String
|
Friend m_Name As String
|
||||||
|
|
||||||
Public Property Name As String
|
Public Property Name As String
|
||||||
Get
|
Get
|
||||||
Return m_Name
|
Return m_Name
|
||||||
@@ -195,7 +217,6 @@ Public Class ParentItem
|
|||||||
Inherits TreeViewItemBase
|
Inherits TreeViewItemBase
|
||||||
|
|
||||||
Private m_sPictureString As String
|
Private m_sPictureString As String
|
||||||
Private m_Items As ObservableCollection(Of ChildItem)
|
|
||||||
|
|
||||||
Public Property PictureString As String
|
Public Property PictureString As String
|
||||||
Get
|
Get
|
||||||
@@ -209,6 +230,7 @@ Public Class ParentItem
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_Items As ObservableCollection(Of ChildItem)
|
||||||
Public Property Items As ObservableCollection(Of ChildItem)
|
Public Property Items As ObservableCollection(Of ChildItem)
|
||||||
Get
|
Get
|
||||||
Return m_Items
|
Return m_Items
|
||||||
@@ -255,4 +277,4 @@ Public Class ChildItem
|
|||||||
MyBase.New(Name, IsSelected, IsExpanded, IsActive)
|
MyBase.New(Name, IsSelected, IsExpanded, IsActive)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
<Expander IsExpanded="{Binding IsEnabled}" IsEnabled="{Binding IsEnabled}"
|
<Expander IsExpanded="{Binding IsEnabled}" IsEnabled="{Binding IsEnabled}"
|
||||||
Style="{StaticResource ExpanderStyle}">
|
Style="{StaticResource ExpanderStyle}">
|
||||||
<Expander.Header>
|
<Expander.Header>
|
||||||
<TextBlock Text="{Binding PropertiesMsg}"/>
|
<TextBlock Text="{Binding PropertiesMsg}"/>
|
||||||
</Expander.Header>
|
</Expander.Header>
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
<UserControl x:Class="InputExpanderV"
|
<UserControl x:Class="InputExpanderV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||||
|
|
||||||
<Expander Header="{Binding Title}" IsExpanded="{Binding IsExpanded}" IsEnabled="{Binding IsEnabled}"
|
<Expander Header="{Binding Title}" IsExpanded="{Binding IsExpanded}" IsEnabled="{Binding IsEnabled}"
|
||||||
Style="{StaticResource ExpanderStyle}">
|
Style="{StaticResource ExpanderStyle}">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<StackPanel.Style>
|
<StackPanel.Style>
|
||||||
<Style TargetType="{x:Type StackPanel}">
|
<Style TargetType="{x:Type StackPanel}">
|
||||||
@@ -16,26 +18,75 @@
|
|||||||
</StackPanel.Style>
|
</StackPanel.Style>
|
||||||
<TextBlock Text="{Binding TextBlock}"
|
<TextBlock Text="{Binding TextBlock}"
|
||||||
Visibility="{Binding TextVisibility}" Margin="5,5,0,5"/>
|
Visibility="{Binding TextVisibility}" Margin="5,5,0,5"/>
|
||||||
<TextBox Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}"
|
<Grid>
|
||||||
Visibility="{Binding TextVisibility}" Margin="5,0,5,5">
|
<Grid.ColumnDefinitions>
|
||||||
<TextBox.InputBindings>
|
<ColumnDefinition Width="1*"/>
|
||||||
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/>
|
</Grid.ColumnDefinitions>
|
||||||
</TextBox.InputBindings>
|
<TextBox x:Name="Txt" Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}"
|
||||||
</TextBox>
|
PreviewKeyDown="TextBox_PreviewKeyDown" Height="Auto"
|
||||||
|
Visibility="{Binding TextVisibility}" Margin="5,0,5,5" >
|
||||||
|
<TextBox.InputBindings>
|
||||||
|
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
|
||||||
|
<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/>
|
||||||
|
</TextBox.InputBindings>
|
||||||
|
</TextBox>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Content="+"
|
||||||
|
Command="{Binding ShowInfoItemCommand}"
|
||||||
|
Visibility="Collapsed"
|
||||||
|
Width="20"
|
||||||
|
Height="20"
|
||||||
|
Margin="5,-1,5,0"
|
||||||
|
VerticalAlignment="Top"/>
|
||||||
|
<!--Visibility="{Binding ShowInfoItemVisibility}"-->
|
||||||
|
</Grid>
|
||||||
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
|
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
|
||||||
Visibility="{Binding CheckVisibility}" Margin="5,0,5,5"/>
|
Visibility="{Binding CheckVisibility}" Margin="5,0,5,5"/>
|
||||||
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
|
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
|
||||||
Visibility="{Binding ComboVisibility}" Margin="5,0,5,5"/>
|
Visibility="{Binding ComboVisibility}" Margin="5,5,5,5"/>
|
||||||
|
|
||||||
|
<ItemsControl ItemsSource="{Binding InfoList}"
|
||||||
|
Visibility="{Binding InfoVisibility}"
|
||||||
|
Margin="5,5,0,10">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding Key}"
|
||||||
|
Width="70"
|
||||||
|
Margin="0,6,-15,0"/>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Text="{Binding Valour, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,5,5,10">
|
||||||
|
<TextBox.InputBindings>
|
||||||
|
<KeyBinding Key="Enter" Command="{Binding DoneInfoCommand}"/>
|
||||||
|
</TextBox.InputBindings>
|
||||||
|
</TextBox>
|
||||||
|
<Button Grid.Column="2"
|
||||||
|
Content="-"
|
||||||
|
Command="{Binding RemoveInfoItemCommand}"
|
||||||
|
Width="20"
|
||||||
|
Height="20"
|
||||||
|
Margin="5,-2,5,5"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
|
||||||
<Grid Margin="5,0,5,5">
|
<Grid Margin="5,0,5,5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Command="{Binding ShowCommand}" Visibility="{Binding ShowBtnVisibility}"
|
<Button Command="{Binding ShowCommand}" Visibility="{Binding ShowBtnVisibility}"
|
||||||
Content="{Binding ShowMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
|
Content="{Binding ShowMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
|
||||||
<Button Command="{Binding DoneCommand}" Grid.Column="1"
|
<Button Command="{Binding DoneCommand}" Grid.Column="1"
|
||||||
Content="{Binding OkMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
|
Content="{Binding OkMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Expander>
|
</Expander>
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
Public Class InputExpanderV
|
Public Class InputExpanderV
|
||||||
|
|
||||||
|
Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||||
|
If e.Key = Key.Enter And Keyboard.Modifiers = ModifierKeys.Shift Then
|
||||||
|
Txt.AcceptsReturn = True
|
||||||
|
Txt.TextWrapping = TextWrapping.Wrap
|
||||||
|
Txt.AppendText(Environment.NewLine)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,11 +1,29 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports MS.Internal
|
||||||
|
|
||||||
Public Class InputExpanderVM
|
Public Class InputExpanderVM
|
||||||
Inherits ViewModelBase
|
Inherits ViewModelBase
|
||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
' Variabile temporanea per salvare bShow
|
||||||
|
Private m_tmpbShow As Boolean
|
||||||
|
|
||||||
|
Private m_tmpInfoList As New ObservableCollection(Of InfoItem)
|
||||||
|
''' <summary>
|
||||||
|
''' Lista temporanea delle info
|
||||||
|
''' </summary>
|
||||||
|
Private Property tmpInfoList As ObservableCollection(Of InfoItem)
|
||||||
|
Get
|
||||||
|
Return m_tmpInfoList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of InfoItem))
|
||||||
|
m_tmpInfoList = value
|
||||||
|
OnPropertyChanged("tmpInfoList")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
' Expander fields
|
' Expander fields
|
||||||
Private m_IsExpanded As Boolean
|
Private m_IsExpanded As Boolean
|
||||||
Public Property IsExpanded As Boolean
|
Public Property IsExpanded As Boolean
|
||||||
@@ -140,15 +158,47 @@ Public Class InputExpanderVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_InfoList As New ObservableCollection(Of InfoItem)
|
||||||
|
''' <summary>
|
||||||
|
''' Lista delle info modificate
|
||||||
|
''' </summary>
|
||||||
|
Public Property InfoList As ObservableCollection(Of InfoItem)
|
||||||
|
Get
|
||||||
|
Return m_InfoList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of InfoItem))
|
||||||
|
m_InfoList = value
|
||||||
|
OnPropertyChanged("InfoList")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_ComboSelectedIndex As Integer
|
Private m_ComboSelectedIndex As Integer
|
||||||
Public Property ComboSelectedIndex As Integer
|
Public Property ComboSelectedIndex As Integer
|
||||||
Get
|
Get
|
||||||
Return m_ComboSelectedIndex
|
Return m_ComboSelectedIndex
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
Map.refProjectVM.SetLastInteger(value)
|
If m_tmpbShow Then Map.refProjectVM.SetLastInteger(value)
|
||||||
m_ComboSelectedIndex = value
|
m_ComboSelectedIndex = value
|
||||||
|
' Assegno l'indice selezionato ad una variabile temporanea per utilizzarlo quando rimuovo l'info dalla lista
|
||||||
|
Dim tmpComboSelectedIndex As Integer = ComboSelectedIndex
|
||||||
|
' Controllo se l'indice è maggiore o uguale a zero e la lista tmp contiene valori
|
||||||
|
If m_ComboSelectedIndex >= 0 AndAlso tmpInfoList.Count > 0 Then
|
||||||
|
' Controllo se la info è contenuta nella lista ComboItemsList
|
||||||
|
If ComboItemsList.Contains(tmpInfoList(m_ComboSelectedIndex).sKey) Then
|
||||||
|
' Aggiungo la info alla lista per visualizzarla
|
||||||
|
InfoList.Add(New InfoItem(tmpInfoList(m_ComboSelectedIndex).nId, tmpInfoList(m_ComboSelectedIndex).sKey, m_tmpInfoList(m_ComboSelectedIndex).sValour))
|
||||||
|
' Nascondo la combobox
|
||||||
|
ComboVisibility = Visibility.Collapsed
|
||||||
|
' Rimuovo la info dalla ComboItemsList
|
||||||
|
ComboItemsList.Remove(tmpInfoList(m_ComboSelectedIndex).sKey)
|
||||||
|
End If
|
||||||
|
' Rimuovo la info dalla tmpInfoList
|
||||||
|
tmpInfoList.Remove(tmpInfoList(tmpComboSelectedIndex))
|
||||||
|
End If
|
||||||
OnPropertyChanged("ComboSelectedIndex")
|
OnPropertyChanged("ComboSelectedIndex")
|
||||||
|
OnPropertyChanged("ComboItemsList")
|
||||||
|
OnPropertyChanged("InfoList")
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -177,9 +227,43 @@ Public Class InputExpanderVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_ShowInfoItemVisibility As Visibility
|
||||||
|
''' <summary>
|
||||||
|
''' Propietà visibilità bottone +
|
||||||
|
''' </summary>
|
||||||
|
Public Property ShowInfoItemVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_ShowInfoItemVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
If value <> m_ShowInfoItemVisibility Then
|
||||||
|
m_ShowInfoItemVisibility = value
|
||||||
|
OnPropertyChanged("ShowInfoItemVisibility")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_InfoVisibility As Visibility
|
||||||
|
''' <summary>
|
||||||
|
''' Propietà visibilità lista info modificate
|
||||||
|
''' </summary>
|
||||||
|
Public Property InfoVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_InfoVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
If value <> m_InfoVisibility Then
|
||||||
|
m_InfoVisibility = value
|
||||||
|
OnPropertyChanged("InfoVisibility")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
' Commands definition
|
' Commands definition
|
||||||
Private m_cmdShow As ICommand
|
Private m_cmdShow As ICommand
|
||||||
Private m_cmdDone As ICommand
|
Private m_cmdDone As ICommand
|
||||||
|
Private m_cmdShowInfoItem As ICommand
|
||||||
|
Private m_cmdRemoveInfoItem As ICommand
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
@@ -257,6 +341,15 @@ Public Class InputExpanderVM
|
|||||||
''' Execute the Point. This method is invoked by the PointCommand.
|
''' Execute the Point. This method is invoked by the PointCommand.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub Done(ByVal param As Object)
|
Public Sub Done(ByVal param As Object)
|
||||||
|
' Controllo se la lista contenente la info modificata sia presente
|
||||||
|
If InfoList.Count > 0 Then
|
||||||
|
' Ciclo sulla lista
|
||||||
|
For Each Item As InfoItem In InfoList
|
||||||
|
Map.refProjectVM.NotifyInputText((Item.Key & "=" & Item.Valour).Trim())
|
||||||
|
' Assegno a m_TextBox la info modificata
|
||||||
|
m_TextBox &= vbCrLf & (Item.Key & "=" & Item.Valour).Trim() & vbCrLf
|
||||||
|
Next
|
||||||
|
End If
|
||||||
Map.refProjectVM.Done(m_TextBox)
|
Map.refProjectVM.Done(m_TextBox)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -269,6 +362,30 @@ Public Class InputExpanderVM
|
|||||||
|
|
||||||
#End Region ' DoneCommand
|
#End Region ' DoneCommand
|
||||||
|
|
||||||
|
#Region "ShowInfoItemCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Comando per la visualizzazione della combobox
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property ShowInfoItemCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdShowInfoItem Is Nothing Then
|
||||||
|
m_cmdShowInfoItem = New Command(AddressOf ShowInfoItem)
|
||||||
|
End If
|
||||||
|
Return m_cmdShowInfoItem
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione per la visualizzazione della combobox
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="param"></param>
|
||||||
|
Public Sub ShowInfoItem(ByVal param As Object)
|
||||||
|
ComboVisibility = Visibility.Visible
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ShowInfoItemCommand
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
@@ -279,13 +396,37 @@ Public Class InputExpanderVM
|
|||||||
TextBlock = PrepareInputBoxParam.sLabel
|
TextBlock = PrepareInputBoxParam.sLabel
|
||||||
TextBox = ""
|
TextBox = ""
|
||||||
TextVisibility = Visibility.Visible
|
TextVisibility = Visibility.Visible
|
||||||
|
' Controllo se il titolo è uguale a INFO se si
|
||||||
|
If Title = EgtMsg(5359).ToUpper() Then
|
||||||
|
' Metto tmpbShow a false
|
||||||
|
m_tmpbShow = False
|
||||||
|
' Rendo visibile il pulsante che mostra la lista delle info
|
||||||
|
ShowInfoItemVisibility = Visibility.Visible
|
||||||
|
' Rendo visibile la lista delle info selezionate
|
||||||
|
InfoVisibility = Visibility.Visible
|
||||||
|
' Pulisco la lista tmpInfoList
|
||||||
|
tmpInfoList.Clear()
|
||||||
|
' Pulisco la lista InfoList
|
||||||
|
InfoList.Clear()
|
||||||
|
' Pulisco la lista ComboItemsList
|
||||||
|
ComboItemsList.Clear()
|
||||||
|
' Popolo la lista ComboItemsList
|
||||||
|
ComboInfo()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
If PrepareInputBoxParam.sCheckLabel <> "" Then
|
If PrepareInputBoxParam.sCheckLabel <> "" Then
|
||||||
CheckBoxText = PrepareInputBoxParam.sCheckLabel
|
CheckBoxText = PrepareInputBoxParam.sCheckLabel
|
||||||
CheckVisibility = Visibility.Visible
|
CheckVisibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
If PrepareInputBoxParam.bShowCombo Then
|
If PrepareInputBoxParam.bShowCombo Then
|
||||||
|
' Assegno a tmpbShow PrepareInputBoxParam.bShowCombo
|
||||||
|
m_tmpbShow = PrepareInputBoxParam.bShowCombo
|
||||||
|
' Pulisco la lista ComboItemsList
|
||||||
ComboItemsList.Clear()
|
ComboItemsList.Clear()
|
||||||
|
' Pulisco la lista tmpInfoList
|
||||||
|
tmpInfoList.Clear()
|
||||||
|
' Pulisco la lista InfoList
|
||||||
|
InfoList.Clear()
|
||||||
ComboVisibility = Visibility.Visible
|
ComboVisibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
If PrepareInputBoxParam.bShowBtn Then
|
If PrepareInputBoxParam.bShowBtn Then
|
||||||
@@ -302,6 +443,8 @@ Public Class InputExpanderVM
|
|||||||
CheckVisibility = Visibility.Collapsed
|
CheckVisibility = Visibility.Collapsed
|
||||||
ComboVisibility = Visibility.Collapsed
|
ComboVisibility = Visibility.Collapsed
|
||||||
ShowBtnVisibility = Visibility.Collapsed
|
ShowBtnVisibility = Visibility.Collapsed
|
||||||
|
ShowInfoItemVisibility = Visibility.Collapsed
|
||||||
|
InfoVisibility = Visibility.Collapsed
|
||||||
IsExpanded = False
|
IsExpanded = False
|
||||||
IsEnabled = False
|
IsEnabled = False
|
||||||
End Sub
|
End Sub
|
||||||
@@ -329,12 +472,44 @@ Public Class InputExpanderVM
|
|||||||
|
|
||||||
Private Function AddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) As Boolean
|
Private Function AddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) As Boolean
|
||||||
ComboItemsList.Add(sText)
|
ComboItemsList.Add(sText)
|
||||||
|
|
||||||
If bSelected Then
|
If bSelected Then
|
||||||
ComboSelectedIndex = ComboItemsList.Count - 1
|
ComboSelectedIndex = ComboItemsList.Count - 1
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Rimovi nota da info lista
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="InfoItem">Informazione da eliminare</param>
|
||||||
|
Friend Sub RemoveItemInfo(InfoItem As InfoItem)
|
||||||
|
' Rimuovo info da lista modifica
|
||||||
|
InfoList.Remove(InfoItem)
|
||||||
|
' Riaggiungo la info eliminata
|
||||||
|
ComboItemsList.Add(InfoItem.sKey)
|
||||||
|
' Riaggiungo la info eliminata
|
||||||
|
tmpInfoList.Add(InfoItem)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che popola la lista ComboItemsList
|
||||||
|
''' </summary>
|
||||||
|
Private Sub ComboInfo()
|
||||||
|
'''''''''''''''''''''''''''''' Recuperare funzione egtgetallinfo quando sarà pronta
|
||||||
|
Dim val As Integer
|
||||||
|
If Not m_tmpbShow Then
|
||||||
|
For Ind As Integer = 0 To 6
|
||||||
|
val += Ind
|
||||||
|
tmpInfoList.Add(New InfoItem(Ind, "A" & +Ind, val.ToString()))
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each InfoItem As InfoItem In tmpInfoList
|
||||||
|
ComboItemsList.Add(InfoItem.sKey)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Methods
|
#End Region ' Methods
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ Public Class LayerTreeViewItem
|
|||||||
Return m_bOnOff
|
Return m_bOnOff
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If Map.refProjectVM.GetController().GetStep() <> 0 Then Return
|
'If Map.refProjectVM.GetController().GetStep() <> 0 Then Return
|
||||||
If m_bOnOff <> value Then
|
If m_bOnOff <> value Then
|
||||||
m_bOnOff = value
|
m_bOnOff = value
|
||||||
' se abilitato, eseguo operazione
|
' se abilitato, eseguo operazione
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<UserControl x:Class="ManageLayerExpanderV"
|
<UserControl x:Class="ManageLayerExpanderV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
xmlns:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
|
xmlns:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
|
||||||
xmlns:local="clr-namespace:EgtCAM5">
|
xmlns:local="clr-namespace:EgtCAM5">
|
||||||
|
|
||||||
<Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}">
|
<Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}">
|
||||||
<Expander.Header>
|
<Expander.Header>
|
||||||
@@ -20,11 +20,11 @@
|
|||||||
<Button Content="{Binding NewLayerMsg}" Command="{Binding NewLayerCommand}" Height="30"/>
|
<Button Content="{Binding NewLayerMsg}" Command="{Binding NewLayerCommand}" Height="30"/>
|
||||||
<Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/>
|
<Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
<TreeView Name="LayerTreeView" MinHeight="150" MaxHeight="250"
|
<TreeView x:Name="LayerTreeView" MinHeight="150" MaxHeight="250"
|
||||||
ItemsSource="{Binding Path=LayerList}"
|
ItemsSource="{Binding Path=LayerList}"
|
||||||
VirtualizingStackPanel.IsVirtualizing = "True"
|
VirtualizingStackPanel.IsVirtualizing = "True"
|
||||||
VirtualizingStackPanel.VirtualizationMode = "Recycling">
|
VirtualizingStackPanel.VirtualizationMode = "Recycling">
|
||||||
<interactivity:Interaction.Triggers>
|
<interactivity:Interaction.Triggers>
|
||||||
<interactivity:EventTrigger EventName="MouseDoubleClick">
|
<interactivity:EventTrigger EventName="MouseDoubleClick">
|
||||||
<interactivity:InvokeCommandAction Command="{Binding TreeViewDoubleClickCommand}"/>
|
<interactivity:InvokeCommandAction Command="{Binding TreeViewDoubleClickCommand}"/>
|
||||||
@@ -50,8 +50,8 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="0"
|
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="0"
|
||||||
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="False" Height="15" Width="15" Margin="0,0,5,0"/>
|
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>
|
||||||
<Image Grid.Column="1" Source="{Binding PictureString}" Height="15" Margin="0,0,5,0"/>
|
<Image Grid.Column="1" Source="{Binding PictureString}" Height="15" Margin="0,0,5,0"/>
|
||||||
<TextBlock Grid.Column="2" Text="{Binding Name}" Margin="0,0,5,0"/>
|
<TextBlock Grid.Column="2" Text="{Binding Name}" Margin="0,0,5,0"/>
|
||||||
<Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" />
|
<Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" />
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
</TreeView.Resources>
|
</TreeView.Resources>
|
||||||
|
|
||||||
<!--Style dei nodi CathegoryItem che li riquadra di azzurro quando clicckati ed elimina l'ombra grigia
|
<!--Style dei nodi CathegoryItem che li riquadra di azzurro quando clicckati ed elimina l'ombra grigia
|
||||||
che si presenta quando la categoria rimane vuota (ombra causata dal multibinding).-->
|
che si presenta quando la categoria rimane vuota (ombra causata dal multibinding).-->
|
||||||
<TreeView.ItemContainerStyle>
|
<TreeView.ItemContainerStyle>
|
||||||
<Style TargetType="{x:Type TreeViewItem}">
|
<Style TargetType="{x:Type TreeViewItem}">
|
||||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
|||||||
@@ -528,7 +528,7 @@ Public Class ManageLayerExpanderVM
|
|||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
Private WithEvents ObjTreeTimer As New System.Windows.Threading.DispatcherTimer
|
Private WithEvents ObjTreeTimer As New System.Windows.Threading.DispatcherTimer
|
||||||
Private m_nObjTreeOldId As Integer = GDB_ID.NULL
|
Friend m_nObjTreeOldId As Integer = GDB_ID.NULL
|
||||||
Private m_nObjTreeMenuId As Integer = GDB_ID.NULL
|
Private m_nObjTreeMenuId As Integer = GDB_ID.NULL
|
||||||
Private m_bEnableUpdateObjInObjTree As Boolean = True
|
Private m_bEnableUpdateObjInObjTree As Boolean = True
|
||||||
|
|
||||||
|
|||||||
+33
-12
@@ -4,7 +4,7 @@ Imports System.IO
|
|||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
Imports EgtWPFLib5.EgtFloating
|
Imports System.Windows.Forms.AxHost
|
||||||
|
|
||||||
Public Class ProjectVM
|
Public Class ProjectVM
|
||||||
Inherits TabViewModel
|
Inherits TabViewModel
|
||||||
@@ -58,14 +58,16 @@ Public Class ProjectVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
|
|
||||||
|
#End Region
|
||||||
#Region "EGTUILIB FIELDS"
|
#Region "EGTUILIB FIELDS"
|
||||||
|
|
||||||
Private m_bCPlaneTypePos As Boolean
|
Private m_bCPlaneTypePos As Boolean
|
||||||
|
|
||||||
' Variabile per implementazione eventi
|
' Variabile per implementazione eventi
|
||||||
Private m_InputText As String
|
Private m_InputText As String
|
||||||
|
Friend bSelObjOnScene As Boolean = False
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -244,14 +246,14 @@ Public Class ProjectVM
|
|||||||
Dim sTitle As String = EgtMsg(10101)
|
Dim sTitle As String = EgtMsg(10101)
|
||||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
End If
|
End If
|
||||||
' Se altrimenti manca il collegamento con la chiave di rete
|
' Se altrimenti manca il collegamento con la chiave di rete
|
||||||
ElseIf IniFile.m_nKeyLevel = -9 Then
|
ElseIf IniFile.m_nKeyLevel = -9 Then
|
||||||
EgtOutLog("Missing Link with Net Dongle")
|
EgtOutLog("Missing Link with Net Dongle")
|
||||||
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
|
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
|
||||||
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
|
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
|
||||||
Dim sTitle As String = EgtMsg(10101)
|
Dim sTitle As String = EgtMsg(10101)
|
||||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
' Altrimenti manca la licenza
|
' Altrimenti manca la licenza
|
||||||
Else
|
Else
|
||||||
EgtOutLog("Problems with Licence")
|
EgtOutLog("Problems with Licence")
|
||||||
' Box di avviso licenza con problemi : sKeyInfo \n "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
' Box di avviso licenza con problemi : sKeyInfo \n "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
||||||
@@ -486,7 +488,7 @@ Public Class ProjectVM
|
|||||||
End If
|
End If
|
||||||
' Esecuzione
|
' Esecuzione
|
||||||
bOk = ExecBeam(sFile, sMachine, nFlag, True)
|
bOk = ExecBeam(sFile, sMachine, nFlag, True)
|
||||||
' altrimenti pareti
|
' altrimenti pareti
|
||||||
Else
|
Else
|
||||||
' Verifica abilitazione elaborazione pareti
|
' Verifica abilitazione elaborazione pareti
|
||||||
If Not VerifyWall(sFile, sMachine, nFlag) Then
|
If Not VerifyWall(sFile, sMachine, nFlag) Then
|
||||||
@@ -500,12 +502,12 @@ Public Class ProjectVM
|
|||||||
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
|
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
|
||||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
Map.refMainWindowVM.CloseApplicationCmd()
|
Map.refMainWindowVM.CloseApplicationCmd()
|
||||||
' Altrimenti se richiesta visualizzazione DB utensili
|
' Altrimenti se richiesta visualizzazione DB utensili
|
||||||
ElseIf nFlag = 11 And bOk Then
|
ElseIf nFlag = 11 And bOk Then
|
||||||
MyMachinePanelVM.ToolDb()
|
MyMachinePanelVM.ToolDb()
|
||||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
Map.refMainWindowVM.CloseApplicationCmd()
|
Map.refMainWindowVM.CloseApplicationCmd()
|
||||||
' Altrimenti se richiesta visualizzazione DB lavorazioni
|
' Altrimenti se richiesta visualizzazione DB lavorazioni
|
||||||
ElseIf nFlag = 12 And bOk Then
|
ElseIf nFlag = 12 And bOk Then
|
||||||
MyMachinePanelVM.MachDb()
|
MyMachinePanelVM.MachDb()
|
||||||
If bBeam Then
|
If bBeam Then
|
||||||
@@ -515,7 +517,7 @@ Public Class ProjectVM
|
|||||||
End If
|
End If
|
||||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
Map.refMainWindowVM.CloseApplicationCmd()
|
Map.refMainWindowVM.CloseApplicationCmd()
|
||||||
' Altrimenti se errore
|
' Altrimenti se errore
|
||||||
ElseIf Not bOk Then
|
ElseIf Not bOk Then
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
End If
|
End If
|
||||||
@@ -1323,6 +1325,25 @@ Public Class ProjectVM
|
|||||||
If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast)
|
If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast)
|
||||||
Else
|
Else
|
||||||
m_Controller.MouseSelectedObj(nId, bLast)
|
m_Controller.MouseSelectedObj(nId, bLast)
|
||||||
|
' Recupero primo layer selezionato
|
||||||
|
Dim nFirstSelId As Integer = EgtGetFirstSelectedObj()
|
||||||
|
' Se viene selezionato un layer diverso deseleziono il layer precedente
|
||||||
|
If nFirstSelId <> nId Then
|
||||||
|
SetLastInteger(nFirstSelId)
|
||||||
|
Map.refProjectVM.ExecuteCommand(Controller.CMD.DESELECTPARTLAYEROBJ)
|
||||||
|
End If
|
||||||
|
' Selezione layer in albero
|
||||||
|
bSelObjOnScene = True
|
||||||
|
Map.refManageLayerExpanderVM.UpdateObjInObjTree(nId)
|
||||||
|
Map.refManageLayerExpanderVM.SelectIdInObjTree(nId)
|
||||||
|
Map.refManageLayerExpanderVM.UpdateObjTree()
|
||||||
|
Map.refProjectVM.ExecuteCommand(Controller.CMD.SETCURRPARTLAYER)
|
||||||
|
|
||||||
|
' Cancello geometria e info di eventuale precedente analisi
|
||||||
|
Analyze.ClearAnalyzeGroup()
|
||||||
|
Map.refStatusBarVM.NotifyStatusOutput("")
|
||||||
|
EgtDraw()
|
||||||
|
bSelObjOnScene = False
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1387,7 +1408,7 @@ Public Class ProjectVM
|
|||||||
' Visualizzo numerazione
|
' Visualizzo numerazione
|
||||||
Analyze.CreateAnalyzeGroup()
|
Analyze.CreateAnalyzeGroup()
|
||||||
Analyze.CreateCurveCompoPntNbrs(nId)
|
Analyze.CreateCurveCompoPntNbrs(nId)
|
||||||
' Se superficie trimesh, visualizzo dati faccetta toccata
|
' Se superficie trimesh, visualizzo dati faccetta toccata
|
||||||
ElseIf EgtGetType(nId) = GDB_TY.SRF_MESH Then
|
ElseIf EgtGetType(nId) = GDB_TY.SRF_MESH Then
|
||||||
Dim nFac As Integer = EgtSurfTmFacetFromTria(nId, nSub)
|
Dim nFac As Integer = EgtSurfTmFacetFromTria(nId, nSub)
|
||||||
If nFac <> -1 Then
|
If nFac <> -1 Then
|
||||||
@@ -1408,10 +1429,10 @@ Public Class ProjectVM
|
|||||||
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
|
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
|
||||||
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
||||||
End If
|
End If
|
||||||
' Se Regione, visualizzo dati parte toccata
|
' Se Regione, visualizzo dati parte toccata
|
||||||
ElseIf EgtGetType(nId) = GDB_TY.SRF_FRGN Then
|
ElseIf EgtGetType(nId) = GDB_TY.SRF_FRGN Then
|
||||||
Dim nChk As Integer = nSub
|
Dim nChk As Integer = nSub
|
||||||
If nChk >= 0 AndAlso nChk < EgtSurfFrChunkCount( nId) Then
|
If nChk >= 0 AndAlso nChk < EgtSurfFrChunkCount(nId) Then
|
||||||
' Visualizzo la normale e il contorno della parte
|
' Visualizzo la normale e il contorno della parte
|
||||||
Analyze.CreateAnalyzeGroup()
|
Analyze.CreateAnalyzeGroup()
|
||||||
Analyze.CreateChunkNormal(nId, nChk)
|
Analyze.CreateChunkNormal(nId, nChk)
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports EgtWPFLib5.MachiningTreeViewItem
|
||||||
|
|
||||||
Public Class PrepareInputBoxParam
|
Public Class PrepareInputBoxParam
|
||||||
Friend sTitle As String
|
Friend sTitle As String
|
||||||
@@ -62,4 +64,112 @@ Public Class NewMachOpParam
|
|||||||
Me.SelMachOpId = SelMachOpId
|
Me.SelMachOpId = SelMachOpId
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class InfoItem
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Friend nId As Integer
|
||||||
|
''' <summary>
|
||||||
|
''' Indice lista info note
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property Id As Integer
|
||||||
|
Get
|
||||||
|
Return Id
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend sKey As String
|
||||||
|
''' <summary>
|
||||||
|
''' Chiave lista info note
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property Key As String
|
||||||
|
Get
|
||||||
|
Return sKey
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend sValour As String
|
||||||
|
''' <summary>
|
||||||
|
''' Valore lista info note
|
||||||
|
''' </summary>
|
||||||
|
Public Property Valour As String
|
||||||
|
Get
|
||||||
|
Return sValour
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sValour = value
|
||||||
|
NotifyPropertyChanged(NameOf(Valour))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
' Comandi
|
||||||
|
Private m_cmdRemoveInfoItem As ICommand
|
||||||
|
Private m_cmdDoneInfo As ICommand
|
||||||
|
|
||||||
|
#Region "CONSTRUCTORS"
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sKey As String, sValue As String)
|
||||||
|
Me.nId = nId
|
||||||
|
Me.sKey = sKey
|
||||||
|
Me.sValour = sValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructors
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "RemoveItemNoteCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Comando per rimuovere l'informazione selezionata dalla combobox
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property RemoveInfoItemCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdRemoveInfoItem Is Nothing Then
|
||||||
|
m_cmdRemoveInfoItem = New Command(AddressOf RemoveInfoItem)
|
||||||
|
End If
|
||||||
|
Return m_cmdRemoveInfoItem
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Rimuove l'informazione selezionata dalla combobox
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="param"></param>
|
||||||
|
Public Sub RemoveInfoItem(ByVal param As Object)
|
||||||
|
Map.refInputExpanderVM.RemoveItemInfo(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' RemoveItemNoteCommand
|
||||||
|
|
||||||
|
#Region "DoneInfoCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Comando per la conferma modifica o aggiunta nuova informazione
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property DoneInfoCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdDoneInfo Is Nothing Then
|
||||||
|
m_cmdDoneInfo = New Command(AddressOf DoneInfo)
|
||||||
|
End If
|
||||||
|
Return m_cmdDoneInfo
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Conferma modifica o aggiunta nuova informazione
|
||||||
|
''' </summary>
|
||||||
|
Public Sub DoneInfo(ByVal param As Object)
|
||||||
|
Map.refInputExpanderVM.Done(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' DoneInfoCommand
|
||||||
|
|
||||||
|
#End Region ' Commands
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user