diff --git a/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml b/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml
index d4dfbfa..1ef74b8 100644
--- a/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml
+++ b/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml
@@ -45,38 +45,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml.vb b/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml.vb
index 5da57c4..d9ec3c2 100644
--- a/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml.vb
+++ b/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml.vb
@@ -1,8 +1,8 @@
Public Class InputExpanderV
Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs)
- If (e.Key = Key.Enter And (Keyboard.Modifiers And ModifierKeys.Shift)= ModifierKeys.Shift) Or
- (e.Key = Key.V And (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control) Then
+ If (e.Key = Key.Enter And (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) Or
+ (e.Key = Key.V And (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control) Then
Txt.AcceptsReturn = True
Txt.TextWrapping = TextWrapping.Wrap
End If
diff --git a/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderVM.vb b/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderVM.vb
index 8ae1932..a31ac8d 100644
--- a/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderVM.vb
+++ b/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderVM.vb
@@ -158,20 +158,6 @@ Public Class InputExpanderVM
End Set
End Property
- Private m_InfoList As New ObservableCollection(Of InfoItem)
- '''
- ''' Lista delle info modificate
- '''
- 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
Public Property ComboSelectedIndex As Integer
Get
@@ -180,25 +166,18 @@ Public Class InputExpanderVM
Set(value As Integer)
If m_bTempShow Then Map.refProjectVM.SetLastInteger(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
+ ' se la info è presente la aggiungo alla textbox per modificarla
+ m_TextBox &= (tmpInfoList(m_ComboSelectedIndex).sKey & "=" & m_tmpInfoList(m_ComboSelectedIndex).sValour).Trim() & vbCrLf
+ ComboVisibility = Visibility.Collapsed
+ ComboItemsList.Remove((tmpInfoList(m_ComboSelectedIndex).sKey & "=" & m_tmpInfoList(m_ComboSelectedIndex).sValour).Trim())
tmpInfoList.Remove(tmpInfoList(tmpComboSelectedIndex))
End If
+ m_ComboSelectedIndex = -1
OnPropertyChanged("ComboSelectedIndex")
OnPropertyChanged("ComboItemsList")
- OnPropertyChanged("InfoList")
+ OnPropertyChanged("TextBox")
End Set
End Property
@@ -243,27 +222,10 @@ Public Class InputExpanderVM
End Set
End Property
- Private m_InfoVisibility As Visibility
- '''
- ''' Propietà visibilità lista info modificate
- '''
- 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
Private m_cmdShow As ICommand
Private m_cmdDone As ICommand
Private m_cmdShowInfoItem As ICommand
- Private m_cmdRemoveInfoItem As ICommand
#Region "Messages"
@@ -287,6 +249,7 @@ Public Class InputExpanderVM
Sub New()
' Creo riferimento a questa classe in EgtCAM5Map
Map.SetRefInputExpanderVM(Me)
+ ComboSelectedIndex = -1
End Sub
#End Region ' Constructor
@@ -341,15 +304,6 @@ Public Class InputExpanderVM
''' Execute the Point. This method is invoked by the PointCommand.
'''
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)
End Sub
@@ -400,20 +354,9 @@ Public Class InputExpanderVM
TextVisibility = Visibility.Visible
' Se presente il comando "Sic=1"
If vsSplitTitle.Count() > 1 AndAlso vsSplitTitle(1) = "Sic=1" Then
- ' Metto tmpbShow a false
m_bTempShow = 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()
+ If ComboItemsList.Count > 0 Then ShowInfoItemVisibility = Visibility.Visible
End If
End If
If PrepareInputBoxParam.sCheckLabel <> "" Then
@@ -421,14 +364,9 @@ Public Class InputExpanderVM
CheckVisibility = Visibility.Visible
End If
If PrepareInputBoxParam.bShowCombo Then
- ' Assegno a tmpbShow PrepareInputBoxParam.bShowCombo
m_bTempShow = PrepareInputBoxParam.bShowCombo
- ' Pulisco la lista ComboItemsList
ComboItemsList.Clear()
- ' Pulisco la lista tmpInfoList
tmpInfoList.Clear()
- ' Pulisco la lista InfoList
- InfoList.Clear()
ComboVisibility = Visibility.Visible
End If
If PrepareInputBoxParam.bShowBtn Then
@@ -446,7 +384,6 @@ Public Class InputExpanderVM
ComboVisibility = Visibility.Collapsed
ShowBtnVisibility = Visibility.Collapsed
ShowInfoItemVisibility = Visibility.Collapsed
- InfoVisibility = Visibility.Collapsed
IsExpanded = False
IsEnabled = False
End Sub
@@ -481,27 +418,17 @@ Public Class InputExpanderVM
Return True
End Function
- '''
- ''' Rimovi nota da info lista
- '''
- ''' Informazione da eliminare
- 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
-
'''
''' Funzione che popola la lista ComboItemsList
'''
Private Sub ComboInfo()
+ tmpInfoList.Clear()
+ ComboItemsList.Clear()
+
Dim vsVal As String() = Nothing
EgtGetAllInfo(Map.refManageLayerExpanderVM.RightClickedTreeItemId, vsVal)
- If Not m_bTempShow And Not IsNothing( vsVal) Then
+ If Not m_bTempShow And Not IsNothing(vsVal) Then
Dim Ind As Integer = 0
For Each Item As String In vsVal
Dim sSplitItem As String() = Item.Split("="c)
@@ -510,7 +437,7 @@ Public Class InputExpanderVM
Next
For Each InfoItem As InfoItem In tmpInfoList
- ComboItemsList.Add(InfoItem.sKey)
+ ComboItemsList.Add((InfoItem.sKey & "=" & InfoItem.sValour).Trim())
Next
End If
End Sub
diff --git a/StructureDataForMessenger.vb b/StructureDataForMessenger.vb
index 739c6d1..4520826 100644
--- a/StructureDataForMessenger.vb
+++ b/StructureDataForMessenger.vb
@@ -108,7 +108,6 @@ Public Class InfoItem
#End Region ' Fields & Properties
' Comandi
- Private m_cmdRemoveInfoItem As ICommand
Private m_cmdDoneInfo As ICommand
#Region "CONSTRUCTORS"
@@ -123,30 +122,6 @@ Public Class InfoItem
#Region "COMMANDS"
-#Region "RemoveItemNoteCommand"
-
- '''
- ''' Comando per rimuovere l'informazione selezionata dalla combobox
- '''
- 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
-
- '''
- ''' Rimuove l'informazione selezionata dalla combobox
- '''
- '''
- Public Sub RemoveInfoItem(ByVal param As Object)
- Map.refInputExpanderVM.RemoveItemInfo(Me)
- End Sub
-
-#End Region ' RemoveItemNoteCommand
-
#Region "DoneInfoCommand"
'''