diff --git a/Effector.Plugin.Lib/Effector.Plugin.Lib.vbproj b/Effector.Plugin.Lib/Effector.Plugin.Lib.vbproj
index 97a69ab..43692ef 100644
--- a/Effector.Plugin.Lib/Effector.Plugin.Lib.vbproj
+++ b/Effector.Plugin.Lib/Effector.Plugin.Lib.vbproj
@@ -114,10 +114,12 @@
+
+
diff --git a/Effector.Plugin.Lib/MultipleCopyWnd/MultipleCopyWndV.xaml b/Effector.Plugin.Lib/MultipleCopyWnd/MultipleCopyWndV.xaml
index ba6708e..04c9896 100644
--- a/Effector.Plugin.Lib/MultipleCopyWnd/MultipleCopyWndV.xaml
+++ b/Effector.Plugin.Lib/MultipleCopyWnd/MultipleCopyWndV.xaml
@@ -9,14 +9,14 @@
SizeToContent="WidthAndHeight"
IsResizable="False"
IsMinimizable="False"
- Title="Copia multipla"
+ IsClosable="False"
+ Title="{Binding sTitle}"
MinWidth="300">
-
@@ -28,7 +28,7 @@
-
-
diff --git a/Effector.Plugin.Lib/MultipleCopyWnd/MultipleCopyWndVM.vb b/Effector.Plugin.Lib/MultipleCopyWnd/MultipleCopyWndVM.vb
index 8295d3f..4925db3 100644
--- a/Effector.Plugin.Lib/MultipleCopyWnd/MultipleCopyWndVM.vb
+++ b/Effector.Plugin.Lib/MultipleCopyWnd/MultipleCopyWndVM.vb
@@ -3,6 +3,12 @@
Friend Event m_CloseWindow(bDialogResult As Boolean)
+ Public ReadOnly Property sTitle As String
+ Get
+ Return EgtMsg(1101)
+ End Get
+ End Property
+
Private m_nCopyNumber As Integer
Public ReadOnly Property nCopyNumber As Integer
Get
@@ -15,12 +21,34 @@
End Get
Set(value As String)
If Not Integer.TryParse(value, m_nCopyNumber) Then
- MessageBox.Show("Valore non impostabile come quantita' di porte!", "Errore!", MessageBoxButton.OK, MessageBoxImage.Error)
+ MessageBox.Show(EgtMsg(1103), EgtMsg(1051), MessageBoxButton.OK, MessageBoxImage.Error)
NotifyPropertyChanged(sCopyNumber)
End If
End Set
End Property
+#Region "Messages"
+
+ Public ReadOnly Property sCopyNumberMsg As String
+ Get
+ Return EgtMsg(1102)
+ End Get
+ End Property
+
+ Public ReadOnly Property sOkMsg As String
+ Get
+ Return EgtMsg(1001)
+ End Get
+ End Property
+
+ Public ReadOnly Property sCancelMsg As String
+ Get
+ Return EgtMsg(1002)
+ End Get
+ End Property
+
+#End Region ' Messages
+
' Definizione comandi
Private m_cmdOk As ICommand
Private m_cmdCancel As ICommand
diff --git a/Effector.Plugin.Lib/Utility/EgtInterface.vb b/Effector.Plugin.Lib/Utility/EgtInterface.vb
new file mode 100644
index 0000000..dc06bea
--- /dev/null
+++ b/Effector.Plugin.Lib/Utility/EgtInterface.vb
@@ -0,0 +1,80 @@
+Imports System.Runtime.InteropServices
+Imports System.Security
+
+Public Module EgtInterface
+
+#If DEBUG Then
+ Const EgtIntDll32 As String = "EgtBasisD32.dll"
+#Else
+ Const EgtIntDll32 As String = "EgtBasisR32.dll"
+#End If
+
+
+ Public Function EgtSetKey(sKey As String) As Boolean
+ End Function
+
+
+ Public Function EgtGetKeyLevel(nProd As Integer, nVer As Integer, nLev As Integer, ByRef nKLev As Integer) As Boolean
+ End Function
+
+
+ Public Function EgtGetKeyOptions(nProd As Integer, nVer As Integer, nLev As Integer,
+ ByRef nOpt1 As UInteger, ByRef nOpt2 As UInteger) As Boolean
+ End Function
+
+
+ Public Function EgtGetKeyLeftDays(ByRef nLeftDays As Integer) As Boolean
+ End Function
+
+
+ Public Function EgtGetKeyAssLeftDays(ByRef nAssLeftDays As Integer) As Boolean
+ End Function
+
+
+ Public Function EgtGetKeyOptLeftDays(ByRef nOptLeftDays As Integer) As Boolean
+ End Function
+
+
+ Public Function EgtFreeMemory(sB As IntPtr) As Boolean
+ End Function
+
+
+ Public Function EgtLoadMessages(sMsgFilePath As String) As Boolean
+ End Function
+
+
+ Private Function EgtGetMsg_32(nId As Integer) As IntPtr
+ End Function
+ Public Function EgtMsg(nId As Integer) As String
+ Return Marshal.PtrToStringUni(EgtGetMsg_32(nId))
+ ' Non è necessario liberare la memoria nativa perchè usa un buffer statico
+ End Function
+
+
+ Public Function EgtInitLogger(nDebug As Integer, sLogFilePath As String) As Boolean
+ End Function
+
+
+ Private Function EgtOutLog(sMsg As String, nDebugLevel As Integer) As Boolean
+ End Function
+
+
+ Private Function EgtGetStringUtf8FromIni_32(sSec As String, sKey As String, sDef As String, ByRef sVal As IntPtr, sIniFile As String) As Boolean
+ End Function
+ Public Function EgtGetStringUtf8FromIni(sSec As String, sKey As String, sDef As String, ByRef sVal As String, sIniFile As String) As Boolean
+ Dim psVal As IntPtr
+ Dim bOk As Boolean = EgtGetStringUtf8FromIni_32(sSec, sKey, sDef, psVal, sIniFile)
+ If bOk Then
+ sVal = Marshal.PtrToStringUni(psVal)
+ EgtFreeMemory(psVal)
+ Else
+ sVal = String.Empty
+ End If
+ Return bOk
+ End Function
+
+
+ Public Function EgtWriteStringUtf8toIni(sSec As String, sKey As String, sVal As String, sIniFile As String) As Boolean
+ End Function
+
+End Module
diff --git a/Effector.Plugin.Lib/Utility/IniFile.vb b/Effector.Plugin.Lib/Utility/IniFile.vb
index 0f6216a..dbb949c 100644
--- a/Effector.Plugin.Lib/Utility/IniFile.vb
+++ b/Effector.Plugin.Lib/Utility/IniFile.vb
@@ -38,25 +38,19 @@ Public Module IniFile
Return GetPrivateProfileString(IpAppName, IpKeyName, IpDefault, IpString, m_sPath)
End Function
- 'Public Function GetPrivateProfileLanguage(lpAppName As String, lpKeyName As String, lpFileName As String) As Language
- ' Dim sVal As String = String.Empty
- ' GetPrivateProfileString(lpAppName, lpKeyName, "", sVal, lpFileName)
- ' Dim sItems() As String = sVal.Split(",".ToCharArray)
- ' If sItems.Count() = 2 Then
- ' Return New Language(sItems(0), sItems(1))
- ' End If
- ' Return Nothing
- 'End Function
+ Public Function GetPrivateProfileLanguage(lpAppName As String, lpKeyName As String, lpFileName As String) As Language
+ Dim sVal As String = String.Empty
+ GetPrivateProfileString(lpAppName, lpKeyName, "", sVal, lpFileName)
+ Dim sItems() As String = sVal.Split(",".ToCharArray)
+ If sItems.Count() = 2 Then
+ Return New Language(sItems(0), sItems(1))
+ End If
+ Return Nothing
+ End Function
- 'Public Function GetMainPrivateProfileLanguage(lpAppName As String, lpKeyName As String) As Language
- ' Dim sVal As String = String.Empty
- ' GetMainPrivateProfileString(lpAppName, lpKeyName, "", sVal)
- ' Dim sItems() As String = sVal.Split(",".ToCharArray)
- ' If sItems.Count() = 2 Then
- ' Return New Language(sItems(0), sItems(1))
- ' End If
- ' Return Nothing
- 'End Function
+ Public Function GetMainPrivateProfileLanguage(lpAppName As String, lpKeyName As String) As Language
+ Return GetPrivateProfileLanguage(lpAppName, lpKeyName, m_sPath)
+ End Function
Public Function WriteMainPrivateProfileString(IpAppName As String, IpKeyName As String, ByRef IpString As String) As Boolean
Return WritePrivateProfileString(IpAppName, IpKeyName, IpString, m_sPath)
diff --git a/Effector.Plugin.Lib/Utility/Language.vb b/Effector.Plugin.Lib/Utility/Language.vb
new file mode 100644
index 0000000..57c9be6
--- /dev/null
+++ b/Effector.Plugin.Lib/Utility/Language.vb
@@ -0,0 +1,22 @@
+Public Class Language
+
+ Private m_sName As String
+ Public ReadOnly Property Name As String
+ Get
+ Return m_sName
+ End Get
+ End Property
+
+ Private m_sFilePath As String
+ Public ReadOnly Property FilePath As String
+ Get
+ Return m_sFilePath
+ End Get
+ End Property
+
+ Sub New(sName As String, sFilePath As String)
+ m_sName = sName
+ m_sFilePath = sFilePath
+ End Sub
+
+End Class
diff --git a/Effector.Plugin.Lib/Utility/PluginIniFile.vb b/Effector.Plugin.Lib/Utility/PluginIniFile.vb
index 1a8dbe8..d05a851 100644
--- a/Effector.Plugin.Lib/Utility/PluginIniFile.vb
+++ b/Effector.Plugin.Lib/Utility/PluginIniFile.vb
@@ -38,26 +38,6 @@ Public Module PluginIniFile
Return GetPrivateProfileString(IpAppName, IpKeyName, IpDefault, IpString, m_sPath)
End Function
- 'Public Function GetPrivateProfileLanguage(lpAppName As String, lpKeyName As String, lpFileName As String) As Language
- ' Dim sVal As String = String.Empty
- ' GetPrivateProfileString(lpAppName, lpKeyName, "", sVal, lpFileName)
- ' Dim sItems() As String = sVal.Split(",".ToCharArray)
- ' If sItems.Count() = 2 Then
- ' Return New Language(sItems(0), sItems(1))
- ' End If
- ' Return Nothing
- 'End Function
-
- 'Public Function GetMainPrivateProfileLanguage(lpAppName As String, lpKeyName As String) As Language
- ' Dim sVal As String = String.Empty
- ' GetMainPrivateProfileString(lpAppName, lpKeyName, "", sVal)
- ' Dim sItems() As String = sVal.Split(",".ToCharArray)
- ' If sItems.Count() = 2 Then
- ' Return New Language(sItems(0), sItems(1))
- ' End If
- ' Return Nothing
- 'End Function
-
Public Function WritePluginPrivateProfileString(IpAppName As String, IpKeyName As String, ByRef IpString As String) As Boolean
Return WritePrivateProfileString(IpAppName, IpKeyName, IpString, m_sPath)
End Function