OmagOFFICE 1.9k1 :
- aggiunta gestione angoli di fianco con tallone (bisello) - ora angolo verso esterno mantiene dimensione totale del pezzo - gestione ventose con asse rotante a step (STEPS=Val1,Val2,... in GEO di asse) - aggiunta gestione accorciamento fresate negli angoli - sistemazione dati TRF da compo e aggiunta codice pezzo - in DB utensili con nuova lama creazione/aggiornamento note speciali Hofmann - abilitazione bottoni UnderCut e DripDrill sempre da chiave - aggiunto secondo offset nei tagli da sotto - modifiche a componenti per import DXF e nome su linea separata - dati TRF non più richiesti per default sui componenti
This commit is contained in:
@@ -23,6 +23,10 @@
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding OrdDesc}"/>
|
||||
|
||||
<TextBlock Text="{Binding PartCodeMsg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding PartCode}"/>
|
||||
|
||||
<TextBlock Text="{Binding MatCodeMsg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding MatCode}"/>
|
||||
|
||||
@@ -24,6 +24,16 @@ Public Class CompoTrfDataWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_PartCode As String
|
||||
Public Property PartCode As String
|
||||
Get
|
||||
Return m_PartCode
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_PartCode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_MatCode As String
|
||||
Public Property MatCode As String
|
||||
Get
|
||||
@@ -74,6 +84,12 @@ Public Class CompoTrfDataWindowVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property PartCodeMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_DRAWPAGEUC + 16)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MatCodeMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_DRAWPAGEUC + 12)
|
||||
@@ -106,17 +122,19 @@ Public Class CompoTrfDataWindowVM
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sMatCode As String, sSurfCode As String, dTh As Double)
|
||||
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sPartCode As String, sMatCode As String, sSurfCode As String, dTh As Double)
|
||||
OrdCode = sOrdCode
|
||||
OrdDesc = sOrdDesc
|
||||
PartCode = sPartCode
|
||||
MatCode = sMatCode
|
||||
SurfCode = sSurfCode
|
||||
Thickness = LenToString(dTh, 2)
|
||||
End Sub
|
||||
|
||||
Friend Sub GetData(ByRef sOrdCode As String, ByRef sOrdDesc As String, ByRef sMatCode As String, ByRef sSurfCode As String, ByRef dTh As Double)
|
||||
Friend Sub GetData(ByRef sOrdCode As String, ByRef sOrdDesc As String, sPartCode As String, ByRef sMatCode As String, ByRef sSurfCode As String, ByRef dTh As Double)
|
||||
sOrdCode = OrdCode
|
||||
sOrdDesc = OrdDesc
|
||||
sPartCode = PartCode
|
||||
sMatCode = MatCode
|
||||
sSurfCode = SurfCode
|
||||
StringToLen(Thickness, dTh)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
IsChecked="{Binding Drip_IsChecked}"
|
||||
Style="{StaticResource CompoWindow_ToggleButton}"
|
||||
Margin="2.5,0,0,0"
|
||||
IsEnabled="True"/>
|
||||
IsEnabled="{Binding Drip_IsEnabled}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<ItemsControl ItemsSource="{Binding CompoList}"
|
||||
|
||||
@@ -147,6 +147,7 @@ Public Class CompoListPageVM
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_Drip_IsEnabled = value
|
||||
NotifyPropertyChanged("Drip_IsEnabled")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -227,6 +228,7 @@ Public Class CompoListPageVM
|
||||
End If
|
||||
' lancio inizializzazione CompoManager
|
||||
CompoWindowMap.refCompoManagerVM.InitCompoManager()
|
||||
Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT)
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshCompoList()
|
||||
|
||||
@@ -106,6 +106,50 @@ Public Class CompoManagerVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Trf Data
|
||||
Private m_bTrfData As Boolean = False
|
||||
Public ReadOnly Property bTrfData As Boolean
|
||||
Get
|
||||
Return m_bTrfData
|
||||
End Get
|
||||
End Property
|
||||
Private m_bTrfOrderCode As String = ""
|
||||
Public ReadOnly Property bTrfOrderCode As Boolean
|
||||
Get
|
||||
Return m_bTrfOrderCode
|
||||
End Get
|
||||
End Property
|
||||
Private m_bTrfOrderDesc As String = ""
|
||||
Public ReadOnly Property bTrfOrderDesc As Boolean
|
||||
Get
|
||||
Return m_bTrfOrderDesc
|
||||
End Get
|
||||
End Property
|
||||
Private m_bTrfPartCode As String = ""
|
||||
Public ReadOnly Property bTrfPartCode As Boolean
|
||||
Get
|
||||
Return m_bTrfPartCode
|
||||
End Get
|
||||
End Property
|
||||
Private m_bTrfMatCode As String = ""
|
||||
Public ReadOnly Property bTrfMatCode As Boolean
|
||||
Get
|
||||
Return m_bTrfMatCode
|
||||
End Get
|
||||
End Property
|
||||
Private m_bTrfSurfCode As String = ""
|
||||
Public ReadOnly Property bTrfSurfCode As Boolean
|
||||
Get
|
||||
Return m_bTrfSurfCode
|
||||
End Get
|
||||
End Property
|
||||
Private m_bTrfThickness As Double = 0
|
||||
Public ReadOnly Property bTrfThickness As Boolean
|
||||
Get
|
||||
Return m_bTrfThickness
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property TopMsg As String
|
||||
@@ -138,6 +182,7 @@ Public Class CompoManagerVM
|
||||
|
||||
' definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdTrfData As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
@@ -170,6 +215,14 @@ Public Class CompoManagerVM
|
||||
' assegno valori di default numero e nome pezzi
|
||||
PartNum = 1.ToString
|
||||
PartName = String.Empty
|
||||
' Reset dati TRF
|
||||
m_bTrfOrderCode = ""
|
||||
m_bTrfOrderDesc = ""
|
||||
m_bTrfPartCode = ""
|
||||
m_bTrfMatCode = ""
|
||||
m_bTrfSurfCode = ""
|
||||
m_bTrfThickness = 0
|
||||
|
||||
If Not CompoWindowMap.refCompoWindowVM.bTrfData Then
|
||||
TrfData_Visibility = Windows.Visibility.Collapsed
|
||||
Else
|
||||
@@ -224,6 +277,30 @@ Public Class CompoManagerVM
|
||||
|
||||
#End Region ' OkCommand
|
||||
|
||||
#Region "TrfDataCommand"
|
||||
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
Public ReadOnly Property TrfDataCommand() As ICommand
|
||||
Get
|
||||
If m_cmdOk Is Nothing Then
|
||||
m_cmdOk = New Command(AddressOf Ok)
|
||||
End If
|
||||
Return m_cmdOk
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Sub TrfData(ByVal param As Object)
|
||||
Dim DlgTrfDataVM As New CompoTrfDataWindowVM()
|
||||
Dim DlgTrfDataV As New CompoTrfDataWindowV(Application.Current.MainWindow, DlgTrfDataVM)
|
||||
DlgTrfDataVM.SetData(m_bTrfOrderCode, m_bTrfOrderDesc, m_bTrfPartCode, m_bTrfMatCode, m_bTrfSurfCode, m_bTrfThickness)
|
||||
If DlgTrfDataV.ShowDialog() Then
|
||||
DlgTrfDataVM.GetData(m_bTrfOrderCode, m_bTrfOrderDesc, m_bTrfPartCode, m_bTrfMatCode, m_bTrfSurfCode, m_bTrfThickness)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' TrfDataCommand
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -112,7 +112,7 @@ Public Class CompoWindowVM
|
||||
|
||||
' Abilitazione Nome/TrfData
|
||||
m_bTrfData = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.TRF_IMPORT) And
|
||||
(GetMainPrivateProfileInt(S_COMPO, K_TRFDATA, 1) <> 0)
|
||||
(GetMainPrivateProfileInt(S_COMPO, K_TRFDATA, 0) <> 0)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
@@ -190,8 +190,75 @@ Public Class CompoWindowVM
|
||||
End While
|
||||
' Calcolo dimensione ingombro Pezzo tramite OutLoop
|
||||
Dim nOutLoopLayer = EgtGetFirstNameInGroup(Pz, NAME_OUTLOOP)
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtGetBBoxGlob(nOutLoopLayer, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nOutLoopLayer, GDB_BB.STANDARD, b3Part)
|
||||
' Muovo la regione in Z per evitare problemi in visualizzazione
|
||||
EgtMove(nRegLayId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
||||
' Se pezzo con dati normali
|
||||
If Not m_bTrfData Then
|
||||
' Se definito nome lo inserisco nel testo
|
||||
If Not String.IsNullOrWhiteSpace(sName) Then
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = String.Empty
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
Dim sNewText = sName & "<br/>" & sText
|
||||
EgtModifyText(nTextId, sNewText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
End If
|
||||
' altrimenti se pezzo con dati TRF
|
||||
Else
|
||||
' Nome da dati Trf
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = CompoWindowMap.refCompoManagerVM.bTrfOrderCode & "-" & CompoWindowMap.refCompoManagerVM.bTrfOrderDesc
|
||||
Dim sText2 As String = CompoWindowMap.refCompoManagerVM.bTrfMatCode & "-" & CompoWindowMap.refCompoManagerVM.bTrfSurfCode
|
||||
Dim sText3 As String = LenToString(b3Part.DimX(), 0) & " x " & LenToString(b3Part.DimY(), 0) & " x " & LenToString(CompoWindowMap.refCompoManagerVM.bTrfThickness, 0)
|
||||
Dim dRatio As Double = Math.Max(b3Part.DimX(), b3Part.DimY()) / Math.Min(b3Part.DimX(), b3Part.DimY())
|
||||
If dRatio < 5 Then
|
||||
sText = sText & "<br/>" & sText2 & "<br/>" & sText3
|
||||
Else
|
||||
sText = sText & " " & sText2 & " " & sText3
|
||||
End If
|
||||
EgtModifyText(nTextId, sText)
|
||||
Dim ptCen As Point3d
|
||||
EgtCenterPoint(nTextId, ptCen)
|
||||
Dim b3Text As New BBox3d
|
||||
EgtGetBBoxGlob(nTextId, GDB_BB.STANDARD, b3Text)
|
||||
Dim dCoeff As Double = Math.Min(b3Part.DimX() / b3Text.DimX(), b3Part.DimY() / b3Text.DimY()) / 1.25
|
||||
If dCoeff < 1 Then
|
||||
EgtScale(nTextId, New Frame3d(ptCen), dCoeff, dCoeff, dCoeff)
|
||||
End If
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
' Info di pezzo da dati Trf
|
||||
EgtSetInfo(Pz, "OC", CompoWindowMap.refCompoManagerVM.bTrfOrderCode)
|
||||
EgtSetInfo(Pz, "OD", CompoWindowMap.refCompoManagerVM.bTrfOrderDesc)
|
||||
EgtSetInfo(Pz, "PC", CompoWindowMap.refCompoManagerVM.bTrfPartCode)
|
||||
EgtSetInfo(Pz, "MT", CompoWindowMap.refCompoManagerVM.bTrfMatCode)
|
||||
EgtSetInfo(Pz, "SRF", CompoWindowMap.refCompoManagerVM.bTrfSurfCode)
|
||||
EgtSetInfo(Pz, "L", DoubleToString(b3Part.DimX(), 1))
|
||||
EgtSetInfo(Pz, "W", DoubleToString(b3Part.DimY(), 1))
|
||||
EgtSetInfo(Pz, "T", CompoWindowMap.refCompoManagerVM.bTrfThickness)
|
||||
EgtSetInfo(Pz, "V1", DoubleToString(b3Part.DimX(), 1))
|
||||
EgtSetInfo(Pz, "V2", DoubleToString(b3Part.DimY(), 1))
|
||||
End If
|
||||
' Eventuale testo per indicare il sopra (solo nel caso di rettangolo)
|
||||
If CompoWindowMap.refCompoManagerVM.Top_Visibility = Visibility.Visible And
|
||||
CompoWindowMap.refCompoManagerVM.TopIsChecked Then
|
||||
Dim dDimX As Double = b3Part.DimX()
|
||||
Dim dDimY As Double = b3Part.DimY()
|
||||
Dim dH As Double = Math.Min(0.1 * dDimY, 30)
|
||||
Dim nText As Integer = EgtCreateTextAdv(nRegLayId, New Point3d(dDimX / 2, dDimY - 0.6 * dH, 0), 0, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
|
||||
EgtSetColor(nText, New Color3d())
|
||||
End If
|
||||
' Scrivo testi per nesting
|
||||
SideEntityControlVM.WriteSideAngleForNest(CompoWindowMap.refCompoSceneHostV.CompoScene.GetCtx())
|
||||
' Esporto il pezzo in un file temporaneo
|
||||
@@ -212,33 +279,10 @@ Public Class CompoWindowVM
|
||||
EgtInsertFile(sTmpFile)
|
||||
' Ne recupero l'Id
|
||||
Dim nId2 As Integer = EgtGetLastPart()
|
||||
' Muovo la regione in Z per evitare problemi in visualizzazione
|
||||
Dim nRegId = EgtGetFirstNameInGroup(nId2, NAME_REGION)
|
||||
EgtMove(nRegId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
||||
' Se definito nome lo inserisco nel testo
|
||||
If Not String.IsNullOrWhiteSpace(sName) Then
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = String.Empty
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
Dim sNewText = sName & " " & sText
|
||||
EgtModifyText(nTextId, sNewText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
End If
|
||||
' Eventuale testo per indicare il sopra (solo nel caso di rettangolo)
|
||||
If CompoWindowMap.refCompoManagerVM.TopIsChecked Then
|
||||
Dim dDimX As Double = ptMax.x - ptMin.x
|
||||
Dim dDimY As Double = ptMax.y - ptMin.y
|
||||
Dim dH As Double = Math.Min(0.1 * dDimY, 30)
|
||||
Dim nText As Integer = EgtCreateTextAdv(nRegId, New Point3d(dDimX / 2, dDimY - 0.6 * dH, 0), 0, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
|
||||
EgtSetColor(nText, New Color3d())
|
||||
End If
|
||||
' Aggiusto per lavorazioni
|
||||
AdjustFlatPart(nId2)
|
||||
' Se dati Trf assegno nome univoco
|
||||
If m_bTrfData Then EgtSetInfo(nId2, "CsvPart", CompoWindowMap.refCompoManagerVM.bTrfOrderCode & "-" & nId2.ToString())
|
||||
' Inserisco in parcheggio
|
||||
EstCalc.StoreOnePart(nId2, True)
|
||||
' Aggiungo riferimento e lo inserisco in VeinMatching
|
||||
|
||||
@@ -90,6 +90,7 @@ Module ConstIni
|
||||
Public Const K_MAXSIDEANGLE As String = "MaxSideAngle"
|
||||
Public Const K_SIDEANGLE As String = "SideAngle"
|
||||
Public Const K_DRIPOFFSET As String = "DripOffset"
|
||||
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
|
||||
Public Const K_DRIPDEPTH As String = "DripDepth"
|
||||
Public Const K_DRIPSHORT As String = "DripShort"
|
||||
Public Const K_UNDERDRILLDEPTH As String = "UnderDrillDepth"
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<ToggleButton Content="{Binding UnderDrillMsg}"
|
||||
IsChecked="{Binding UnderDrill_IsChecked}"
|
||||
Style="{StaticResource CompoWindow_ToggleButton}"
|
||||
IsEnabled="{Binding UnderDrill_IsEnabled}"/>
|
||||
IsEnabled="{Binding Drip_IsEnabled}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid DockPanel.Dock="Bottom"
|
||||
|
||||
@@ -264,6 +264,17 @@ Public Class DxfImportWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Drip_IsEnabled As Boolean
|
||||
Public Property Drip_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_Drip_IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_Drip_IsEnabled = value
|
||||
NotifyPropertyChanged("Drip_IsEnabled")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_MmIsChecked As Boolean = EgtUiUnitsAreMM()
|
||||
Public Property MmIsChecked As Boolean
|
||||
Get
|
||||
@@ -422,7 +433,6 @@ Public Class DxfImportWindowVM
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOpenDxf As ICommand
|
||||
Private m_cmdSideAngle As ICommand
|
||||
Private m_cmdUseLayer As ICommand
|
||||
Private m_cmdUseClosedCurve As ICommand
|
||||
Private m_cmdUseRegion As ICommand
|
||||
@@ -479,6 +489,7 @@ Public Class DxfImportWindowVM
|
||||
Measure_IsEnabled = (m_nFileType = FT.DXF)
|
||||
OkIsEnabled = False
|
||||
SideEntity_IsEnabled = False
|
||||
Drip_IsEnabled = False
|
||||
ElseIf m_nFileType = FT_TRF Then
|
||||
UseRegionIsEnabled = False
|
||||
UseLayerIsEnabled = False
|
||||
@@ -487,6 +498,7 @@ Public Class DxfImportWindowVM
|
||||
Measure_IsEnabled = False
|
||||
OkIsEnabled = True
|
||||
SideEntity_IsEnabled = False
|
||||
Drip_IsEnabled = False
|
||||
End If
|
||||
' Eseguo zoom
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -799,6 +811,7 @@ Public Class DxfImportWindowVM
|
||||
OkIsEnabled = True
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideEntity_IsEnabled = True
|
||||
Drip_IsEnabled = True
|
||||
End Sub
|
||||
|
||||
#End Region ' UseRegionCommand
|
||||
@@ -829,6 +842,7 @@ Public Class DxfImportWindowVM
|
||||
OkIsEnabled = True
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideEntity_IsEnabled = True
|
||||
Drip_IsEnabled = True
|
||||
End Sub
|
||||
|
||||
#End Region ' UseLayerCommand
|
||||
@@ -859,6 +873,7 @@ Public Class DxfImportWindowVM
|
||||
OkIsEnabled = True
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideEntity_IsEnabled = True
|
||||
Drip_IsEnabled = True
|
||||
End Sub
|
||||
|
||||
#End Region ' UseClosedCurveCommand
|
||||
@@ -879,27 +894,11 @@ Public Class DxfImportWindowVM
|
||||
LoadCurrFile()
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideEntity_IsEnabled = False
|
||||
Drip_IsEnabled = False
|
||||
End Sub
|
||||
|
||||
#End Region ' ResetCommand
|
||||
|
||||
#Region "SideAngleCommand"
|
||||
|
||||
Public ReadOnly Property SideAngleCommand As ICommand
|
||||
Get
|
||||
If m_cmdSideAngle Is Nothing Then
|
||||
m_cmdSideAngle = New Command(AddressOf SideAngle)
|
||||
End If
|
||||
Return m_cmdSideAngle
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub SideAngle(ByVal param As Object)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' SideAngleCommand
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -54,7 +54,7 @@ Friend Module CamAuto
|
||||
Dim nOpeId As Integer = EgtGetLastOperation()
|
||||
While nOpeId <> GDB_ID.NULL
|
||||
Dim nPrevOpeId As Integer = EgtGetPrevOperation(nOpeId)
|
||||
If EgtGetOperationType(nOpeId) = MCH_OY.DISP Then
|
||||
If EgtGetOperationType(nOpeId) = MCH_OY.DISP AndAlso EgtIsOperationEmpty(nOpeId) Then
|
||||
EgtRemoveLastPhase()
|
||||
Else
|
||||
Exit While
|
||||
@@ -548,6 +548,7 @@ Friend Module CamAuto
|
||||
Dim bOneHoleIntCorner As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, 0, CurrentMachine.sMachIniFile) <> 0)
|
||||
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, CurrentMachine.sMachIniFile) <> 0)
|
||||
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, CurrentMachine.sMachIniFile) <> 0)
|
||||
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, CurrentMachine.sMachIniFile)
|
||||
dCornerSafety = Math.Max(dCornerSafety, 10 * EPS_SMALL)
|
||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||
@@ -561,6 +562,7 @@ Friend Module CamAuto
|
||||
EgtLuaSetGlobNumVar("CAM.CORNERSAFETY", dCornerSafety)
|
||||
EgtLuaSetGlobBoolVar("CAM.MILLINGONCORNERS", bMillingOnCorners)
|
||||
EgtLuaSetGlobBoolVar("CAM.MILLINGONSINKS", bMillingOnSinks)
|
||||
EgtLuaSetGlobNumVar("CAM.MILLINGSHORT", dMillingShort)
|
||||
EgtLuaSetGlobNumVar("CAM.RAWHEIGHT", GetRawHeight())
|
||||
EgtLuaSetGlobNumVar("CAM.REGROT", 0.0)
|
||||
Return True
|
||||
|
||||
@@ -29,6 +29,8 @@ Module ConstMach
|
||||
Public Const KEY_VAC_TYPE As String = "VacType"
|
||||
' Nome gruppo layout in testa con ventose
|
||||
Public Const VACUUM_HEAD_LAYOUT As String = "LAYOUT"
|
||||
' Info in asse rotante ventosa per step discreti
|
||||
Public Const KEY_ROTVAC_STEPS As String = "STEPS"
|
||||
' Nome oggetto frame prima uscita di una testa
|
||||
Public Const HEAD_FIRST_EXIT As String = "_T1"
|
||||
|
||||
@@ -117,6 +119,7 @@ Module ConstMach
|
||||
Public Const NAME_PREVIEW As String = "PV"
|
||||
' Info in entità da tagliare per affondamento
|
||||
Public Const INFO_DEPTH As String = "Depth"
|
||||
Public Const INFO_DEPTH2 As String = "Depth2"
|
||||
' Info in entità da tagliare per taglio ristretto
|
||||
Public Const INFO_STRICT As String = "Strict"
|
||||
' Info in entità da tagliare per angolo di lato
|
||||
@@ -124,6 +127,8 @@ Module ConstMach
|
||||
Public Const INFO_OFFSET As String = "Offset"
|
||||
Public Const INFO_SIDE_ANGLE2 As String = "SideAng2"
|
||||
Public Const INFO_OFFSET2 As String = "Offset2"
|
||||
Public Const INFO_HEEL As String = "Heel"
|
||||
Public Const INFO_ORIG_SIDE_ANGLE As String = "OrigSideAng"
|
||||
' Info in entità da tagliare per gocciolatoio
|
||||
Public Const INFO_HAVE_DRIP As String = "HaveDrip"
|
||||
' Info in entità da tagliare per direzione che varia a seconda del tipo (una via o zigzag)
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
Public Const K_MILL As String = "Mill"
|
||||
Public Const K_SHOWTOOLCHANGER As String = "ShowToolChanger"
|
||||
Public Const K_SHOWHEADEXIT As String = "ShowHeadExit"
|
||||
Public Const K_SHOWUSERNOTES As String = "ShowUserNotes"
|
||||
Public Const K_DRILLHOLDER As String = "DrillHolder"
|
||||
Public Const K_SAWBLADEHOLDER As String = "SawBladeHolder"
|
||||
Public Const K_MILLHOLDER As String = "MillHolder"
|
||||
@@ -108,6 +109,7 @@
|
||||
Public Const K_MACH_INTARCMAXSIDEANG As String = "IntArcMaxSideAng"
|
||||
Public Const K_MACH_MILLING_ON_CORNERS As String = "MillingOnCorners"
|
||||
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
||||
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
||||
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
||||
Public Const K_MACH_WASHING As String = "Washing"
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ Public Module CurrentMachine
|
||||
' Dati per fresatura
|
||||
Private m_bCornerCuts As Boolean = False
|
||||
Private m_bInternalCuts As Boolean = False
|
||||
Private m_dShortCut As Double = 0
|
||||
|
||||
' Abilitazione lavaggio lastra
|
||||
Private m_bWashing As Boolean
|
||||
@@ -76,6 +77,7 @@ Public Module CurrentMachine
|
||||
' Flag per visualizzazione TcPos e Testa/uscita
|
||||
Private m_bShowToolChanger As Boolean = False
|
||||
Private m_bShowHeadExit As Boolean = False
|
||||
Private m_nShowUserNotes As Integer = 0 ' 0=no, 1=tutti utensili, 2=solo lame
|
||||
|
||||
' Flag che indicano presenza tipologia lavorazioni (attivo/non attivo)
|
||||
Private m_bSawing As Boolean = False
|
||||
@@ -399,6 +401,16 @@ Public Module CurrentMachine
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property dShortCut As Double
|
||||
Get
|
||||
Return m_dShortCut
|
||||
End Get
|
||||
Set(value As Double)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_SHORTENING, DoubleToString(value, 2), sMachIniFile)
|
||||
m_dShortCut = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property bAligned As Boolean
|
||||
Get
|
||||
Return m_bAligned
|
||||
@@ -451,6 +463,12 @@ Public Module CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bShowUserNotes As Integer
|
||||
Get
|
||||
Return m_nShowUserNotes
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property bSawing As Boolean
|
||||
Get
|
||||
Return m_bSawing
|
||||
@@ -935,6 +953,8 @@ Public Module CurrentMachine
|
||||
m_bCornerCuts = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, sMachIniFile) <> 0)
|
||||
' Leggo lavorazione interni con fresa
|
||||
m_bInternalCuts = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, sMachIniFile) <> 0)
|
||||
' Leggo accorciamento fresate negli angoli
|
||||
m_dShortCut = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, sMachIniFile)
|
||||
' Leggo abilitazione lavaggio lastra
|
||||
m_bWashing = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_WASHING, 1, sMachIniFile) <> 0)
|
||||
' Leggo configurazione degli utensili in macchina
|
||||
@@ -949,6 +969,7 @@ Public Module CurrentMachine
|
||||
' Leggo abilitazione visualizzazione TcPos e Head/exit
|
||||
m_bShowToolChanger = (GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile) > 0)
|
||||
m_bShowHeadExit = (GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 0, sMachIniFile) > 0)
|
||||
m_nShowUserNotes = GetPrivateProfileInt(S_TOOLS, K_SHOWUSERNOTES, 0, sMachIniFile)
|
||||
' Leggo limiti diametro lama per altre operazioni
|
||||
m_dMaxSawDiamForVac = GetPrivateProfileDouble(S_TOOLS, K_MAXSAWDIAMFORVAC, 630, sMachIniFile)
|
||||
m_dMaxSawDiamForProbe = GetPrivateProfileDouble(S_TOOLS, K_MAXSAWDIAMFORPROBE, 630, sMachIniFile)
|
||||
|
||||
@@ -393,6 +393,8 @@ Module EstCalc
|
||||
Public Function InsertOnePart(nId As Integer, bAligned As Boolean, bReducedCut As Boolean) As Boolean
|
||||
' Se esiste grezzo e pezzo in parcheggio, lo metto nella tavola
|
||||
If m_nRawId <> GDB_ID.NULL AndAlso EgtIsPart(nId) Then
|
||||
' Sistemazioni per eventuali lati inclinati con tallone
|
||||
AdjustPartSideAngleHeel(nId, m_b3Raw.DimZ())
|
||||
' Sistemazioni per eventuali lati esterni inclinati e/o offsettati
|
||||
EgtCalcFlatPartUpRegion(nId, True)
|
||||
EgtCalcFlatPartDownRegion(nId, m_b3Raw.DimZ())
|
||||
@@ -436,6 +438,69 @@ Module EstCalc
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function AdjustPartSideAngleHeel(nPartId As Integer, dTh As Double) As Boolean
|
||||
' Recupero entità del layer esterno e di quelli interni
|
||||
Dim vEnt As New List(Of Integer)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP))
|
||||
While nEntId <> GDB_ID.NULL
|
||||
vEnt.Add(nEntId)
|
||||
nEntId = EgtGetNext(nEntId)
|
||||
End While
|
||||
Dim nLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_INLOOP)
|
||||
While nLayId <> GDB_ID.NULL
|
||||
nEntId = EgtGetFirstInGroup(nLayId)
|
||||
While nEntId <> GDB_ID.NULL
|
||||
vEnt.Add(nEntId)
|
||||
nEntId = EgtGetNext(nEntId)
|
||||
End While
|
||||
nLayId = EgtGetNextName(nLayId, NAME_INLOOP)
|
||||
End While
|
||||
' Aggiorno le entità con tallone e quelle con angolo esterno
|
||||
Const AGG_DEPTH As Double = 2.0
|
||||
For Each nEnt As Integer In vEnt
|
||||
' Recupero eventuali tallone ed angolo originale
|
||||
Dim dHeel As Double = 0
|
||||
Dim dSideAng As Double = 0
|
||||
EgtGetInfo(nEnt, INFO_HEEL, dHeel)
|
||||
EgtGetInfo(nEnt, INFO_ORIG_SIDE_ANGLE, dSideAng)
|
||||
If Math.Abs(dSideAng) > EPS_ANG_SMALL And dHeel > 10 * EPS_SMALL Then
|
||||
' Angolo esterno
|
||||
If dSideAng > 0 Then
|
||||
' Se tallone inferiore a spessore
|
||||
If dHeel < dTh - 10 * EPS_SMALL Then
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, dSideAng)
|
||||
EgtSetInfo(nEnt, INFO_OFFSET2, -(dTh - dHeel) * Math.Tan(dSideAng * Math.PI / 180))
|
||||
EgtSetInfo(nEnt, INFO_DEPTH2, (dTh - dHeel) + AGG_DEPTH)
|
||||
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
||||
Else
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
|
||||
EgtRemoveInfo(nEnt, INFO_OFFSET2)
|
||||
EgtRemoveInfo(nEnt, INFO_DEPTH2)
|
||||
End If
|
||||
' Angolo interno
|
||||
Else
|
||||
' Se tallone inferiore a spessore
|
||||
If dHeel < dTh - 10 * EPS_SMALL Then
|
||||
EgtSetInfo(nEnt, INFO_OFFSET, dHeel * Math.Tan(-dSideAng * Math.PI / 180))
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
|
||||
EgtSetInfo(nEnt, INFO_DEPTH2, dHeel + AGG_DEPTH)
|
||||
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
||||
Else
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
||||
EgtRemoveInfo(nEnt, INFO_OFFSET)
|
||||
EgtRemoveInfo(nEnt, INFO_SIDE_ANGLE2)
|
||||
EgtRemoveInfo(nEnt, INFO_DEPTH2)
|
||||
End If
|
||||
End If
|
||||
ElseIf dSideAng > EPS_ANG_SMALL Then
|
||||
EgtSetInfo(nEnt, INFO_OFFSET, -dTh * Math.Tan(dSideAng * Math.PI / 180))
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Function StoreOnePart(ByVal nId As Integer, Optional ByVal bForced As Boolean = False) As Boolean
|
||||
' Se pezzo in grezzo, metto in parcheggio (sempre possibile)
|
||||
If bForced OrElse
|
||||
|
||||
@@ -304,6 +304,23 @@ Module VacuumCups
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function GetVacRotAxisSteps(ByRef vAngRot As List(Of Double)) As Boolean
|
||||
' Recupero l'asse rotante della testa ventosa
|
||||
Dim nRotAxId As Integer = EgtGetParent(EgtGetHeadId(VACUUM_HEAD))
|
||||
' Verifico se contiene info con STEPS
|
||||
Dim sSteps As String = ""
|
||||
If Not EgtGetInfo(nRotAxId, KEY_ROTVAC_STEPS, sSteps) Then Return False
|
||||
' Leggo gli step previsti
|
||||
Dim vStep() As String = sSteps.Split(",".ToCharArray)
|
||||
For Each sStep As String In vStep
|
||||
Dim dStep As Double = 0
|
||||
If StringToDouble(sStep, dStep) Then
|
||||
vAngRot.Add(dStep)
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function TestVacuumCupSelection(sCups() As String, b3Raw As BBox3d, ptRawCen As Point3d, nOutlineId As Integer, nRawRegId As Integer,
|
||||
ByRef vtMove As Vector3d, ByRef ptRotCen As Point3d, ByRef dRotAngDeg As Double) As Double
|
||||
' Se definizione mancante, scarto soluzione
|
||||
@@ -347,10 +364,21 @@ Module VacuumCups
|
||||
For nJ As Integer = 0 To sCups.Length() - 1
|
||||
nCups(nJ) = EgtGetFirstNameInGroup(m_nVacId, sCups(nJ))
|
||||
Next
|
||||
' Angoli di prova
|
||||
Dim vAngRot As New List(Of Double)
|
||||
' Se asse rotante ventosa a step
|
||||
If GetVacRotAxisSteps(vAngRot) Then
|
||||
' Annullo la rotazione di allineamento
|
||||
dRotAngDeg = 0
|
||||
' altrimenti in continuo
|
||||
Else
|
||||
' Assegno più valori di ricerca e conservo angolo di allineamento
|
||||
vAngRot.AddRange({0, +5, -5, +12.5, -12.5, +25, -25, +45, -45})
|
||||
End If
|
||||
|
||||
' Eseguo verifica delle ventose rispetto al grezzo
|
||||
Dim bVacOk As Boolean = False
|
||||
Dim vAngRot() As Double = {0, +5, -5, +12.5, -12.5, +25, -25, +45, -45}
|
||||
For i As Integer = 0 To vAngRot.Length() - 1
|
||||
For i As Integer = 0 To vAngRot.Count() - 1
|
||||
If TestVacuumCups(nCups, nRawRegId, vtMove, ptRotCen, dRotAngDeg + vAngRot(i)) Then
|
||||
dRotAngDeg += vAngRot(i)
|
||||
bVacOk = True
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="3*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
@@ -140,7 +140,7 @@
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="{Binding MillingParamMsg}" Grid.Column="0" Grid.Row="1">
|
||||
<UniformGrid Rows="2">
|
||||
<UniformGrid Rows="3">
|
||||
|
||||
<Grid>
|
||||
<TextBlock Text="{Binding CornerCutsMsg}"
|
||||
@@ -154,6 +154,12 @@
|
||||
<CheckBox IsChecked="{Binding InternalCuts}"
|
||||
Style="{StaticResource OptionCheckBox}"/>
|
||||
</Grid>
|
||||
<UniformGrid Columns="2">
|
||||
<TextBlock Text="{Binding ShortMsg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding ShortCut}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
@@ -166,6 +166,18 @@ Public Class MachOptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ShortCut As String
|
||||
Get
|
||||
Return LenToString(CurrentMachine.dShortCut, -2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dShortCut As Double = 0
|
||||
If StringToLen(value, dShortCut) Then
|
||||
CurrentMachine.dShortCut = dShortCut
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Milling Param
|
||||
|
||||
#Region "Nesting Param"
|
||||
@@ -377,6 +389,11 @@ Public Class MachOptionWindowVM
|
||||
Return EgtMsg(MSG_ALARMSPAGEUC + 44)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ShortMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_ALARMSPAGEUC + 49)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property InternalCutsMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_ALARMSPAGEUC + 30)
|
||||
|
||||
@@ -69,5 +69,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.9.9.3")>
|
||||
<Assembly: AssemblyFileVersion("1.9.9.3")>
|
||||
<Assembly: AssemblyVersion("1.9.11.1")>
|
||||
<Assembly: AssemblyFileVersion("1.9.11.1")>
|
||||
|
||||
@@ -0,0 +1,920 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="MyToolDbWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding CloseToolsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}">
|
||||
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding ReloadToolCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem,ElementName=ToolsTreeView}"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<EgtWPFLib5:ToolParamVisibilityConverter x:Key="ToolParamVisibilityConverter"/>
|
||||
<EgtWPFLib5:ToolDrawUUIDConverter x:Key="ToolDrawUUIDConverter"/>
|
||||
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
|
||||
<sys:Int32 x:Key="Corr">0</sys:Int32>
|
||||
<sys:Int32 x:Key="ExitPar">1</sys:Int32>
|
||||
<sys:Int32 x:Key="Coolant">2</sys:Int32>
|
||||
<sys:Int32 x:Key="CornRad">3</sys:Int32>
|
||||
<sys:Int32 x:Key="Diam">4</sys:Int32>
|
||||
<sys:Int32 x:Key="TotDiam">5</sys:Int32>
|
||||
<sys:Int32 x:Key="Feed">6</sys:Int32>
|
||||
<sys:Int32 x:Key="EndFeed">7</sys:Int32>
|
||||
<sys:Int32 x:Key="StartFeed">8</sys:Int32>
|
||||
<sys:Int32 x:Key="TipFeed">9</sys:Int32>
|
||||
<sys:Int32 x:Key="Len">10</sys:Int32>
|
||||
<sys:Int32 x:Key="TotLen">11</sys:Int32>
|
||||
<sys:Int32 x:Key="MaxMat">12</sys:Int32>
|
||||
<sys:Int32 x:Key="LonOffset">13</sys:Int32>
|
||||
<sys:Int32 x:Key="RadOffset">14</sys:Int32>
|
||||
<sys:Int32 x:Key="Speed">15</sys:Int32>
|
||||
<sys:Int32 x:Key="SideAng">16</sys:Int32>
|
||||
<sys:Int32 x:Key="MaxSpeed">17</sys:Int32>
|
||||
<sys:Int32 x:Key="Thick">18</sys:Int32>
|
||||
<sys:Int32 x:Key="MaxAbsorption">19</sys:Int32>
|
||||
<sys:Int32 x:Key="MinFeed">20</sys:Int32>
|
||||
<sys:Int32 x:Key="Draw">21</sys:Int32>
|
||||
<sys:Int32 x:Key="Head">22</sys:Int32>
|
||||
<sys:Int32 x:Key="NamePar">23</sys:Int32>
|
||||
<sys:Int32 x:Key="UserNotes">24</sys:Int32>
|
||||
<sys:Int32 x:Key="TcPos">25</sys:Int32>
|
||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.75*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="11*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<UniformGrid Grid.Row="0" Columns="3">
|
||||
<Button Content="New" Command="{Binding NewCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"/>
|
||||
<Button Content="Save" Command="{Binding SaveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"/>
|
||||
<Button Content="Remove" Command="{Binding RemoveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<TreeView Name="ToolsTreeView" Grid.Row="1"
|
||||
ItemsSource="{Binding ToolsList}">
|
||||
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyToolTreeViewItem}" ItemsSource="{Binding Items}">
|
||||
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ToolTreeViewItem}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<TextBlock Grid.Column="1" Text="{Binding NamePar}" Height="18" FontSize="15" Margin="10"/>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</TreeView.Resources>
|
||||
|
||||
</TreeView>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.RowSpan="2" Margin="0,2,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding NameParTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource NamePar}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="NameParTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.NamePar,
|
||||
ElementName=ToolsTreeView, Mode=TwoWay,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource NamePar}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.NameErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.NameErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding MaxSpeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MaxSpeed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="MaxSpeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.MaxSpeed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MaxSpeed}}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding FeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Feed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="FeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.Feed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Feed}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=FeedTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding StartFeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource StartFeed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="StartFeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.StartFeed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource StartFeed}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=StartFeedTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding TotLenTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TotLen}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="TotLenTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.TotLen,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TotLen}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.TotLenErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.TotLenErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding TotDiamTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TotDiam}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="TotDiamTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.TotDiam,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TotDiam}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.TotDiamErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.TotDiamErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding ThickTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Thick}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="ThickTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.Thick,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Thick}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.ThickErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.ThickErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding MaxMatTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MaxMat}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="MaxMatTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.MaxMat,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MaxMat}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.MaxMatErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.MaxMatErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding LonOffsetTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource LonOffset}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="LonOffsetTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.LonOffset,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource LonOffset}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=LonOffsetTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="9">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding HeadTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Head}}"/>
|
||||
<ComboBox Name="HeadTxBx" Grid.Column="1" Style="{DynamicResource ToolsComboBox}"
|
||||
ItemsSource="{Binding Path=SelectedItem.HeadList, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelectedHead, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
DisplayMemberPath="HText"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Head}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.SelectedHeadErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.SelectedHeadErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding CorrTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Corr}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="CorrTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.Corr,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Corr}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=CorrTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="11">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding UserNotesTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource UserNotes}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="UserNotesTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.UserNotes,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource UserNotes}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=UserNotesTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding DrawTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Draw}}"/>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderThickness="0.5,1,0.5,0.5" BorderBrush="{DynamicResource TextBox.Static.Border}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Draw}}">
|
||||
<TextBlock Name="DrawTxBx" Grid.Column="0" Margin="3,0,0,0"
|
||||
VerticalAlignment="Center" Foreground="Gray"
|
||||
ToolTip="{Binding Path=SelectedItem.Draw,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
Converter={StaticResource ToolDrawUUIDConverter}}"
|
||||
Text="{Binding Path=SelectedItem.Draw,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True,
|
||||
Converter={StaticResource ToolDrawUUIDConverter}}"/>
|
||||
</Border>
|
||||
<Button Grid.Column="1" Margin="5,0,0,0" Content="A"
|
||||
Command="{Binding Path=SelectedItem.AutoDrawCommand,ElementName=ToolsTreeView}"
|
||||
Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Draw}}"/>
|
||||
<Button Grid.Column="2" Margin="5,0,5,0" Content=". . ."
|
||||
Command="{Binding Path=SelectedItem.OpenDrawFileCommand,ElementName=ToolsTreeView}"
|
||||
Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Draw}}"/>
|
||||
</Grid>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.DrawErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.DrawErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding SpeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Speed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="SpeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.Speed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Speed}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.SpeedErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.SpeedErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding TipFeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TipFeed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="TipFeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.TipFeed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TipFeed}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=TipFeedTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding EndFeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource EndFeed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="EndFeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.EndFeed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource EndFeed}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=EndFeedTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding LenTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Len}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="LenTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.Len,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Len}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.LenErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.LenErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding DiamTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Diam}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="DiamTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.Diam,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Diam}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.DiamErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.DiamErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding CornRadTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource CornRad}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="CornRadTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.CornRad,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource CornRad}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=CornRadTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding SideAngTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource SideAng}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="SideAngTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.SideAng,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource SideAng}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=SideAngTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding RadOffsetTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource RadOffset}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="RadOffsetTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.RadOffset,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource RadOffset}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=RadOffsetTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="9">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding ExitParTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource ExitPar}}"/>
|
||||
<ComboBox Name="ExitParTxBx" Grid.Column="1" Style="{DynamicResource ToolsComboBox}"
|
||||
ItemsSource="{Binding Path=SelectedItem.ExitList,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelectedExit, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource ExitPar}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.SelectedExitErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.SelectedExitErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding TcPosTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TcPos}}"/>
|
||||
<ComboBox Name="TcPosTxBx" Grid.Column="1" Style="{DynamicResource ToolsComboBox}"
|
||||
ItemsSource="{Binding Path=SelectedItem.TcPosList, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelectedTcPos, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TcPos}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=TcPosTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="12">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding MaxAbsorptionTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MaxAbsorption}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="MaxAbsorptionTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.MaxAbsorption,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MaxAbsorption}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=MaxAbsorptionTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="12">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding MinFeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MinFeed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="MinFeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.MinFeed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MinFeed}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=MinFeedTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
<Grid Grid.Column="0" Grid.Row="13">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding CoolantTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Coolant}}"/>
|
||||
<ComboBox Name="CoolantTxBx" Grid.Column="1" Style="{DynamicResource ToolsComboBox}"
|
||||
ItemsSource="{Binding Path=SelectedItem.CoolantList, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedIndex="{Binding Path=SelectedItem.SelCoolant, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Coolant}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=CoolantTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
|
||||
<ContentControl Content="{Binding ToolSceneHost}" Grid.Column="2"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class MyToolDbWindowV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,160 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MyToolDbWindowVM
|
||||
Inherits ToolDbWindowVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(sMachineDirPath As String, sMachineIniPath As String, ProjectSceneContext As Integer)
|
||||
MyBase.New(sMachineDirPath, sMachineIniPath, ProjectSceneContext)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
Private Sub ManageSpecialSawNotes()
|
||||
' Note utente devono essere visualizzate
|
||||
If CurrentMachine.bShowUserNotes = 0 Then Return
|
||||
' Utensile deve essere lama
|
||||
Dim nType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
If nType <> MCH_TY.SAW_STD Then Return
|
||||
' Recupero le note utente
|
||||
Dim sUserNotes As String = ""
|
||||
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, sUserNotes)
|
||||
' Se esistono
|
||||
If Not String.IsNullOrEmpty(sUserNotes) Then
|
||||
' Le divido in parti
|
||||
Dim bIsCode As Boolean = False
|
||||
Dim bIsSuppl As Boolean = False
|
||||
Dim bIsSN As Boolean = False
|
||||
Dim sItems() As String = sUserNotes.Split(";".ToCharArray)
|
||||
For i As Integer = 0 To sItems.Count() - 1
|
||||
If sItems(i).Contains("CODE=") Then
|
||||
bIsCode = True
|
||||
ElseIf sItems(i).Contains("SUPPL=") Then
|
||||
bIsSuppl = True
|
||||
ElseIf sItems(i).Contains("S/N=") Then
|
||||
bIsSN = True
|
||||
ElseIf sItems(i).Contains("START=") Then
|
||||
sItems(i) = ""
|
||||
ElseIf sItems(i).Contains("PROD=") Then
|
||||
sItems(i) = ""
|
||||
End If
|
||||
Next
|
||||
sUserNotes = ""
|
||||
For i As Integer = 0 To sItems.Count() - 1
|
||||
If Not String.IsNullOrWhiteSpace(sItems(i)) Then
|
||||
sUserNotes &= sItems(i) & ";"
|
||||
End If
|
||||
Next
|
||||
If Not bIsCode Then sUserNotes &= "CODE= ;"
|
||||
If Not bIsSuppl Then sUserNotes &= "SUPPL= ;"
|
||||
If Not bIsSN Then sUserNotes &= "S/N= ;"
|
||||
Else
|
||||
sUserNotes = "CODE= ; SUPPL= ; S/N= ;"
|
||||
End If
|
||||
sUserNotes &= "START=" & My.Computer.Clock.LocalTime.ToString("dd.MM.yyyy HH:mm:ss") & ";"
|
||||
sUserNotes &= "PROD=0;"
|
||||
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, sUserNotes)
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "NewCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Creata the new tool. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Overrides Sub NewPar(ByVal param As Object)
|
||||
EgtSetCurrentContext(ToolDbWindowVM.ProjectSceneContext)
|
||||
' Verifico se sia selezionata una famiglia
|
||||
Dim NewToolItem As ToolTreeViewItem
|
||||
If TypeOf param Is FamilyToolTreeViewItem Then
|
||||
Dim ToolFamily As FamilyToolTreeViewItem = DirectCast(param, FamilyToolTreeViewItem)
|
||||
Dim NewName As String = ToolFamily.Name
|
||||
EgtTdbGetToolNewName(NewName)
|
||||
If EgtTdbAddTool(NewName, ToolFamily.ToolType) Then
|
||||
NewToolItem = New ToolTreeViewItem(NewName)
|
||||
ToolFamily.Items.Add(NewToolItem)
|
||||
EgtTdbSaveCurrTool()
|
||||
NewToolItem.NewTool = True
|
||||
' Determino il tipo di utensile
|
||||
Dim nType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
Dim bSaw As Boolean = ((nType And MCH_TF.SAWBLADE) <> 0)
|
||||
' Imposto testa e uscita
|
||||
' Sempre lame su H1.1 e altri utensili su H1.2
|
||||
EgtTdbSetCurrToolParam(MCH_TP.HEAD, "H1")
|
||||
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, If(bSaw, 1, 2))
|
||||
' Per macchine senza ToolChanger, resetto la posizione su questo
|
||||
If CurrentMachine.bShowToolChanger = 0 Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TCPOS, "")
|
||||
End If
|
||||
' Imposto dimensioni standard
|
||||
If (nType And MCH_TF.DRILLBIT) <> 0 Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 80.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 80.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DIAM, 20.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, 20.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 40.0)
|
||||
ElseIf (nType And MCH_TF.SAWBLADE) <> 0 Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 80.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 80.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DIAM, 600.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, 600.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.THICK, 5.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 40.0)
|
||||
ElseIf (nType And MCH_TF.MILL) <> 0 Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 80.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 80.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DIAM, 20.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, 20.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 40.0)
|
||||
End If
|
||||
' Gestione speciale eventuali note tipo Hofmann
|
||||
ManageSpecialSawNotes()
|
||||
' Salvo e aggiorno interfaccia utente
|
||||
EgtTdbSaveCurrTool()
|
||||
' Seleziono il nuovo utensile
|
||||
If Not ToolFamily.IsExpanded Then ToolFamily.IsExpanded = True
|
||||
NewToolItem.IsSelected = True
|
||||
NewToolItem.NotifyPropertyChanged("IsSelected")
|
||||
End If
|
||||
' Verifico se sia selezionato un utensile
|
||||
ElseIf TypeOf param Is ToolTreeViewItem Then
|
||||
Dim ToolCopied As ToolTreeViewItem = DirectCast(param, ToolTreeViewItem)
|
||||
Dim NewName As String = ToolCopied.Name
|
||||
EgtTdbGetToolNewName(NewName)
|
||||
If EgtTdbCopyTool(ToolCopied.Name, NewName) Then
|
||||
' Gestione speciale eventuali note tipo Hofmann
|
||||
ManageSpecialSawNotes()
|
||||
' Elimino disegno che non deve essere copiato
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DRAW, String.Empty)
|
||||
Dim CurrType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, CurrType)
|
||||
For Each ToolFamily In ToolsList
|
||||
If (ToolFamily.ToolType And CurrType) <> 0 Then
|
||||
NewToolItem = New ToolTreeViewItem(NewName)
|
||||
ToolFamily.Items.Add(NewToolItem)
|
||||
EgtTdbSaveCurrTool()
|
||||
NewToolItem.NewTool = True
|
||||
' Reimposto l'utensile vecchio nel Db per deselezionarlo e fare le verifiche correttamente
|
||||
EgtTdbSetCurrTool(ToolCopied.Name)
|
||||
ToolCopied.IsSelected = False
|
||||
ToolCopied.NotifyPropertyChanged("IsSelected")
|
||||
NewToolItem.IsSelected = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' NewCommand
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
+9
-1
@@ -71,7 +71,7 @@
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>41999,42016</NoWarn>
|
||||
<DebugType>None</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -211,6 +211,10 @@
|
||||
<Compile Include="MyMachiningDbWindow\MyMachiningTreeView.vb" />
|
||||
<Compile Include="MySceneHost\MySceneHostVM.vb" />
|
||||
<Compile Include="MySetUpWindow\MySetUpWindowVM.vb" />
|
||||
<Compile Include="MyToolDbWindow\MyToolDbWindowV.xaml.vb">
|
||||
<DependentUpon>MyToolDbWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MyToolDbWindow\MyToolDbWindowVM.vb" />
|
||||
<Compile Include="OptionPanel\MachiningTab\MachiningTabV.xaml.vb">
|
||||
<DependentUpon>MachiningTabV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -363,6 +367,10 @@
|
||||
<DependentUpon>MainWindowV.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="MyToolDbWindow\MyToolDbWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\MachiningTab\MachiningTabV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -18,9 +18,14 @@
|
||||
Grid.Column="1"
|
||||
Visibility="{Binding Check_Visibility}"
|
||||
HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding GrphSideAngle}"
|
||||
Grid.Column="1"
|
||||
Visibility="{Binding Value_Visibility}"/>
|
||||
<UniformGrid Grid.Column="1">
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding GrphSideAngle}"
|
||||
Visibility="{Binding Value_Visibility}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding GrphSideHeel}"
|
||||
Visibility="{Binding Value_Visibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
@@ -63,7 +68,20 @@
|
||||
Grid.Column="1"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
<Grid Visibility="{Binding Parameter23_Visibility}"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Parameter4Msg}" Grid.Row="2"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter4}"
|
||||
Grid.Column="1"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -84,7 +84,7 @@ Public Class SideEntityControlVM
|
||||
RefreshSideAngleText()
|
||||
Else
|
||||
' Recupero il valore
|
||||
StringToDouble(value, m_dDripOffset)
|
||||
StringToLen(value, m_dDripOffset)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
@@ -102,7 +102,12 @@ Public Class SideEntityControlVM
|
||||
Return LenToString(m_Parameter2, -2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLen(value, m_Parameter2)
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
StringToLen(value, m_Parameter2)
|
||||
m_dDripOffset2 = m_Parameter2
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetParameter2(value As Double)
|
||||
@@ -116,7 +121,12 @@ Public Class SideEntityControlVM
|
||||
Return LenToString(m_Parameter3, -2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLen(value, m_Parameter3)
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
StringToLen(value, m_Parameter3)
|
||||
m_dDripDepth = m_Parameter3
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetParameter3(value As Double)
|
||||
@@ -124,7 +134,27 @@ Public Class SideEntityControlVM
|
||||
NotifyPropertyChanged("Parameter3")
|
||||
End Sub
|
||||
|
||||
Private m_Parameter4 As Double
|
||||
Public Property Parameter4 As String
|
||||
Get
|
||||
Return LenToString(m_Parameter4, -2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
StringToLen(value, m_Parameter4)
|
||||
m_dDripShort = m_Parameter4
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetParameter4(value As Double)
|
||||
m_Parameter4 = value
|
||||
NotifyPropertyChanged("Parameter4")
|
||||
End Sub
|
||||
|
||||
Private m_dDripOffset As Double = 10
|
||||
Private m_dDripOffset2 As Double = 0
|
||||
Private m_dDripDepth As Double = 10
|
||||
Private m_dDripShort As Double = 0
|
||||
|
||||
@@ -145,10 +175,15 @@ Public Class SideEntityControlVM
|
||||
End Property
|
||||
Public ReadOnly Property Parameter2Msg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
|
||||
Return EgtMsg(MSG_IMPORTPAGEUC + 16) ' Offset 2
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Parameter3Msg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Parameter4Msg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_IMPORTPAGEUC + 12) ' Accorciamento
|
||||
End Get
|
||||
@@ -161,6 +196,7 @@ Public Class SideEntityControlVM
|
||||
Sub New(CallingWindow As CallingWindowOpt, CallingWndScene As Scene, Mode As ModeOpt)
|
||||
|
||||
SideAngleEntity.m_ModifySideAngle = AddressOf ModifySideAngle
|
||||
SideAngleEntity.m_ModifySideHeel = AddressOf ModifySideHeel
|
||||
SideAngleEntity.m_RefreshSideAngleText = AddressOf RefreshSideAngleText
|
||||
DripEntity.m_ModifyDrip = AddressOf ModifyDrip
|
||||
DripEntity.m_RefreshSideAngleText = AddressOf RefreshSideAngleText
|
||||
@@ -202,11 +238,13 @@ Public Class SideEntityControlVM
|
||||
Else
|
||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
m_dDripOffset = GetMainPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20)
|
||||
m_dDripOffset2 = GetMainPrivateProfileDouble(S_SIDES, K_DRIPOFFSET2, 0)
|
||||
m_dDripDepth = GetMainPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10)
|
||||
m_dDripShort = GetMainPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0)
|
||||
SetParameter1(m_dDripOffset)
|
||||
SetParameter2(m_dDripDepth)
|
||||
SetParameter3(m_dDripShort)
|
||||
SetParameter2(m_dDripOffset2)
|
||||
SetParameter3(m_dDripDepth)
|
||||
SetParameter4(m_dDripShort)
|
||||
End If
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
@@ -257,7 +295,9 @@ Public Class SideEntityControlVM
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
' Per ogni entità, creo testo con nome e angolo di inclinazione
|
||||
For Each Entity In m_SideEntityList
|
||||
Dim sText As String = Entity.sEntityName & " = " & DoubleToString(DirectCast(Entity, SideAngleEntity).dSideAngle, 1) & "°"
|
||||
Dim SideEntity As SideAngleEntity = TryCast(Entity, SideAngleEntity)
|
||||
Dim sText As String = Entity.sEntityName & " = " & DoubleToString(SideEntity.dSideAngle, 1) & "°"
|
||||
If SideEntity.dSideHeel > 10 * EPS_SMALL Then sText += "; " & LenToString(SideEntity.dSideHeel, 1)
|
||||
AddTextToLine(sText, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
||||
Next
|
||||
' Altrimenti modalità gocciolatoio
|
||||
@@ -462,12 +502,17 @@ Public Class SideEntityControlVM
|
||||
' Ricavo angolo dell'entità
|
||||
Dim dSideAngleVal As Double
|
||||
If Not EgtGetInfo(CurrLine, INFO_SIDE_ANGLE, dSideAngleVal) Then dSideAngleVal = 0
|
||||
' Ricavo tallone dell'entità
|
||||
Dim dSideHeelVal As Double
|
||||
If Not EgtGetInfo(CurrLine, INFO_HEEL, dSideHeelVal) Then dSideHeelVal = 0
|
||||
' Aggiungo entità all'elenco di quelle inclinabili
|
||||
Dim sEntityName As String = String.Empty
|
||||
EgtGetName(CurrLine, sEntityName)
|
||||
m_SideEntityList.Add(New SideAngleEntity(CurrLine, sEntityName, TextLayer, dSideAngleVal, m_Mode))
|
||||
' Creo testo con angolo di inclinazione 0
|
||||
AddTextToLine(sEntityName & " = " & DoubleToString(dSideAngleVal, 1) & "°", TextLayer, CurrLine, 20, dBBoxRad, True)
|
||||
m_SideEntityList.Add(New SideAngleEntity(CurrLine, sEntityName, TextLayer, dSideAngleVal, dSideHeelVal, m_Mode))
|
||||
' Creo testo con angolo di inclinazione ed eventuale tallone
|
||||
Dim sText As String = sEntityName & " = " & DoubleToString(dSideAngleVal, 1) & "°"
|
||||
If dSideHeelVal > 10 * EPS_SMALL Then sText += "; " & LenToString(dSideHeelVal, 1)
|
||||
AddTextToLine(sText, TextLayer, CurrLine, 20, dBBoxRad, True)
|
||||
End Sub
|
||||
|
||||
' Funzione che gestisce le operazioni sull'entità con gocciolatoio
|
||||
@@ -590,23 +635,60 @@ Public Class SideEntityControlVM
|
||||
vSelId.Add(nNewId)
|
||||
End If
|
||||
Next
|
||||
' Concateno le curve
|
||||
EgtCreateCurveCompoByReorder(DripLayer, vSelId.Count(), vSelId.ToArray(), New Point3d(), True)
|
||||
' Eseguo offset dei risultati ed eventuali accorciamenti iniziali e finali
|
||||
' Eseguo eventuali allungamenti iniziali e finali
|
||||
Dim nCrvId As Integer = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtOffsetCurve(nCrvId, -m_dDripOffset, OFF_TYPE.EXTEND)
|
||||
EgtSetColor(nCrvId, New Color3d(255, 165, 0))
|
||||
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
If m_dDripShort > EPS_SMALL Then
|
||||
If m_dDripShort < -EPS_SMALL Then
|
||||
EgtExtendCurveStartByLen(nCrvId, -m_dDripShort)
|
||||
EgtExtendCurveEndByLen(nCrvId, -m_dDripShort)
|
||||
End If
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
' Concateno le curve
|
||||
EgtCreateCurveCompoByReorder(DripLayer, vSelId.Count(), vSelId.ToArray(), New Point3d(), True)
|
||||
' Eseguo eventuali accorciamenti iniziali e finali
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
If m_dDripShort > EPS_SMALL AndAlso Not EgtCurveIsClosed(nCrvId) Then
|
||||
Dim dLen As Double
|
||||
EgtCurveLength(nCrvId, dLen)
|
||||
EgtTrimCurveEndAtLen(nCrvId, dLen - m_dDripShort)
|
||||
EgtTrimCurveStartAtLen(nCrvId, m_dDripShort)
|
||||
EgtSetInfo(nCrvId, INFO_STRICT, "1")
|
||||
End If
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
' Eseguo offset dei risultati
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtOffsetCurve(nCrvId, -m_dDripOffset, OFF_TYPE.EXTEND)
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
' Eventuali curve aggiuntive con offset2
|
||||
If m_dDripOffset2 > EPS_SMALL Then
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
Dim nNextCrvId As Integer = EgtGetNext(nCrvId)
|
||||
Dim nNewId As Integer = EgtCopy(nCrvId, nCrvId, GDB_POS.AFTER)
|
||||
EgtOffsetCurve(nNewId, -m_dDripOffset2, OFF_TYPE.EXTEND)
|
||||
nCrvId = nNextCrvId
|
||||
End While
|
||||
End If
|
||||
' Esplodo nelle curve componenti
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
Dim nNextCrvId = EgtGetNext(nCrvId)
|
||||
Dim nCount As Integer
|
||||
EgtExplodeCurveCompo(nCrvId, nCount)
|
||||
nCrvId = nNextCrvId
|
||||
End While
|
||||
' Assegno colore e attributi
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtSetColor(nCrvId, New Color3d(255, 165, 0))
|
||||
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
If m_dDripShort > EPS_SMALL Then EgtSetInfo(nCrvId, INFO_STRICT, "1")
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
' Funzione che modifica l'inclinazione di un lato
|
||||
@@ -629,6 +711,26 @@ Public Class SideEntityControlVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Funzione che modifica il tallone di un lato
|
||||
Friend Function ModifySideHeel(sEntityName As String, dSideHeel As Double) As Boolean
|
||||
' Ricavo CurrEntity dal nome
|
||||
Dim CurrEntity As SideAngleEntity = SideAngleEntity.FindEntity(sEntityName, m_SideEntityList)
|
||||
If IsNothing(CurrEntity) Then
|
||||
EgtOutLog("Error in side angle definition: selected line not found in SideAngleList")
|
||||
Return False
|
||||
End If
|
||||
' Scrivo nuovo tallone nelle info
|
||||
If dSideHeel > 10 * EPS_SMALL Then
|
||||
EgtSetInfo(CurrEntity.nGeomId, INFO_HEEL, dSideHeel)
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
Else
|
||||
EgtRemoveInfo(CurrEntity.nGeomId, INFO_HEEL)
|
||||
End If
|
||||
' Aggiorno lista entità con nuova inclinazione
|
||||
CurrEntity.dSideHeel = dSideHeel
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Funzione che modifica l'inclinazione di un lato
|
||||
Friend Function ModifyDrip(sEntityName As String, bVal As Boolean) As Boolean
|
||||
' Ricavo CurrEntity dal nome
|
||||
@@ -683,11 +785,13 @@ Public Class SideEntityControlVM
|
||||
Else
|
||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
m_dDripOffset = GetMainPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20)
|
||||
m_dDripOffset2 = GetMainPrivateProfileDouble(S_SIDES, K_DRIPOFFSET2, 0)
|
||||
m_dDripDepth = GetMainPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10)
|
||||
m_dDripShort = GetMainPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0)
|
||||
SetParameter1(m_dDripOffset)
|
||||
SetParameter2(m_dDripDepth)
|
||||
SetParameter3(m_dDripShort)
|
||||
SetParameter2(m_dDripOffset2)
|
||||
SetParameter3(m_dDripDepth)
|
||||
SetParameter4(m_dDripShort)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -704,6 +808,7 @@ Public Class SideEntityControlVM
|
||||
WriteMainPrivateProfileString(S_SIDES, K_SIDEANGLE, DoubleToString(m_Parameter1, 3))
|
||||
Else
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET, DoubleToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET2, DoubleToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPDEPTH, DoubleToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPSHORT, DoubleToString(m_dDripShort, 3))
|
||||
End If
|
||||
@@ -746,13 +851,15 @@ Public Class SideEntityControlVM
|
||||
While LineId <> GDB_ID.NULL
|
||||
Dim dSideAngle As Double = 0
|
||||
Dim bSA As Boolean = EgtGetInfo(LineId, INFO_SIDE_ANGLE, dSideAngle)
|
||||
Dim dSideAngle2 As Double = 0
|
||||
Dim bSA2 As Boolean = EgtGetInfo(LineId, INFO_SIDE_ANGLE2, dSideAngle2)
|
||||
If Math.Abs(dSideAngle) > EPS_ANG_SMALL Or bSA2 Then
|
||||
Dim dSideHeel As Double = 0
|
||||
Dim bSH As Boolean = EgtGetInfo(LineId, INFO_HEEL, dSideHeel)
|
||||
If Math.Abs(dSideAngle) > EPS_ANG_SMALL Or bSH Then
|
||||
' Creo testo con angolo di inclinazione
|
||||
Dim sText As String = DoubleToString(dSideAngle, 1) & "°"
|
||||
If bSA2 Then sText &= "; " & DoubleToString(dSideAngle2, 1) & "°"
|
||||
If dSideHeel > 10 * EPS_SMALL Then sText &= "; " & LenToString(dSideHeel, 1) & "°"
|
||||
SideEntityControlVM.AddTextToLine(sText, TextLayId, LineId, 15, dBBoxRad, False, True)
|
||||
' Imposto angolo originale
|
||||
EgtSetInfo(LineId, INFO_ORIG_SIDE_ANGLE, dSideAngle)
|
||||
End If
|
||||
LineId = EgtGetNext(LineId)
|
||||
End While
|
||||
@@ -845,6 +952,7 @@ Friend Class SideAngleEntity
|
||||
|
||||
Friend Shared m_Parameter1 As Double
|
||||
Friend Shared m_ModifySideAngle As Action(Of String, Double)
|
||||
Friend Shared m_ModifySideHeel As Action(Of String, Double)
|
||||
Friend Shared m_RefreshSideAngleText As Action
|
||||
|
||||
Private m_dSideAngle As Double
|
||||
@@ -889,6 +997,43 @@ Friend Class SideAngleEntity
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_dSideHeel As Double
|
||||
Public Property GrphSideHeel As String
|
||||
Get
|
||||
Return DoubleToString(m_dSideHeel, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dVal As Double = 0
|
||||
If Not String.IsNullOrWhiteSpace(value) Then StringToDouble(value, dVal)
|
||||
If dVal <> m_dSideHeel Then
|
||||
' Verifico stia nei limiti
|
||||
If dVal < 0 Then
|
||||
m_dSideHeel = 0
|
||||
NotifyPropertyChanged("GrphSideHeel")
|
||||
Else
|
||||
m_dSideHeel = dVal
|
||||
End If
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
m_ModifySideHeel(sEntityName, dSideHeel)
|
||||
' Aggiorno tutti i testi
|
||||
m_RefreshSideAngleText()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Public Property dSideHeel As Double
|
||||
Get
|
||||
Return m_dSideHeel
|
||||
End Get
|
||||
Set(value As Double)
|
||||
' Verifico stia nei limiti
|
||||
If value < 0 Then
|
||||
m_dSideHeel = 0
|
||||
Else
|
||||
m_dSideHeel = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overrides Property bIsChecked As Boolean
|
||||
Get
|
||||
Return Not m_dSideAngle = 0
|
||||
@@ -910,9 +1055,10 @@ Friend Class SideAngleEntity
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, dSideAngle As Double, Mode As SideEntityControlVM.ModeOpt)
|
||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, dSideAngle As Double, dSideHeel As Double, Mode As SideEntityControlVM.ModeOpt)
|
||||
MyBase.New(nId, sEntityName, nTextId, Mode)
|
||||
m_dSideAngle = dSideAngle
|
||||
m_dSideHeel = dSideHeel
|
||||
End Sub
|
||||
|
||||
Friend Shared Function FindEntity(sEntityName As String, EntityList As ObservableCollection(Of SideEntity)) As SideAngleEntity
|
||||
|
||||
Reference in New Issue
Block a user