Compare commits

...

2 Commits

Author SHA1 Message Date
NicolaP 5f2d03cbcb Gestione ricerca progetti 2022-09-05 16:56:04 +02:00
NicolaP 5255fad7fc Gestione ricerca file DXF 2022-09-05 16:30:04 +02:00
4 changed files with 107 additions and 12 deletions
+16 -3
View File
@@ -49,15 +49,28 @@
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="7.25*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
ItemsSource="{Binding ItemList}"/>
<Border Name="MessageBrd" Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="Gray">
<Grid Grid.Row="3" Margin="0,0,8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
</Button>
</Grid>
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
<TextBlock Name="MessageTxBx" TextAlignment="Center"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Border>
+30
View File
@@ -297,6 +297,36 @@ Public Class ImportPageUC
End Select
End Sub
Private Sub FindTxBx_EgtClosed(sender As Object, e As EventArgs) Handles FindTxBx.EgtClosed
' Elimino spazi iniziali e finali
FindTxBx.Text = FindTxBx.Text.Trim()
' ricarico la lista dei file
LoadCurrDir()
Dim UpdateListFile As New List(Of IconListBoxItem)
' Se esiste un nome
If Not String.IsNullOrWhiteSpace(FindTxBx.Text) Then
For Each Item As IconListBoxItem In FileListBox.ItemsSource
If Item.Name.ToLower.Contains(FindTxBx.Text.ToLower) Then
UpdateListFile.Add(Item)
End If
Next
End If
If UpdateListFile.Count > 0 Then
FileListBox.ItemsSource = UpdateListFile
Else
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
End If
End Sub
Private Sub ClearFindBtn_Click() Handles ClearFindBtn.Click
' svuoto la text
FindTxBx.Text = ""
' ricarico la lista dei file
LoadCurrDir()
' e aggiorno la lista dei file
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
End Sub
Private Function ClearView() As Boolean
' Pulisco il DB geometrico locale
EgtNewFile()
+30 -9
View File
@@ -2,7 +2,8 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="OpenPage_Initialized" Loaded="OpenPage_Loaded" Unloaded="OpenPage_Unloaded">
@@ -17,22 +18,42 @@
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Definizione della Grid Inferiore per i Button V e X -->
<!-- Definizione della Grid Superiore -->
<Grid Name="UpperButtonsGrid" Grid.Column="1" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
</Grid>
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
<TextBlock Name="FilePathTxBl" Grid.Row="0" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<Grid Grid.Row="1" Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="6.5*"/>
<RowDefinition Height="0.65*"/>
</Grid.RowDefinitions>
<ListBox Name="FileListBox" ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
<Grid Grid.Row="1" Margin="0,0,8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
</Button>
</Grid>
</Grid>
<Border Name="MessageBrd" Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="Gray">
<TextBlock Name="MessageTxBx" TextAlignment="Center"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
+31
View File
@@ -38,6 +38,7 @@ Public Class OpenPageUC
OpenSceneHost.SetValue(Grid.ColumnProperty, 1)
OpenSceneHost.SetValue(Grid.RowProperty, 2)
' OpenSceneHost.SetValue(Grid.RowSpanProperty, 1)
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
Me.OpenPageGrid.Children.Add(OpenSceneHost)
' Definizione del collegamento tra ItemList e ListBox1
@@ -203,6 +204,36 @@ Public Class OpenPageUC
End If
End Sub
Private Sub FindTxBx_EgtClosed(sender As Object, e As EventArgs) Handles FindTxBx.EgtClosed
' Elimino spazi iniziali e finali
FindTxBx.Text = FindTxBx.Text.Trim()
' ricarico la lista dei file
LoadCurrDir()
Dim UpdateListFile As New List(Of IconListBoxItem)
' Se esiste un nome
If Not String.IsNullOrWhiteSpace(FindTxBx.Text) Then
For Each Item As IconListBoxItem In FileListBox.ItemsSource
If Item.Name.ToLower.Contains(FindTxBx.Text.ToLower) Then
UpdateListFile.Add(Item)
End If
Next
End If
If UpdateListFile.Count > 0 Then
FileListBox.ItemsSource = UpdateListFile
Else
FileListBox.ItemsSource = m_MainWindow.m_OpenItemList
End If
End Sub
Private Sub ClearFindBtn_Click() Handles ClearFindBtn.Click
' svuoto la text
FindTxBx.Text = ""
' ricarico la lista dei file
LoadCurrDir()
' e aggiorno la lista dei file
FileListBox.ItemsSource = m_MainWindow.m_OpenItemList
End Sub
Private Function ClearView() As Boolean
' Pulisco il DB geometrico locale
EgtNewFile()