From 7bdee2479d4d2baa8e313ac3c4000f790b2e400f Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Wed, 27 Nov 2019 13:12:30 +0000 Subject: [PATCH] =?UTF-8?q?DOORCreator=202.1k2=20:=20->=20correzione=20ape?= =?UTF-8?q?rtura=20dello=20stesso=20file=20in=20modalit=C3=A0=20porta=20si?= =?UTF-8?q?ngola.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DoorParameters/Compo.vb | 3 ++- DoorParameters/Part.vb | 14 ++++++++------ ProjectManager/ProjectManagerVM.vb | 2 ++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/DoorParameters/Compo.vb b/DoorParameters/Compo.vb index cefc125..b64d41f 100644 --- a/DoorParameters/Compo.vb +++ b/DoorParameters/Compo.vb @@ -2150,7 +2150,8 @@ Public Class TextBoxParam ErrorInReading = False MissingParameterInReading = False m_Value = sValue - If String.IsNullOrEmpty( sValue) then + If sValue.Contains("$") then + m_Value = "" EnableCopy = False End If End If diff --git a/DoorParameters/Part.vb b/DoorParameters/Part.vb index c602cb3..70114e8 100644 --- a/DoorParameters/Part.vb +++ b/DoorParameters/Part.vb @@ -2704,14 +2704,16 @@ Public Class Part If String.Equals(Trim(CompoTemplateItem.CompoParamList(IndexParam).DDFName), GetKey(sLine)) Then ' se la stringa c'è nel DDF vuol dire che è stata selezionata Dim sVal As String = GetValueWithKey(sLine, Trim(CurrCompoParam.DDFName)) - ' DirectCast(CurrCompoParam, TextBoxOnOffParam).m_Value = sVal - DirectCast(CurrCompoParam, TextBoxOnOffParam).Value = sVal + DirectCast(CurrCompoParam, TextBoxOnOffParam).m_Value = sVal + 'DirectCast(CurrCompoParam, TextBoxOnOffParam).Value = sVal Dim dVal As Double If String.IsNullOrEmpty(sVal) OrElse Not StringToDouble(sVal, dVal) Then - CompoTemplateItem.ErrorValue = True - CurrCompoParam.ErrorInReading = True - End If - DirectCast(CurrCompoParam, TextBoxOnOffParam).SetIsActive(True) + CompoTemplateItem.ErrorValue = False + CurrCompoParam.ErrorInReading = False + DirectCast(CurrCompoParam, TextBoxOnOffParam).SetIsActive(False) + Else + DirectCast(CurrCompoParam, TextBoxOnOffParam).SetIsActive(True) + End If ' se il nome esiste ma è sbagliato ElseIf Not String.IsNullOrWhiteSpace(GetKey(sLine)) Then ' significa che la TextBoxOnOff è stata disattivata diff --git a/ProjectManager/ProjectManagerVM.vb b/ProjectManager/ProjectManagerVM.vb index ce4f129..1e8c203 100644 --- a/ProjectManager/ProjectManagerVM.vb +++ b/ProjectManager/ProjectManagerVM.vb @@ -615,6 +615,7 @@ Public Class ProjectManagerVM End If Return End If + Utility.UnLockDir() ' salvo il nome del direttorio sFilePath = Path.GetDirectoryName(fd.FileName) ' salvo il nome completo del file @@ -777,6 +778,7 @@ Public Class ProjectManagerVM Public Sub OpenMruFile(ByVal param As Object) Dim sLastProject As String = DirectCast(param, String).Replace("__", "_") + Utility.UnLockDir() OpenProject(sLastProject) End Sub