Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2cbbb73a74 | |||
| 618b1f38aa | |||
| 40bcf93e79 | |||
| 7c4b85a3f2 | |||
| 5eca816bfc | |||
| f0a2826174 | |||
| 0aa0268368 | |||
| 49078b7aa6 | |||
| 36ea7e6404 | |||
| aac0b4c33e | |||
| a9540db0b2 | |||
| a41230f4b9 | |||
| 3ec88260c1 | |||
| a57c60aa47 | |||
| 6786d74cad | |||
| 0d1cc18716 | |||
| ca0466e60f | |||
| 8dc60ed6eb | |||
| f3065ef003 | |||
| 16a0f18f52 | |||
| 3a40af91e2 | |||
| 98052f4a8e | |||
| a63bb50543 | |||
| 1937dbec6b | |||
| 8b1fd9643f | |||
| 737ad6cd5a | |||
| 71f926eb44 | |||
| 235537c9f3 | |||
| e034816bed | |||
| 5f1d48696f | |||
| d2ff748fe0 | |||
| fc89ef7deb | |||
| 45780aff25 | |||
| 6f1e05aaa3 | |||
| ce8447a5e8 | |||
| d2925af06b | |||
| be067aa785 | |||
| cdf98ecff5 | |||
| f952167d5d | |||
| 5f29f5821a | |||
| ecc0dc3a4f | |||
| 2a3656fb55 | |||
| d5fdf246a0 | |||
| c0af5e5754 | |||
| d9da37444d |
@@ -31,7 +31,7 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Name="LogoBrd" Grid.Column="1" Background="White">
|
||||
<Image Source="/Resources/LogoOmag.jpg" Stretch="Uniform"/>
|
||||
<Image Source="/Resources/AboutBoxImage.png" Stretch="Uniform"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
|
||||
|
||||
@@ -1,14 +1,21 @@
|
||||
Class Application
|
||||
Imports EgtPHOTOLib
|
||||
|
||||
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
|
||||
' can be handled in this file.
|
||||
Class Application
|
||||
|
||||
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
|
||||
' can be handled in this file.
|
||||
Protected Overrides Sub OnStartup(e As StartupEventArgs)
|
||||
MyBase.OnStartup(e)
|
||||
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
||||
' Creo la View principale
|
||||
Me.MainWindow = New MainWindowV
|
||||
' Mostro la View principale
|
||||
Me.MainWindow.Show()
|
||||
If PhotoMap.ContinueApplication Then
|
||||
Me.MainWindow.Show()
|
||||
Else
|
||||
End
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
|
||||
Imports System.Data
|
||||
Imports EgtPHOTOLib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Module ConstIni
|
||||
|
||||
Public Const INI_FILE_NAME As String = "OmagPHOTO.ini"
|
||||
@@ -18,6 +22,7 @@ Module ConstIni
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_DEBUG As String = "Debug"
|
||||
Public Const K_LICENCE As String = "Licence"
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_USERLEVEL As String = "UserLevel"
|
||||
Public Const K_MAXINST As String = "MaxInstances"
|
||||
Public Const K_INSTANCES As String = "Instances"
|
||||
@@ -36,6 +41,7 @@ Module ConstIni
|
||||
Public Const K_PHOTODIR As String = "PhotoDir"
|
||||
Public Const K_CAMERALINK As String = "CameraLink"
|
||||
Public Const K_LASTID As String = "LastId"
|
||||
Public Const K_CAPSLOCK As String = "CapsLock"
|
||||
|
||||
Public Const S_PRINTER As String = "Printer"
|
||||
Public Const K_TEMPLATE As String = "Template"
|
||||
@@ -87,6 +93,13 @@ Module ConstIni
|
||||
Public Const K_MINLNCOLOR As String = "MinLnColor"
|
||||
Public Const K_MAJLNCOLOR As String = "MajLnColor"
|
||||
|
||||
Public Const S_AUTOCLICK As String = "AutoClick"
|
||||
Public Const K_CLICKDIR As String = "ClickDir"
|
||||
Public Const K_STATE As String = "State"
|
||||
Public Const K_AUTOMATERIAL As String = "Material"
|
||||
Public Const K_THICKNESS As String = "Thickness"
|
||||
Public Const K_WAREHAOUSE As String = "WareHouse"
|
||||
|
||||
Public Const S_CAMERA As String = "Camera"
|
||||
Public Const K_CAM_COUNT As String = "Count"
|
||||
Public Const K_CAM_EXEPATH As String = "ExePath"
|
||||
|
||||
@@ -5,6 +5,7 @@ Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtPHOTOLib
|
||||
Imports System.Windows.Forms.Integration
|
||||
|
||||
Public Class MainWindowM
|
||||
|
||||
@@ -14,6 +15,12 @@ Public Class MainWindowM
|
||||
Private m_TimerIsBusy As Boolean = False
|
||||
Private m_RefreshTimer As New DispatcherTimer
|
||||
|
||||
' Per lettura modifica direttorio
|
||||
Private fsWatch As FileSystemWatcher
|
||||
Private m_RefreshNewFileClick As New DispatcherTimer
|
||||
Private m_bNewFileClick As Boolean = False
|
||||
Private m_sNewFileClickPath As String = String.Empty
|
||||
|
||||
Private m_sDataRoot As String = String.Empty
|
||||
Friend ReadOnly Property sDataRoot As String
|
||||
Get
|
||||
@@ -153,6 +160,13 @@ Public Class MainWindowM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bCapsLock As Boolean
|
||||
Public ReadOnly Property bCapsLock As Boolean
|
||||
Get
|
||||
Return m_bCapsLock
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
@@ -192,9 +206,11 @@ Public Class MainWindowM
|
||||
Dim sKey As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
EgtSetKey(sKey)
|
||||
Dim bNetHwKey As Boolean = (GetMainPrivateProfileInt(S_GENERAL, K_NETKEY, 0) = 1)
|
||||
EgtSetNetHwKey(bNetHwKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2403, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2403, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2707, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2707, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.PHOTO_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -261,40 +277,120 @@ Public Class MainWindowM
|
||||
GetMainPrivateProfileString(S_PRINTER, K_ZEBRAUTILITIES, System.AppDomain.CurrentDomain.BaseDirectory & "ZebraPrinterUtilitiesR32.exe", m_ZebraUtilitiesExe)
|
||||
' verifico che sia abilitata la stampante con flag
|
||||
m_PrinterIsVisible = (GetMainPrivateProfileInt(S_PRINTER, K_ENABLE_PRINTER, 0) = 1)
|
||||
' verifico che sia abilitata il CapsLock
|
||||
m_bCapsLock = (GetMainPrivateProfileInt(S_GENERAL, K_CAPSLOCK, 0) = 1)
|
||||
' Creo connessione al Db
|
||||
If Not ManageDb.ConnectToDb(m_sPhotoDir & "\" & DB_FILENAME) Then
|
||||
EgtOutLog("Error connecting to DB")
|
||||
MessageBox.Show(EgtMsg(MSG_OMAGPHOTO + 1) & EgtMsg(MSG_OMAGPHOTO + 2), EgtMsg(MSG_EGTMSGBOX + 15), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End
|
||||
End If
|
||||
|
||||
Dim sLastBlock As String = String.Empty
|
||||
|
||||
' Info su opzioni chiave
|
||||
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString() & " " & bProd.ToString())
|
||||
' Imposto parametri EgtPHOTOLib
|
||||
EgtPHOTOLib.MainData.SetDebugLevel(m_nDebug)
|
||||
EgtPHOTOLib.MainData.SetConfigDir(m_sConfigDir)
|
||||
EgtPHOTOLib.MainData.SetKeyLevel(m_nKeyLevel)
|
||||
EgtPHOTOLib.MainData.SetKeyOptions(m_nKeyOptions)
|
||||
EgtPHOTOLib.MainData.SetUser(Environment.MachineName & "\" & Environment.UserName & " (" & nInstance.ToString() & ")")
|
||||
EgtPHOTOLib.MainData.SetPhotoDir(m_sPhotoDir)
|
||||
EgtPHOTOLib.MainData.SetBackUpDir(m_sBackUpDir)
|
||||
EgtPHOTOLib.MainData.SetTemplateFilePrinter(m_TemplateFilePrinter)
|
||||
EgtPHOTOLib.MainData.SetDataFilePrinter(m_DatFilePrinter)
|
||||
EgtPHOTOLib.MainData.SetZebraPrinterExe(m_ZebraUtilitiesExe)
|
||||
EgtPHOTOLib.MainData.SetPrinterVisibility(m_PrinterIsVisible)
|
||||
EgtPHOTOLib.MainData.SetCapsLock(m_bCapsLock)
|
||||
Dim sLastBlock As String = String.Empty
|
||||
If GetMainPrivateProfileString(S_GENERAL, "LastBlock", "", sLastBlock) <> 0 Then EgtPHOTOLib.MainData.SetLastBlock(sLastBlock)
|
||||
Dim sIdKey As String = String.Empty
|
||||
EgtGetKeyInfo(sIdKey)
|
||||
EgtPHOTOLib.MainData.SetKey(sIdKey)
|
||||
'' lancio il timer di aggiornamento dell'interfaccia, per la gestione di due OmagPHOTO che accedono allo stesso SQL
|
||||
' AddHandler m_RefreshTimer.Tick, AddressOf RefreshTimer_Tick
|
||||
' m_RefreshTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
' m_RefreshTimer.Start()
|
||||
' lancio il timer di aggiornamento dell'interfaccia, per la gestione di due OmagPHOTO che accedono allo stesso SQL
|
||||
AddHandler m_RefreshTimer.Tick, AddressOf RefreshTimer_Tick
|
||||
m_RefreshTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_RefreshTimer.Start()
|
||||
' sec onfigurato lancio il controllo di uno specifico direttorio per leggere quando scattare una nuova foto
|
||||
Dim sClidkDir As String = String.Empty
|
||||
Dim bEnableLineProduction As Boolean = GetMainPrivateProfileString(S_AUTOCLICK, K_CLICKDIR, "", sClidkDir) <> 0
|
||||
If bEnableLineProduction Then
|
||||
fsWatch = New FileSystemWatcher(sClidkDir) With {.EnableRaisingEvents = True}
|
||||
'fsWatch.EnableRaisingEvents = True
|
||||
AddHandler fsWatch.Created, AddressOf AutoClick
|
||||
AddHandler fsWatch.Changed, AddressOf AutoClick
|
||||
AddHandler fsWatch.Renamed, AddressOf AutoClick
|
||||
m_bNewFileClick = False
|
||||
AddHandler m_RefreshNewFileClick.Tick, AddressOf AutoClick_Cmd
|
||||
m_RefreshNewFileClick.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_RefreshNewFileClick.Start()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub AutoClick(ByVal sender As Object, ByVal e As FileSystemEventArgs)
|
||||
EgtOutLog("File '" & e.FullPath & "' has been created: ready to Click")
|
||||
m_sNewFileClickPath = e.FullPath
|
||||
m_bNewFileClick = True
|
||||
End Sub
|
||||
|
||||
Private Sub AutoClick_Cmd()
|
||||
If Not m_bNewFileClick Then Return
|
||||
' deseleziono la precedente lastra
|
||||
If Not IsNothing(EgtPHOTOLib.PhotoMap.refProjectVM.SelSlab) Then
|
||||
EgtPHOTOLib.PhotoMap.refProjectVM.SelSlab.IsSelected = 0
|
||||
End If
|
||||
' verifico se esite una lastra corrente in modifica, quindi chiedo se salvare
|
||||
Map.refTopCommandBarVM.NewCmd(True)
|
||||
' apro la pagina per inserire una nuova lastra, se esiste un oggetto di tipo lastra allora procedo
|
||||
If Not IsNothing(EgtPHOTOLib.PhotoMap.refProjectVM.SelSlab) Then
|
||||
' Autocompilazione dei campi con i dati dell'ultima lastra salvata
|
||||
ReadLastInfoAutoClick(EgtPHOTOLib.PhotoMap.refProjectVM.SelSlab)
|
||||
' scatto la foto
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.Photo(Nothing)
|
||||
' notifico che è stata scattata una foto
|
||||
Try
|
||||
File.Delete(m_sNewFileClickPath)
|
||||
EgtOutLog("File '" & m_sNewFileClickPath & "' has been deleted!")
|
||||
m_bNewFileClick = False
|
||||
Catch ex As Exception
|
||||
EgtOutLog("File '" & m_sNewFileClickPath & "' can't be deleted! " & ex.ToString)
|
||||
|
||||
End Try
|
||||
' se è stata scattata una foto provvedo a salvare l'inserimento
|
||||
If Not m_bNewFileClick Then
|
||||
' salvo i dati inseriti ( nel file ini e nel DB )
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.Save()
|
||||
' ricarico la pagina
|
||||
EgtPHOTOLib.PhotoMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.DETAIL
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.Ok_IsEnabled = False
|
||||
' stampo etichetta
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.PrintLabel()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ReadLastInfoAutoClick(CurrSlab As Slab)
|
||||
Dim nIndState As Integer = 1
|
||||
Dim sMaterial As String = ""
|
||||
Dim dThick As Double = 0
|
||||
Dim sWarehouse As String = ""
|
||||
nIndState = GetMainPrivateProfileInt(S_AUTOCLICK, K_STATE, nIndState)
|
||||
GetMainPrivateProfileString(S_AUTOCLICK, K_AUTOMATERIAL, "", sMaterial)
|
||||
dThick = GetMainPrivateProfileDouble(S_AUTOCLICK, K_THICKNESS, 1)
|
||||
GetMainPrivateProfileString(S_AUTOCLICK, K_WAREHAOUSE, "", sWarehouse)
|
||||
CurrSlab.State = nIndState
|
||||
For IndexMat As Integer = 0 To EgtPHOTOLib.PhotoMap.refProjectVM.MaterialList.Count - 1
|
||||
If EgtPHOTOLib.PhotoMap.refProjectVM.MaterialList(IndexMat).Trim = sMaterial.Trim Then
|
||||
CurrSlab.SetMaterial(EgtPHOTOLib.PhotoMap.refProjectVM.MaterialList(IndexMat))
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
CurrSlab.SetThickness(dThick)
|
||||
CurrSlab.WarehousePosition = sWarehouse
|
||||
End Sub
|
||||
|
||||
' per la gestione di due OmagPHOTO che accedono allo stesso SQL
|
||||
Private Sub RefreshTimer_Tick()
|
||||
If Not m_TimerIsBusy And PhotoMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.LIST Then
|
||||
If Not m_TimerIsBusy AndAlso Not IsNothing(PhotoMap.refProjectVM) AndAlso
|
||||
PhotoMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.LIST Then
|
||||
m_TimerIsBusy = True
|
||||
m_RefreshTimer.Stop()
|
||||
EgtPHOTOLib.PhotoMap.refListPageVM.RefreshLisPage()
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
xmlns:EgtPHOTOLib="clr-namespace:EgtPHOTOLib;assembly=EgtPHOTOLib"
|
||||
DataContext="{StaticResource MainWindowVM}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
TitleBarForeground="{StaticResource Omag_White}"
|
||||
Title="{Binding Title}" Icon="/Resources/OmagPHOTO.ico"
|
||||
MinHeight="600" MinWidth="800"
|
||||
AboutBoxCommand="{Binding AboutBoxCommand}" WindowStyle="None" ResizeMode="NoResize"
|
||||
|
||||
@@ -125,6 +125,11 @@ Public Class MainWindowVM
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.Ok(Nothing)
|
||||
End If
|
||||
End If
|
||||
' deseleziono la lastra corrente
|
||||
If Not IsNothing(EgtPHOTOLib.PhotoMap.refProjectVM) AndAlso
|
||||
Not IsNothing(EgtPHOTOLib.PhotoMap.refProjectVM.SelSlab) Then
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.Cancel(Nothing)
|
||||
End If
|
||||
' Imposto contesto principale
|
||||
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||
' Chiudo il gestore della macchina fotografica
|
||||
|
||||
@@ -18,8 +18,8 @@ Imports System.Windows
|
||||
<Assembly: AssemblyDescription("OmagPHOTO 32 bit")>
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagPHOTO")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2017-2022 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagPHOTO")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2017-2025 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -59,5 +59,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.3.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.3.1")>
|
||||
<Assembly: AssemblyVersion("2.7.7.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.7.1")>
|
||||
|
||||
@@ -216,6 +216,42 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\Search.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\InstrumentPanel\Matitina.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\AboutBoxImage.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DetailPage\Save.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DetailPage\Print.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DetailPage\Elimina.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DetailPage\Cancel.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DetailPage\Confirm.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DetailPage\Reset.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DetailPage\Pencil.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DetailPage\Polygon.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DetailPage\Rubber.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DetailPage\ZoomAll.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagPHOTO\OmagPHOTOR32.exe
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<UniformGrid Columns="2">
|
||||
<TextBlock Text="{Binding ThicknessToleranceMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding ThicknessTolerance}"
|
||||
Margin="13,0,0,0"
|
||||
Margin="36,0,0,0"
|
||||
TextAlignment="Right"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
@@ -58,7 +58,7 @@
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding LabelFileName}"/>
|
||||
<TextBlock Text="{Binding LabelFileName}" VerticalAlignment="Center"/>
|
||||
<Button Content="{Binding BrowseMsg}" Grid.Column="1"
|
||||
Command="{Binding BrowseCommand}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
@@ -112,6 +112,9 @@
|
||||
|
||||
<ListBox ItemsSource="{Binding MaterialList}"
|
||||
SelectedItem="{Binding SelMaterial}"
|
||||
Background="{StaticResource Omag_Black}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
BorderThickness="0"
|
||||
Grid.RowSpan="2"
|
||||
Margin="0,0,0,5"
|
||||
Height="150"/>
|
||||
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 703 B |
|
After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 604 B After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 637 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 610 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 746 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -6,12 +6,14 @@
|
||||
|
||||
<!--Barra superiore dei comandi-->
|
||||
<Button Command="{Binding NewCommand}"
|
||||
ToolTip="{Binding NewToolTip}">
|
||||
ToolTip="{Binding NewToolTip}"
|
||||
Style="{StaticResource TopCmdBar_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<ToggleButton IsChecked="{Binding Search_IsChecked}"
|
||||
IsEnabled="{Binding Search_IsEnabled}"
|
||||
ToolTip="{Binding SearchToolTip}">
|
||||
ToolTip="{Binding SearchToolTip}"
|
||||
Style="{StaticResource TopCmdBar_ToggleButton}">
|
||||
<Image Source="/Resources/TopCommandBar/Search.png" Stretch="Uniform"/>
|
||||
</ToggleButton>
|
||||
<!--<Button Command="{Binding OpenCommand}"
|
||||
@@ -41,7 +43,8 @@
|
||||
</Button>-->
|
||||
<Button Command="{Binding OptionsCommand}"
|
||||
ToolTip="{Binding OptionsToolTip}"
|
||||
IsEnabled="{Binding IsEnabled}">
|
||||
IsEnabled="{Binding IsEnabled}"
|
||||
Style="{StaticResource TopCmdBar_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Options.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ Imports EgtPHOTOLib
|
||||
Public Class TopCommandBarVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_bFirstResearch As Boolean = True
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Friend m_MruFiles As New MruList
|
||||
@@ -23,7 +25,16 @@ Public Class TopCommandBarVM
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value Then
|
||||
If m_bFirstResearch Then
|
||||
' Resetto la data corrente per la prima ricerca
|
||||
PhotoMap.refSearchPanelVM.StartAddedDate = Nothing
|
||||
PhotoMap.refSearchPanelVM.NotifyPropertyChanged("StartAddedDate")
|
||||
PhotoMap.refSearchPanelVM.EndAddedDate = Nothing
|
||||
PhotoMap.refSearchPanelVM.NotifyPropertyChanged("EndAddedDate")
|
||||
m_bFirstResearch = False
|
||||
End If
|
||||
PhotoMap.refSearchPanelVM.InitSearchPanel()
|
||||
|
||||
Else
|
||||
PhotoMap.refListPageVM.InitListPage()
|
||||
End If
|
||||
@@ -156,6 +167,23 @@ Public Class TopCommandBarVM
|
||||
Friend Sub NewCmd(Optional bUseDefaults As Boolean = False)
|
||||
' passo alla libreria l'oggetto Camera che è stato inizializzato nel Omag-PHOTO
|
||||
EgtPHOTOLib.MainData.SetCamera(Map.refMainWindowVM.m_Camera)
|
||||
Dim bIsSaved As Boolean = False
|
||||
If Not IsNothing(EgtPHOTOLib.PhotoMap.refProjectVM.SelSlab) Then
|
||||
If EgtPHOTOLib.PhotoMap.refProjectVM.SelSlab.IsModified Then
|
||||
' 91125: Salvare le modifiche correnti? - 92201: Avviso
|
||||
If MessageBox.Show(EgtMsg(91125), EgtMsg(92201), MessageBoxButton.YesNo, MessageBoxImage.Asterisk) = MessageBoxResult.Yes Then
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.Save()
|
||||
bIsSaved = True
|
||||
End If
|
||||
Else
|
||||
bIsSaved = True
|
||||
End If
|
||||
If Not bIsSaved Then
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.Cancel(Nothing)
|
||||
Else
|
||||
EgtPHOTOLib.PhotoMap.refListPageVM.RefreshLisPage()
|
||||
End If
|
||||
End If
|
||||
Map.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.NEWSLAB
|
||||
End Sub
|
||||
|
||||
|
||||