Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 55b8f80721 | |||
| b8e64c83b7 | |||
| 6f5e7cd11a | |||
| 46e7846f3e | |||
| 14d3de85ff | |||
| 8e60c252fe | |||
| 19670ccbf7 | |||
| 972650891c | |||
| 662fee7865 | |||
| 6d2c098682 | |||
| 4d9b29e9fe | |||
| 5719b711af | |||
| 076ff0af49 | |||
| 16fb3d7a36 | |||
| c36fafdc8d | |||
| ee9f2bd91e | |||
| 1e98aeb9d9 | |||
| a08db1aab5 | |||
| e166b2f5ed | |||
| 06f8ace3c8 | |||
| bdc4f56914 |
+13
@@ -73,7 +73,20 @@ Module ConstGen
|
||||
Public Const NAME_PREVIEW As String = "PV"
|
||||
' Info per stato pezzo
|
||||
Public Const INFO_PARTOK As String = "POK"
|
||||
|
||||
' Info in pezzo con path di Csv di provenienza
|
||||
Public Const INFO_CSV_PATH As String = "CsvPath"
|
||||
' Info in pezzo con suo nome in Csv
|
||||
Public Const INFO_CSV_PART As String = "CsvPart"
|
||||
' Info in pezzo con suo ordine in Csv
|
||||
Public Const INFO_CSV_ORD As String = "CsvOrd"
|
||||
' Info in pezzo con sua distinta in Csv
|
||||
Public Const INFO_CSV_DIST As String = "CsvDist"
|
||||
' Info in pezzo con suo materiale in Csv
|
||||
Public Const INFO_CSV_MAT As String = "CsvMat"
|
||||
' Info in pezzo con dimensione X in Csv
|
||||
Public Const INFO_CSV_V1 As String = "V1"
|
||||
' Info in pezzo con dimensione Y in Csv
|
||||
Public Const INFO_CSV_V2 As String = "V2"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -25,6 +25,7 @@ Module ConstIni
|
||||
Public Const K_PROJDIR As String = "ProjDir"
|
||||
Public Const K_PREVNEXTPROJ As String = "PrevNextProj"
|
||||
Public Const K_THEME As String = "Theme"
|
||||
Public Const K_PRINTSLEEP As String = "PrintSleep"
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
@@ -39,7 +40,10 @@ Module ConstIni
|
||||
Public Const K_DEFAULTCOLOR As String = "DefaultColor"
|
||||
|
||||
Public Const S_PRINTER As String = "Printer"
|
||||
Public Const K_ENABLEPRINTER As String = "EnablePrinter"
|
||||
Public Const K_DELAYTIME As String = "DelayTime"
|
||||
Public Const K_TEMPLATE As String = "Template"
|
||||
Public Const K_TEMPLATE_ARROW As String = "TemplateArrow"
|
||||
Public Const K_DAT As String = "Dat"
|
||||
Public Const K_ZEBRAUTILITIES As String = "ZebraUtilities"
|
||||
|
||||
|
||||
+3
-3
@@ -58,8 +58,8 @@
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Name="SceneGrid" Grid.Row="1">
|
||||
|
||||
<Grid Name="SceneGrid" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="14*"/>
|
||||
@@ -87,7 +87,7 @@
|
||||
FontSize="32"/>
|
||||
<Button Name="ConfirmBtn" Grid.Row="5" Style="{DynamicResource OmagCut_BlueTextButton}"
|
||||
FontSize="32"/>
|
||||
<Border Name="OutMessageBrd" Grid.Row="6" >
|
||||
<Border Name="OutMessageBrd" Grid.Row="6">
|
||||
<TextBlock Name="OutMessageTxBl" TextAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Border>
|
||||
|
||||
+146
-23
@@ -5,6 +5,7 @@ Imports EgtWPFLib
|
||||
Imports System.ComponentModel
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Threading
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Class MainWindow
|
||||
|
||||
@@ -54,10 +55,14 @@ Class MainWindow
|
||||
Friend m_nTopViewRotStep As Integer = 0
|
||||
' Timer per aggiornamento interfaccia
|
||||
Private m_IdleTimer As New DispatcherTimer(DispatcherPriority.ApplicationIdle)
|
||||
' Timero per reset dei messaggi
|
||||
Private m_DelayTimerMsg As New DispatcherTimer(DispatcherPriority.ApplicationIdle)
|
||||
' Lista dei pezzi attivi
|
||||
Private m_vParts As New List(Of Integer)
|
||||
' percorso file template per stampante
|
||||
Private m_TemplateFilePrinter As String
|
||||
Friend m_TemplateFilePrinter As String
|
||||
' percorso file template per stampante (disegnod della freccia per indicare il TOP del pezzo)
|
||||
Friend m_TemplateFileArrowPrinter As String
|
||||
' percorso direttorio per stampa file ini
|
||||
Private m_DatDirPrinter As String
|
||||
' percorso eseguibile per stampante zebra
|
||||
@@ -183,14 +188,15 @@ Class MainWindow
|
||||
GetPrivateProfileString(S_GEOMDB, K_DEFAULTFONT, "", sDefFont, m_sIniFile)
|
||||
EgtSetFont(sNfeDir, sDefFont)
|
||||
' leggo nome file prn (per stampante zebra)
|
||||
GetPrivateProfileString(S_PRINTER, K_TEMPLATE, m_sDataRoot & "\Template.prn", m_TemplateFilePrinter, m_sIniFile)
|
||||
GetPrivateProfileString(S_PRINTER, K_TEMPLATE, m_sDataRoot & "\Label\Default.prn", m_TemplateFilePrinter, m_sIniFile)
|
||||
GetPrivateProfileString(S_PRINTER, K_TEMPLATE_ARROW, m_sDataRoot & "\Label\DefaultArrow.prn", m_TemplateFileArrowPrinter, m_sIniFile)
|
||||
' leggo nome del direttorio in cui scrivere il file ini (per stampante zebra)
|
||||
GetPrivateProfileString(S_PRINTER, K_DAT, m_sDataRoot & "\Temp", m_DatDirPrinter, m_sIniFile)
|
||||
' leggo nome file exe (per stampante zebra)
|
||||
GetPrivateProfileString(S_PRINTER, K_ZEBRAUTILITIES, System.AppDomain.CurrentDomain.BaseDirectory & "ZebraPrinterUtilitiesR32.exe", m_ZebraUtilitiesExe, m_sIniFile)
|
||||
' Recupero 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, 2602, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2602, 1, m_nKeyOptions)
|
||||
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString())
|
||||
' Imposto dir di default per libreria Lua e lancio libreria di base
|
||||
Dim sLuaLibsDir As String = String.Empty
|
||||
@@ -235,7 +241,7 @@ Class MainWindow
|
||||
LabelBtn.Content = EgtMsg(91304) 'Stampa Etichetta
|
||||
ConfirmBtn.Content = EgtMsg(91305) 'Conferma
|
||||
' Abilitazione stampa etichetta
|
||||
LabelBtn.IsEnabled = True
|
||||
LabelBtn.IsEnabled = GetPrivateProfileInt(S_PRINTER, K_ENABLEPRINTER, 0, m_sIniFile) <> 0
|
||||
' Visualizzazione bottoni Prev/Next
|
||||
If GetPrivateProfileInt(S_GENERAL, K_PREVNEXTPROJ, 0, m_sIniFile) = 0 Then
|
||||
PrevNextGrid.Visibility = Windows.Visibility.Hidden
|
||||
@@ -244,6 +250,8 @@ Class MainWindow
|
||||
End If
|
||||
' Imposto OnIdle
|
||||
AddHandler m_IdleTimer.Tick, AddressOf OnIdle
|
||||
' Imposto "Maniglia" per la gestione dell'evento di pulizia dei messaggi
|
||||
AddHandler m_DelayTimerMsg.Tick, AddressOf RefreshErrorMsgPrinter
|
||||
End Sub
|
||||
|
||||
Private Sub ManageSingleIstance()
|
||||
@@ -331,11 +339,11 @@ Class MainWindow
|
||||
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
|
||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
||||
MissingKeyWnd = New EgtMsgBox(Me, EgtMsg(MSG_MISSINGKEYWD + 1), EgtMsg(MSG_MISSINGKEYWD + 2) & " " & EgtMsg(MSG_MISSINGKEYWD + 3), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
' Altrimenti manca la licenza
|
||||
' Altrimenti manca la licenza
|
||||
Else
|
||||
EgtOutLog("Problems with Licence")
|
||||
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
||||
Dim sKeyInfo As String = "" : EgtGetKeyInfo( sKeyInfo)
|
||||
Dim sKeyInfo As String = "" : EgtGetKeyInfo(sKeyInfo)
|
||||
Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6)
|
||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
||||
MissingKeyWnd = New EgtMsgBox(Me, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL, 2, 2)
|
||||
@@ -351,9 +359,9 @@ Class MainWindow
|
||||
' Recupero il direttorio del file
|
||||
Dim sDir As String = System.IO.Path.GetDirectoryName(LicDlg.FileName)
|
||||
' Se il file non è già nel direttorio di configurazione lo copio
|
||||
If Not String.Equals(System.IO.Path.GetFullPath(sDir), System.IO.Path.GetFullPath( m_sConfigDir), StringComparison.OrdinalIgnoreCase) Then
|
||||
If Not String.Equals(System.IO.Path.GetFullPath(sDir), System.IO.Path.GetFullPath(m_sConfigDir), StringComparison.OrdinalIgnoreCase) Then
|
||||
Try
|
||||
System.IO.File.Copy(LicDlg.FileName, System.IO.Path.Combine( m_sConfigDir, LicDlg.SafeFileName), True)
|
||||
System.IO.File.Copy(LicDlg.FileName, System.IO.Path.Combine(m_sConfigDir, LicDlg.SafeFileName), True)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
@@ -415,7 +423,7 @@ Class MainWindow
|
||||
Private Sub MainWindow_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Handles Me.PreviewMouseDown
|
||||
End Sub
|
||||
|
||||
Private Sub MainWindow_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
|
||||
Private Sub OnKeyDownHandler(ByVal sender As Object, ByVal e As KeyEventArgs)
|
||||
'If (m_NumericKeyboardWD.IsVisible And e.Key = Key.Enter) Then
|
||||
' m_NumericKeyboardWD.Visibility = Windows.Visibility.Hidden
|
||||
'End If
|
||||
@@ -443,9 +451,11 @@ Class MainWindow
|
||||
' Se già selezionato deseleziono
|
||||
If nStat = GDB_ST.SEL Then
|
||||
EgtDeselectObj(nPartId)
|
||||
' Altrimenti seleziono
|
||||
' Altrimenti seleziono
|
||||
Else
|
||||
EgtDeselectAll()
|
||||
If Not (Keyboard.Modifiers And ModifierKeys.Control) > 0 Then
|
||||
EgtDeselectAll()
|
||||
End If
|
||||
EgtSelectObj(nPartId)
|
||||
End If
|
||||
EgtDraw()
|
||||
@@ -515,7 +525,11 @@ Class MainWindow
|
||||
|
||||
Private Sub PrintBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrintBtn.Click
|
||||
|
||||
Dim printDlg As New PrintDialog
|
||||
Dim printDlg As New System.Windows.Controls.PrintDialog()
|
||||
Dim SM_Select As SM = SM.SHADING
|
||||
If (Keyboard.Modifiers And ModifierKeys.Control) > 0 Then
|
||||
SM_Select = SM.HIDDENLINE
|
||||
End If
|
||||
|
||||
If printDlg.ShowDialog() Then
|
||||
|
||||
@@ -534,7 +548,7 @@ Class MainWindow
|
||||
Dim nImgH As Integer = 2400
|
||||
Dim sPath As String = m_sTempDir & "\Image.png"
|
||||
EgtSetLineAttribs( 3)
|
||||
If Not EgtGetImage(SM.HIDDENLINE, colWhite, colWhite, nImgW, nImgH, sPath) Then
|
||||
If Not EgtGetImage(SM_Select, colWhite, colWhite, nImgW, nImgH, sPath) Then
|
||||
EgtOutLog("Errore creazione immagine di stampa")
|
||||
Return
|
||||
End If
|
||||
@@ -576,8 +590,9 @@ Class MainWindow
|
||||
|
||||
End Sub
|
||||
|
||||
' Funzione per stampa delle etichette
|
||||
' Funzione per stampa delle etichette con ZebraPrinter
|
||||
Private Sub LabelBtn_Click(sender As Object, e As RoutedEventArgs) Handles LabelBtn.Click
|
||||
Dim dTimerSleep As Double = GetPrivateProfileDouble(S_GENERAL, K_PRINTSLEEP, 5000, m_sIniFile)
|
||||
Dim FileName As String = DateTime.Now.ToString()
|
||||
FileName = FileName.Replace("/"c, "_")
|
||||
FileName = FileName.Replace(":"c, "_")
|
||||
@@ -585,14 +600,29 @@ Class MainWindow
|
||||
Dim sFileDatIni As String = m_DatDirPrinter & "\" & FileName & ".ini"
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
' recupero il part
|
||||
Dim nParentId = EgtGetParent(nId)
|
||||
Dim nParentId As Integer = nId
|
||||
' se nessun elemento selezionato esco
|
||||
If nParentId = GDB_ID.NULL Then
|
||||
ReadFileErrorPrinter(False)
|
||||
Return
|
||||
End If
|
||||
Dim bArrow As Boolean = False
|
||||
While nParentId <> GDB_ID.NULL
|
||||
CreateFileData(nParentId, sFileDatIni)
|
||||
Dim nNextId As Integer = EgtGetNextSelectedObj()
|
||||
nParentId = EgtGetParent(nNextId)
|
||||
bArrow = GetTopInfoPart(nParentId)
|
||||
Dim ProcsPrint As Process() = Process.GetProcessesByName(m_ZebraUtilitiesExe)
|
||||
If bArrow Then
|
||||
Process.Start(m_ZebraUtilitiesExe, m_TemplateFileArrowPrinter & " " & sFileDatIni)
|
||||
Else
|
||||
Process.Start(m_ZebraUtilitiesExe, m_TemplateFilePrinter & " " & sFileDatIni)
|
||||
End If
|
||||
Thread.Sleep(dTimerSleep)
|
||||
' passo al pezzo successivo
|
||||
nParentId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Dim ProcsPrint As Process() = Process.GetProcessesByName(m_ZebraUtilitiesExe)
|
||||
Process.Start(m_ZebraUtilitiesExe, m_TemplateFilePrinter & " " & sFileDatIni)
|
||||
' attendo che sia generato il file
|
||||
Thread.Sleep(10)
|
||||
ReadFileErrorPrinter()
|
||||
End Sub
|
||||
|
||||
' creazione file ini dei dati pezzo per stampa etichetta
|
||||
@@ -601,19 +631,36 @@ Class MainWindow
|
||||
FileText.Add("[Main]")
|
||||
' Recupero materiale
|
||||
Dim sMaterial As String = String.Empty
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_PROJMAT, sMaterial)
|
||||
EgtGetInfo(nPartId, INFO_CSV_MAT, sMaterial)
|
||||
FileText.Add("Var1=$ProjMat$," & sMaterial)
|
||||
' Recupero path originale di carico
|
||||
Dim sCutPath As String = String.Empty
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_LOADPATH, sCutPath)
|
||||
FileText.Add("Var2=$LoadPath$," & sCutPath)
|
||||
' recupero l'ordine del pezzo
|
||||
Dim sOrd As String = String.Empty
|
||||
EgtGetInfo(nPartId, INFO_CSV_ORD, sOrd)
|
||||
FileText.Add("Var3=$CsvOrd$," & sOrd)
|
||||
' recupero la distointa del pezzo
|
||||
Dim sDist As String = String.Empty
|
||||
EgtGetInfo(nPartId, INFO_CSV_DIST, sDist)
|
||||
FileText.Add("Var4=$CsvDist$," & sDist)
|
||||
' recupero il nome della componente
|
||||
Dim sName As String = String.Empty
|
||||
EgtGetInfo(nPartId, INFO_CSV_PART, sName)
|
||||
FileText.Add("Var3=$CsvPart$," & sName)
|
||||
FileText.Add("Var5=$CsvPart$," & sName)
|
||||
' nome della componente geometrica
|
||||
Dim sCompo As String = String.Empty
|
||||
EgtGetInfo(nPartId, "CMP", sCompo)
|
||||
FileText.Add("Var4=$CMP$," & sCompo)
|
||||
FileText.Add("Var6=$CMP$," & sCompo)
|
||||
' recupero dimensioni pezzo
|
||||
Dim sV1 As String = String.Empty
|
||||
EgtGetInfo(nPartId, INFO_CSV_V1, sV1)
|
||||
FileText.Add("Var7=$CsvV1$," & sV1)
|
||||
' recupero dimensioni pezzo
|
||||
Dim sV2 As String = String.Empty
|
||||
EgtGetInfo(nPartId, INFO_CSV_V2, sV2)
|
||||
FileText.Add("Var8=$CsvV2$," & sV2)
|
||||
Try
|
||||
File.WriteAllLines(sFilePath, FileText)
|
||||
Catch ex As Exception
|
||||
@@ -621,6 +668,82 @@ Class MainWindow
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ReadFileErrorPrinter(Optional bReadFileError As Boolean = True)
|
||||
' stringa che conterrà il mesasggio da stampare come errore
|
||||
Dim sErrorMsg As String = String.Empty
|
||||
' se non leggo il messaggio di errore allora
|
||||
If Not bReadFileError Then
|
||||
sErrorMsg = EgtMsg(4 + 91460)
|
||||
|
||||
' leggo il messaggio di errore della stampante
|
||||
Else
|
||||
' percorso del file di errore
|
||||
Dim sPathFileError As String = m_sDataRoot & "\Temp\" & "Error.txt"
|
||||
' provo a recuperare il mesaggio di errore
|
||||
If File.Exists(sPathFileError) Then
|
||||
Dim sAllLines As String() = File.ReadAllLines(sPathFileError)
|
||||
' verifico che ci sia almeno una riga nel file degli errori
|
||||
If sAllLines.Count > 0 Then
|
||||
' verifico che la prima riga non sia vuota
|
||||
Dim Index As Integer = 0
|
||||
While String.IsNullOrEmpty(sAllLines(Index))
|
||||
Index += 1
|
||||
If Index > sAllLines.Count Then
|
||||
EgtOutLog("Il messaggio di errore della stampante non è comprensibile: " & sAllLines(Index))
|
||||
Return
|
||||
End If
|
||||
End While
|
||||
Dim sItems As String() = sAllLines(Index).Split("=")
|
||||
'verifico che sia avvenuto lo split
|
||||
If sItems.Count > 1 Then
|
||||
' verifico che il termine dopo il segno di uguale sia un numero
|
||||
Dim nErrorIndex As Integer = -1
|
||||
Try
|
||||
nErrorIndex = CInt(sItems(1))
|
||||
' se nErrorIndex=0 significa che non ci sono errori
|
||||
If nErrorIndex < 1 Then
|
||||
Return
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Il messaggio di errore della stampante non è comprensibile: " & sAllLines(Index))
|
||||
Return
|
||||
End Try
|
||||
sErrorMsg = EgtMsg(nErrorIndex + 91460)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' eventualmente stampo il messaggio
|
||||
If Not String.IsNullOrEmpty(sErrorMsg) Then
|
||||
SetErrorMessage(sErrorMsg)
|
||||
End If
|
||||
' Lancio timer per aggiornamento interfaccia
|
||||
Dim DelayTime As Integer = 4000
|
||||
DelayTime = GetPrivateProfileInt(S_PRINTER, K_DELAYTIME, DelayTime, GetIniFile)
|
||||
m_DelayTimerMsg.Interval = TimeSpan.FromMilliseconds(DelayTime)
|
||||
m_DelayTimerMsg.Start()
|
||||
End Sub
|
||||
|
||||
' questa funzione viene eseguita dall'evento associato al m_DelayTimerMsg
|
||||
Private Sub RefreshErrorMsgPrinter()
|
||||
ClearMessage()
|
||||
m_DelayTimerMsg.Stop()
|
||||
End Sub
|
||||
|
||||
' cerco se esiste la definizione del "*TOP*" del pezzo
|
||||
Private Function GetTopInfoPart(nPartId As Integer) As Boolean
|
||||
Dim nRegion As Integer = EgtGetFirstNameInGroup(nPartId, NAME_REGION)
|
||||
If nRegion = GDB_ID.NULL Then Return False
|
||||
Dim nLayer As Integer = EgtGetFirstInGroup(nRegion)
|
||||
While nLayer <> GDB_ID.NULL
|
||||
Dim sMsg As String = String.Empty
|
||||
EgtTextGetContent(nLayer, sMsg)
|
||||
If Not String.IsNullOrEmpty(sMsg) AndAlso sMsg = "*TOP*" Then Return True
|
||||
nLayer = EgtGetNext(nLayer)
|
||||
End While
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Sub UpdateBtns()
|
||||
' Per bottoni precedente e successivo progetto
|
||||
UpdatePrevNextBtns()
|
||||
|
||||
@@ -12,10 +12,10 @@ Imports System.Windows
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("OmagVIEW 32 bit")>
|
||||
<Assembly: AssemblyDescription("OmagVIEWR32.exe")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("OmagVIEW")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016-2021 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyDescription("OmagVIEWR32.exe")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagVIEW")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -55,5 +55,6 @@ 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.6.2.1")>
|
||||
<Assembly: AssemblyFileVersion("2.6.2.1")>
|
||||
|
||||
|
||||
@@ -250,6 +250,9 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\AboutBoxImage.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\Folder.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagVIEW\OmagVIEWR32.exe
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
<BitmapImage x:Key="ZoomInImg" UriSource="Resources/ZoomIn.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZoomOutImg" UriSource="Resources/ZoomOut.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZoomWinImg" UriSource="Resources/ZoomWIn.png"></BitmapImage>
|
||||
<BitmapImage x:Key="FolderImg" UriSource="Resources/Folder.png"></BitmapImage>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
|
||||
+116
-42
@@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
FontFamily="{DynamicResource OmagView_Font}"
|
||||
Height="682.4" Width="511.8" ResizeMode="NoResize"
|
||||
Height="720.4" Width="511.8" ResizeMode="NoResize"
|
||||
ShowInTaskbar="False" AllowsTransparency="True" WindowStyle="None"
|
||||
Background="Transparent">
|
||||
|
||||
@@ -16,27 +16,33 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.15*"/>
|
||||
<RowDefinition Height="2.25*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.15*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.15*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.15*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.15*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.15*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.15*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="OptTitle" Grid.Column="1" Grid.Row="0"
|
||||
FontSize="{StaticResource FontSize_UpperCaseCharacter}" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Foreground="{DynamicResource Omag_TextColor}"/>
|
||||
<GroupBox Name="LanguageGpBx" Grid.Column="1" Grid.Row="2" Style="{StaticResource OmagCut_GroupBox}">
|
||||
|
||||
<GroupBox Name="LanguageGpBx" Grid.Column="1" Grid.Row="2"
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
@@ -46,7 +52,7 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="LanguageCmBx" Grid.Column="1" Grid.Row="1" MinWidth="49" Height="40">
|
||||
@@ -63,7 +69,9 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="UnitsOfMeasureGpBx" Grid.Column="1" Grid.Row="4" Style="{StaticResource OmagCut_GroupBox}">
|
||||
<!--Selezione unità di misura-->
|
||||
<GroupBox Name="UnitsOfMeasureGpBx" Grid.Column="1" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
@@ -71,9 +79,9 @@
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="UnitsOfMeasureCmBx" Grid.Column="1" Grid.Row="1" Height="40">
|
||||
@@ -88,32 +96,9 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="ViewRotGpBx" Grid.Column="1" Grid.Row="6" Style="{StaticResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="ViewRotCmBx" Grid.Column="1" Grid.Row="1" Height="40">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Label Content="{Binding}" FontSize="20" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="ThemesGpBx" Grid.Column="1" Grid.Row="8" Style="{StaticResource OmagCut_GroupBox}">
|
||||
<!--Disposizione della tavola-->
|
||||
<GroupBox Name="ViewRotGpBx" Grid.Column="2" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
@@ -121,9 +106,34 @@
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="ViewRotCmBx" Grid.Column="1" Grid.Row="1" Height="40">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Label Content="{Binding}" FontSize="20" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="ThemesGpBx" Grid.Column="1" Grid.Row="6"
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="ThemesCmBx" Grid.Column="1" Grid.Row="1" Height="40">
|
||||
@@ -138,7 +148,71 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="10">
|
||||
<!--Selezione del file template1-->
|
||||
<GroupBox Name="LabelGpBx" Grid.Column="1" Grid.Row="8"
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="LabelTxt"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button Name ="BrowseBtn"
|
||||
Grid.Row="1" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}"
|
||||
Margin="0.5,0,0,0">
|
||||
<Image Source="{DynamicResource FolderImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Selezione file template2 con freccia TOP-->
|
||||
<GroupBox Name="LabelArrowGpBx" Grid.Column="1" Grid.Row="10"
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="LabelArrowTxt"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button Name ="BrowseArrowBtn"
|
||||
Grid.Row="1" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}"
|
||||
Margin="0.5,0,0,0">
|
||||
<Image Source="{DynamicResource FolderImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="12" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.IO
|
||||
|
||||
Public Class OptionsPageUC
|
||||
|
||||
@@ -46,6 +47,9 @@ Public Class OptionsPageUC
|
||||
' Imposto il tema corrente
|
||||
ThemesCmBx.SelectedIndex = m_MainWindow.m_CurrTheme
|
||||
|
||||
AddHandler BrowseBtn.Click, AddressOf Me.BrowseBtn_OnClick
|
||||
AddHandler BrowseArrowBtn.Click, AddressOf Me.BrowseArrowBtn_OnClick
|
||||
|
||||
' Messaggi
|
||||
OptTitle.Text = EgtMsg(MSG_OMAGCUT + 6) ' OPZIONI
|
||||
LanguageGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 1) ' Lingua
|
||||
@@ -53,6 +57,10 @@ Public Class OptionsPageUC
|
||||
UnitsOfMeasureGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 3) ' Unità di misura
|
||||
ViewRotGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 4) ' Rotazione vista
|
||||
ThemesGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 25) ' Tema
|
||||
LabelGpBx.Header = EgtMsg(92056) ' Etichetta
|
||||
LabelTxt.Text = m_MainWindow.m_TemplateFilePrinter
|
||||
LabelArrowGpBx.Header = EgtMsg(92057) ' Etichetta Freccia
|
||||
LabelArrowTxt.Text = m_MainWindow.m_TemplateFileArrowPrinter
|
||||
End Sub
|
||||
|
||||
Private Sub LanguageCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles LanguageCmBx.SelectionChanged
|
||||
@@ -91,4 +99,33 @@ Public Class OptionsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' distinguo il direttorio di ricerca a seconda del file selezionato
|
||||
Private Sub BrowseBtn_OnClick()
|
||||
Browse(m_MainWindow.m_TemplateFilePrinter, K_TEMPLATE)
|
||||
LabelTxt.Text = m_MainWindow.m_TemplateFilePrinter
|
||||
End Sub
|
||||
|
||||
Private Sub BrowseArrowBtn_OnClick()
|
||||
Browse(m_MainWindow.m_TemplateFileArrowPrinter, K_TEMPLATE_ARROW)
|
||||
LabelArrowTxt.Text = m_MainWindow.m_TemplateFileArrowPrinter
|
||||
End Sub
|
||||
|
||||
Private Sub Browse(ByRef sFileName As String, sKey As String)
|
||||
'recupero il nome del direttorio
|
||||
Dim CurrDirectory As String = Path.GetDirectoryName(sFileName)
|
||||
' 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
|
||||
sFileName = OpenFileDialog.FileName
|
||||
' salvo il nome del nuovo file template in uso
|
||||
WritePrivateProfileString(S_PRINTER, sKey, sFileName, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Reference in New Issue
Block a user