Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f1e05aaa3 | |||
| d2925af06b | |||
| be067aa785 | |||
| cdf98ecff5 | |||
| f952167d5d | |||
| 5f29f5821a | |||
| ecc0dc3a4f | |||
| 2a3656fb55 | |||
| d5fdf246a0 | |||
| c0af5e5754 | |||
| d9da37444d | |||
| 9d5ddf60ff | |||
| d5368ce1e4 | |||
| cf4ee52db4 | |||
| 0c0c0acc07 | |||
| f932a3095a | |||
| 0f259e7a63 | |||
| 3ee156e26c | |||
| 8cd6c20c98 | |||
| 51e81a57ad | |||
| 79c24ff113 | |||
| f1d1c14e44 | |||
| 7e0a9331bb | |||
| 131a554568 | |||
| b1e41c36f3 | |||
| 8f4f8c75a8 | |||
| bf90fd5cee | |||
| 814c918258 | |||
| fc2a262893 | |||
| 40780892c1 | |||
| e8716e32ef |
@@ -18,6 +18,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"
|
||||
@@ -35,11 +36,14 @@ Module ConstIni
|
||||
Public Const K_SUPPORT As String = "Support"
|
||||
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"
|
||||
Public Const K_DAT As String = "Dat"
|
||||
Public Const K_ZEBRAUTILITIES As String = "ZebraUtilities"
|
||||
Public Const K_ENABLE_PRINTER As String = "EnablePrinter"
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
|
||||
@@ -93,11 +93,19 @@ Public Class MainWindowM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' l'indirizzo del file può essere modificato dalla pagina OptionPage
|
||||
Private m_TemplateFilePrinter As String
|
||||
Friend ReadOnly Property sTemplateFilePrinter As String
|
||||
Friend Property sTemplateFilePrinter As String
|
||||
Get
|
||||
Return m_TemplateFilePrinter
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_TemplateFilePrinter = value
|
||||
' salvo il nome del nuovo file template in uso
|
||||
WriteMainPrivateProfileString(S_PRINTER, K_TEMPLATE, m_TemplateFilePrinter)
|
||||
' comunico alla librearia il nuovo nome del file in uso dal programma
|
||||
EgtPHOTOLib.MainData.SetTemplateFilePrinter(m_TemplateFilePrinter)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_DatFilePrinter As String
|
||||
@@ -114,6 +122,13 @@ Public Class MainWindowM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_PrinterIsVisible As Boolean = False
|
||||
Friend ReadOnly Property PrinterIsVisible As Boolean
|
||||
Get
|
||||
Return m_PrinterIsVisible
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sBackUpDir As String
|
||||
Friend ReadOnly Property sBackUpDir As String
|
||||
Get
|
||||
@@ -121,6 +136,30 @@ Public Class MainWindowM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_EnableTextId As Boolean = True
|
||||
Public ReadOnly Property EnableTextId As Boolean
|
||||
Get
|
||||
Return m_EnableTextId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_LastId As Integer = 10000
|
||||
Public Property nLastId As Integer
|
||||
Get
|
||||
Return m_LastId
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_LastId = value
|
||||
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"
|
||||
@@ -160,9 +199,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, 2308, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2308, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2407, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2407, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.PHOTO_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -222,28 +263,39 @@ Public Class MainWindowM
|
||||
' Leggo nome cartella delle foto
|
||||
GetMainPrivateProfileString(S_GENERAL, K_PHOTODIR, sDataRoot & "\Data", m_sPhotoDir)
|
||||
' leggo nome file prn (per stampante zebra)
|
||||
GetMainPrivateProfileString(S_PRINTER, K_TEMPLATE, sDataRoot & "\Template.prn", m_TemplateFilePrinter)
|
||||
' leggo nome del direttorio in cui scrivere il file ini (per stampante zebra)
|
||||
GetMainPrivateProfileString(S_PRINTER, K_TEMPLATE, sDataRoot & "\Label\Default.prn", m_TemplateFilePrinter)
|
||||
' leggo nome del direttorio in cui scrivere il file ini (per stampante zebra) -- solo se si desidera scrivere il file in un direttorio diverso
|
||||
GetMainPrivateProfileString(S_PRINTER, K_DAT, sDataRoot & "\Temp", m_DatFilePrinter)
|
||||
' leggo nome file exe (per stampante zebra)
|
||||
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.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)
|
||||
If GetMainPrivateProfileString(S_GENERAL, "LastBlock", "", sLastBlock) <> 0 Then EgtPHOTOLib.MainData.SetLastBlock(sLastBlock)
|
||||
Dim sIdKey As String = String.Empty
|
||||
EgtGetKeyInfo(sIdKey)
|
||||
EgtPHOTOLib.MainData.SetKey(sIdKey)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,9 +17,9 @@ Imports System.Windows
|
||||
<Assembly: AssemblyTitle("OmagPHOTOR32.exe")>
|
||||
<Assembly: AssemblyDescription("OmagPHOTO 32 bit")>
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagPHOTO")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2017-2021 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2017-2022 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.3.8.1")>
|
||||
<Assembly: AssemblyFileVersion("2.3.8.1")>
|
||||
<Assembly: AssemblyVersion("2.4.7.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.7.1")>
|
||||
|
||||
+4
-2
@@ -55,8 +55,7 @@
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtPHOTOLib, Version=2.3.1.1, Culture=neutral, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<Reference Include="EgtPHOTOLib">
|
||||
<HintPath>..\..\EgtProg\Dll32\EgtPHOTOLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtUILib, Version=2.3.4.5, Culture=neutral, processorArchitecture=MSIL">
|
||||
@@ -217,6 +216,9 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\Search.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\InstrumentPanel\Matitina.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagPHOTO\OmagPHOTOR32.exe
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Header="{Binding CurrentLanguageMsg}"
|
||||
@@ -48,11 +49,30 @@
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="{Binding MaterialsMsg}" Grid.Column="0"
|
||||
Grid.Row="2" Grid.ColumnSpan="2" Margin="0,0,0,5">
|
||||
<GroupBox Header="{Binding LabelMsg}"
|
||||
Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Visibility="{Binding LabelVisibility}"
|
||||
Margin="0,0,0,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding LabelFileName}"/>
|
||||
<Button Content="{Binding BrowseMsg}" Grid.Column="1"
|
||||
Command="{Binding BrowseCommand}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="{Binding MaterialsMsg}" Grid.Column="0"
|
||||
Grid.Row="3" Grid.ColumnSpan="2" Margin="0,0,0,5">
|
||||
|
||||
<DockPanel>
|
||||
|
||||
|
||||
|
||||
<UniformGrid Grid.Row="2" Columns="2"
|
||||
DockPanel.Dock="Bottom">
|
||||
<Button Content="{Binding NewMatMsg}" Grid.Column="1"
|
||||
@@ -65,16 +85,36 @@
|
||||
Margin="2.5,0,0,0"/>
|
||||
</UniformGrid>
|
||||
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding NewMatName}"
|
||||
DockPanel.Dock="Bottom" Width="240"
|
||||
Visibility="{Binding NewMatName_Visibility}"
|
||||
Margin="0,0,0,5"/>
|
||||
<Grid DockPanel.Dock="Bottom" Visibility="{Binding NewMatName_Visibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding NewMatName}"
|
||||
DockPanel.Dock="Bottom"
|
||||
Margin="0,0,0,5"/>
|
||||
<Button Content="{Binding OkMsg}" Grid.Column="1"
|
||||
Command="{Binding OkCommand}"
|
||||
IsEnabled="{Binding EnableOkNewMat}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Margin="2.5,0,0,2.5"/>
|
||||
<Button Content="{Binding CancelMsg}" Grid.Column="2"
|
||||
Command="{Binding CamcelCommand}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Margin="2.5,0,0,2.5"/>
|
||||
</Grid>
|
||||
|
||||
<!--<EgtWPFLib5:EgtTextBox Text="{Binding NewMatName}"
|
||||
DockPanel.Dock="Bottom" Width="240"
|
||||
Visibility="{Binding NewMatName_Visibility}"
|
||||
Margin="0,0,0,5"/>-->
|
||||
|
||||
<ListBox ItemsSource="{Binding MaterialList}"
|
||||
SelectedItem="{Binding SelMaterial}"
|
||||
Grid.RowSpan="2"
|
||||
Margin="0,0,0,5"
|
||||
Height="150"/>
|
||||
<ListBox ItemsSource="{Binding MaterialList}"
|
||||
SelectedItem="{Binding SelMaterial}"
|
||||
Grid.RowSpan="2"
|
||||
Margin="0,0,0,5"
|
||||
Height="150"/>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
|
||||
+164
-16
@@ -1,4 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtPHOTOLib
|
||||
@@ -62,6 +63,22 @@ Public Class OptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LabelFileName As String
|
||||
Get
|
||||
Return Map.refMainWindowVM.MainWindowM.sTemplateFilePrinter
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LabelVisibility As Visibility
|
||||
Get
|
||||
If Map.refMainWindowVM.MainWindowM.PrinterIsVisible Then
|
||||
Return Visibility.Visible
|
||||
Else
|
||||
Return Visibility.Collapsed
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ThicknessTolerance As Double
|
||||
Public Property ThicknessTolerance As String
|
||||
Get
|
||||
@@ -112,22 +129,18 @@ Public Class OptionWindowVM
|
||||
Set(value As String)
|
||||
m_NewMatName = value
|
||||
' Verifico che il nome non sia vuoto
|
||||
If Not String.IsNullOrWhiteSpace(m_NewMatName) Then
|
||||
' Verifico che il nome non sia già utilizzato
|
||||
Dim bNameExist As Boolean = False
|
||||
For Each Material In m_MaterialList
|
||||
If Material = m_NewMatName Then
|
||||
bNameExist = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bNameExist Then
|
||||
m_MaterialList.Add(m_NewMatName)
|
||||
End If
|
||||
End If
|
||||
' Nascondo textbox per il nome
|
||||
NewMatName_Visibility = Visibility.Collapsed
|
||||
m_NewMatName = String.Empty
|
||||
AddNewMaterial()
|
||||
NotifyPropertyChanged("EnableOkNewMat")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_EnableOkNewMat As Boolean = False
|
||||
Public Property EnableOkNewMat As Boolean
|
||||
Get
|
||||
Return m_EnableOkNewMat
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EnableOkNewMat = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -192,11 +205,38 @@ Public Class OptionWindowVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property BrowseMsg As String
|
||||
Get
|
||||
Return EgtMsg(92058)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LabelMsg As String
|
||||
Get
|
||||
Return EgtMsg(92056)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property OkMsg As String
|
||||
Get
|
||||
Return "Ok"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CancelMsg As String
|
||||
Get
|
||||
Return "Cancel"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdNewMat As ICommand
|
||||
Private m_cmdRemoveMat As ICommand
|
||||
Private m_cmdBrowse As ICommand
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdCanel As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
@@ -245,6 +285,29 @@ Public Class OptionWindowVM
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Function AddNewMaterial() As Boolean
|
||||
If Not String.IsNullOrWhiteSpace(m_NewMatName) Then
|
||||
' Verifico che il nome non sia già utilizzato
|
||||
Dim bNameExist As Boolean = False
|
||||
For Each Material In m_MaterialList
|
||||
If Material = m_NewMatName Then
|
||||
bNameExist = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bNameExist Then
|
||||
'm_MaterialList.Add(m_NewMatName)
|
||||
m_EnableOkNewMat = True
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
' ' Nascondo textbox per il nome
|
||||
' NewMatName_Visibility = Visibility.Collapsed
|
||||
' m_NewMatName = String.Empty
|
||||
m_EnableOkNewMat = False
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -272,6 +335,60 @@ Public Class OptionWindowVM
|
||||
|
||||
#End Region ' NewMatCommand
|
||||
|
||||
#Region "OkCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property OkCommand As ICommand
|
||||
Get
|
||||
If m_cmdOk Is Nothing Then
|
||||
m_cmdOk = New Command(AddressOf OkMat)
|
||||
End If
|
||||
Return m_cmdOk
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub OkMat(ByVal param As Object)
|
||||
' aggiungo il materiale alla lista
|
||||
m_MaterialList.Add(m_NewMatName)
|
||||
' Nascondo textbox per il nome
|
||||
NewMatName_Visibility = Visibility.Collapsed
|
||||
m_NewMatName = String.Empty
|
||||
NotifyPropertyChanged("NewMatName")
|
||||
End Sub
|
||||
|
||||
#End Region ' OkCommand
|
||||
|
||||
#Region "CancelCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CamcelCommand As ICommand
|
||||
Get
|
||||
If m_cmdCanel Is Nothing Then
|
||||
m_cmdCanel = New Command(AddressOf CancelMat)
|
||||
End If
|
||||
Return m_cmdCanel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub CancelMat(ByVal param As Object)
|
||||
' Nascondo textbox per il nome
|
||||
NewMatName_Visibility = Visibility.Collapsed
|
||||
m_NewMatName = String.Empty
|
||||
NotifyPropertyChanged("NewMatName")
|
||||
End Sub
|
||||
|
||||
#End Region ' CancelCommand
|
||||
|
||||
#Region "RemoveMatCommand"
|
||||
|
||||
''' <summary>
|
||||
@@ -299,6 +416,37 @@ Public Class OptionWindowVM
|
||||
|
||||
#End Region ' RemoveMatCommand
|
||||
|
||||
#Region "Browse"
|
||||
|
||||
#End Region ' Browse
|
||||
|
||||
Public ReadOnly Property BrowseCommand As ICommand
|
||||
Get
|
||||
If m_cmdBrowse Is Nothing Then
|
||||
m_cmdBrowse = New Command(AddressOf BrowseFile)
|
||||
End If
|
||||
Return m_cmdBrowse
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub BrowseFile(ByVal Param As Object)
|
||||
' recupero il nome del direttorio
|
||||
Dim CurrDirectory As String = Path.GetDirectoryName(Map.refMainWindowVM.MainWindowM.sTemplateFilePrinter)
|
||||
' Apro la finestra di dialogo aperta direttamente sulla cartella cercata
|
||||
Dim OpenFileDialog As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.InitialDirectory = CurrDirectory
|
||||
}
|
||||
OpenFileDialog.Filter = "prn files (*.prn)|*.prn"
|
||||
If OpenFileDialog.ShowDialog() <> True Then
|
||||
' se la risposta è diversa da OK esce
|
||||
Else
|
||||
' carico l'indirizzo del template che voglio aprire
|
||||
Map.refMainWindowVM.MainWindowM.sTemplateFilePrinter = OpenFileDialog.FileName
|
||||
NotifyPropertyChanged("LabelFileName")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 746 B |
+1
-1
@@ -139,7 +139,7 @@ Module Map
|
||||
Not IsNothing(LibMap.refSceneHostVM) AndAlso
|
||||
Not IsNothing(PhotoMap.refOptionPanelVM) AndAlso Not IsNothing(PhotoMap.refListPageVM) AndAlso
|
||||
Not IsNothing(PhotoMap.refDetailPageVM) AndAlso Not IsNothing(PhotoMap.refSearchPanelVM) AndAlso
|
||||
PhotoMap.ContninueApplication
|
||||
PhotoMap.ContinueApplication
|
||||
End Function
|
||||
|
||||
#End Region ' Init
|
||||
|
||||
Reference in New Issue
Block a user