diff --git a/Assembly/Assembly.vb b/Assembly/Assembly.vb index 7590118..e3fd37e 100644 --- a/Assembly/Assembly.vb +++ b/Assembly/Assembly.vb @@ -818,15 +818,19 @@ Public Class Assembly If FileContent(Index).Contains(ConstCompo.DDF_METADATA) Then If Not String.IsNullOrWhiteSpace(Regex.Match(FileContent(Index), "\s*" & DDF_METADATA & "\s*(.*?\b)\s*:\s*$").Groups(1).Value) Then ExitLoop = True - ElseIf Not String.IsNullOrWhiteSpace(Regex.Match(FileContent(Index), "\s*" & DDF_METADATA & "\s*(.*?\b)\s*:\s*(.*?\b)$").Groups(1).Value) Then + ElseIf Not String.IsNullOrWhiteSpace(Regex.Match(FileContent(Index), "\s*" & DDF_METADATA & "\s*(.*?\b)\s*:\s*(.*?\.*)$").Groups(1).Value) Then ExitLoop = True - ElseIf Not String.IsNullOrWhiteSpace(Regex.Match(FileContent(Index), "\s*(" & ConstCompo.S_MEASURES & ")\s*:\s*(.*?\b)$").Groups(1).Value) Then + ElseIf Not String.IsNullOrWhiteSpace(Regex.Match(FileContent(Index), "\s*(" & ConstCompo.S_MEASURES & ")\s*:\s*(.*?\.*)$").Groups(1).Value) Then ExitLoop = True Else Index += 1 End If - ElseIf Not String.IsNullOrWhiteSpace(Regex.Match(FileContent(Index), "\s*(" & ConstCompo.S_MEASURES & ")\s*:\s*(.*?\b)$").Groups(1).Value) Or - Not String.IsNullOrWhiteSpace(Regex.Match(FileContent(Index), "\s*(" & ConstCompo.S_PRODUCE & ")\s*:\s*(.*?\b)$").Groups(1).Value) Then + ' utilizzando una funzione regex + ElseIf Not String.IsNullOrWhiteSpace(Regex.Match(FileContent(Index), "\s*(" & ConstCompo.S_MEASURES & ")\s*:\s*(.*?\.*)$").Groups(1).Value) Or + Not String.IsNullOrWhiteSpace(Regex.Match(FileContent(Index), "\s*(" & ConstCompo.S_PRODUCE & ")\s*:\s*(.*?\.*)$").Groups(1).Value) Then + '' utilizzando il semplice controllo se la stringa contiene le parole + 'ElseIf Not FileContent(Index).Contains(ConstCompo.S_MEASURES) Or + ' Not FileContent(Index).Contains(ConstCompo.S_PRODUCE) Then Index = 0 ExitLoop = True Else diff --git a/AssemblyManager/AssemblyManagerVM.vb b/AssemblyManager/AssemblyManagerVM.vb index ba3f7fb..f085cf9 100644 --- a/AssemblyManager/AssemblyManagerVM.vb +++ b/AssemblyManager/AssemblyManagerVM.vb @@ -441,6 +441,8 @@ Public Class AssemblyManagerVM End Try If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then + DdfFile.WriteDDFPart(m_CurrProject.SelAssemblyName.SelAssembly.GetArrayPartDoor(0).Door, m_CurrProject.SelAssemblyName.Name, False, False) + DdfFile.WriteDDFPart(m_CurrProject.SelAssemblyName.SelAssembly.GetArrayPartDoor(0).Door, m_CurrProject.SelAssemblyName.Name, True, False) ' Va salvato ancora con i parametri perchè sotto viene riletto e ci devono ancora essere i parametri DdfFile.WriteDDFPart(m_CurrProject.SelAssemblyName.SelAssembly.GetArrayPartDoor(0).Door, m_CurrProject.SelAssemblyName.Name, False, False) ' aggiorno elenco quotature diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 4b97d26..f67e618 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -72,5 +72,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/NewHardware/NewHardwareVM.vb b/NewHardware/NewHardwareVM.vb index bd6fe7c..2ef4f79 100644 --- a/NewHardware/NewHardwareVM.vb +++ b/NewHardware/NewHardwareVM.vb @@ -1,6 +1,7 @@ Imports System.Collections.ObjectModel Imports System.IO Imports EgtWPFLib5 +Imports EgtUILib ' la finestra associata a queta classe serve per gestire la creazione di una copia (ivocata dal bottone Duplica) @@ -21,25 +22,25 @@ Public Class NewHardwareVM Public ReadOnly Property Title As String Get - Return "New Hardware" + Return EgtMsg(50405) End Get End Property Public ReadOnly Property BrandMsg As String Get - Return "Brand" + Return EgtMsg(50052) End Get End Property Public ReadOnly Property TemplateMsg As String Get - Return "Template" + Return EgtMsg(50031) End Get End Property Public ReadOnly Property TypeMsg As String Get - Return "Type" + Return EgtMsg(50009) End Get End Property diff --git a/OptionsWindow/OptionModule.vb b/OptionsWindow/OptionModule.vb index b929b3a..de51329 100644 --- a/OptionsWindow/OptionModule.vb +++ b/OptionsWindow/OptionModule.vb @@ -171,7 +171,7 @@ Friend Module OptionModule ' se non esiste il direttorio If Not Directory.Exists(sTemplateDir) Then ' manntego l'accesso a quello di default - EgtOutLog("Warning : " & sTemplateDir & " does not exist") + EgtOutLog(String.Format(EgtMsg(50180), sTemplateDir)) ' controllo che il direttorio che era stato passato di default esista If Not Directory.Exists(IniFile.m_TemplateDir) Then ' creo il direttorio @@ -186,7 +186,7 @@ Friend Module OptionModule If GetMainPrivateProfileString(S_DOORS, K_MACHINDIR, "", sMachinDir) <> 0 Then If Not Directory.Exists(sMachinDir) Then ' mantengo l'accesso a quello di default - EgtOutLog("Warning : " & sMachinDir & " does not exist") + EgtOutLog(String.Format(EgtMsg(50180), sMachinDir)) ' controllo che il direttorio che era stato passato di default esista Else IniFile.m_MachinProject = sMachinDir diff --git a/OptionsWindow/OptionsViewModel.vb b/OptionsWindow/OptionsViewModel.vb index d40c2bd..f025a11 100644 --- a/OptionsWindow/OptionsViewModel.vb +++ b/OptionsWindow/OptionsViewModel.vb @@ -61,11 +61,11 @@ Public Class OptionsVM If value IsNot OptionModule.m_SelectedOptionLauncher Then OptionModule.m_SelectedOptionLauncher = Trim(value) Select Case OptionModule.m_SelectedOptionLauncher - Case "Open Window" + Case EgtMsg(50206) ' Open Window WriteMainPrivateProfileString(S_LAUNCHERWINDOW, K_LAUNCHER, CStr(0)) - Case "Last Project" + Case EgtMsg(50207) 'Last Project WriteMainPrivateProfileString(S_LAUNCHERWINDOW, K_LAUNCHER, CStr(1)) - Case "Empty" + Case EgtMsg(50208) 'Empty WriteMainPrivateProfileString(S_LAUNCHERWINDOW, K_LAUNCHER, CStr(2)) End Select End If @@ -795,7 +795,8 @@ Public Class OptionsVM Public ReadOnly Property MachinDirectoryMsg As String Get - Return "Directory Machine " + ' Directory Machine + Return EgtMsg(50306) End Get End Property @@ -825,14 +826,16 @@ Public Class OptionsVM Public ReadOnly Property CurrentMachinDirectiry As String Get - Return "Machine" + 'Machine + Return EgtMsg(50307) End Get End Property Public ReadOnly Property DoorMsg As String Get - Return "Door" + 'Door + Return EgtMsg(50308) End Get End Property @@ -969,11 +972,13 @@ Public Class OptionsVM Get Dim Msg As String = String.Empty If OptionModule.m_sDisposition = ConstGen.BEVEL_UP Then - Msg = "Wide Side Down (BU)" + 'Wide Side Down (BU) + Msg = EgtMsg(50309) m_BevelConfiguration = Visibility.Visible m_BySwingConfiguration = Visibility.Collapsed ElseIf OptionModule.m_sDisposition = ConstGen.BEVEL_DOWN Then - Msg = "Wide Side Up (BD)" + 'Wide Side Up (BD) + Msg = EgtMsg(50310) m_BevelConfiguration = Visibility.Visible m_BySwingConfiguration = Visibility.Collapsed Else diff --git a/Order/OrderVM.vb b/Order/OrderVM.vb index a720426..630cd00 100644 --- a/Order/OrderVM.vb +++ b/Order/OrderVM.vb @@ -1,4 +1,5 @@ Imports EgtWPFLib5 +Imports EgtUILib Public Class OrderVM Inherits VMBase @@ -7,45 +8,53 @@ Public Class OrderVM Public ReadOnly Property Title As String Get - Return "Order" + ' Order + Return EgtMsg(50068) End Get End Property Public ReadOnly Property CustomerMsg As String Get - Return "Customer" + ' Customer + Return EgtMsg(50070) End Get End Property Public ReadOnly Property ElevationMsg As String Get - Return "Elevation" + ' Elevation + Return EgtMsg(50406) End Get End Property Public ReadOnly Property ProjectMsg As String Get - Return "Project" + ' Project + Return EgtMsg(50407) End Get End Property Public ReadOnly Property POMsg As String Get - Return "PO" + ' PO + Return EgtMsg(50408) End Get End Property Public ReadOnly Property LineMsg As String Get - Return "Line" + ' Line + Return EgtMsg(50409) End Get End Property Public ReadOnly Property WeightMsg As String Get - Return "Weight" + ' Weight + Return EgtMsg(50047) End Get End Property Public ReadOnly Property SaveMsg As String Get - Return "Save" + ' Save + Return EgtMsg(50410) End Get End Property diff --git a/Print/PrintWndVM.vb b/Print/PrintWndVM.vb index 7e3cbde..4b67adc 100644 --- a/Print/PrintWndVM.vb +++ b/Print/PrintWndVM.vb @@ -15,37 +15,41 @@ Public Class PrintWndVM Public ReadOnly Property Title As String Get - Return "Print" + ' Print + Return EgtMsg(50411) End Get End Property Public ReadOnly Property PrintMsg As String Get - Return "Print" + Return EgtMsg(50411) End Get End Property Public ReadOnly Property CancelMsg As String Get - Return "Cancel" + ' Cancel + Return EgtMsg(50412) End Get End Property Public ReadOnly Property PrintToolTip As String Get - Return "Print" + Return EgtMsg(50411) End Get End Property Public ReadOnly Property HardwareMsg As String Get - Return "Hardware" + ' Hardware + Return EgtMsg(50413) End Get End Property Public ReadOnly Property DimensioningMsg As String Get - Return "Dimensioning" + ' Dimensioning + Return EgtMsg(50414) End Get End Property @@ -109,7 +113,8 @@ Public Class PrintWndVM Dim nImgH As Integer = 4000 Dim sPath As String = m_sTempDir & "\Image.png" If Not EgtGetImage(SM.HIDDENLINE, colWhite, colWhite, nImgW, nImgH, sPath) Then - EgtOutLog("Errore creazione immagine di stampa") + ' Error in creating the print image + EgtOutLog(EgtMsg(50181)) Return End If @@ -138,7 +143,8 @@ Public Class PrintWndVM ' eseguo la stampa printDlg.PrintVisual(tmpImg, "Parts Layout") Catch - EgtOutLog("Errore esecuzione stampa") + ' Rrror in executing print + EgtOutLog(EgtMsg(50182)) End Try End If ' Chiusura finestra diff --git a/ProjectManager/ProjectManagerHardwareVM.vb b/ProjectManager/ProjectManagerHardwareVM.vb index ad973cb..47c69ca 100644 --- a/ProjectManager/ProjectManagerHardwareVM.vb +++ b/ProjectManager/ProjectManagerHardwareVM.vb @@ -81,17 +81,20 @@ Public Class ProjectManagerHardwareVM End Property Public ReadOnly Property DuplicaToolTip As String Get - Return "Duplicate" + ' Duplicate + Return EgtMsg(50415) End Get End Property Public ReadOnly Property DeleteToolTip As String Get - Return "Delete" + ' Delete + Return EgtMsg(50126) End Get End Property Public ReadOnly Property DoorToolTip As String Get - Return "Door" + ' Door + Return EgtMsg(50308) End Get End Property @@ -210,91 +213,91 @@ Public Class ProjectManagerHardwareVM ''' Execute the SendFeedback. This method is invoked by the SendFeedbackCommand. ''' Public Sub SendFeedback() - '' Recupero indirizzo a cui spedire la mail - 'Dim sSupportAddress As String = String.Empty - 'GetMainPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress) - '' se vuoto do messaggio di errore ed esco - 'If String.IsNullOrWhiteSpace(sSupportAddress) Then - ' MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error) - ' Return - 'End If - '' Recupero numero chiave - 'Dim sKey As String = String.Empty - 'EgtGetKeyInfo(sKey) - '' Recupero file del progetto corrente (tipo file .nge) - 'Dim sCurrProject As String = String.Empty - 'EgtGetCurrFilePath(sCurrProject) - '' se nome file vuoto, chiedo se si vuole salvare (file .nge) - 'If String.IsNullOrWhiteSpace(sCurrProject) Then - ' If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then - ' Save() - ' End If - ' EgtGetCurrFilePath(sCurrProject) - ' ' se modificato, chiedo se si vuole salvare - 'Else - ' If EgtGetModified() Then - ' If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then - ' Save() - ' End If - ' End If - 'End If - '' recuro il file DDF associato al file .nge - 'Dim sCurrProjectDDF As String = String.Empty - 'sCurrProjectDDF = IniFile.m_sTempDir & "\CurrPart.ddf" - '' recupero il file di log - 'Dim sFileLog As String = String.Empty - 'sFileLog = IniFile.m_sTempDir & "\EgtDOORCreatorLog1.txt" + ' Recupero indirizzo a cui spedire la mail + Dim sSupportAddress As String = String.Empty + GetMainPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress) + ' se vuoto do messaggio di errore ed esco + If String.IsNullOrWhiteSpace(sSupportAddress) Then + MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error) + Return + End If + ' Recupero numero chiave + Dim sKey As String = String.Empty + EgtGetKeyInfo(sKey) + ' Recupero file del progetto corrente (tipo file .nge) + Dim sCurrProject As String = String.Empty + EgtGetCurrFilePath(sCurrProject) + ' se nome file vuoto, chiedo se si vuole salvare (file .nge) + If String.IsNullOrWhiteSpace(sCurrProject) Then + If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then + Save() + End If + EgtGetCurrFilePath(sCurrProject) + ' se modificato, chiedo se si vuole salvare + Else + If EgtGetModified() Then + If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then + Save() + End If + End If + End If + ' recuro il file DDF associato al file .nge + Dim sCurrProjectDDF As String = String.Empty + sCurrProjectDDF = IniFile.m_sTempDir & "\CurrPart.ddf" + ' recupero il file di log + Dim sFileLog As String = String.Empty + sFileLog = IniFile.m_sTempDir & "\EgtDOORCreatorLog1.txt" - '' Creo zip file da allegare - 'Dim sZipToCreate As String = IniFile.m_sTempDir & "\Feedback.zip" - 'If File.Exists(sZipToCreate) Then - ' File.Delete(sZipToCreate) - 'End If - 'Try - ' Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out) - ' ' aggiungo progetto corrente .nge - ' If File.Exists(sCurrProject) Then - ' zip.AddItem(sCurrProject, "") - ' End If - ' ' aggiungo progetto corrente .ddf - ' If File.Exists(sCurrProjectDDF) Then - ' zip.AddItem(sCurrProjectDDF, "") - ' End If - ' ' aggiungo file log - ' If File.Exists(sFileLog) Then - ' zip.AddItem(sFileLog, "") - ' End If - ' ' aggiungo la cartella Doors - ' If Directory.Exists(IniFile.m_sDoorsDirPath) Then - ' zip.AddItem(IniFile.m_sDoorsDirPath, "Doors") - ' End If - ' zip.Save() - ' End Using - 'Catch ex1 As Exception - ' EgtOutLog("Exception in zip: " & ex1.ToString()) - 'End Try + ' Creo zip file da allegare + Dim sZipToCreate As String = IniFile.m_sTempDir & "\Feedback.zip" + If File.Exists(sZipToCreate) Then + File.Delete(sZipToCreate) + End If + Try + Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out) + ' aggiungo progetto corrente .nge + If File.Exists(sCurrProject) Then + zip.AddItem(sCurrProject, "") + End If + ' aggiungo progetto corrente .ddf + If File.Exists(sCurrProjectDDF) Then + zip.AddItem(sCurrProjectDDF, "") + End If + ' aggiungo file log + If File.Exists(sFileLog) Then + zip.AddItem(sFileLog, "") + End If + ' aggiungo la cartella Doors + If Directory.Exists(IniFile.m_sDoorsDirPath) Then + zip.AddItem(IniFile.m_sDoorsDirPath, "Doors") + End If + zip.Save() + End Using + Catch ex1 As Exception + EgtOutLog("Exception in zip: " & ex1.ToString()) + End Try - '' preparo la mail per il supporto - 'Dim bEx As Boolean = False - 'Try - ' Dim SendFeedbackWindow As New EgtWPFLib5.MapiMailMessage("EgtDOORCreator Feedback - " & sKey) - ' SendFeedbackWindow.Recipients.Add(sSupportAddress) - ' If Not String.IsNullOrWhiteSpace(sZipToCreate) AndAlso File.Exists(sZipToCreate) Then - ' SendFeedbackWindow.Files.Add(IniFile.m_sTempDir & "\Feedback.zip") - ' End If - ' SendFeedbackWindow.ShowDialog() - 'Catch ex As Exception - ' EgtOutLog("Feedback exception: " & ex.ToString) - ' bEx = True - 'End Try - 'If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then - ' MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_EGTDOORCREATOR + 118), MessageBoxButton.OK, MessageBoxImage.Information) - ' ' stampo il messaggio nella StatusBar - ' Map.refStatusBarVM.StatusOutput = EgtMsg(MSG_TOPCOMMANDBAR + 14) - 'Else - ' ' stampo il messaggio nella StatusBar - ' Map.refStatusBarVM.StatusOutput = EgtMsg(MSG_TOPCOMMANDBAR + 14) - 'End If + ' preparo la mail per il supporto + Dim bEx As Boolean = False + Try + Dim SendFeedbackWindow As New EgtWPFLib5.MapiMailMessage("EgtDOORCreator Feedback - " & sKey) + SendFeedbackWindow.Recipients.Add(sSupportAddress) + If Not String.IsNullOrWhiteSpace(sZipToCreate) AndAlso File.Exists(sZipToCreate) Then + SendFeedbackWindow.Files.Add(IniFile.m_sTempDir & "\Feedback.zip") + End If + SendFeedbackWindow.ShowDialog() + Catch ex As Exception + EgtOutLog("Feedback exception: " & ex.ToString) + bEx = True + End Try + If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then + MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_EGTDOORCREATOR + 118), MessageBoxButton.OK, MessageBoxImage.Information) + ' stampo il messaggio nella StatusBar + Map.refStatusBarVM.StatusOutput = EgtMsg(MSG_TOPCOMMANDBAR + 14) + Else + ' stampo il messaggio nella StatusBar + Map.refStatusBarVM.StatusOutput = EgtMsg(MSG_TOPCOMMANDBAR + 14) + End If End Sub #End Region ' SendFeedbackCommand @@ -330,7 +333,8 @@ Public Class ProjectManagerHardwareVM Public Sub Duplica() If Not IsNothing(Map.refHardwarePageVM) And Not IsNothing(Map.refHardwarePageVM.CurrHardware) Then If String.IsNullOrEmpty(Map.refHardwarePageVM.CurrHardware.SelTemplate) Then - MessageBox.Show("Impossible to duplicate Hardware if there is no Hardware selected!", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Exclamation) + ' Impossible to duplicate Hardware if there is no Hardware selected! + MessageBox.Show(EgtMsg(50185), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Exclamation) Return End If If Map.refHardwarePageVM.CurrHardware.SaveControl() = Hardware.SaveResult.nCancel Then @@ -368,10 +372,12 @@ Public Class ProjectManagerHardwareVM Public Sub Delete() If Not IsNothing(Map.refHardwarePageVM) And Not IsNothing(Map.refHardwarePageVM.CurrHardware) Then If String.IsNullOrEmpty(Map.refHardwarePageVM.CurrHardware.SelTemplate) Then - MessageBox.Show("Impossible to delete Hardware if there is no Hardware selected!", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Exclamation) + ' Impossible to delete Hardware if there is no Hardware selected! + MessageBox.Show(EgtMsg(50184), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Exclamation) Return End If - Select Case MessageBox.Show("Some Doors could use this hardware, do you want to proceed deleting?", EgtMsg(50101), MessageBoxButton.YesNo, MessageBoxImage.Exclamation) + 'Some Doors could use this hardware, do you want to proceed deleting? + Select Case MessageBox.Show(EgtMsg(50183), EgtMsg(50101), MessageBoxButton.YesNo, MessageBoxImage.Exclamation) Case MessageBoxResult.Yes Map.refProjectManagerHardwareVM.IsModified = False Dim LastCompoType As CompoType = Map.refHardwarePageVM.CurrHardware.HardwareGeneral diff --git a/ProjectManager/ProjectManagerVM.vb b/ProjectManager/ProjectManagerVM.vb index 7c23345..4da9f26 100644 --- a/ProjectManager/ProjectManagerVM.vb +++ b/ProjectManager/ProjectManagerVM.vb @@ -111,23 +111,27 @@ Public Class ProjectManagerVM Public ReadOnly Property CopyToolTip As String Get - Return "Export to machine" + ' Export to machine + Return EgtMsg(50416) End Get End Property Public ReadOnly Property DuplicaToolTip As String Get - Return "Duplicate" + ' Duplicate + Return EgtMsg(50415) End Get End Property Public ReadOnly Property PrintToolTip As String Get - Return "Print" + ' Print + Return EgtMsg(50411) End Get End Property Public ReadOnly Property HardwareToolTip As String Get - Return "Hardware" + ' Hardware + Return EgtMsg(50413) End Get End Property #End Region ' ToolTip @@ -558,7 +562,7 @@ Public Class ProjectManagerVM If Not IsNothing(Map.refPartPageVM.CurrPart) Then ' Stampo il file correte nella cartella Template Dim SaveFileDialog As New EgtWPFLib5.EgtSaveFileDialog - SaveFileDialog.Title = "New Template" + SaveFileDialog.Title = EgtMsg(50417) SaveFileDialog.Directory = IniFile.m_TemplateDir & "\" SaveFileDialog.Extension = DDT_EXTENSION 'SaveFileDialog.FileName = m_CurrProject.Name & "\" @@ -618,15 +622,19 @@ Public Class ProjectManagerVM Public Sub CopyDDF() 'Verifico che tutto sia salvato, altrimenti esco con messaggio If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified() Then - MessageBox.Show("Project must be saved before copying", EgtMsg(50144), MessageBoxButton.OK, MessageBoxImage.Warning) + ' Project must be saved before copying + MessageBox.Show(EgtMsg(50186), EgtMsg(50144), MessageBoxButton.OK, MessageBoxImage.Warning) Return End If - Dim sMsg As String = "Do you want to copy all files ?" & vbCrLf & vbCrLf & "(No to copy only the current file)" - Dim Result = MessageBox.Show(sMsg, "Export to machine", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) + ' Do you want to copy all files ? {0} (No to copy only the current file) + Dim sMsg As String = String.Format(EgtMsg(50187), vbCrLf & vbCrLf) + ' Export to machine + Dim Result = MessageBox.Show(sMsg, EgtMsg(50188), MessageBoxButton.YesNoCancel, MessageBoxImage.Question) Dim CurrProjetc As String = Map.refAssemblyManagerVM.CurrProject.Name Dim MachinProject As String = IniFile.m_MachinProject If String.IsNullOrEmpty(MachinProject) Then - MessageBox.Show("Machine Directory not found", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error) + ' Machine Directory not found + MessageBox.Show(EgtMsg(50189), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error) Return End If Select Case Result @@ -639,7 +647,8 @@ Public Class ProjectManagerVM Try File.Copy(SouFile, DestFile, True) Catch ex As System.IO.IOException - MessageBox.Show("Error in copying: " & ex.Message) + ' Error in copying: {0} + MessageBox.Show(String.Format(EgtMsg(50189), ex.Message)) Exit For End Try End If @@ -650,7 +659,8 @@ Public Class ProjectManagerVM Try File.Copy(SouFile, DestFile, True) Catch ex As System.IO.IOException - MessageBox.Show("Error in copying: " & ex.Message) + ' Error in copying: {0} + MessageBox.Show(String.Format(EgtMsg(50189), ex.Message)) End Try Case Else End Select @@ -672,7 +682,8 @@ Public Class ProjectManagerVM Public Sub Duplica() If IsNothing(Map.refAssemblyManagerVM.CurrProject) Then Return If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified() Then - MessageBox.Show("Project must be saved before copying", EgtMsg(50144), MessageBoxButton.OK, MessageBoxImage.Warning) + ' Project must be saved before copying + MessageBox.Show(EgtMsg(50186), EgtMsg(50144), MessageBoxButton.OK, MessageBoxImage.Warning) Return End If Dim LocalCurrProject As New Project @@ -680,7 +691,8 @@ Public Class ProjectManagerVM ' Creo nuovo assembly ' Lancio la finestra per chiedere il nome dell'assemblato Dim SaveFileDialog As New EgtWPFLib5.EgtSaveFileDialog - SaveFileDialog.Title = "New Door" + ' New Door + SaveFileDialog.Title = EgtMsg(50113) SaveFileDialog.Directory = LocalCurrProject.Name SaveFileDialog.Extension = DDF_EXTENSION ' Se annullo esco @@ -729,7 +741,8 @@ Public Class ProjectManagerVM Try File.Copy(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name, Local_AssemblyName.Name, True) Catch ex As System.IO.IOException - MessageBox.Show("Error in copying: " & ex.Message) + ' Error in copying: {0} + MessageBox.Show(String.Format(EgtMsg(50190), ex.Message)) ' interrompo la copia e la creazione del nuovo file File.Delete(Local_AssemblyName.Name) Return @@ -786,7 +799,8 @@ Public Class ProjectManagerVM Public Sub Print(ByVal param As Object) If IsNothing(Map.refAssemblyManagerVM.CurrProject) Then Return If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified() Then - MessageBox.Show("Project must be saved before printing", EgtMsg(50144), MessageBoxButton.OK, MessageBoxImage.Warning) + ' Project must be saved before printing + MessageBox.Show(EgtMsg(50186), EgtMsg(50144), MessageBoxButton.OK, MessageBoxImage.Warning) Return End If Dim PrintWindow As New PrintWndV(Application.Current.MainWindow, New PrintWndVM) diff --git a/SceneManager/DimensioningPanel/DimensioningPanelV.xaml b/SceneManager/DimensioningPanel/DimensioningPanelV.xaml index f046bab..b0fe196 100644 --- a/SceneManager/DimensioningPanel/DimensioningPanelV.xaml +++ b/SceneManager/DimensioningPanel/DimensioningPanelV.xaml @@ -7,7 +7,8 @@ Visibility="{Binding DimensioningPanel_Visibility}"> + Style="{StaticResource GridViewPanelToggleButton}" + ToolTip="{Binding DimensionToolTip}"> diff --git a/SceneManager/DimensioningPanel/DimensioningPanelVM.vb b/SceneManager/DimensioningPanel/DimensioningPanelVM.vb index 8157c7a..55cad63 100644 --- a/SceneManager/DimensioningPanel/DimensioningPanelVM.vb +++ b/SceneManager/DimensioningPanel/DimensioningPanelVM.vb @@ -1,12 +1,14 @@ Imports System.Collections.ObjectModel Imports EgtWPFLib5 +Imports EgtUILib Public Class DimensioningPanelVM Inherits VMBase - Public ReadOnly Property DimensionMsg As String + Public ReadOnly Property DimensionToolTip As String Get - Return "Dimension" + ' Dimension + Return EgtMsg(50418) End Get End Property