EgtDOORCreator 2.2j2:
-> aggiunto la possibilità di configurare di non comunicare il messaggio di Configurazione sbagliata (AskMeAgaingConfirm = 0).
This commit is contained in:
@@ -119,6 +119,8 @@ Public Class CompoPanelVM
|
||||
For IndexCompoType As Integer = 0 To Map.refCompoPanelHardwareVM.CompoTypeList.Count - 1
|
||||
If m_CurrCompoType.Name <> Map.refCompoPanelHardwareVM.CompoTypeList(IndexCompoType).Name Then
|
||||
Map.refCompoPanelHardwareVM.CompoTypeList(IndexCompoType).IsSelectedBtn = False
|
||||
Else
|
||||
Map.refCompoPanelHardwareVM.CompoTypeList(IndexCompoType).IsSelectedBtn = True
|
||||
End If
|
||||
Next
|
||||
' ogni volta che clicco il bottone definisco un nuovo Hardware
|
||||
|
||||
@@ -38,6 +38,7 @@ Module ConstIni
|
||||
Public Const K_DOORDIMENSION As String = "DoorDimensions"
|
||||
Public Const K_HARDWAREDIMENSION As String = "HardwareDimensions"
|
||||
Public Const K_INVERTBEVEL As String = "DisableInvertBevel"
|
||||
Public Const K_ASKMEAGAINCONFIRM As String = "AskMeAgainConfirm"
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
|
||||
+8
-6
@@ -932,12 +932,14 @@ Friend Module DdfFile
|
||||
Return "Frame Top"
|
||||
Case ConstGen.PART_FRAME_BOTTOM
|
||||
' eseguo un controllo per verifiacre che sia attivo
|
||||
If Not Map.refAssemblyPageVM.CurrAssembly.Exterior Then
|
||||
Dim FB As PartDoor = Map.refAssemblyManagerVM.ReserchPartDoor("FB_")
|
||||
If Not IsNothing(FB) Then
|
||||
FB.Door.SetIsActive(False)
|
||||
Else
|
||||
FB.Door.SetIsActive(True)
|
||||
If Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nHardwarePage Then
|
||||
If Not Map.refAssemblyPageVM.CurrAssembly.Exterior Then
|
||||
Dim FB As PartDoor = Map.refAssemblyManagerVM.ReserchPartDoor("FB_")
|
||||
If Not IsNothing(FB) Then
|
||||
FB.Door.SetIsActive(False)
|
||||
Else
|
||||
FB.Door.SetIsActive(True)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return "Frame Bottom"
|
||||
|
||||
+53
-13
@@ -28,7 +28,7 @@ Public Class Compo
|
||||
Implements INotifyPropertyChanged
|
||||
Friend TempFileDDF As String = IniFile.m_sTempDir & "\" & TEMP_FILE
|
||||
' permette di bloccare il refresh della componente singola (solo se nell'Hardwaremanagaer)
|
||||
Friend Shared DoRefreshCompo As Boolean = False
|
||||
Friend Shared DoRefreshCompo As Boolean = True
|
||||
|
||||
Friend LoadDefaultFromLua As Boolean = True
|
||||
|
||||
@@ -1879,7 +1879,9 @@ Public Class Compo
|
||||
Private Function LoadParamFromLua(sValue As String, ByRef CurrCompoParam As CompoParam) As Boolean
|
||||
If TypeOf CurrCompoParam Is TextBoxOnOffParam Then
|
||||
Dim TempParam As TextBoxOnOffParam = DirectCast(CurrCompoParam, TextBoxOnOffParam)
|
||||
If Not TempParam.EnableCopy then Return False
|
||||
If Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nHardwarePage Then
|
||||
If Not TempParam.EnableCopy Then Return False
|
||||
End If
|
||||
Dim ReadValue = RegexFunction.Brackets(sValue)
|
||||
If ReadValue.Contains("DGD.dW") Then
|
||||
ReadValue = sValue.Replace(ReadValue & ")", "W")
|
||||
@@ -1899,7 +1901,9 @@ Public Class Compo
|
||||
Return True
|
||||
ElseIf TypeOf CurrCompoParam Is TextBoxParam Then
|
||||
Dim TempParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
|
||||
If Not TempParam.EnableCopy then Return False
|
||||
If Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nHardwarePage Then
|
||||
If Not TempParam.EnableCopy Then Return False
|
||||
End If
|
||||
Dim ReadValue = RegexFunction.Brackets(sValue)
|
||||
If ReadValue.Contains("DGD.dW") Then
|
||||
ReadValue = sValue.Replace(ReadValue & ")", "W")
|
||||
@@ -1918,7 +1922,9 @@ Public Class Compo
|
||||
Return True
|
||||
ElseIf TypeOf CurrCompoParam Is ComboBoxOnOffParam Then
|
||||
Dim TempParam As ComboBoxOnOffParam = DirectCast(CurrCompoParam, ComboBoxOnOffParam)
|
||||
If TempParam.EnableCopy then Return False
|
||||
If Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nHardwarePage Then
|
||||
If Not TempParam.EnableCopy Then Return False
|
||||
End If
|
||||
Dim ReadValue = Trim(sValue)
|
||||
For Each Item In TempParam.ItemListDDF
|
||||
If Trim(Item).ToLower = ReadValue.ToLower Then
|
||||
@@ -1930,7 +1936,9 @@ Public Class Compo
|
||||
Return True
|
||||
ElseIf TypeOf CurrCompoParam Is ComboBoxParam Then
|
||||
Dim TempParam As ComboBoxParam = DirectCast(CurrCompoParam, ComboBoxParam)
|
||||
If TempParam.EnableCopy then Return False
|
||||
If Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nHardwarePage Then
|
||||
If Not TempParam.EnableCopy Then Return False
|
||||
End If
|
||||
Dim ReadValue = Trim(sValue)
|
||||
For Each Item In TempParam.ItemList
|
||||
If Trim(Item) = ReadValue Then
|
||||
@@ -2089,11 +2097,12 @@ Public Class Compo
|
||||
Public Sub GoToHardware()
|
||||
' blocco la posssiblità di aggiornare la parte grafica
|
||||
DoRefreshCompo = False
|
||||
Dim sErrorMsg As String = String.Empty
|
||||
If Not IsNothing(Map.refProjectManagerVM) Then
|
||||
Map.refProjectManagerVM.GoToHardwarePage()
|
||||
End If
|
||||
If Not IsNothing(Map.refCompoPanelVM) Then
|
||||
Map.refCompoPanelVM.CompoBtn(Me.CompoType)
|
||||
If Not IsNothing(Map.refCompoPanelVM) And Not IsNothing(m_CompoType) Then
|
||||
Map.refCompoPanelVM.CompoBtn(m_CompoType)
|
||||
Dim bBrandExists As Boolean = False
|
||||
If Not IsNothing(Map.refHardwarePageVM.CurrHardware) Then
|
||||
For Each ItemBrand In m_CompoType.HardwareFolderList
|
||||
@@ -2113,10 +2122,10 @@ Public Class Compo
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
MessageBox.Show(String.Format(EgtMsg(50565), m_SelBrandPart), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
sErrorMsg = String.Format(EgtMsg(50565), m_SelBrandPart)
|
||||
End If
|
||||
If Not bFileExists Then
|
||||
MessageBox.Show(String.Format(EgtMsg(50566), m_SelFile), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
If bBrandExists AndAlso Not bFileExists Then
|
||||
sErrorMsg = String.Format(EgtMsg(50566), m_SelFile)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -2124,7 +2133,9 @@ Public Class Compo
|
||||
If Not IsNothing(Map.refSceneManagerVM) Then
|
||||
Map.refSceneManagerVM.RefreshBtn()
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(sErrorMsg) Then
|
||||
MessageBox.Show(sErrorMsg, EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' GoToHardware
|
||||
@@ -2684,9 +2695,22 @@ Public Class ComboBoxParam
|
||||
Set(value As String)
|
||||
m_SelItem = value
|
||||
SetModified()
|
||||
|
||||
' riconosco la ComboBox corrente
|
||||
Dim IsGeometryList As Boolean = False
|
||||
For Each ItemParam In CurrCompo.CompoParamList
|
||||
If ItemParam.DDFName = DDFName Then
|
||||
' se il tipo è LUA allora devo ricaricare la listeìa delle geometrie
|
||||
If TypeOf ItemParam Is ComboBoxParamLua Then
|
||||
IsGeometryList = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
' gestione diversificata errori per DoorCreator e HardwareManager
|
||||
If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage AndAlso
|
||||
Not IsNothing(Map.refHardwarePageVM) AndAlso Not IsNothing(Map.refHardwarePageVM.CurrHardware) Then
|
||||
Not IsNothing(Map.refHardwarePageVM) AndAlso Not IsNothing(Map.refHardwarePageVM.CurrHardware) AndAlso IsGeometryList Then
|
||||
If Me.CurrCompo.TemplateDDFName <> MATCHING_FILE_TEMPLATE AndAlso Me.CurrCompo.TemplateDDFName <> MATCHING_FILE_TEMPLATE_DOOR Then
|
||||
' se sono nell'HardwarePage ricarico la lista dei nomi geometrie
|
||||
Dim CurrList As ObservableCollection(Of String) = Map.refHardwarePageVM.CurrHardware.GetCurrentListGeometry(CurrCompo.CompoType.DDFName, DDFName)
|
||||
@@ -2724,7 +2748,7 @@ Public Class ComboBoxParam
|
||||
Dim IndexP As Integer = CurrCompo.CompoParamList.IndexOf(Me)
|
||||
|
||||
' se il nome della combobox è side ed esiste un riferimento
|
||||
If CmpPar.DDFName.ToLower = K_SIDE.ToLower Then
|
||||
If CmpPar.DDFName.ToLower = K_SIDE.ToLower AndAlso Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nHardwarePage Then
|
||||
' se esiste una componente allora deve essere cancellata per essere nuovamente riposizionata
|
||||
Dim sSide As String = String.Empty
|
||||
If Not IsNothing(CurrCompo.refJambCompo) Then Map.refPartPageVM.CurrPart.RemoveCompo(CurrCompo, True)
|
||||
@@ -2738,6 +2762,22 @@ Public Class ComboBoxParam
|
||||
End If
|
||||
End If
|
||||
Map.refAssemblyPageVM.CurrAssembly.CreateCompoOnJamb(CurrCompo, Trim(sSide))
|
||||
ElseIf CmpPar.DDFName.ToLower = K_SIDE.ToLower AndAlso Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage AndAlso
|
||||
Not IsNothing(Map.refHardwarePageVM.GenericPart) AndAlso Map.refHardwarePageVM.GenericPart.TypePart.Contains("F") Then
|
||||
Dim sSide As String = String.Empty
|
||||
Dim IndexItemDDF As Integer = m_ItemList.IndexOf(m_SelItem)
|
||||
If IndexItemDDF > -1 AndAlso IndexItemDDF <= m_ItemListDDF(IndexItemDDF).Count - 1 Then
|
||||
sSide = m_ItemListDDF(IndexItemDDF)
|
||||
End If
|
||||
Select Case sSide
|
||||
Case "bottom"
|
||||
Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_BOTTOM
|
||||
Case "top"
|
||||
Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_TOP
|
||||
Case Else
|
||||
Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_LEFT
|
||||
End Select
|
||||
|
||||
End If
|
||||
|
||||
' significa che sto modificando una componente del telaio
|
||||
|
||||
@@ -8,10 +8,13 @@ Public Class Part
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
' queste variabili servono per getsire le ripezioni dei messaggi durante il caricamento degli assemblati
|
||||
|
||||
' in fase di lettura diventa vero dopo aver caricato il primo dei part del ddf
|
||||
Friend Shared bFirstConfigRead As Boolean = False
|
||||
' questa variabile è stata definita condovisa per permettere di essere inizializzata alla prima lettura del DDF
|
||||
Public Shared FirstReadingEdge As Boolean = False
|
||||
' per disabilitare la richiesta di confermare la configurazione
|
||||
Public Shared LastPartName As String = String.Empty
|
||||
|
||||
' costruisco il riferimento con l'oggetto PartDoor che ospita il Part
|
||||
Private m_refPartDoor As PartDoor
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
Dim ListControl As ListBox=DirectCast(sender,listbox)
|
||||
If Not IsNothing( ListControl.SelectedItem) Then
|
||||
Dim SelectedItemIndex As Integer = ListControl.Items.IndexOf(ListControl.SelectedItem)
|
||||
If SelectedItemIndex < 0 Then Return
|
||||
ListControl.Dispatcher.BeginInvoke(DirectCast(Sub()
|
||||
ListControl.UpdateLayout()
|
||||
If ListControl.SelectedItem IsNot Nothing Then
|
||||
|
||||
@@ -809,6 +809,7 @@ Public Class Hardware
|
||||
End If
|
||||
ParamIndex += 1
|
||||
End While ' termina lettura del capitolo
|
||||
|
||||
GroupChapters.Add(Chapter)
|
||||
ParamIndex = 1
|
||||
ChapterIndex += 1
|
||||
|
||||
@@ -63,6 +63,8 @@ Friend Module OptionModule
|
||||
WebBrowserPC
|
||||
End Enum
|
||||
|
||||
Friend m_AskMeAgainConfirm As Boolean = False
|
||||
|
||||
Friend m_DisableHM As Boolean = False
|
||||
Friend m_DisableDeleteCommandHM As Boolean = False
|
||||
Friend m_CompoPanelFrameVisibility As Visibility = Visibility.Visible
|
||||
@@ -312,6 +314,8 @@ Friend Module OptionModule
|
||||
|
||||
m_DimensionHardware = If(GetMainPrivateProfileInt(S_REPORT, K_HARDWAREDIMENSION, 0) = 1, Visibility.Visible, Visibility.Collapsed)
|
||||
|
||||
m_AskMeAgainConfirm = If(GetMainPrivateProfileInt(S_GENERAL, K_ASKMEAGAINCONFIRM, 1) = 1, True, False)
|
||||
|
||||
' leggo il tipo di Bevel selezionato
|
||||
DefaultGetPrivateProfilesBevel(S_EDGE, K_BEVELU_INI, m_bBevelUp)
|
||||
DefaultGetPrivateProfilesBevel(S_EDGE, K_BEVELD_INI, m_bBevelDown)
|
||||
|
||||
@@ -537,7 +537,7 @@ Public Class ProjectManagerHardwareVM
|
||||
' abilito DimensioningPanel
|
||||
Map.refDimensioningPanelVM.SetDimensioningPanel_Visibility(True)
|
||||
'riporto la vista a top
|
||||
Map.refSceneManagerVM.ProjectScene.SetStatusNull()
|
||||
'Map.refSceneManagerVM.ProjectScene.SetStatusNull()
|
||||
EgtSetView(VT.TOP, False)
|
||||
EgtZoom(ZM.ALL, False)
|
||||
' torna all'EgtDOORCreator
|
||||
|
||||
+11
-1
@@ -51,7 +51,13 @@ Module RegexFunction
|
||||
Friend Function RemoveComment(sLine As String) As String
|
||||
sLine = sLine.Replace(DDF_METADATA, "§")
|
||||
If sLine.Contains("#"c) Then
|
||||
If Not Part.bFirstConfigRead Then
|
||||
Dim bIgnoreConfig As Boolean = False
|
||||
If Not IsNothing(Map.refAssemblyManagerVM) AndAlso Not IsNothing(Map.refAssemblyManagerVM.CurrProject) AndAlso
|
||||
Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
|
||||
Not OptionModule.m_AskMeAgainConfirm Then
|
||||
bIgnoreConfig = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name = Part.LastPartName
|
||||
End If
|
||||
If Not bIgnoreConfig AndAlso Not Part.bFirstConfigRead Then
|
||||
Part.bFirstConfigRead = ReadConfig(sLine)
|
||||
End If
|
||||
sLine = Regex.Match(sLine, "\s*(.*?)\s*#.*$").Groups(1).Value
|
||||
@@ -67,6 +73,8 @@ Module RegexFunction
|
||||
|
||||
' legge la configurazione scritta nelle linee di commento
|
||||
Friend Function ReadConfig(sLine As String) As Boolean
|
||||
' annullo l'ultiam selezione fatta
|
||||
Part.LastPartName = String.Empty
|
||||
' Se non c'è Config esco
|
||||
If Not sLine.Contains("Config") Then Return False
|
||||
' Processo il tipo di configurazione
|
||||
@@ -94,6 +102,8 @@ Module RegexFunction
|
||||
EgtExit()
|
||||
Application.Current.MainWindow.Close()
|
||||
End
|
||||
Else
|
||||
Part.LastPartName = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -49,10 +49,10 @@ Public Class InstrumentPanelVM
|
||||
If bGetDistanceIsChecked Then
|
||||
Map.refSceneManagerVM.ProjectScene.SetStatusGetDistance()
|
||||
Else
|
||||
Map.refSceneManagerVM.ProjectScene.ResetStatusGetDistance()
|
||||
If m_DimensionVisibility = Visibility.Collapsed Then
|
||||
Map.refSceneManagerVM.ProjectScene.SetStatusNull()
|
||||
End If
|
||||
Map.refSceneManagerVM.ProjectScene.ResetStatusGetDistance()
|
||||
Dim rfStatusBarVM As StatusBarVM = Map.refStatusBarVM
|
||||
rfStatusBarVM.StatusOutput = String.Empty
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user