- Aggiornata versione, - Ordinamento per data. - aggiornato campo data, - gestita eccezione Immagine non trovata

This commit is contained in:
Nicola Pievani
2024-02-12 14:53:49 +01:00
parent 95f58c113d
commit ba5d51e86c
7 changed files with 59 additions and 25 deletions
+4
View File
@@ -232,6 +232,10 @@
<ItemGroup>
<Resource Include="Resources\InstrumentPanel\GetDist.png" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Resource Include="Resources\Immagini\ErrorImage.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Dll32\EgtPHOTOLib.dll
+2 -2
View File
@@ -58,5 +58,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.9.5")>
<Assembly: AssemblyFileVersion("2.5.9.5")>
<Assembly: AssemblyVersion("2.6.2.1")>
<Assembly: AssemblyFileVersion("2.6.2.1")>
+2 -1
View File
@@ -44,7 +44,8 @@ Public Class ListPageSlabVM
If PhotoMap.refSearchPanelVM.Search_IsChecked Then
PhotoMap.refSearchPanelVM.Search()
Else
PhotoMap.refProjectVM.SlabList = New ObservableCollection(Of Slab)(ManageDb.ExecuteSlabReaderQuery("SELECT * FROM " & Slab.DB_SLABS & " ORDER BY " & Slab.DB_MATERIAL & ", " & Slab.DB_STATE))
'PhotoMap.refProjectVM.SlabList = New ObservableCollection(Of Slab)(ManageDb.ExecuteSlabReaderQuery("SELECT * FROM " & Slab.DB_SLABS & " ORDER BY " & Slab.DB_MATERIAL & ", " & Slab.DB_STATE))
PhotoMap.refProjectVM.SlabList = New ObservableCollection(Of Slab)(ManageDb.ExecuteSlabReaderQuery("SELECT * FROM " & Slab.DB_SLABS & " ORDER BY " & Slab.DB_ADDEDDATE & " DESC "))
PhotoMap.refProjectVM.DateTimeList = New ObservableCollection(Of DataTimeRecord)(ManageDb.ExecuteDataTimeReaderQuery("SELECT * FROM " & Slab.DB_DATATIME))
End If
End Sub
+35 -18
View File
@@ -1,9 +1,9 @@
Imports System.Collections.ObjectModel
Imports System.Data.SQLite
Imports System.IO
Imports System.Reflection
Imports EgtUILib
Imports EgtWPFLib5
Imports System.Text.RegularExpressions
Public Class Slab
Inherits VMBase
@@ -193,25 +193,42 @@ Public Class Slab
'-------------------------FINE NUOVA GESTIONE ID -------------------------
Public ReadOnly Property GraphicalImagePath As BitMapImage
Public ReadOnly Property GraphicalImagePath As BitmapImage
Get
Dim src As BitMapImage = New BitMapImage()
src.BeginInit()
src.DecodePixelWidth = 256
If m_bRefreshImage Then
' se immagine modificata allora deve essere ricaricata
src.CacheOption = BitmapCacheOption.None
src.UriCachePolicy = New Net.Cache.RequestCachePolicy(Net.Cache.RequestCacheLevel.BypassCache)
src.CacheOption = BitmapCacheOption.OnLoad
src.CreateOptions = BitmapCreateOptions.IgnoreImageCache
m_bRefreshImage = False
Else
src.CacheOption = BitmapCacheOption.OnLoad
End If
src.UriSource = New Uri(m_ImagePath, UriKind.Absolute)
src.EndInit()
Return src
Try
Dim src As BitmapImage = New BitmapImage()
src.BeginInit()
src.DecodePixelWidth = 256
If m_bRefreshImage Then
' se immagine modificata allora deve essere ricaricata
src.CacheOption = BitmapCacheOption.None
src.UriCachePolicy = New Net.Cache.RequestCachePolicy(Net.Cache.RequestCacheLevel.BypassCache)
src.CacheOption = BitmapCacheOption.OnLoad
src.CreateOptions = BitmapCreateOptions.IgnoreImageCache
m_bRefreshImage = False
Else
src.CacheOption = BitmapCacheOption.OnLoad
End If
src.UriSource = New Uri(m_ImagePath, UriKind.Absolute)
src.EndInit()
Return src
Catch ex As Exception
EgtOutLog(ex.ToString)
Dim src As BitmapImage = New BitmapImage()
src.BeginInit()
src.DecodePixelWidth = 256
src.CacheOption = BitmapCacheOption.OnLoad
src.UriSource = New Uri("pack://application:,,,/EgtPHOTOLib;component/Resources/Immagini/ErrorImage.png")
src.EndInit()
Return src
End Try
End Get
End Property
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

+6 -4
View File
@@ -306,25 +306,27 @@
Style="{StaticResource SeacrhTxtBl}"/>
<DatePicker SelectedDate="{Binding StartAddedDate}"
Focusable="False"
Text="10/10/2023"
Text="{Binding sCurrDateText}"
Margin="13,0,5,5"/>
<TextBlock Text="{Binding EndAddedDateMsg}" Margin="5,0,0,5"
Style="{StaticResource SeacrhTxtBl}"/>
<DatePicker SelectedDate="{Binding EndAddedDate}"
Focusable="False"
Text="10/10/2023"
Text="{Binding sCurrDateText}"
Margin="13,0,5,5"/>
<Button Command="{Binding Reset_Command}"
Content="{Binding ResetMsg}"
Margin="5,0,5,5"
Grid.Column="1"/>
Grid.Column="1"
Style="{StaticResource OptionPanel_TextButton}"/>
<Button Command="{Binding Search_Command}"
Content="{Binding SearchMsg}"
Margin="5,0,5,5"
Grid.Column="1"/>
Grid.Column="1"
Style="{StaticResource OptionPanel_TextButton}"/>
</UniformGrid>
</GroupBox>
+10
View File
@@ -146,6 +146,16 @@ Public Class SearchPanelSlabVM
End Set
End Property
Private Property m_sCurrDateText As String = String.Format("{0:dd/MM/yyyy}", DateTime.Now)
Public Property sCurrDateText As String
Get
Return m_sCurrDateText
End Get
Set(value As String)
m_sCurrDateText = value
End Set
End Property
Private m_ThicknessTolerance As Double
Private m_SearchPanel_Visibility As Visibility