Compare commits
78 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 90ec48526b | |||
| af8690cf33 | |||
| 21ff4be8ec | |||
| 228a751335 | |||
| d5188fcd96 | |||
| 1b131fd781 | |||
| 6f1ea25aaa | |||
| 6d18e9eba5 | |||
| bd43571e10 | |||
| 757c4d7b6f | |||
| 251ae061f1 | |||
| f0eec3b4da | |||
| b529aa7e99 | |||
| dd31c112a6 | |||
| 738945927b | |||
| 6827c7f971 | |||
| 7abeca0815 | |||
| c758f5474e | |||
| 99750342ad | |||
| dfb555c7ea | |||
| 429e82e349 | |||
| c1a0d1267e | |||
| efbc378b9e | |||
| 60323f2929 | |||
| da1e7b8104 | |||
| b8fdd83f88 | |||
| 5a3a36c02d | |||
| e65a5a7b4b | |||
| 4e80a94013 | |||
| 98f9a3917c | |||
| a737a9313d | |||
| 1f94bff09b | |||
| 849b5e6f45 | |||
| 0a77a8e32f | |||
| 084a71bf54 | |||
| bdc26a0bf6 | |||
| ca32de50f0 | |||
| a0d7687214 | |||
| 412c3c4b5d | |||
| 90b1fa9221 | |||
| 11704fa33d | |||
| 97442a5d65 | |||
| 4f1a9b8938 | |||
| c96c3ef581 | |||
| fdf33ef796 | |||
| a599fde07a | |||
| 7267b77522 | |||
| 1ebf4a3f54 | |||
| 4b85c118cd | |||
| 53a79186c9 | |||
| 4d37978789 | |||
| 12081cec28 | |||
| 109feeb6f7 | |||
| da0bcbac69 | |||
| 27a54b0034 | |||
| c1aee47e53 | |||
| 6eb6e817b8 | |||
| f3f48f0794 | |||
| 3ad5e8085d | |||
| 2b48a26032 | |||
| cf066275a5 | |||
| 37abbd79d5 | |||
| f959cb157c | |||
| 8353132036 | |||
| e59d50923b | |||
| e5fca60809 | |||
| f7631e5201 | |||
| f45efb2310 | |||
| 88f863407a | |||
| 9e4f05f2cc | |||
| 8a7ec79689 | |||
| ec29054009 | |||
| 96be2e5fbf | |||
| 3ef8843b1d | |||
| cb261ce99b | |||
| 13bfc40f9f | |||
| 1acf7d0d87 | |||
| eb0f3adec2 |
@@ -18,12 +18,24 @@ Public Class AboutBoxV
|
||||
Dim sLeftDays As String = ""
|
||||
Dim nLeftDays As Integer
|
||||
If EgtGetKeyLeftDays(nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays = " (" & nLeftDays.ToString() & ")"
|
||||
Dim sAssStatus As String = " discontinued"
|
||||
Dim nAssLeftDays As Integer
|
||||
If EgtGetKeyAssLeftDays( nAssLeftDays) And nAssLeftDays >= 0 Then
|
||||
If nAssLeftDays > 30 then
|
||||
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
|
||||
Else If nAssLeftDays > 0 then
|
||||
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
|
||||
Else
|
||||
sAssStatus = "to be renewed by today"
|
||||
End If
|
||||
End If
|
||||
sInfo = If(EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
|
||||
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
|
||||
" Inst" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() &
|
||||
" Ulv" & Map.refMainWindowVM.MainWindowM.nUserLevel.ToString() &
|
||||
" Dbg" & Map.refMainWindowVM.MainWindowM.DebugLevel().ToString() & Environment.NewLine
|
||||
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
|
||||
sInfo &= "Maintenance plan " & sAssStatus & Environment.NewLine
|
||||
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
|
||||
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
|
||||
Dim sOpSys As String = String.Empty
|
||||
|
||||
@@ -72,13 +72,15 @@ Public Module TreeViewItemHelper
|
||||
Dim treeViewItem As TreeViewItem = VisualUpwardSearch(Of TreeViewItem)(TryCast(e.OriginalSource, DependencyObject))
|
||||
If treeViewItem IsNot Nothing Then
|
||||
treeViewItem.IsSelected = True
|
||||
Dim Tree As TreeView = VisualUpwardSearch(Of TreeView)(TryCast(treeViewItem, DependencyObject))
|
||||
If Not IsNothing(Tree) Then
|
||||
Dim myTransform As GeneralTransform = treeViewItem.TransformToAncestor(Tree)
|
||||
If Not IsNothing(treeViewItem.ContextMenu) Then
|
||||
Dim Tree As TreeView = VisualUpwardSearch(Of TreeView)(TryCast(treeViewItem, DependencyObject))
|
||||
If Not IsNothing(Tree) Then
|
||||
Dim myTransform As GeneralTransform = treeViewItem.TransformToAncestor(Tree)
|
||||
|
||||
Dim myOffset As Point = myTransform.Transform(New Point(0, 0))
|
||||
treeViewItem.ContextMenu.HorizontalOffset = -treeViewItem.ActualWidth + (-myOffset.X) + Tree.ActualWidth - 3
|
||||
treeViewItem.ContextMenu.VerticalOffset = -3
|
||||
Dim myOffset As Point = myTransform.Transform(New Point(0, 0))
|
||||
treeViewItem.ContextMenu.HorizontalOffset = -treeViewItem.ActualWidth + (-myOffset.X) + Tree.ActualWidth - 3
|
||||
treeViewItem.ContextMenu.VerticalOffset = -3
|
||||
End If
|
||||
End If
|
||||
e.Handled = True
|
||||
End If
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class ChooseMachineWndVM
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
Public Const MAT_KW = "KW"
|
||||
Public Const MAT_KZ = "KZ"
|
||||
Public Const MAT_KN = "KN"
|
||||
Public Const MAT_TDRYER = "TDRYER"
|
||||
Public Const MAT_ORIG = "Orig"
|
||||
|
||||
' parametri Lavorazione
|
||||
@@ -93,6 +94,7 @@
|
||||
Public Const MAC_INNERSHELLWIDTH = "InnerStrandW"
|
||||
Public Const MAC_OFFSETLEADPOINT = "OffsetLeadPoint"
|
||||
Public Const MAC_LEADIN = "LeadIn"
|
||||
Public Const MAC_SINGLELEADIN = "SingleLeadIn"
|
||||
Public Const MAC_LEADINTANGDIST = "LeadInTangDist"
|
||||
Public Const MAC_LEADINORTHODIST = "LeadInOrthoDist"
|
||||
Public Const MAC_LEADOUT = "LeadOut"
|
||||
@@ -102,6 +104,7 @@
|
||||
Public Const MAC_COASTINGFEEDPU = "CoastingFeedPu"
|
||||
Public Const MAC_WIPELEN = "WipeLen"
|
||||
Public Const MAC_WIPEFEEDPU = "WipeFeedPu"
|
||||
Public Const MAC_SPIRALVASELEN = "SpiralVaseLen"
|
||||
Public Const MAC_WIPEDIR = "WipeDir"
|
||||
Public Const MAC_FLOORCOUNT = "FloorCount"
|
||||
Public Const MAC_G0FEED = "G0Feed"
|
||||
@@ -111,11 +114,16 @@
|
||||
Public Const MAC_POSTFLOWDELAY = "PostFlowDelay"
|
||||
Public Const MAC_SCREWBACK = "ScrewBack"
|
||||
Public Const MAC_SLICINGHEIGHT = "SlicingHeight"
|
||||
Public Const MAC_MAXSLICESNUMBER = "MaxSlicesNumber"
|
||||
Public Const MAC_RIBSSTRANDWIDTH = "RibsStrandW"
|
||||
Public Const MAC_RIBSTYPE = "RibsType"
|
||||
Public Const MAC_RIBSOVERLAP = "RibsOverlap"
|
||||
Public Const MAC_RIBSSTRANDOVERLAP = "RibsStrandOverlap"
|
||||
Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount"
|
||||
Public Const MAC_RIBSLINK = "RibsLink"
|
||||
Public Const MAC_RIBSLINKFILLET = "RibsLinkFillet"
|
||||
Public Const MAC_RIBSMERGEWITHSHELL = "RibsMergeWithShell"
|
||||
Public Const MAC_RIBSINVERTMERGEDSHELLMAINLINK = "InvertRibsMergedShellMainLink"
|
||||
Public Const MAC_RIBSINVERTORDER = "RibsInvertOrder"
|
||||
Public Const MAC_RIBSINVERTDIRECTION = "RibsInvertDirection"
|
||||
Public Const MAC_RIBSINVERTSTRANDORDER = "RibsInvertStrandOrder"
|
||||
@@ -126,6 +134,7 @@
|
||||
Public Const MAC_RIBSLEADOUTCOASTING = "RibsLeadOutCoasting"
|
||||
Public Const MAC_RIBSLEADOUTWIPE = "RibsLeadOutWipe"
|
||||
Public Const MAC_RIBSLEADOUTWIPEDIR = "RibsLeadOutWipeDir"
|
||||
Public Const MAC_RIBSLEADFILLET = "RibsLeadFillet"
|
||||
Public Const MAC_RIBSLIMITUNBOUNDEDWITHSOLID = "LimitUnboundedRibsWithSolid"
|
||||
Public Const MAC_SHELLNBRDIFFERENCE = "ShellNbrDifference"
|
||||
Public Const MAC_SHELLNBRCOASTING = "ShellNbrCoasting"
|
||||
|
||||
@@ -53,6 +53,7 @@ Public Module ConstGen
|
||||
' Abilitazioni licenza
|
||||
Friend Enum KEY_OPT As UInteger
|
||||
BASE = 1 ' Prodotto Icarus
|
||||
MACHINE_EXPORT = 2 ' opzione per esportare file icrx per macchina
|
||||
End Enum
|
||||
|
||||
' File di log generale
|
||||
@@ -77,4 +78,7 @@ Public Module ConstGen
|
||||
' Nome file Lua con le funzioni di attrezzaggio
|
||||
Public Const SETUP_LUA As String = "SetUp.lua"
|
||||
|
||||
' Chiave di Info in gruppo di lavoro per attivazione Virtual Milling
|
||||
Public Const KEY_MCHGRP_VM As String = "Vm"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -29,6 +29,7 @@ Public Module ConstIni
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_LASTNGEDIR As String = "LastNgeDir"
|
||||
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
||||
Public Const K_MACHINEEXPORT As String = "MachineExport"
|
||||
'Public Const K_SUPPORT As String = "Support"
|
||||
|
||||
'Public Const S_LANGUAGES As String = "Languages"
|
||||
@@ -102,11 +103,15 @@ Public Module ConstIni
|
||||
Public Const K_DXFSCALE As String = "DxfScale"
|
||||
Public Const K_STLSCALE As String = "StlScale"
|
||||
Public Const K_CNCFLAG As String = "CncFlag"
|
||||
Public Const K_ADVFLAG As String = "AdvFlag"
|
||||
Public Const K_ADVTOLER As String = "AdvToler"
|
||||
|
||||
'Public Const S_SIMUL As String = "Simul"
|
||||
'Public Const K_SLIDERX As String = "SliderX"
|
||||
'Public Const K_SLIDERVAL As String = "SliderVal"
|
||||
Public Const K_MACHVIEWMODE As String = "MachViewMode"
|
||||
Public Const K_VIRTUALADDITIVE As String = "VirtualAdditive"
|
||||
Public Const K_TRACEENABLE As String = "TraceEnable"
|
||||
|
||||
Public Const S_PRINTING3D As String = "3dPrinting"
|
||||
Public Const K_3PRNBASEDIR As String = "BaseDir"
|
||||
@@ -115,6 +120,9 @@ Public Module ConstIni
|
||||
Public Const K_VIEWSLIDER As String = "ViewSlider"
|
||||
Public Const K_IMPORTCURREXTENSION As String = "ImportCurrExtension"
|
||||
|
||||
Public Const S_SOLIDS As String = "Solids"
|
||||
Public Const K_SIMPLIFIEDSECTION As String = "SimplifiedSection"
|
||||
|
||||
Public Const S_COLORS As String = "Colors"
|
||||
Public Const K_CLR_PRINTPART As String = "PrintPart"
|
||||
Public Const K_CLR_RIBS As String = "Ribs"
|
||||
@@ -126,4 +134,7 @@ Public Module ConstIni
|
||||
Public Const S_MRUFILES As String = "MruFiles"
|
||||
Public Const S_MRUIMPORTFILES As String = "MruImportFiles"
|
||||
|
||||
Public Const S_TEMPLETESEL As String = "TempleteSel"
|
||||
Public Const K_CURRTEMPLETESEL As String = "CurrTempleteSel"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
Public Module ConstMachDataIni
|
||||
|
||||
Public Const MACHDATA_INI_FILE_NAME As String = "Data.ini"
|
||||
Public Const TOOLTIP_INI_FILE_NAME As String = "TooltipData.ini"
|
||||
|
||||
Public Const S_TABLE As String = "Table"
|
||||
Public Const K_DIMX As String = "DimX"
|
||||
@@ -26,6 +27,7 @@ Public Module ConstMachDataIni
|
||||
Public Const S_45DEGX As String = "45DegX"
|
||||
Public Const S_45DEGY As String = "45DegY"
|
||||
Public Const S_HORIZONTAL As String = "Horizontal"
|
||||
Public Const S_MULTIPLANAR As String = "MultiPlanar"
|
||||
Public Const K_MINX As String = "MinX"
|
||||
Public Const K_MAXX As String = "MaxX"
|
||||
Public Const K_MINY As String = "MinY"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Public Module ConstMachIni
|
||||
|
||||
Public Const MACH_INI_FILE_NAME As String = "MachData.ini"
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_GEN_STD_VIEW As String = "StandardView"
|
||||
|
||||
Public Const S_MACHINING As String = "Machining"
|
||||
Public Const K_MACH_INITSCRIPT As String = "InitScript"
|
||||
@@ -8,10 +9,27 @@
|
||||
|
||||
Public Const S_MACH_PRINTING3D As String = "3dPrinting"
|
||||
Public Const K_SLICINGTYPE As String = "SlicingType"
|
||||
Public Const K_NEWSLICINGTYPE As String = "NewSlicingType"
|
||||
Public Const K_SPEED_MIN As String = "SpeedMin"
|
||||
Public Const K_SPEED_MAX As String = "SpeedMax"
|
||||
Public Const K_MAX_HEIGHT As String = "HMax"
|
||||
|
||||
Public Const S_MINMAX As String = "MinMax"
|
||||
|
||||
#Region "ToolTip"
|
||||
|
||||
Public Const K_TITLE As String = "Title"
|
||||
Public Const K_DESCRIPTION As String = "Description"
|
||||
Public Const K_FIRST_ICON As String = "Icon_First"
|
||||
Public Const K_SECOND_ICON As String = "Icon_Second"
|
||||
Public Const K_ORIENTATION_ICON As String = "IconOrientation"
|
||||
|
||||
#End Region
|
||||
|
||||
Public Const S_VMILL As String = "VMill"
|
||||
Public Const K_VM_ENABLE As String = "Enable"
|
||||
|
||||
Public Const S_TOOLTRACE As String = "ToolTrace"
|
||||
Public Const K_TT_ENABLE As String = "Enable"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -106,12 +106,12 @@ Public Class CurrMachining
|
||||
Else
|
||||
m_nIndex = 0
|
||||
End If
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.GENERAL, nPartId, m_nIndex, False))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.LINK, nPartId, m_nIndex, False))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, False))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, False))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, False))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, False))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.GENERAL, nPartId, m_nIndex, False, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.LINK, nPartId, m_nIndex, False, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, False, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, False, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, False, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, False, Me))
|
||||
For Each Cathegory In m_CathegoryList
|
||||
For Each MachiningParam In Cathegory.MachiningParamList
|
||||
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
|
||||
@@ -124,12 +124,12 @@ Public Class CurrMachining
|
||||
' ricavo lavorazione da lista
|
||||
Dim CurrMachiningInDb As MachiningIndex = Map.refTopPanelVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
||||
m_sCurrGUID = CurrMachiningInDb.sGUID
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.GENERAL, nPartId, m_nIndex, True))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.LINK, nPartId, m_nIndex, True))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, True))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, True))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, True))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, True))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.GENERAL, nPartId, m_nIndex, True, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.LINK, nPartId, m_nIndex, True, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, True, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, True, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, True, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, True, Me))
|
||||
For Each Cathegory In m_CathegoryList
|
||||
For Each MachiningParam In Cathegory.MachiningParamList
|
||||
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
|
||||
@@ -196,8 +196,9 @@ End Class
|
||||
Public Class CurrMachiningCathegory
|
||||
Inherits MachiningCathegory
|
||||
|
||||
Sub New(Type As Cathegories, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
|
||||
Sub New(Type As Cathegories, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Machining As Machining)
|
||||
m_Type = Type
|
||||
m_Machining = Machining
|
||||
Select Case m_Type
|
||||
Case Cathegories.GENERAL
|
||||
m_sName = "General"
|
||||
@@ -221,7 +222,8 @@ Public Class CurrMachiningCathegory
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.SCREWBACK, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nPartId, nIndex, bForceFromDb, Me)})
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.MAXSLICESNUMBER, nPartId, nIndex, bForceFromDb, Me)})
|
||||
Case Cathegories.LINK
|
||||
m_sName = "Shell"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.INNERSHELLWIDTH, nPartId, nIndex, bForceFromDb, Me),
|
||||
@@ -229,6 +231,7 @@ Public Class CurrMachiningCathegory
|
||||
New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.LINKPARAM, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.SINGLELEADIN, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrComboMachiningParam(MachiningParam.Params.LEADOUT, nPartId, nIndex, bForceFromDb, Me),
|
||||
@@ -237,7 +240,8 @@ Public Class CurrMachiningCathegory
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGLEN, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.WIPELEN, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nPartId, nIndex, bForceFromDb, Me)})
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.SPIRALVASELEN, nPartId, nIndex, bForceFromDb, Me)})
|
||||
'New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
||||
Case Cathegories.RIBS
|
||||
m_sName = "Ribs"
|
||||
@@ -245,8 +249,12 @@ Public Class CurrMachiningCathegory
|
||||
New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLINK, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLINKFILLET, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSMERGEWITHSHELL, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTMERGEDSHELLMAINLINK, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
|
||||
@@ -256,7 +264,8 @@ Public Class CurrMachiningCathegory
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADFILLET, nPartId, nIndex, bForceFromDb, Me)})
|
||||
Case Cathegories.SHELL_NUMBER
|
||||
m_sName = "Reduce Shell Number"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb, Me),
|
||||
@@ -309,6 +318,11 @@ Public Class CurrMachiningCathegory
|
||||
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||
MachiningParam.ManageDependencyParam()
|
||||
Next
|
||||
For Each Param In {MachiningParam.Params.SPIRALVASE}
|
||||
Dim GeneralCathegory As MachiningCathegory = Machining.CathegoryList.FirstOrDefault(Function(z) z.Type = Cathegories.GENERAL)
|
||||
Dim MachiningParam As CheckMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||
MachiningParam.ManageDependencyParam(Me)
|
||||
Next
|
||||
Case Cathegories.RIBS
|
||||
For Each Param In {MachiningParam.Params.RIBSTYPE}
|
||||
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||
@@ -354,7 +368,7 @@ Public Class CurrNumericMachiningParam
|
||||
|
||||
Public Overrides Property sValue As String
|
||||
Get
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 1), DoubleToString(m_dValue, 2))
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 2), DoubleToString(m_dValue, 2))
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dTempValue As Double = 0
|
||||
@@ -467,6 +481,9 @@ Public Class CurrNumericMachiningParam
|
||||
Case Params.WIPEFEED_PC
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEFEEDPU, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.SPIRALVASELEN
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SPIRALVASELEN, m_dValue)
|
||||
m_bIsLen = True
|
||||
'Case Params.WIPEDIR
|
||||
' bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEDIR, m_dValue)
|
||||
' m_bIsLen = True
|
||||
@@ -484,25 +501,34 @@ Public Class CurrNumericMachiningParam
|
||||
m_bIsLen = True
|
||||
Case Params.PREFLOWDELAY
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_PREFLOWDELAY, m_dValue)
|
||||
m_bIsLen = True
|
||||
m_bIsLen = False
|
||||
Case Params.POSTFLOWDELAY
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_POSTFLOWDELAY, m_dValue)
|
||||
m_bIsLen = True
|
||||
m_bIsLen = False
|
||||
Case Params.SCREWBACK
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SCREWBACK, m_dValue)
|
||||
m_bIsLen = True
|
||||
m_bIsLen = False
|
||||
Case Params.SLICINGHEIGHT
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGHEIGHT, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.MAXSLICESNUMBER
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_MAXSLICESNUMBER, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDWIDTH
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDWIDTH, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSOVERLAP
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSLINKFILLET
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINKFILLET, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSLEADINLEN
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADINLEN, m_dValue)
|
||||
m_bIsLen = True
|
||||
@@ -518,6 +544,9 @@ Public Class CurrNumericMachiningParam
|
||||
Case Params.RIBSLEADOUTWIPEDIR
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSLEADFILLET
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADFILLET, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.SHELLNBRDIFFERENCE
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, m_dValue)
|
||||
m_bIsLen = False
|
||||
@@ -614,15 +643,15 @@ Public Class CurrNumericMachiningParam
|
||||
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
||||
Select Case Type
|
||||
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE,
|
||||
Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK, Params.SLICINGHEIGHT
|
||||
Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK, Params.SLICINGHEIGHT, Params.MAXSLICESNUMBER
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.LINKPARAM, Params.INNERSHELLWIDTH, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
|
||||
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC,
|
||||
Params.WIPELEN, Params.WIPEFEED_PC ' Params.WIPEDIR
|
||||
Params.WIPELEN, Params.WIPEFEED_PC, Params.SPIRALVASELEN, Params.SINGLELEADIN ' Params.WIPEDIR
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.RIBSSTRANDWIDTH, Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
|
||||
Case Params.RIBSSTRANDWIDTH, Params.RIBSOVERLAP, Params.RIBSSTRANDOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSLINKFILLET, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
|
||||
Params.RIBSLEADININVERT, Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING,
|
||||
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR
|
||||
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR, Params.RIBSLEADFILLET
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.SHELLNBRDIFFERENCE, Params.SHELLNBRCOASTING, Params.SHELLNBRWIPE, Params.SHELLNBRWIPEDIR
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
@@ -693,6 +722,8 @@ Public Class CurrNumericMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_WIPELEN, sWriteValue)
|
||||
Case Params.WIPEFEED_PC
|
||||
EgtSetInfo(nPartId, MAC_WIPEFEEDPU, sWriteValue)
|
||||
Case Params.SPIRALVASELEN
|
||||
EgtSetInfo(nPartId, MAC_SPIRALVASELEN, sWriteValue)
|
||||
'Case Params.WIPEDIR
|
||||
' EgtSetInfo(nPartId, MAC_WIPEDIR, sWriteValue)
|
||||
Case Params.FLOORCOUNT
|
||||
@@ -711,12 +742,18 @@ Public Class CurrNumericMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_SCREWBACK, sWriteValue)
|
||||
Case Params.SLICINGHEIGHT
|
||||
EgtSetInfo(nPartId, MAC_SLICINGHEIGHT, sWriteValue)
|
||||
Case Params.MAXSLICESNUMBER
|
||||
EgtSetInfo(nPartId, MAC_MAXSLICESNUMBER, sWriteValue)
|
||||
Case Params.RIBSSTRANDWIDTH
|
||||
EgtSetInfo(nPartId, MAC_RIBSSTRANDWIDTH, sWriteValue)
|
||||
Case Params.RIBSOVERLAP
|
||||
EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue)
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
EgtSetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, sWriteValue)
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
EgtSetInfo(nPartId, MAC_RIBSSTRANDCOUNT, sWriteValue)
|
||||
Case Params.RIBSLINKFILLET
|
||||
EgtSetInfo(nPartId, MAC_RIBSLINKFILLET, sWriteValue)
|
||||
Case Params.RIBSLEADINLEN
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADINLEN, sWriteValue)
|
||||
Case Params.RIBSLEADOUTLEN
|
||||
@@ -727,6 +764,8 @@ Public Class CurrNumericMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPE, sWriteValue)
|
||||
Case Params.RIBSLEADOUTWIPEDIR
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, sWriteValue)
|
||||
Case Params.RIBSLEADFILLET
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADFILLET, sWriteValue)
|
||||
Case Params.SHELLNBRDIFFERENCE
|
||||
EgtSetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, sWriteValue)
|
||||
Case Params.SHELLNBRCOASTING
|
||||
@@ -928,17 +967,15 @@ Public Class CurrComboMachiningParam
|
||||
Dim bReadFromPart As Boolean = False
|
||||
Select Case Type
|
||||
Case Params.SLICINGTYPE
|
||||
Dim nSlicingType As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_SLICINGTYPE, 0, CurrentMachine.sMachIniFile)
|
||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical")})
|
||||
If nSlicingType >= 1 Then
|
||||
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45deg X"))
|
||||
If nSlicingType >= 2 Then
|
||||
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45_Y, "45deg Y"))
|
||||
If nSlicingType >= 3 Then
|
||||
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Dim nNewSlicingType As Integer = CurrentMachine.GetSlicingType()
|
||||
m_ValueList = New List(Of IdNameStruct)
|
||||
If (nNewSlicingType And 1) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical"))
|
||||
If (nNewSlicingType And 2) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45deg X"))
|
||||
If (nNewSlicingType And 4) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45_Y, "45deg Y"))
|
||||
If (nNewSlicingType And 8) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal"))
|
||||
If (nNewSlicingType And 16) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR, "MultiPlanar"))
|
||||
If (nNewSlicingType And 32) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45, "MultiPlanar 45deg"))
|
||||
If (nNewSlicingType And 64) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_HORIZ, "MultiPlanar Horiz"))
|
||||
Dim nSelValue As Integer = 0
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGTYPE, nSelValue)
|
||||
If Not bReadFromPart Then
|
||||
@@ -1150,6 +1187,7 @@ Public Class CurrCheckMachiningParam
|
||||
m_bValue = value
|
||||
NotifyPropertyChanged(NameOf(bValue))
|
||||
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
||||
ManageDependencyParam()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -1175,8 +1213,14 @@ Public Class CurrCheckMachiningParam
|
||||
Select Case Type
|
||||
Case Params.SPIRALVASE
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SPIRALVASE, m_bValue)
|
||||
Case Params.SINGLELEADIN
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SINGLELEADIN, m_bValue)
|
||||
Case Params.RIBSLINK
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINK, m_bValue)
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, m_bValue)
|
||||
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTMERGEDSHELLMAINLINK, m_bValue)
|
||||
Case Params.RIBSINVERTORDER
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTORDER, m_bValue)
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
@@ -1200,7 +1244,9 @@ Public Class CurrCheckMachiningParam
|
||||
Select Case Type
|
||||
Case Params.SPIRALVASE
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||
Case Params.SINGLELEADIN
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.RIBSLINK, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.AUXSOLIDSINFILLLINK
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
@@ -1218,8 +1264,14 @@ Public Class CurrCheckMachiningParam
|
||||
Select Case Type
|
||||
Case Params.SPIRALVASE
|
||||
EgtSetInfo(nPartId, MAC_SPIRALVASE, If(m_bValue, 1, 0))
|
||||
Case Params.SINGLELEADIN
|
||||
EgtSetInfo(nPartId, MAC_SINGLELEADIN, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSLINK
|
||||
EgtSetInfo(nPartId, MAC_RIBSLINK, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
EgtSetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
||||
EgtSetInfo(nPartId, MAC_RIBSINVERTMERGEDSHELLMAINLINK, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSINVERTORDER
|
||||
EgtSetInfo(nPartId, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||
Margin="0,0,2.5,0"
|
||||
ToolTip="{StaticResource MachiningParam_Tooltip}"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<TextBlock Text=" (BETA)"
|
||||
Margin="0,0,2.5,0"
|
||||
@@ -89,7 +90,9 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
ToolTip="{StaticResource MachiningParam_Tooltip}"
|
||||
Style="{StaticResource ParameterList_TextBlock}">
|
||||
</TextBlock>
|
||||
<TextBlock Text=" (BETA)"
|
||||
Margin="0,0,2.5,0"
|
||||
Foreground="Red"
|
||||
@@ -124,6 +127,7 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||
Margin="0,0,2.5,0"
|
||||
ToolTip="{StaticResource MachiningParam_Tooltip}"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<TextBlock Text=" (BETA)"
|
||||
Margin="0,0,2.5,0"
|
||||
@@ -156,6 +160,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Margin="0,0,2.5,0"
|
||||
ToolTip="{StaticResource MachiningParam_Tooltip}"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<CheckBox Grid.Column="1"
|
||||
IsChecked="{Binding bValue}"
|
||||
@@ -181,6 +186,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Margin="0,0,2.5,0"
|
||||
ToolTip="{StaticResource MachiningParam_Tooltip}"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<ListBox Grid.Column="1"
|
||||
ItemsSource="{Binding ValueList}"
|
||||
|
||||
@@ -140,7 +140,7 @@ Public Class CurrMachiningPanelVM
|
||||
WriteMachiningParam(nIndex, MAC_GUID, sNewMachGUID.ToString())
|
||||
WriteMachiningParam(nIndex, MAC_NAME, SaveInDbWndVM.sName)
|
||||
' creo categoria materiali con attivo materiale corrente
|
||||
Dim MaterialCathegory As New MachiningCathegory(MachiningCathegory.Cathegories.MATERIALS, 0)
|
||||
Dim MaterialCathegory As New MachiningCathegory(MachiningCathegory.Cathegories.MATERIALS, 0, m_CurrMachining)
|
||||
Dim SelMaterialParam As MaterialMachiningParam = MaterialCathegory.MachiningParamList.FirstOrDefault(Function(x As MaterialMachiningParam) x.sGUID = Map.refTopPanelVM.SelMaterial.sGUID)
|
||||
If Not IsNothing(SelMaterialParam) Then
|
||||
SelMaterialParam.bValue = True
|
||||
|
||||
@@ -21,8 +21,8 @@ Public Class DispositionPanelVM
|
||||
Dim dNewXPos As Double = ptReference.x
|
||||
StringToLen(value, dNewXPos)
|
||||
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||
Dim dMin As Double = 0
|
||||
Dim dMax As Double = CurrentMachine.b3Tab.DimX
|
||||
Dim dMin As Double = Math.Min( 0, CurrentMachine.b3ExtrusionArea.Min.x)
|
||||
Dim dMax As Double = Math.Max( CurrentMachine.b3Tab.DimX, CurrentMachine.b3ExtrusionArea.Max.x)
|
||||
If b3Print.Max.x > ptReference.x Then
|
||||
dMax -= b3Print.Max.x - ptReference.x
|
||||
End If
|
||||
@@ -60,8 +60,8 @@ Public Class DispositionPanelVM
|
||||
Dim dNewYPos As Double = ptReference.y
|
||||
StringToLen(value, dNewYPos)
|
||||
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||
Dim dMin As Double = 0
|
||||
Dim dMax As Double = CurrentMachine.b3Tab.DimY
|
||||
Dim dMin As Double = Math.Min( 0, CurrentMachine.b3ExtrusionArea.Min.y)
|
||||
Dim dMax As Double = Math.Max( CurrentMachine.b3Tab.DimY, CurrentMachine.b3ExtrusionArea.Max.y)
|
||||
If b3Print.Max.y > ptReference.y Then
|
||||
dMax -= b3Print.Max.y - ptReference.y
|
||||
End If
|
||||
|
||||
@@ -1,171 +1,188 @@
|
||||
<EgtWPFLib5:EgtMainWindow x:Class="EgtColorPickerV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtHexagon="clr-namespace:Icarus"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Width="750" Height="450"
|
||||
Style="{StaticResource Dialog_Window}">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Title="{Binding sTitle}"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Style="{StaticResource Dialog_Window}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl>
|
||||
<TabItem Header="{Binding BasicColor_Msg}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColors}"
|
||||
SelectedItem="{Binding SelColor}"
|
||||
HorizontalAlignment="Center"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding ColorPicker_Msg}">
|
||||
<TabItem.Resources>
|
||||
<Style TargetType="{x:Type EgtHexagon:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
|
||||
<Setter Property="BorderThickness" Value="1.5"/>
|
||||
<Setter Property="BorderBrush" Value="White"/>
|
||||
</Style>
|
||||
</TabItem.Resources>
|
||||
<EgtHexagon:EgtHexList ItemsSource="{Binding HexList}"
|
||||
SelectedItem="{Binding sHexSelColor}"
|
||||
Orientation="Vertical"
|
||||
Margin="2.5"
|
||||
RowCount="13"
|
||||
ColumnCount="13"
|
||||
Height="300"
|
||||
Width="350"
|
||||
Style="{StaticResource EgtHexList}">
|
||||
<EgtHexagon:EgtHexList.ItemTemplate>
|
||||
<DataTemplate/>
|
||||
</EgtHexagon:EgtHexList.ItemTemplate>
|
||||
<EgtHexagon:EgtHexList.ItemContainerStyle>
|
||||
<Style TargetType="EgtHexagon:EgtHexItem" BasedOn="{StaticResource EgtHexItem}">
|
||||
<Setter Property="Grid.Row" Value="{Binding nRow}"/>
|
||||
<Setter Property="Grid.Column" Value="{Binding nColumn}"/>
|
||||
<Setter Property="Background" Value="{Binding Background}"/>
|
||||
</Style>
|
||||
</EgtHexagon:EgtHexList.ItemContainerStyle>
|
||||
</EgtHexagon:EgtHexList>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding ColorPickerTheme_Msg}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColorsTheme}"
|
||||
SelectedItem="{Binding SelColorTheme}"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1"
|
||||
Margin="5,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding CustomColor_Msg}"
|
||||
Margin="5,18,5,10"
|
||||
<TextBlock Grid.Row="0"
|
||||
Text="{Binding BasicColor_Msg}"
|
||||
Margin="5,0,5,0"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding CustomColors}"
|
||||
SelectedItem="{Binding SelCustomColor}"
|
||||
HorizontalAlignment="Center"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
<ListBox Grid.Row="1"
|
||||
ItemsSource="{Binding BasicColors}"
|
||||
SelectedItem="{Binding SelColor}"
|
||||
HorizontalAlignment="Center">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="8"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="4"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding CustomColor_Msg}"
|
||||
Margin="5,0,5,0"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<ListBox Grid.Row="3"
|
||||
Margin="5,0,0,0"
|
||||
ItemsSource="{Binding CustomColors}"
|
||||
SelectedItem="{Binding SelCustomColor}"
|
||||
HorizontalAlignment="Center">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="8"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="4"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid x:Name="CanvasGrid"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalAlignment="Stretch"
|
||||
Margin="5,10,5,0">
|
||||
<Canvas x:Name="MyCanvas"
|
||||
MouseDown="ColorRectangle_MouseDown"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Width="260"
|
||||
Height="{Binding ActualHeight, ElementName=CanvasGrid}">
|
||||
<Rectangle Grid.Column="0"
|
||||
Width="{Binding ActualWidth, ElementName=MyCanvas}"
|
||||
Height="{Binding ActualHeight, ElementName=MyCanvas}"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
IsEnabled="True">
|
||||
<Rectangle.Fill>
|
||||
<LinearGradientBrush StartPoint="0, 0.5" EndPoint="1.6, 0.5" >
|
||||
<GradientStop Color="Red" Offset="0" />
|
||||
<GradientStop Color="Yellow" Offset="0.1" />
|
||||
<GradientStop Color="Lime" Offset="0.2" />
|
||||
<GradientStop Color="Cyan" Offset="0.3" />
|
||||
<GradientStop Color="Blue" Offset="0.4" />
|
||||
<GradientStop Color="Purple" Offset="0.5" />
|
||||
<GradientStop Color="Red" Offset="0.6" />
|
||||
</LinearGradientBrush>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Rectangle Grid.Column="0"
|
||||
Width="{Binding ActualWidth, ElementName=MyCanvas}"
|
||||
Height="{Binding ActualHeight, ElementName=MyCanvas}"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
IsEnabled="True">
|
||||
<Rectangle.Fill>
|
||||
<LinearGradientBrush StartPoint="0.5, 0" EndPoint="0.5, 1" >
|
||||
<GradientStop Color="#00ffffff" Offset="0" />
|
||||
<GradientStop Color="Gray" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Ellipse x:Name="Ellipse"
|
||||
Stroke="Black"
|
||||
StrokeThickness="1"
|
||||
Width="15"
|
||||
Height="15"/>
|
||||
</Canvas>
|
||||
</Grid>
|
||||
<Grid x:Name="CanvasGridL"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalAlignment="Stretch"
|
||||
Grid.Column="1"
|
||||
Margin="5,10,10,0">
|
||||
<Canvas x:Name="MyCanvasL"
|
||||
MouseMove="Luminosity_MouseMove"
|
||||
MouseDown="Luminosity_MouseDown"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Height="{Binding ActualHeight, ElementName=CanvasGridL}"
|
||||
Width="20">
|
||||
<!--<Rectangle x:Name="LRect"
|
||||
Grid.Column="1"
|
||||
Width="20"
|
||||
Height="{Binding ActualHeight, ElementName=MyCanvasL}"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Luminosity_Fill}"/>-->
|
||||
<Rectangle Grid.Column="1"
|
||||
Width="20"
|
||||
Height="{Binding ActualHeight, ElementName=MyCanvasL}"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5">
|
||||
<Rectangle.Fill>
|
||||
<LinearGradientBrush StartPoint="0.5, 0" EndPoint="0.5, 1" >
|
||||
<GradientStop Color="White" Offset="0" />
|
||||
<GradientStop x:Name="LightnessColor" Offset="0.5"/>
|
||||
<GradientStop Color="Black" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Path x:Name="Arrow"
|
||||
Grid.Column="1"
|
||||
Data="M0,0 l4,4 l0,2 l-4,-4 l-4,4 l0,-2 z "
|
||||
Canvas.Left="0"
|
||||
Canvas.Top="10"
|
||||
Stroke="Black"
|
||||
Fill="Black"
|
||||
StrokeThickness="1">
|
||||
<!--Data="M13.5,10.697 l-3.497-3.6,-3.497,3.6 L6.494,8.328 l3.503-3.631 l3.48,3.592 L13.494,10.697z"-->
|
||||
<Path.RenderTransform>
|
||||
<RotateTransform Angle="270" />
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Canvas>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="0,20,0,0">
|
||||
<Grid Grid.Row="1" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -183,15 +200,17 @@
|
||||
Fill="{Binding CurrColor}"/>
|
||||
<Button x:Name="SaveColor"
|
||||
Grid.Row="1"
|
||||
Margin="0,10,0,0"
|
||||
Margin="0,5,0,0"
|
||||
Content="{Binding AddCColor_Msg}"
|
||||
Command="{Binding SaveColor_Command}"
|
||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
@@ -208,7 +227,7 @@
|
||||
Margin="0,10,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding Green_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
@@ -220,7 +239,7 @@
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding Blu_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
@@ -232,18 +251,58 @@
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="H"
|
||||
Margin="0,10,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="3"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,10,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Hue, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Text="S"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="3"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Saturation, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
Text="L"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="3"
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Lightness, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
<TextBlock Grid.Row="3"
|
||||
Grid.ColumnSpan="2"
|
||||
Text="{Binding Hexadecimal_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
<TextBox Grid.Column="2"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="3"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
Text="{Binding Hexadecimal}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
Text="{Binding Hexadecimal, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Drawing.Configuration
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class EgtColorPickerV
|
||||
|
||||
@@ -19,16 +21,19 @@ Public Class EgtColorPickerV
|
||||
|
||||
Public Property Color As System.Drawing.Color
|
||||
Get
|
||||
Return System.Drawing.Color.FromArgb(255, m_EgtColorPickerVM.Red, m_EgtColorPickerVM.Green, m_EgtColorPickerVM.Blue)
|
||||
Dim RgbColor As Color = HSLColor.HslToRgb(m_EgtColorPickerVM.HSLColor)
|
||||
Return System.Drawing.Color.FromArgb(255, RgbColor.R, RgbColor.G, RgbColor.B)
|
||||
End Get
|
||||
Set(value As System.Drawing.Color)
|
||||
m_EgtColorPickerVM.Red = value.R
|
||||
m_EgtColorPickerVM.Green = value.G
|
||||
m_EgtColorPickerVM.Blue = value.B
|
||||
m_EgtColorPickerVM.SetHSLColor(System.Windows.Media.Color.FromArgb(255, value.R, value.G, value.B))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
Private m_dH As Double = 0
|
||||
Private m_dS As Double = 0
|
||||
Private m_dL As Double = 0.5
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
@@ -40,7 +45,7 @@ Public Class EgtColorPickerV
|
||||
m_EgtColorPickerVM = EtgColorPickerVM
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructors
|
||||
#End Region
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
@@ -49,10 +54,251 @@ Public Class EgtColorPickerV
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
Private Sub EgtColorPickerVM_SetLuminosityFill(color As Color) Handles m_EgtColorPickerVM.m_SetLuminosityFill
|
||||
LightnessColor.Color = color
|
||||
End Sub
|
||||
|
||||
Private Sub EgtColorPickerVM_SetLuminosityFills() Handles m_EgtColorPickerVM.m_UpdateCursorsPos
|
||||
Dim dX As Double = m_EgtColorPickerVM.HSLColor.Hue / 360 * MyCanvas.ActualWidth
|
||||
Dim dY As Double = (1 - m_EgtColorPickerVM.HSLColor.Saturation) * MyCanvas.ActualHeight
|
||||
Dim dYL As Double = (1 - m_EgtColorPickerVM.HSLColor.Lightness) * MyCanvasL.ActualHeight
|
||||
Canvas.SetLeft(Ellipse, dX - (Ellipse.Width / 2))
|
||||
Canvas.SetTop(Ellipse, dY - (Ellipse.Height / 2))
|
||||
Canvas.SetTop(Arrow, dYL)
|
||||
Canvas.SetLeft(Arrow, MyCanvasL.ActualWidth)
|
||||
End Sub
|
||||
|
||||
Private Sub EgtColorPickerV_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
||||
EgtColorPickerVM_SetLuminosityFills()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Seleziona il colore all'interno del rettangolo nominato ColorRectangle attraverso un'ellisse
|
||||
''' </summary>
|
||||
Private Sub ColorRectangle_MouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
Dim dX As Double = Mouse.GetPosition(MyCanvas).X
|
||||
Dim dY As Double = Mouse.GetPosition(MyCanvas).Y
|
||||
|
||||
Dim sat As Double = dX / MyCanvas.ActualWidth * 360
|
||||
Dim ton As Double = 1 - dY / MyCanvas.ActualHeight
|
||||
|
||||
m_EgtColorPickerVM.UpdateHue(Math.Round(sat, MidpointRounding.AwayFromZero))
|
||||
m_EgtColorPickerVM.UpdateSaturation(Math.Round(ton, 2))
|
||||
m_EgtColorPickerVM.UpdateLightness(0.5)
|
||||
|
||||
'Dim r, g, b As Integer
|
||||
|
||||
If dX > 0 AndAlso dX < MyCanvas.ActualWidth And dY > 0 AndAlso dY < MyCanvas.ActualHeight Then
|
||||
Canvas.SetTop(Ellipse, dY - (Ellipse.Height / 2))
|
||||
Canvas.SetLeft(Ellipse, dX - (Ellipse.Width / 2))
|
||||
Canvas.SetTop(Arrow, MyCanvas.Height / 2)
|
||||
Canvas.SetLeft(Arrow, MyCanvasL.ActualWidth)
|
||||
End If
|
||||
|
||||
'HlsToRgb(sat, lum, 1 - ton, r, g, b)
|
||||
|
||||
'Dim colargb As System.Drawing.Color = ColorFromHSV(sat, ton, lum)
|
||||
|
||||
'Dim col As Color = Media.Color.FromRgb(colargb.R, colargb.G, colargb.B)
|
||||
'Dim col As Color = Media.Color.FromRgb(r, g, b)
|
||||
'm_EgtColorPickerVM.SetCurrColorFill(col)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Permette il movimento della freccia dall'alto verso il basso
|
||||
''' </summary>
|
||||
Private Sub Luminosity_MouseMove(sender As Object, e As Input.MouseEventArgs)
|
||||
'Dim dX As Double = Mouse.GetPosition(MyCanvasL).X
|
||||
'Dim dY As Double = Mouse.GetPosition(MyCanvasL).Y
|
||||
|
||||
'If dX > 0 AndAlso dX < MyCanvasL.ActualWidth And dY > 0 AndAlso dY < MyCanvasL.ActualHeight Then
|
||||
' Arrow.Visibility = Visibility.Visible
|
||||
' Canvas.SetTop(Arrow, dY)
|
||||
' Canvas.SetLeft(Arrow, MyCanvasL.ActualWidth)
|
||||
'Else
|
||||
' Arrow.Visibility = Visibility.Collapsed
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Modifica la luminosità del colore selezionato
|
||||
''' </summary>
|
||||
Private Sub Luminosity_MouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
|
||||
Arrow.Visibility = Visibility.Visible
|
||||
Dim dYPos As Double = Mouse.GetPosition(MyCanvasL).Y
|
||||
Canvas.SetTop(Arrow, dYPos)
|
||||
|
||||
Dim dX As Double = Canvas.GetLeft(Ellipse)
|
||||
Dim dY As Double = Canvas.GetTop(Ellipse)
|
||||
Dim dL As Double = Mouse.GetPosition(MyCanvasL).Y
|
||||
|
||||
Dim sat As Double = dX / MyCanvas.ActualWidth * 360
|
||||
Dim ton As Double = dY / MyCanvas.ActualHeight
|
||||
Dim lum As Double = dL / MyCanvasL.ActualHeight
|
||||
|
||||
m_EgtColorPickerVM.UpdateLightness(1 - Math.Round(lum, 2))
|
||||
|
||||
Dim r, g, b As Integer
|
||||
|
||||
HslToRgb(m_dH, m_dS, 1 - m_dL, r, g, b)
|
||||
' HslToRgb(sat, 1 - ton, 1 - lum, r, g, b)
|
||||
' HlsToRgb(sat, 1 - lum, 1 - ton, r, g, b)
|
||||
|
||||
'Dim col As Color = Media.Color.FromRgb(r, g, b)
|
||||
'm_EgtColorPickerVM.SetCurrColorFill(col)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Shared Function HslToRgb(ByVal h As Double, ByVal s As Double, ByVal l As Double, ByRef r As Integer, ByRef g As Integer, ByRef b As Integer) As Color
|
||||
Dim dConversionH As Double = Math.Round(h, MidpointRounding.AwayFromZero)
|
||||
Dim dConversionS As Double = Math.Round(s, 2)
|
||||
Dim dConversionL As Double = Math.Round(l, 2)
|
||||
Dim C As Double = (1 - Math.Abs(2 * dConversionL - 1)) * dConversionS
|
||||
Dim X = C * (1 - Math.Abs((dConversionH / 60) Mod 2 - 1))
|
||||
Dim m = dConversionL - C / 2
|
||||
Dim dRPrimo As Double
|
||||
Dim dGPrimo As Double
|
||||
Dim dBPrimo As Double
|
||||
|
||||
If dConversionH >= 0 Then
|
||||
If dConversionH < 60 Then
|
||||
dRPrimo = C
|
||||
dGPrimo = X
|
||||
dBPrimo = 0
|
||||
ElseIf dConversionH < 120 Then
|
||||
dRPrimo = X
|
||||
dGPrimo = C
|
||||
dBPrimo = 0
|
||||
ElseIf dConversionH < 180 Then
|
||||
dRPrimo = 0
|
||||
dGPrimo = C
|
||||
dBPrimo = X
|
||||
ElseIf dConversionH < 240 Then
|
||||
dRPrimo = 0
|
||||
dGPrimo = X
|
||||
dBPrimo = C
|
||||
ElseIf dConversionH < 300 Then
|
||||
dRPrimo = X
|
||||
dGPrimo = 0
|
||||
dBPrimo = C
|
||||
ElseIf dConversionH < 360 Then
|
||||
dRPrimo = C
|
||||
dGPrimo = 0
|
||||
dBPrimo = X
|
||||
End If
|
||||
End If
|
||||
|
||||
r = (dRPrimo + m) * 255
|
||||
g = (dGPrimo + m) * 255
|
||||
b = (dBPrimo + m) * 255
|
||||
End Function
|
||||
|
||||
Friend Shared Function RgbToHsl(ByVal r As Integer, ByVal g As Integer, ByVal b As Integer, ByRef h As Double, ByRef s As Double, ByRef l As Double) As Color
|
||||
Dim dRPrimo As Double = r / 255
|
||||
Dim dGPrimo As Double = g / 255
|
||||
Dim dBPrimo As Double = b / 255
|
||||
Dim CMax As Double = Math.Max(Math.Max(dRPrimo, dGPrimo), dBPrimo)
|
||||
Dim CMin As Double = Math.Min(Math.Min(dRPrimo, dGPrimo), dBPrimo)
|
||||
Dim Delta As Double = CMax - CMin
|
||||
If Delta = 0 Then
|
||||
h = 0
|
||||
ElseIf CMax = dRPrimo Then
|
||||
h = 60 * (((dGPrimo - dBPrimo) / Delta) Mod 6)
|
||||
ElseIf CMax = dGPrimo Then
|
||||
h = 60 * (((dBPrimo - dRPrimo) / Delta) + 2)
|
||||
ElseIf CMax = dBPrimo Then
|
||||
h = 60 * (((dRPrimo - dRPrimo) / Delta) + 4)
|
||||
End If
|
||||
|
||||
l = (CMax + CMin) / 2
|
||||
|
||||
If Delta = 0 Then
|
||||
s = 0
|
||||
Else
|
||||
s = Delta / (1 - Math.Abs(2 * l - 1))
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'''' <summary>
|
||||
'''' Converte il colore selezionato da HLS ( tonalità, luminosità, saturazione) in RGB
|
||||
'''' </summary>
|
||||
'''' <param name="h">Tonalità del colore selezionato espressa in double</param>
|
||||
'''' <param name="l">Luminosità del colore selezionato espressa in double</param>
|
||||
'''' <param name="s">Saturazione del colore selezionato espressa in double</param>
|
||||
'''' <param name="r">Colore Rosso restituito dalla funzione espresso in intero</param>
|
||||
'''' <param name="g">Colore Verde restituito dalla funzione espresso in intero</param>
|
||||
'''' <param name="b">Colore Blu restituito dalla funzione espresso in intero</param>
|
||||
'Private Shared Sub HlsToRgb(ByVal h As Double, ByVal l As Double, ByVal s As Double, <Out> ByRef r As Integer, <Out> ByRef g As Integer, <Out> ByRef b As Integer)
|
||||
' Dim p2 As Double
|
||||
|
||||
' If l <= 0.5 Then
|
||||
' p2 = l * (1 + s)
|
||||
' Else
|
||||
' p2 = l + s - l * s
|
||||
' End If
|
||||
|
||||
' Dim p1 As Double = 2 * l - p2
|
||||
' Dim double_r, double_g, double_b As Double
|
||||
|
||||
' If s = 0 Then
|
||||
' double_r = l
|
||||
' double_g = l
|
||||
' double_b = l
|
||||
' Else
|
||||
' double_r = QqhToRgb(p1, p2, h + 120)
|
||||
' double_g = QqhToRgb(p1, p2, h)
|
||||
' double_b = QqhToRgb(p1, p2, h - 120)
|
||||
' End If
|
||||
|
||||
' r = CInt((double_r * 255.0))
|
||||
' g = CInt((double_g * 255.0))
|
||||
' b = CInt((double_b * 255.0))
|
||||
'End Sub
|
||||
|
||||
'Private Shared Function QqhToRgb(ByVal q1 As Double, ByVal q2 As Double, ByVal hue As Double) As Double
|
||||
' If hue > 360 Then
|
||||
' hue -= 360
|
||||
' ElseIf hue < 0 Then
|
||||
' hue += 360
|
||||
' End If
|
||||
|
||||
' If hue < 60 Then Return q1 + (q2 - q1) * hue / 60
|
||||
' If hue < 180 Then Return q2
|
||||
' If hue < 240 Then Return q1 + (q2 - q1) * (240 - hue) / 60
|
||||
' Return q1
|
||||
'End Function
|
||||
|
||||
Public Shared Function ColorFromHSV(ByVal hue As Double, ByVal saturation As Double, ByVal value As Double) As System.Drawing.Color
|
||||
Dim hi As Integer = Convert.ToInt32(Math.Floor(hue / 60)) Mod 6
|
||||
Dim f As Double = hue / 60 - Math.Floor(hue / 60)
|
||||
value *= 255
|
||||
Dim v As Integer = Convert.ToInt32(value)
|
||||
Dim p As Integer = Convert.ToInt32(value * (1 - saturation))
|
||||
Dim q As Integer = Convert.ToInt32(value * (1 - f * saturation))
|
||||
Dim t As Integer = Convert.ToInt32(value * (1 - (1 - f) * saturation))
|
||||
|
||||
If hi = 0 Then
|
||||
Return System.Drawing.Color.FromArgb(255, v, t, p)
|
||||
ElseIf hi = 1 Then
|
||||
Return System.Drawing.Color.FromArgb(255, q, v, p)
|
||||
ElseIf hi = 2 Then
|
||||
Return System.Drawing.Color.FromArgb(255, p, v, t)
|
||||
ElseIf hi = 3 Then
|
||||
Return System.Drawing.Color.FromArgb(255, p, q, v)
|
||||
ElseIf hi = 4 Then
|
||||
Return System.Drawing.Color.FromArgb(255, t, p, v)
|
||||
Else
|
||||
Return System.Drawing.Color.FromArgb(255, v, p, q)
|
||||
End If
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una finestra EgtColorPicker
|
||||
''' </summary>
|
||||
@@ -62,6 +308,6 @@ Public Class EgtColorPickerV
|
||||
Return Me.DialogResult
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -1,373 +0,0 @@
|
||||
Imports System.Globalization
|
||||
|
||||
Public Class EgtHexagon
|
||||
Inherits Panel
|
||||
|
||||
#Region "ORIENTATION"
|
||||
|
||||
Public Shared ReadOnly OrientationProperty As DependencyProperty = DependencyProperty.RegisterAttached("Orientation",
|
||||
GetType(Orientation),
|
||||
GetType(EgtHexagon),
|
||||
New FrameworkPropertyMetadata(Orientation.Horizontal, FrameworkPropertyMetadataOptions.AffectsMeasure Or FrameworkPropertyMetadataOptions.AffectsArrange Or FrameworkPropertyMetadataOptions.[Inherits]))
|
||||
|
||||
Public Shared Sub SetOrientation(element As DependencyObject, value As Orientation)
|
||||
element.SetValue(OrientationProperty, value)
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetOrientation(element As DependencyObject) As Orientation
|
||||
Return CType(element.GetValue(OrientationProperty), Orientation)
|
||||
End Function
|
||||
|
||||
Public Property Orientation As Orientation
|
||||
Get
|
||||
Return CType(GetValue(OrientationProperty), Orientation)
|
||||
End Get
|
||||
Set(value As Orientation)
|
||||
SetValue(OrientationProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Orientation
|
||||
|
||||
#Region "ROW"
|
||||
|
||||
Public Shared ReadOnly RowCountProperty As DependencyProperty = DependencyProperty.Register("RowCount", GetType(Integer),
|
||||
GetType(EgtHexagon),
|
||||
New FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsMeasure Or FrameworkPropertyMetadataOptions.AffectsArrange), AddressOf ValidateCountCallback)
|
||||
|
||||
Public Property RowCount As Integer
|
||||
Get
|
||||
Return CInt(GetValue(RowCountProperty))
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
SetValue(RowCountProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Row
|
||||
|
||||
#Region "COLUMN"
|
||||
|
||||
Public Shared ReadOnly ColumnCountProperty As DependencyProperty = DependencyProperty.Register("ColumnCount",
|
||||
GetType(Integer),
|
||||
GetType(EgtHexagon),
|
||||
New FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsMeasure Or FrameworkPropertyMetadataOptions.AffectsArrange), AddressOf ValidateCountCallback)
|
||||
|
||||
Public Property ColumnCount As Integer
|
||||
Get
|
||||
Return CInt(GetValue(ColumnCountProperty))
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
SetValue(ColumnCountProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region 'Column
|
||||
|
||||
#Region "VALIDATE"
|
||||
|
||||
Private Shared Function ValidateCountCallback(value As Object) As Boolean
|
||||
If TypeOf value Is Integer Then
|
||||
Dim count As Integer = CInt(value)
|
||||
Return count > 0
|
||||
End If
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function GetRow(e As UIElement) As Integer
|
||||
Dim row As Integer = CInt(e.GetValue(Grid.RowProperty))
|
||||
If row >= RowCount Then row = RowCount - 1
|
||||
Return row
|
||||
End Function
|
||||
|
||||
Private Function GetColumn(e As UIElement) As Integer
|
||||
Dim column As Integer = CInt(e.GetValue(Grid.ColumnProperty))
|
||||
If column >= ColumnCount Then column = ColumnCount - 1
|
||||
Return column
|
||||
End Function
|
||||
|
||||
Protected Overrides Function MeasureOverride(ByVal availableSize As Size) As Size
|
||||
Dim w As Double = availableSize.Width
|
||||
Dim h As Double = availableSize.Height
|
||||
|
||||
If Double.IsInfinity(w) OrElse Double.IsInfinity(h) Then
|
||||
h = 0
|
||||
w = 0
|
||||
|
||||
For Each e As UIElement In InternalChildren
|
||||
e.Measure(availableSize)
|
||||
Dim s = e.DesiredSize
|
||||
If s.Height > h Then h = s.Height
|
||||
If s.Width > w Then w = s.Width
|
||||
Next
|
||||
|
||||
If Orientation = Orientation.Horizontal Then Return New Size(w * (ColumnCount * 3 + 1) / 4, h * (RowCount * 2 + 1) / 2)
|
||||
Return New Size(w * (ColumnCount * 2 + 1) / 2, h * (RowCount * 3 + 1) / 4)
|
||||
End If
|
||||
|
||||
Return availableSize
|
||||
End Function
|
||||
|
||||
#End Region ' Validate
|
||||
|
||||
#Region "HASSHIFT"
|
||||
|
||||
Private Sub HasShift(first As Boolean, last As Boolean)
|
||||
If Orientation = Orientation.Horizontal Then
|
||||
HasRowShift(first, last)
|
||||
Else
|
||||
HasColumnShift(first, last)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub HasRowShift(firstRow As Boolean, lastRow As Boolean)
|
||||
lastRow = True
|
||||
firstRow = lastRow
|
||||
Dim elements As UIElementCollection = MyBase.InternalChildren
|
||||
Dim i As Integer = 0
|
||||
|
||||
While i < elements.Count AndAlso (firstRow OrElse lastRow)
|
||||
Dim e = elements(i)
|
||||
If e.Visibility = Visibility.Collapsed Then Continue While
|
||||
Dim row As Integer = GetRow(e)
|
||||
Dim column As Integer = GetColumn(e)
|
||||
Dim modify As Integer = column Mod 2
|
||||
If row = 0 AndAlso modify = 0 Then firstRow = False
|
||||
If row = RowCount - 1 AndAlso modify = 1 Then lastRow = False
|
||||
i += 1
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Sub HasColumnShift(firstColumn As Boolean, lastColumn As Boolean)
|
||||
lastColumn = True
|
||||
firstColumn = lastColumn
|
||||
Dim elements As UIElementCollection = MyBase.InternalChildren
|
||||
Dim i As Integer = 0
|
||||
|
||||
While i < elements.Count AndAlso (firstColumn OrElse lastColumn)
|
||||
Dim e = elements(i)
|
||||
If e.Visibility = Visibility.Collapsed Then Continue While
|
||||
Dim row As Integer = GetRow(e)
|
||||
Dim column As Integer = GetColumn(e)
|
||||
Dim modify As Integer = row Mod 2
|
||||
If column = 0 AndAlso modify = 0 Then firstColumn = False
|
||||
If column = ColumnCount - 1 AndAlso modify = 1 Then lastColumn = False
|
||||
i += 1
|
||||
End While
|
||||
End Sub
|
||||
|
||||
#End Region ' HasShift
|
||||
|
||||
#Region "GETHEXSIZE"
|
||||
|
||||
Private Function GetHexSize(gridSize As Size) As Size
|
||||
Dim minH As Double = 0
|
||||
Dim minW As Double = 0
|
||||
|
||||
For Each e As UIElement In InternalChildren
|
||||
Dim f = TryCast(e, FrameworkElement)
|
||||
|
||||
If f IsNot Nothing Then
|
||||
If f.MinHeight > minH Then minH = f.MinHeight
|
||||
If f.MinWidth > minW Then minW = f.MinWidth
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim first, last As Boolean
|
||||
HasShift(first, last)
|
||||
Dim possibleSize = GetPossibleSize(gridSize)
|
||||
Dim possibleW As Double = possibleSize.Width
|
||||
Dim possibleH As Double = possibleSize.Height
|
||||
Dim w = Math.Max(minW, possibleW)
|
||||
Dim h = Math.Max(minH, possibleH)
|
||||
|
||||
Return New Size(w, h)
|
||||
End Function
|
||||
|
||||
Private Function GetPossibleSize(gridSize As Size) As Size
|
||||
Dim first, last As Boolean
|
||||
HasShift(first, last)
|
||||
If Orientation = Orientation.Horizontal Then Return GetPossibleSizeHorizontal(gridSize, first, last)
|
||||
Return GetPossibleSizeVertical(gridSize, first, last)
|
||||
End Function
|
||||
|
||||
Private Function GetPossibleSizeVertical(gridSize As Size, first As Boolean, last As Boolean) As Size
|
||||
Dim columns As Integer = ((If(first, 0, 1)) + 2 * ColumnCount - (If(last, 1, 0)))
|
||||
Dim w As Double = 2 * (gridSize.Width / columns)
|
||||
Dim rows As Integer = 1 + 3 * RowCount
|
||||
Dim h As Double = 4 * (gridSize.Height / rows)
|
||||
Return New Size(w, h)
|
||||
End Function
|
||||
|
||||
Private Function GetPossibleSizeHorizontal(gridSize As Size, first As Boolean, last As Boolean) As Size
|
||||
Dim columns As Integer = 1 + 3 * ColumnCount
|
||||
Dim w As Double = 4 * (gridSize.Width / columns)
|
||||
Dim rows As Integer = (If(first, 0, 1)) + 2 * RowCount - (If(last, 1, 0))
|
||||
Dim h As Double = 2 * (gridSize.Height / rows)
|
||||
Return New Size(w, h)
|
||||
End Function
|
||||
|
||||
#End Region ' GetHexSize
|
||||
|
||||
#Region "ARRANGE"
|
||||
|
||||
Protected Overrides Function ArrangeOverride(finalSize As Size) As Size
|
||||
Dim first, last As Boolean
|
||||
HasShift(first, last)
|
||||
Dim hexSize As Size = GetHexSize(finalSize)
|
||||
Dim columnWidth, rowHeight As Double
|
||||
|
||||
If Orientation = Orientation.Horizontal Then
|
||||
rowHeight = 0.5 * hexSize.Height
|
||||
columnWidth = 0.25 * hexSize.Width
|
||||
Else
|
||||
rowHeight = 0.25 * hexSize.Height
|
||||
columnWidth = 0.5 * hexSize.Width
|
||||
End If
|
||||
|
||||
Dim elements As UIElementCollection = MyBase.InternalChildren
|
||||
|
||||
For i As Integer = 0 To elements.Count - 1
|
||||
If elements(i).Visibility = Visibility.Collapsed Then Continue For
|
||||
ArrangeElement(elements(i), hexSize, columnWidth, rowHeight, first)
|
||||
Next
|
||||
|
||||
Return finalSize
|
||||
End Function
|
||||
|
||||
Private Sub ArrangeElement(e As UIElement, hexSize As Size, columnWidth As Double, rowHeight As Double, shift As Boolean)
|
||||
Dim row As Integer = GetRow(e)
|
||||
Dim column As Integer = GetColumn(e)
|
||||
Dim x As Double
|
||||
Dim y As Double
|
||||
|
||||
If Orientation = Orientation.Horizontal Then
|
||||
x = 3 * columnWidth * column
|
||||
y = rowHeight * (2 * row + (If(column Mod 2 = 1, 1, 0)) + (If(shift, -1, 0)))
|
||||
Else
|
||||
x = columnWidth * (2 * column + (If(row Mod 2 = 1, 1, 0)) + (If(shift, -1, 0)))
|
||||
y = 3 * rowHeight * row
|
||||
End If
|
||||
|
||||
e.Arrange(New Rect(x, y, hexSize.Width, hexSize.Height))
|
||||
End Sub
|
||||
|
||||
#End Region ' Arrange
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EgtHexList
|
||||
Inherits ListBox
|
||||
|
||||
Shared Sub New()
|
||||
DefaultStyleKeyProperty.OverrideMetadata(GetType(EgtHexList),
|
||||
New FrameworkPropertyMetadata(GetType(EgtHexList)))
|
||||
End Sub
|
||||
|
||||
Public Shared ReadOnly OrientationProperty As DependencyProperty = EgtHexagon.OrientationProperty.AddOwner(GetType(EgtHexList))
|
||||
Public Shared ReadOnly RowCountProperty As DependencyProperty = EgtHexagon.RowCountProperty.AddOwner(GetType(EgtHexList))
|
||||
Public Shared ReadOnly ColumnCountProperty As DependencyProperty = EgtHexagon.ColumnCountProperty.AddOwner(GetType(EgtHexList))
|
||||
|
||||
Public Property Orientation As Orientation
|
||||
Get
|
||||
Return CType(GetValue(OrientationProperty), Orientation)
|
||||
End Get
|
||||
Set(value As Orientation)
|
||||
SetValue(OrientationProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property RowCount As Integer
|
||||
Get
|
||||
Return CInt(GetValue(RowCountProperty))
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
SetValue(RowCountProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ColumnCount As Integer
|
||||
Get
|
||||
Return CInt(GetValue(ColumnCountProperty))
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
SetValue(ColumnCountProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Overrides Function IsItemItsOwnContainerOverride(item As Object) As Boolean
|
||||
Return (TypeOf item Is EgtHexItem)
|
||||
End Function
|
||||
|
||||
Protected Overrides Function GetContainerForItemOverride() As DependencyObject
|
||||
Return New EgtHexItem()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EgtHexItem
|
||||
Inherits ListBoxItem
|
||||
|
||||
Shared Sub New()
|
||||
DefaultStyleKeyProperty.OverrideMetadata(GetType(EgtHexItem),
|
||||
New FrameworkPropertyMetadata(GetType(EgtHexItem)))
|
||||
End Sub
|
||||
|
||||
Public Shared ReadOnly OrientationProperty As DependencyProperty = EgtHexagon.OrientationProperty.AddOwner(GetType(EgtHexItem))
|
||||
|
||||
Public Property Orientation As Orientation
|
||||
Get
|
||||
Return CType(GetValue(OrientationProperty), Orientation)
|
||||
End Get
|
||||
Set(value As Orientation)
|
||||
SetValue(OrientationProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
Public Class HexClipConverter
|
||||
Implements IMultiValueConverter
|
||||
|
||||
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
|
||||
Dim width As Double = CDbl(values(0))
|
||||
Dim height As Double = CDbl(values(1))
|
||||
Dim orientation As Orientation = CType(values(2), Orientation)
|
||||
|
||||
If width <= 0 OrElse height <= 0 Then Return Nothing
|
||||
|
||||
Dim pathGeometry As New PathGeometry With {
|
||||
.Figures = New PathFigureCollection()
|
||||
}
|
||||
|
||||
Dim pathFigure As New PathFigure()
|
||||
|
||||
If orientation = Orientation.Horizontal Then
|
||||
pathFigure.StartPoint = New Point(0, height * 0.5)
|
||||
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.25, 0)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.75, 0)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width, height * 0.5)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.75, height)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.25, height)})
|
||||
Else
|
||||
pathFigure.StartPoint = New Point(width * 0.5, 0)
|
||||
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width, height * 0.25)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width, height * 0.75)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.5, height)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(0, height * 0.75)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(0, height * 0.25)})
|
||||
End If
|
||||
|
||||
pathGeometry.Figures.Add(pathFigure)
|
||||
|
||||
Return pathGeometry
|
||||
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
End Class
|
||||
@@ -1,325 +1,312 @@
|
||||
<EgtWPFLib5:EgtMainWindow x:Class="EgtManageFileDialogV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:local="clr-namespace:Icarus"
|
||||
Title="{Binding sTitle}"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Style="{StaticResource Dialog_Window}">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:local="clr-namespace:Icarus"
|
||||
Title="{Binding sTitle}"
|
||||
Height="500"
|
||||
Width="800"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Style="{StaticResource Dialog_Window}">
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Command="{Binding GoBack_Command}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="2.5,0,0,0"
|
||||
Margin="2.5,0,5,0"
|
||||
BorderBrush="Transparent"
|
||||
Style="{StaticResource RightPanel_Button}">
|
||||
<Image Source="\Resources\EgtDialog\Restore.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<TextBlock Grid.Column="1"
|
||||
Margin="5"
|
||||
Text="{Binding sUrl_Msg, Mode=TwoWay}"
|
||||
Text="{Binding sSelPath}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding VisualizationList}"
|
||||
SelectedItem="{Binding SelVisualization}"
|
||||
ItemsSource="{Binding ViewModeList}"
|
||||
SelectedItem="{Binding SelViewMode}"
|
||||
Width="200"
|
||||
Margin="2.5,0,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}">
|
||||
</ComboBox>
|
||||
Height="30"
|
||||
Margin="2.5,5,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TreeView x:Name="FileTree"
|
||||
ItemsSource="{Binding RootList}"
|
||||
Height="300"
|
||||
Width="200"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center">
|
||||
FontSize="15"
|
||||
BorderBrush="White"
|
||||
Foreground="{StaticResource Icarus_Gray}">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type local:EgtFolder}"
|
||||
ItemsSource="{Binding FolderList}">
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
ItemsSource="{Binding TreeItemList_View}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</HierarchicalDataTemplate>
|
||||
<DataTemplate DataType="{x:Type local:EgtItem}">
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
<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="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
</TreeView>
|
||||
<TabControl Grid.Column="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="White"
|
||||
BorderThickness="0"
|
||||
Background="White"
|
||||
SelectedIndex="{Binding nSelectView}">
|
||||
<TabItem Visibility="{Binding ListBox_Visibility}">
|
||||
<Grid Grid.Column="1"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Name_Msg}"
|
||||
Visibility="{Binding UVision_Visibility}"
|
||||
Margin="5,5,5,5"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<ListBox x:Name="FileList"
|
||||
Grid.Row="1"
|
||||
Width="350"
|
||||
Height="250"
|
||||
Margin="5,5,5,5"
|
||||
BorderBrush="White"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding SelTreeItem.ItemSelected}">
|
||||
<ListBox.Resources>
|
||||
<DataTemplate x:Key="ScheduleTemplate"
|
||||
DataType="{x:Type local:EgtDirectory}" >
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
SelectedIndex="{Binding nSelTab}">
|
||||
<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabItem Header="LISTBOX">
|
||||
<ListBox x:Name="FileList"
|
||||
Grid.Row="1"
|
||||
Margin="5,5,5,5"
|
||||
BorderBrush="White"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding ItemSelected, Mode=TwoWay}">
|
||||
<ListBox.Resources>
|
||||
<DataTemplate x:Key="ListTemplateView"
|
||||
DataType="{x:Type local:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="TilesTemplateView"
|
||||
DataType="{x:Type local:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="50"
|
||||
Width="250">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="3"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="BoxingTemplate"
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding ghTypeItem}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ContentTemplateView"
|
||||
DataType="{x:Type local:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="65"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="3"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sTypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ContentTemplateView"
|
||||
DataType="{x:Type local:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="50">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="60"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sTypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding ghTypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Column="2"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding dLastModifyDate}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sLastModifyDate}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.Resources>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type local:EgtDirectory}">
|
||||
<ContentControl Content="{Binding}">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="{x:Type ContentControl}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.nTaskStatus, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="0">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ScheduleTemplate}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nTaskStatus, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="1">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource BoxingTemplate}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nTaskStatus, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="2">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ContentTemplateView}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
|
||||
<!--<ListBox.ItemTemplate>
|
||||
<DataTemplate >
|
||||
<TextBlock Text="{Binding Name}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>-->
|
||||
|
||||
<!--<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="/Resources/ProjectManager/New.png"
|
||||
Height="65"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="3"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding Name}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding TypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding Dimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>-->
|
||||
|
||||
<!--<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="/Resources/ProjectManager/New.png"
|
||||
Height="60"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding Name}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding TypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Column="2"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding LastModifyDate}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding Dimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>-->
|
||||
<!--</DataTemplate>
|
||||
</ListBox.ItemTemplate>-->
|
||||
</ListBox>
|
||||
<UniformGrid Visibility="{Binding UVision_Visibility}"
|
||||
Grid.Column="1"
|
||||
Columns="3"
|
||||
HorizontalAlignment="Stretch">
|
||||
<TextBlock Margin="5,5,5,5"
|
||||
Text="{Binding LastModify_Msg}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock Margin="5,5,5,5"
|
||||
Text="{Binding Type_Msg}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock Margin="5,5,5,5"
|
||||
Text="{Binding Dimension_Msg}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Visibility="{Binding UVision_Visibility}"
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Columns="3"
|
||||
HorizontalAlignment="Stretch">
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Margin="5,5,5,5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
Text="{Binding SelectedItem.dLastModifyDate, ElementName=FileList}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Grid.Row="1"
|
||||
Margin="5,5,5,5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
Text="{Binding SelectedItem.sTypeItem, ElementName=FileList}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock Grid.Column="3"
|
||||
Grid.Row="1"
|
||||
Margin="5,5,5,5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
Text="{Binding SelectedItem.sDimension, ElementName=FileList}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
<Border Grid.Row="1"
|
||||
BorderThickness="1"
|
||||
BorderBrush="LightGray"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.Resources>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type local:EgtDirectory}">
|
||||
<ContentControl Content="{Binding}">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="{x:Type ContentControl}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="0">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ListTemplateView}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="1">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource TilesTemplateView}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="2">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ContentTemplateView}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<EventSetter Event="MouseDoubleClick" Handler="ListBoxItem_MouseDoubleClick"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.Style>
|
||||
<Style TargetType="{x:Type ListBox}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"
|
||||
Value="0">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"
|
||||
Value="1">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"
|
||||
Value="2">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListBox.Style>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<TabItem Visibility="{Binding DataGrid_Visibility}">
|
||||
<TabItem Header="DATAGRID">
|
||||
<DataGrid AutoGenerateColumns="False"
|
||||
Height="300"
|
||||
Margin="5,5,5,10"
|
||||
IsReadOnly="True"
|
||||
HeadersVisibility="Column"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding SelTreeItem.ItemSelected}">
|
||||
SelectedItem="{Binding ItemSelected}"
|
||||
ColumnHeaderStyle="{StaticResource DataGridColumnHeader}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding sName}">
|
||||
<DataGridTemplateColumn Width="5*">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sName}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Binding="{Binding sLastModifyDate}"
|
||||
Width="2*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
@@ -331,25 +318,12 @@
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding dLastModifyDate}">
|
||||
<DataGridTextColumn Binding="{Binding ghTypeItem}"
|
||||
Width="1*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding sTypeItem}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
@@ -361,10 +335,12 @@
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding sDimension}">
|
||||
<DataGridTextColumn Binding="{Binding sDimension}"
|
||||
Width="1*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
@@ -377,74 +353,55 @@
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow"
|
||||
BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}">
|
||||
</Style>
|
||||
</DataGrid.CellStyle>
|
||||
<DataGrid.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick" Command="{Binding DataContext.DoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"/>
|
||||
</DataGrid.InputBindings>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="5,5,5,5"
|
||||
Text="{Binding FileName_Msg}"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<!--<ComboBox Grid.Column="1"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
IsEditable="True"
|
||||
ItemsSource="{Binding ListItemView}"
|
||||
SelectedItem="{Binding SelListItemView}"
|
||||
Width="400"
|
||||
Margin="2.5,0,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}">
|
||||
</ComboBox>-->
|
||||
<TextBox Grid.Column="1"
|
||||
Margin="2.5,2.5,2.5,5"
|
||||
Width="350"
|
||||
Height="30"
|
||||
TextAlignment="Left"
|
||||
Text="{Binding sSaveFileName}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding ListFilter}"
|
||||
SelectedItem="{Binding SelExstension}"
|
||||
ItemsSource="{Binding FilterList}"
|
||||
SelectedItem="{Binding SelFilter, Mode=OneWayToSource}"
|
||||
DisplayMemberPath="sNameExstension"
|
||||
HorizontalAlignment="Right"
|
||||
Width="200"
|
||||
Margin="2.5,0,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}">
|
||||
</ComboBox>
|
||||
<UniformGrid Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Rows="1"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
Margin="15,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
Height="30"
|
||||
Margin="10,2.5,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<UniformGrid Grid.Row="3"
|
||||
Rows="1"
|
||||
Margin="2.5,0,2.5,0">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="15,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtMainWindow>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EgtManageFileDialogV
|
||||
|
||||
@@ -8,6 +9,9 @@ Public Class EgtManageFileDialogV
|
||||
|
||||
Private Shadows DialogResult As DialogResult
|
||||
|
||||
''' <summary>
|
||||
''' Stringa che specifica il titolo da mostrare
|
||||
''' </summary>
|
||||
Public Overloads Property Title As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sTitle
|
||||
@@ -35,6 +39,15 @@ Public Class EgtManageFileDialogV
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SafeFileName As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sSaveFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sSaveFileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FileName As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sFileName
|
||||
@@ -53,6 +66,42 @@ Public Class EgtManageFileDialogV
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Mode As Integer
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.nMode
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_EgtManageFileDialogVM.nMode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property CheckFileExists As Boolean
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.bCheckFileExists
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EgtManageFileDialogVM.bCheckFileExists = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ValidateNames As Boolean
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.bValidateNames
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EgtManageFileDialogVM.bValidateNames = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property OverwritePrompt As Boolean
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.bOverwritePrompt
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EgtManageFileDialogVM.bOverwritePrompt = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
@@ -69,7 +118,7 @@ Public Class EgtManageFileDialogV
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtManageFileDialogVM.m_CloseWindow
|
||||
Private Sub CloseWindow(DialogResult As DialogResult) Handles m_EgtManageFileDialogVM.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
@@ -83,6 +132,10 @@ Public Class EgtManageFileDialogV
|
||||
Return Me.DialogResult
|
||||
End Function
|
||||
|
||||
Private Sub ListBoxItem_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
|
||||
m_EgtManageFileDialogVM.MouseDoubleClick()
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Public Class EgtMessageBoxV
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EgtMessageBoxV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
@@ -97,7 +99,7 @@
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.m_CloseWindow
|
||||
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.OnCloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
@@ -1,234 +0,0 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EgtMessageBoxVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Friend Event m_CloseWindow(DialogResult As MessageBoxResult)
|
||||
|
||||
Private m_sTitle As String = ""
|
||||
Public ReadOnly Property sTitle As String
|
||||
Get
|
||||
Return m_sTitle
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sMessage As String = ""
|
||||
Public ReadOnly Property sMessage As String
|
||||
Get
|
||||
Return m_sMessage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Button As MessageBoxButton
|
||||
Private m_Icon As MessageBoxImage
|
||||
Public ReadOnly Property sIconSource As String
|
||||
Get
|
||||
Select Case m_Icon
|
||||
Case MessageBoxImage.Hand
|
||||
Return "\Resources\EgtMessageBox\Error.png"
|
||||
Case MessageBoxImage.Question
|
||||
Return "\Resources\EgtMessageBox\Question.png"
|
||||
Case MessageBoxImage.Exclamation
|
||||
Return "\Resources\EgtMessageBox\Warning.png"
|
||||
Case MessageBoxImage.Asterisk
|
||||
Return "\Resources\EgtMessageBox\Information.png"
|
||||
Case MessageBoxImage.Stop
|
||||
Return "\Resources\EgtMessageBox\Error.png"
|
||||
Case MessageBoxImage.Error
|
||||
Return "\Resources\EgtMessageBox\Error.png"
|
||||
Case MessageBoxImage.Warning
|
||||
Return "\Resources\EgtMessageBox\Warning.png"
|
||||
Case MessageBoxImage.Information
|
||||
Return "\Resources\EgtMessageBox\Information.png"
|
||||
Case Else ' MessageBoxImage.None
|
||||
Return ""
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ButtonList As New List(Of EgtMsgBoxButton)
|
||||
Public Property ButtonList As List(Of EgtMsgBoxButton)
|
||||
Get
|
||||
Return m_ButtonList
|
||||
End Get
|
||||
Set(value As List(Of EgtMsgBoxButton))
|
||||
m_ButtonList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(sMessageBoxText As String)
|
||||
EgtMsgBoxButton.SetOwner(Me)
|
||||
m_sMessage = sMessageBoxText
|
||||
m_Button = MessageBoxButton.OK
|
||||
m_Icon = MessageBoxImage.None
|
||||
NotifyPropertyChanged(NameOf(ButtonList))
|
||||
NotifyPropertyChanged(NameOf(sIconSource))
|
||||
End Sub
|
||||
|
||||
Sub New(sMessageBoxText As String, sCaption As String)
|
||||
MyClass.New(sMessageBoxText)
|
||||
m_sTitle = sCaption
|
||||
End Sub
|
||||
|
||||
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton)
|
||||
MyClass.New(sMessageBoxText, sCaption)
|
||||
m_Button = Button
|
||||
Select Case m_Button
|
||||
Case MessageBoxButton.OK
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.OK))
|
||||
Case MessageBoxButton.OKCancel
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.OK))
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.CANCEL))
|
||||
Case MessageBoxButton.YesNoCancel
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.YES))
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.NO))
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.CANCEL))
|
||||
Case MessageBoxButton.YesNo
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.YES))
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.NO))
|
||||
End Select
|
||||
NotifyPropertyChanged(NameOf(ButtonList))
|
||||
End Sub
|
||||
|
||||
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage)
|
||||
MyClass.New(sMessageBoxText, sCaption, Button)
|
||||
m_Icon = Icon
|
||||
NotifyPropertyChanged(NameOf(sIconSource))
|
||||
End Sub
|
||||
|
||||
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult)
|
||||
MyClass.New(sMessageBoxText, sCaption, Button, Icon)
|
||||
Dim DefaultBtn As EgtMsgBoxButton = m_ButtonList.FirstOrDefault(Function(x) (x.Type = EgtMsgBoxButton.Types.OK AndAlso DefaultResult = MessageBoxResult.OK) OrElse
|
||||
(x.Type = EgtMsgBoxButton.Types.CANCEL AndAlso DefaultResult = MessageBoxResult.Cancel) OrElse
|
||||
(x.Type = EgtMsgBoxButton.Types.YES AndAlso DefaultResult = MessageBoxResult.Yes) OrElse
|
||||
(x.Type = EgtMsgBoxButton.Types.NO AndAlso DefaultResult = MessageBoxResult.No))
|
||||
If Not IsNothing(DefaultBtn) Then
|
||||
DefaultBtn.SetIsDefault(True)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(ButtonList))
|
||||
End Sub
|
||||
|
||||
#End Region ' CONTRUCTORS
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Sub CloseWindow(DialogResult As MessageBoxResult)
|
||||
RaiseEvent m_CloseWindow(DialogResult)
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EgtMsgBoxButton
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Enum Types As Integer
|
||||
OK = 1
|
||||
CANCEL = 2
|
||||
YES = 3
|
||||
NO = 4
|
||||
End Enum
|
||||
|
||||
Private Shared Owner As EgtMessageBoxVM
|
||||
|
||||
Private m_Type As Types
|
||||
Public ReadOnly Property Type As Types
|
||||
Get
|
||||
Return m_Type
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sMessage As String
|
||||
Public ReadOnly Property sMessage As String
|
||||
Get
|
||||
Return m_sMessage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bIsDefault As Boolean = False
|
||||
Public ReadOnly Property bIsDefault As Boolean
|
||||
Get
|
||||
Return m_bIsDefault
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetIsDefault(bValue As Boolean)
|
||||
m_bIsDefault = bValue
|
||||
End Sub
|
||||
' Definizione comandi
|
||||
Private m_cmdCommand As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Type As Types)
|
||||
m_Type = Type
|
||||
Select Case m_Type
|
||||
Case Types.OK
|
||||
m_sMessage = EgtMsg(35001)
|
||||
Case Types.CANCEL
|
||||
m_sMessage = EgtMsg(35002)
|
||||
Case Types.YES
|
||||
m_sMessage = EgtMsg(35003)
|
||||
Case Types.NO
|
||||
m_sMessage = EgtMsg(35004)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Sub New(Type As Types, bIsDefault As Boolean)
|
||||
MyClass.New(Type)
|
||||
m_bIsDefault = bIsDefault
|
||||
End Sub
|
||||
|
||||
#End Region ' CONTRUCTORS
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Shared Sub SetOwner(value As EgtMessageBoxVM)
|
||||
Owner = value
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Command"
|
||||
|
||||
Public ReadOnly Property Command_Command As ICommand
|
||||
Get
|
||||
If m_cmdCommand Is Nothing Then
|
||||
m_cmdCommand = New Command(AddressOf Command)
|
||||
End If
|
||||
Return m_cmdCommand
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Command()
|
||||
Select Case m_Type
|
||||
Case Types.OK
|
||||
Owner.CloseWindow(MessageBoxResult.OK)
|
||||
Case Types.CANCEL
|
||||
Owner.CloseWindow(MessageBoxResult.Cancel)
|
||||
Case Types.YES
|
||||
Owner.CloseWindow(MessageBoxResult.Yes)
|
||||
Case Types.NO
|
||||
Owner.CloseWindow(MessageBoxResult.No)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
#End Region ' Ok
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
@@ -595,6 +595,7 @@ Public Class FilledSolidPanelVM
|
||||
Friend Sub Dispose()
|
||||
' ripristino frame originale
|
||||
EgtSetGridFrame(m_OriginalGridFrame)
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
' se in modifica parametri
|
||||
If m_bMachParam_IsChecked Then
|
||||
' ripristino modalita' standard
|
||||
@@ -1075,6 +1076,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneTop(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1100,6 +1102,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneFront(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1125,6 +1128,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneRight(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1150,6 +1154,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBack(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1175,6 +1180,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneLeft(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1200,6 +1206,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBottom(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1226,6 +1233,7 @@ Public Class FilledSolidPanelVM
|
||||
Public Sub CPlaneElevation(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
|
||||
End Sub
|
||||
|
||||
@@ -1251,87 +1259,12 @@ Public Class FilledSolidPanelVM
|
||||
Public Sub CPlaneOrigin(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneOrigin
|
||||
|
||||
#Region "CPlaneRotate"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneRotate.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CPlaneRotate_Command As ICommand
|
||||
Get
|
||||
If m_cmdCPlaneRotate Is Nothing Then
|
||||
m_cmdCPlaneRotate = New Command(AddressOf CPlaneRotate)
|
||||
End If
|
||||
Return m_cmdCPlaneRotate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneRotate(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
|
||||
Else
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE3D)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneRotate
|
||||
|
||||
#Region "CPlane3P"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlane3P.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CPlane3P_Command As ICommand
|
||||
Get
|
||||
If m_cmdCPlane3P Is Nothing Then
|
||||
m_cmdCPlane3P = New Command(AddressOf CPlane3P)
|
||||
End If
|
||||
Return m_cmdCPlane3P
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlane3P(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlane3P
|
||||
|
||||
#Region "CPlanePerpObj"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlanePerpObj.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CPlanePerpObj_Command As ICommand
|
||||
Get
|
||||
If m_cmdCPlanePerpObj Is Nothing Then
|
||||
m_cmdCPlanePerpObj = New Command(AddressOf CPlanePerpObj)
|
||||
End If
|
||||
Return m_cmdCPlanePerpObj
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlanePerpObj(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlanePerpObj
|
||||
|
||||
#Region "CPlaneObj"
|
||||
|
||||
Private m_bCPlaneObj_IsActive As Boolean = False
|
||||
|
||||
@@ -166,13 +166,13 @@ Public Class FilledSolidNumericMachiningParam
|
||||
|
||||
Public Overrides Property sValue As String
|
||||
Get
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue)
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 2), DoubleToString(m_dValue, 2))
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_bIsLen Then
|
||||
StringToLen(value, m_dValue)
|
||||
Else
|
||||
m_dValue = value
|
||||
StringToDouble(value, m_dValue)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(sValue))
|
||||
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||
|
||||
@@ -76,6 +76,9 @@
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DotNetZip">
|
||||
<HintPath>..\..\..\EgtProg\Icarus\DotNetZip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtUILib, Version=2.4.7.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||
@@ -84,8 +87,8 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationFramework.Aero2" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -150,11 +153,10 @@
|
||||
<DependentUpon>DispositionPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DispositionPanel\DispositionPanelVM.vb" />
|
||||
<Compile Include="EgtColorPicker\EgtHexagon.vb" />
|
||||
<Compile Include="EgtManageFileDialog\EgtManageFileDialogVM.vb" />
|
||||
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
|
||||
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtMessageBox\EgtMessageBoxVM.vb" />
|
||||
<Compile Include="EgtColorPicker\EgtColorPickerV.xaml.vb">
|
||||
<DependentUpon>EgtColorPickerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -162,7 +164,6 @@
|
||||
<Compile Include="EgtManageFileDialog\EgtManageFileDialogV.xaml.vb">
|
||||
<DependentUpon>EgtManageFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtManageFileDialog\EgtManageFileDialogVM.vb" />
|
||||
<Compile Include="FilledSolidPanel\FilledSolidPanelV.xaml.vb">
|
||||
<DependentUpon>FilledSolidPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -219,6 +220,7 @@
|
||||
<DependentUpon>MaterialDbV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MaterialDb\MaterialDbVM.vb" />
|
||||
<Compile Include="Resources\TooltipMsg.vb" />
|
||||
<Compile Include="TSFEditor\ColumnHeader.xaml.vb">
|
||||
<DependentUpon>ColumnHeader.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -333,6 +335,7 @@
|
||||
<Compile Include="Utility\DisableModifiedMgr.vb" />
|
||||
<Compile Include="Utility\EgwCrypto.vb" />
|
||||
<Compile Include="Utility\GeomEntityColors.vb" />
|
||||
<Compile Include="Utility\JsonUtility.vb" />
|
||||
<Compile Include="Utility\LuaExec.vb" />
|
||||
<Compile Include="Utility\Map.vb" />
|
||||
<Compile Include="Utility\MyMachine.vb" />
|
||||
@@ -629,6 +632,7 @@
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Resources\TooltipData.ini" />
|
||||
<Resource Include="Resources\EgtMessageBox\Error.png" />
|
||||
<Resource Include="Resources\Fonts\Roboto-Regular.ttf" />
|
||||
<Resource Include="Resources\Fonts\Roboto-Light.ttf" />
|
||||
@@ -882,6 +886,194 @@
|
||||
<Resource Include="Resources\RibParamPanel\CopyFrom.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\SpiralVase_1.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\SpiralVase_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\StrandOrder_1.png" />
|
||||
<Resource Include="Resources\ToolTip\StrandOrder_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\StrandHeight_1.png" />
|
||||
<Resource Include="Resources\ToolTip\StrandHeight_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\StrandWidth_1.png" />
|
||||
<Resource Include="Resources\ToolTip\StrandWidth_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\StrandCount_1.png" />
|
||||
<Resource Include="Resources\ToolTip\StrandCount_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\Offset_1.png" />
|
||||
<Resource Include="Resources\ToolTip\Offset_2.png" />
|
||||
<Resource Include="Resources\ToolTip\StrandOverlap_1.png" />
|
||||
<Resource Include="Resources\ToolTip\StrandOverlap_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\StrandPointOffset.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\Direction.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\LinkZUp_1.png" />
|
||||
<Resource Include="Resources\ToolTip\LinkZUp_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\Diameter_1.png" />
|
||||
<Resource Include="Resources\ToolTip\Diameter_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\LinkType_1.png" />
|
||||
<Resource Include="Resources\ToolTip\LinkType_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\LinkParam_1.png" />
|
||||
<Resource Include="Resources\ToolTip\LinkParam_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\LeadIn_1.png" />
|
||||
<Resource Include="Resources\ToolTip\LeadIn_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\OffsetLeadPoint_1.png" />
|
||||
<Resource Include="Resources\ToolTip\OffsetLeadPoint_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\LeadOut_1.png" />
|
||||
<Resource Include="Resources\ToolTip\LeadOut_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\CoastingLen.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\WipeLen_1.png" />
|
||||
<Resource Include="Resources\ToolTip\WipeLen_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\OverlapRibs_1.png" />
|
||||
<Resource Include="Resources\ToolTip\OverlapRibs_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\StrandCountRibs_1.png" />
|
||||
<Resource Include="Resources\ToolTip\StrandCountRibs_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\LinkRibs.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\InvertDirectionRibs_1.png" />
|
||||
<Resource Include="Resources\ToolTip\InvertDirectionRibs_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\InvertStrandOrderRibs_1.png" />
|
||||
<Resource Include="Resources\ToolTip\InvertStrandOrderRibs_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\LeadInInvertRibs_1.png" />
|
||||
<Resource Include="Resources\ToolTip\LeadInInvertRibs_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\LeadOutInvertRibs_1.png" />
|
||||
<Resource Include="Resources\ToolTip\LeadOutInvertRibs_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\LeadOutCoasting.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\LeadOutWipeRibs_1.png" />
|
||||
<Resource Include="Resources\ToolTip\LeadOutWipeRibs_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\LeadOutWipeDirRibs_1.png" />
|
||||
<Resource Include="Resources\ToolTip\LeadOutWipeDirRibs_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\Difference.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\Coasting.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\Wipe_1.png" />
|
||||
<Resource Include="Resources\ToolTip\Wipe_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\Infill_1.png" />
|
||||
<Resource Include="Resources\ToolTip\Infill_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\Density_1.png" />
|
||||
<Resource Include="Resources\ToolTip\Density_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\Direction_1.png" />
|
||||
<Resource Include="Resources\ToolTip\Direction_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\Directionx_1.png" />
|
||||
<Resource Include="Resources\ToolTip\Directionx_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\Directiony_1.png" />
|
||||
<Resource Include="Resources\ToolTip\Directiony_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\CoastingLength.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\WipeLength.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\FloorCount_1.png" />
|
||||
<Resource Include="Resources\ToolTip\FloorCount_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\FloorType_1.png" />
|
||||
<Resource Include="Resources\ToolTip\FloorType_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\CeilCount_1.png" />
|
||||
<Resource Include="Resources\ToolTip\CeilCount_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\InfillType.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\InfillDensity_1.png" />
|
||||
<Resource Include="Resources\ToolTip\InfillDensity_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\GridOverlap_1.png" />
|
||||
<Resource Include="Resources\ToolTip\GridOverlap_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\PDirection_1.png" />
|
||||
<Resource Include="Resources\ToolTip\PDirection_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\OffsetX_1.png" />
|
||||
<Resource Include="Resources\ToolTip\OffsetX_2.png" />
|
||||
<Resource Include="Resources\ToolTip\OffsetY_1.png" />
|
||||
<Resource Include="Resources\ToolTip\OffsetY_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\CoastingLength_1.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\WipeLength_1.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\WipeDirection_1.png" />
|
||||
<Resource Include="Resources\ToolTip\WipeDirection_2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolTip\InvertOrderRibs_1.png" />
|
||||
<Resource Include="Resources\ToolTip\InvertOrderRibs_2.png" />
|
||||
<Resource Include="Resources\EgtMessageBox\Information.png" />
|
||||
<Resource Include="Resources\EgtMessageBox\Question.png" />
|
||||
<Resource Include="Resources\EgtMessageBox\Warning.png" />
|
||||
@@ -895,6 +1087,9 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\Folder.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\Root.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe
|
||||
|
||||
@@ -488,7 +488,12 @@ Public Class ImportExportMachiningPanelVM
|
||||
Else
|
||||
sExtension = MachiningDataExtension
|
||||
End If
|
||||
Dim SaveFileDlg As New System.Windows.Forms.SaveFileDialog() With {
|
||||
'Dim SaveFileDlg As New System.Windows.Forms.SaveFileDialog() With {
|
||||
' .Title = EgtMsg(31451) & " " & EgtMsg(31452),
|
||||
' .Filter = "File data (*" & sExtension & ")|*" & sExtension,
|
||||
' .FileName = String.Empty
|
||||
'}
|
||||
Dim SaveFileDlg As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
|
||||
.Title = EgtMsg(31451) & " " & EgtMsg(31452),
|
||||
.Filter = "File data (*" & sExtension & ")|*" & sExtension,
|
||||
.FileName = String.Empty
|
||||
|
||||
@@ -1,30 +1,37 @@
|
||||
<StackPanel x:Class="InstrumentPanelV"
|
||||
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:local="clr-namespace:Icarus"
|
||||
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
|
||||
Orientation="Horizontal">
|
||||
<Border x:Class="InstrumentPanelV"
|
||||
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:local="clr-namespace:Icarus"
|
||||
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
|
||||
Background="{DynamicResource EgaltechWhite}"
|
||||
CornerRadius="0,4,0,0"
|
||||
Padding="0,0,8,0">
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
|
||||
<local:CheckedImageToggleButton ToolTip="{Binding GetDist_ToolTip}"
|
||||
IsChecked="{Binding GetDistIsChecked}"
|
||||
ImageSource="/Resources/InstrumentPanel/GetDist.png"
|
||||
CheckedImageSource="/Resources/InstrumentPanel/GetDist_White.png"
|
||||
Width="15"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}">
|
||||
<local:CheckedImageToggleButton.Resources>
|
||||
<sys:Double x:Key="ToggleButton.Image.Height">25</sys:Double>
|
||||
<sys:Double x:Key="ToggleButton.Image.Width">25</sys:Double>
|
||||
</local:CheckedImageToggleButton.Resources>
|
||||
</local:CheckedImageToggleButton>
|
||||
<local:CheckedImageToggleButton ToolTip="{Binding EdgeAnalysis_ToolTip}"
|
||||
IsChecked="{Binding bEdgeAnalysis_IsChecked}"
|
||||
IsEnabled="{Binding bEdgeAnalysis_IsEnabled}"
|
||||
ImageSource="/Resources/InstrumentPanel/EdgeAnalysis.png"
|
||||
CheckedImageSource="/Resources/InstrumentPanel/EdgeAnalysis_White.png"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}">
|
||||
</local:CheckedImageToggleButton>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<local:CheckedImageToggleButton ToolTip="{Binding GetDist_ToolTip}"
|
||||
IsChecked="{Binding GetDistIsChecked}"
|
||||
ImageSource="/Resources/InstrumentPanel/GetDist.png"
|
||||
CheckedImageSource="/Resources/InstrumentPanel/GetDist_White.png"
|
||||
Width="15"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}">
|
||||
<local:CheckedImageToggleButton.Resources>
|
||||
<sys:Double x:Key="ToggleButton.Image.Height">25</sys:Double>
|
||||
<sys:Double x:Key="ToggleButton.Image.Width">25</sys:Double>
|
||||
</local:CheckedImageToggleButton.Resources>
|
||||
</local:CheckedImageToggleButton>
|
||||
<local:CheckedImageToggleButton ToolTip="{Binding EdgeAnalysis_ToolTip}"
|
||||
IsChecked="{Binding bEdgeAnalysis_IsChecked}"
|
||||
IsEnabled="{Binding bEdgeAnalysis_IsEnabled}"
|
||||
ImageSource="/Resources/InstrumentPanel/EdgeAnalysis.png"
|
||||
CheckedImageSource="/Resources/InstrumentPanel/EdgeAnalysis_White.png"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}">
|
||||
</local:CheckedImageToggleButton>
|
||||
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
@@ -14,6 +14,9 @@ Public Class Machining
|
||||
DEG45 = 2
|
||||
DEG45_Y = 3
|
||||
HORIZONTAL = 4
|
||||
MULTIPLANAR = 5
|
||||
MULTIPLANAR_DEG45 = 6
|
||||
MULTIPLANAR_HORIZ = 7
|
||||
End Enum
|
||||
|
||||
Public Enum MPAR_STRANDORDERS As Integer
|
||||
@@ -147,13 +150,13 @@ Public Class Machining
|
||||
m_sName = "New Machining"
|
||||
End If
|
||||
m_sOrigName = m_sName
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.GENERAL, nIndex))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.LINK, nIndex))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.RIBS, nIndex))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nIndex))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nIndex))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.INFILL, nIndex))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.MATERIALS, nIndex))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.GENERAL, nIndex, Me))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.LINK, nIndex, Me))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.RIBS, nIndex, Me))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nIndex, Me))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nIndex, Me))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.INFILL, nIndex, Me))
|
||||
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.MATERIALS, nIndex, Me))
|
||||
For Each Cathegory In m_CathegoryList
|
||||
For Each MachiningParam In Cathegory.MachiningParamList
|
||||
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
|
||||
@@ -314,11 +317,19 @@ Public Class MachiningCathegory
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_Machining As Machining
|
||||
Friend ReadOnly Property Machining As Machining
|
||||
Get
|
||||
Return m_Machining
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
Sub New(Type As Cathegories, nIndex As Integer)
|
||||
Sub New(Type As Cathegories, nIndex As Integer, Machining As Machining)
|
||||
m_Machining = Machining
|
||||
m_Type = Type
|
||||
Select Case m_Type
|
||||
Case Cathegories.GENERAL
|
||||
@@ -343,7 +354,8 @@ Public Class MachiningCathegory
|
||||
New NumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.SCREWBACK, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nIndex, Me)})
|
||||
New NumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.MAXSLICESNUMBER, nIndex, Me)})
|
||||
Case Cathegories.LINK
|
||||
m_sName = "Shell"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.INNERSHELLWIDTH, nIndex, Me),
|
||||
@@ -351,6 +363,7 @@ Public Class MachiningCathegory
|
||||
New ComboMachiningParam(MachiningParam.Params.LINKTYPE, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.LINKPARAM, nIndex, Me),
|
||||
New ComboMachiningParam(MachiningParam.Params.LEADIN, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.SINGLELEADIN, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nIndex, Me),
|
||||
New ComboMachiningParam(MachiningParam.Params.LEADOUT, nIndex, Me),
|
||||
@@ -359,7 +372,8 @@ Public Class MachiningCathegory
|
||||
New NumericMachiningParam(MachiningParam.Params.COASTINGLEN, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.WIPELEN, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nIndex, Me)})
|
||||
New NumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.SPIRALVASELEN, nIndex, Me)})
|
||||
'New NumericMachiningParam(MachiningParam.Params.WIPEDIR, nIndex, Me)})
|
||||
Case Cathegories.RIBS
|
||||
m_sName = "Ribs"
|
||||
@@ -367,8 +381,12 @@ Public Class MachiningCathegory
|
||||
New ComboMachiningParam(MachiningParam.Params.RIBSTYPE, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDOVERLAP, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSLINK, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLINKFILLET, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSMERGEWITHSHELL, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTMERGEDSHELLMAINLINK, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nIndex, Me),
|
||||
@@ -378,7 +396,8 @@ Public Class MachiningCathegory
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nIndex, Me)})
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLEADFILLET, nIndex, Me)})
|
||||
Case Cathegories.SHELL_NUMBER
|
||||
m_sName = "Reduce Shell Number"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nIndex, Me),
|
||||
@@ -440,7 +459,12 @@ Public Class MachiningCathegory
|
||||
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||
MachiningParam.ManageDependencyParam()
|
||||
Next
|
||||
Case Cathegories.RIBS
|
||||
For Each Param In {MachiningParam.Params.SPIRALVASE}
|
||||
Dim GeneralCathegory As MachiningCathegory = Machining.CathegoryList.FirstOrDefault(Function(z) z.Type = Cathegories.GENERAL)
|
||||
Dim MachiningParam As CheckMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||
MachiningParam.ManageDependencyParam(Me)
|
||||
Next
|
||||
Case Cathegories.RIBS
|
||||
For Each Param In {MachiningParam.Params.RIBSTYPE}
|
||||
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||
MachiningParam.ManageDependencyParam()
|
||||
@@ -489,9 +513,92 @@ Public Class MachiningCathegory
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ToolTipDataMsg
|
||||
Inherits VMBase
|
||||
|
||||
Protected m_sNameTitleToolTip As String
|
||||
Public ReadOnly Property sNameTitleToolTip As String
|
||||
Get
|
||||
Return m_sNameTitleToolTip
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sNameDescriptionToolTip As String
|
||||
Public ReadOnly Property sNameDescriptionToolTip As String
|
||||
Get
|
||||
Return m_sNameDescriptionToolTip
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sIconOrientation As String
|
||||
Public ReadOnly Property sIconOrientation As String
|
||||
Get
|
||||
Return m_sIconOrientation
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sIconToolTip_First As String
|
||||
Public ReadOnly Property sIconToolTip_First As String
|
||||
Get
|
||||
Return m_sIconToolTip_First
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_nDimension_First As Integer
|
||||
Public ReadOnly Property nDimension_First As Integer
|
||||
Get
|
||||
Return m_nDimension_First
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_nDimension_Second As Integer
|
||||
Public ReadOnly Property nDimension_Second As Integer
|
||||
Get
|
||||
Return m_nDimension_Second
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sIconToolTip_Second As String
|
||||
Public ReadOnly Property sIconToolTip_Second As String
|
||||
Get
|
||||
Return m_sIconToolTip_Second
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Type As MachiningParam.Params, bIsBeta As Boolean)
|
||||
Dim sTitle As String = ""
|
||||
Dim sDescription As String = ""
|
||||
If GetPrivateProfileString(Type, K_TITLE, "", sTitle, CurrentMachine.sToolTipFilePath) > 0 Then
|
||||
GetPrivateProfileString(Type, K_DESCRIPTION, "", sDescription, CurrentMachine.sToolTipFilePath)
|
||||
If bIsBeta Then
|
||||
m_sNameTitleToolTip = ReadToolTipMsg(sTitle) & " (BETA)"
|
||||
Else
|
||||
m_sNameTitleToolTip = ReadToolTipMsg(sTitle)
|
||||
End If
|
||||
m_sNameDescriptionToolTip = ReadToolTipMsg(sDescription)
|
||||
End If
|
||||
If GetPrivateProfileString(Type, K_FIRST_ICON, "", m_sIconToolTip_First, CurrentMachine.sToolTipFilePath) > 0 Then
|
||||
GetPrivateProfileString(Type, K_ORIENTATION_ICON, "", m_sIconOrientation, CurrentMachine.sToolTipFilePath)
|
||||
m_nDimension_First = 200
|
||||
End If
|
||||
If GetPrivateProfileString(Type, K_SECOND_ICON, "", m_sIconToolTip_Second, CurrentMachine.sToolTipFilePath) > 0 Then
|
||||
GetPrivateProfileString(Type, K_ORIENTATION_ICON, "", m_sIconOrientation, CurrentMachine.sToolTipFilePath)
|
||||
m_nDimension_Second = 200
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Public MustInherit Class MachiningParam
|
||||
Inherits VMBase
|
||||
|
||||
Protected m_Tooltip As ToolTipDataMsg
|
||||
Public ReadOnly Property Tooltip As ToolTipDataMsg
|
||||
Get
|
||||
Return m_Tooltip
|
||||
End Get
|
||||
End Property
|
||||
Public Enum MinMaxTypes As Integer
|
||||
ABSOLUT = 1
|
||||
PERCENTAGE = 2
|
||||
@@ -519,6 +626,7 @@ Public MustInherit Class MachiningParam
|
||||
POSTFLOWDELAY = 20
|
||||
SCREWBACK = 21
|
||||
SLICINGHEIGHT = 22
|
||||
MAXSLICESNUMBER = 23
|
||||
LINKTYPE = 51
|
||||
LINKPARAM = 52
|
||||
LEADIN = 53
|
||||
@@ -533,23 +641,30 @@ Public MustInherit Class MachiningParam
|
||||
WIPELEN = 62
|
||||
WIPEFEED_PC = 63
|
||||
INNERSHELLWIDTH = 64
|
||||
SPIRALVASELEN = 65
|
||||
SINGLELEADIN = 66
|
||||
'WIPEDIR = 64
|
||||
RIBSTYPE = 101
|
||||
RIBSOVERLAP = 102
|
||||
RIBSSTRANDCOUNT = 103
|
||||
RIBSLINK = 104
|
||||
RIBSINVERTORDER = 105
|
||||
RIBSINVERTDIRECTION = 106
|
||||
RIBSINVERTSTRANDORDER = 107
|
||||
RIBSLEADININVERT = 108
|
||||
RIBSLEADINLEN = 109
|
||||
RIBSLEADOUTINVERT = 110
|
||||
RIBSLEADOUTLEN = 111
|
||||
RIBSLEADOUTCOASTING = 112
|
||||
RIBSLEADOUTWIPE = 113
|
||||
RIBSLEADOUTWIPEDIR = 114
|
||||
RIBSLIMITUNBOUNDEDWITHSOLID = 115
|
||||
RIBSSTRANDWIDTH = 116
|
||||
RIBSMERGEWITHSHELL = 105
|
||||
RIBSINVERTMERGEDSHELLMAINLINK = 106
|
||||
RIBSINVERTORDER = 107
|
||||
RIBSINVERTDIRECTION = 108
|
||||
RIBSINVERTSTRANDORDER = 109
|
||||
RIBSLEADININVERT = 110
|
||||
RIBSLEADINLEN = 111
|
||||
RIBSLEADOUTINVERT = 112
|
||||
RIBSLEADOUTLEN = 113
|
||||
RIBSLEADOUTCOASTING = 114
|
||||
RIBSLEADOUTWIPE = 115
|
||||
RIBSLEADOUTWIPEDIR = 116
|
||||
RIBSLIMITUNBOUNDEDWITHSOLID = 117
|
||||
RIBSSTRANDWIDTH = 118
|
||||
RIBSLINKFILLET = 119
|
||||
RIBSLEADFILLET = 120
|
||||
RIBSSTRANDOVERLAP = 121
|
||||
SHELLNBRDIFFERENCE = 151
|
||||
SHELLNBRCOASTING = 152
|
||||
SHELLNBRWIPE = 153
|
||||
@@ -636,7 +751,7 @@ Public MustInherit Class MachiningParam
|
||||
m_Cathegory = Cathegory
|
||||
Select Case m_Type
|
||||
Case Params.SLICINGTYPE
|
||||
m_sName = "Slicing Direction"
|
||||
m_sName = "Slicing Type"
|
||||
Case Params.STRANDH
|
||||
m_sName = "Strand Height"
|
||||
Case Params.STRANDW
|
||||
@@ -663,6 +778,8 @@ Public MustInherit Class MachiningParam
|
||||
m_sName = "Offset Lead Point"
|
||||
Case Params.LEADIN
|
||||
m_sName = "Lead In"
|
||||
Case Params.SINGLELEADIN
|
||||
m_sName = "Single Lead In"
|
||||
Case Params.LEADINTANGDIST
|
||||
m_sName = "Lead In Tang Dist"
|
||||
Case Params.LEADINORTHODIST
|
||||
@@ -681,6 +798,8 @@ Public MustInherit Class MachiningParam
|
||||
m_sName = "Wipe Len"
|
||||
Case Params.WIPEFEED_PC
|
||||
m_sName = "Wipe Feed [%]"
|
||||
Case Params.SPIRALVASELEN
|
||||
m_sName = "Spiral Trans Len"
|
||||
Case Params.FLOORCOUNT
|
||||
m_sName = "Floor Count"
|
||||
Case Params.G0FEED
|
||||
@@ -697,16 +816,26 @@ Public MustInherit Class MachiningParam
|
||||
m_sName = "Screw Back"
|
||||
Case Params.SLICINGHEIGHT
|
||||
m_sName = "Slicing Height"
|
||||
Case Params.MAXSLICESNUMBER
|
||||
m_sName = "Max Slices Number"
|
||||
Case Params.RIBSSTRANDWIDTH
|
||||
m_sName = "Custom Strand Width"
|
||||
Case Params.RIBSTYPE
|
||||
m_sName = "Type"
|
||||
Case Params.RIBSOVERLAP
|
||||
m_sName = "Overlap [%]"
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
m_sName = "Strand Overlap [%]"
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
m_sName = "Strand Count"
|
||||
Case Params.RIBSLINK
|
||||
m_sName = "Link"
|
||||
Case Params.RIBSLINKFILLET
|
||||
m_sName = "Link Fillet"
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
m_sName = "Merge With Shell"
|
||||
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
||||
m_sName = "Invert Merged Shell Main Link"
|
||||
Case Params.RIBSINVERTORDER
|
||||
m_sName = "Invert Order"
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
@@ -727,6 +856,8 @@ Public MustInherit Class MachiningParam
|
||||
m_sName = "Lead Out Wipe"
|
||||
Case Params.RIBSLEADOUTWIPEDIR
|
||||
m_sName = "Lead Out Wipe Dir [deg]"
|
||||
Case Params.RIBSLEADFILLET
|
||||
m_sName = "Lead Fillet"
|
||||
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||
m_sName = "Limit Unbounded With Solid"
|
||||
Case Params.SHELLNBRDIFFERENCE
|
||||
@@ -816,6 +947,7 @@ Public MustInherit Class MachiningParam
|
||||
Case Params.INFILLWIPEDIR
|
||||
m_sName = "Wipe Direction"
|
||||
End Select
|
||||
m_Tooltip = New ToolTipDataMsg(m_Type, bIsBeta)
|
||||
End Sub
|
||||
|
||||
Sub New(sName As String, Cathegory As MachiningCathegory)
|
||||
@@ -851,7 +983,7 @@ Public Class NumericMachiningParam
|
||||
End Property
|
||||
Public Overridable Property sValue As String
|
||||
Get
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 1), DoubleToString(m_dValue, 2))
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 2), DoubleToString(m_dValue, 2))
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dTempValue As Double = 0
|
||||
@@ -956,6 +1088,7 @@ Public Class NumericMachiningParam
|
||||
If Type = Params.SLICINGHEIGHT Then
|
||||
m_dMinValue = 0
|
||||
m_dMaxValue = CurrentMachine.dSlicingMaxHeight
|
||||
m_MinMaxType = MinMaxTypes.ABSOLUT
|
||||
m_bIsActiveMinMax = True
|
||||
End If
|
||||
' leggo parametri da Db
|
||||
@@ -1018,6 +1151,9 @@ Public Class NumericMachiningParam
|
||||
Case Params.WIPEFEED_PC
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_WIPEFEEDPU, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.SPIRALVASELEN
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SPIRALVASELEN, 0)
|
||||
m_bIsLen = True
|
||||
'Case Params.WIPEDIR
|
||||
' m_dValue = ReadMachiningParamDouble(nIndex, MAC_WIPEDIR, 0)
|
||||
' m_bIsLen = True
|
||||
@@ -1045,15 +1181,24 @@ Public Class NumericMachiningParam
|
||||
Case Params.SLICINGHEIGHT
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SLICINGHEIGHT, CurrentMachine.dSlicingMaxHeight)
|
||||
m_bIsLen = False
|
||||
Case Params.MAXSLICESNUMBER
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_MAXSLICESNUMBER, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDWIDTH
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSSTRANDWIDTH, 0)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSOVERLAP
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSOVERLAP, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSSTRANDOVERLAP, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSSTRANDCOUNT, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSLINKFILLET
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLINKFILLET, 0)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSLEADINLEN
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADINLEN, 0)
|
||||
m_bIsLen = True
|
||||
@@ -1069,6 +1214,9 @@ Public Class NumericMachiningParam
|
||||
Case Params.RIBSLEADOUTWIPEDIR
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADOUTWIPEDIR, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSLEADFILLET
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADFILLET, 0)
|
||||
m_bIsLen = True
|
||||
Case Params.SHELLNBRDIFFERENCE
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SHELLNBRDIFFERENCE, 0)
|
||||
m_bIsLen = False
|
||||
@@ -1232,6 +1380,8 @@ Public Class NumericMachiningParam
|
||||
WriteMachiningParam(nIndex, MAC_WIPELEN, sWriteValue, sFilePath)
|
||||
Case Params.WIPEFEED_PC
|
||||
WriteMachiningParam(nIndex, MAC_WIPEFEEDPU, sWriteValue, sFilePath)
|
||||
Case Params.SPIRALVASELEN
|
||||
WriteMachiningParam(nIndex, MAC_SPIRALVASELEN, sWriteValue, sFilePath)
|
||||
'Case Params.WIPEDIR
|
||||
' WriteMachiningParam(nIndex, MAC_WIPEDIR, sWriteValue, sFilePath)
|
||||
Case Params.FLOORCOUNT
|
||||
@@ -1250,12 +1400,18 @@ Public Class NumericMachiningParam
|
||||
WriteMachiningParam(nIndex, MAC_SCREWBACK, sWriteValue, sFilePath)
|
||||
Case Params.SLICINGHEIGHT
|
||||
WriteMachiningParam(nIndex, MAC_SLICINGHEIGHT, sWriteValue, sFilePath)
|
||||
Case Params.MAXSLICESNUMBER
|
||||
WriteMachiningParam(nIndex, MAC_MAXSLICESNUMBER, sWriteValue, sFilePath)
|
||||
Case Params.RIBSSTRANDWIDTH
|
||||
WriteMachiningParam(nIndex, MAC_RIBSSTRANDWIDTH, sWriteValue, sFilePath)
|
||||
Case Params.RIBSOVERLAP
|
||||
WriteMachiningParam(nIndex, MAC_RIBSOVERLAP, sWriteValue, sFilePath)
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
WriteMachiningParam(nIndex, MAC_RIBSSTRANDOVERLAP, sWriteValue, sFilePath)
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
WriteMachiningParam(nIndex, MAC_RIBSSTRANDCOUNT, sWriteValue, sFilePath)
|
||||
Case Params.RIBSLINKFILLET
|
||||
WriteMachiningParam(nIndex, MAC_RIBSLINKFILLET, sWriteValue, sFilePath)
|
||||
Case Params.RIBSLEADINLEN
|
||||
WriteMachiningParam(nIndex, MAC_RIBSLEADINLEN, sWriteValue, sFilePath)
|
||||
Case Params.RIBSLEADOUTLEN
|
||||
@@ -1266,6 +1422,8 @@ Public Class NumericMachiningParam
|
||||
WriteMachiningParam(nIndex, MAC_RIBSLEADOUTWIPE, sWriteValue, sFilePath)
|
||||
Case Params.RIBSLEADOUTWIPEDIR
|
||||
WriteMachiningParam(nIndex, MAC_RIBSLEADOUTWIPEDIR, sWriteValue, sFilePath)
|
||||
Case Params.RIBSLEADFILLET
|
||||
WriteMachiningParam(nIndex, MAC_RIBSLEADFILLET, sWriteValue, sFilePath)
|
||||
Case Params.SHELLNBRDIFFERENCE
|
||||
WriteMachiningParam(nIndex, MAC_SHELLNBRDIFFERENCE, sWriteValue, sFilePath)
|
||||
Case Params.SHELLNBRCOASTING
|
||||
@@ -1449,17 +1607,15 @@ Public Class ComboMachiningParam
|
||||
Else
|
||||
Select Case Type
|
||||
Case Params.SLICINGTYPE
|
||||
Dim nSlicingType As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_SLICINGTYPE, 0, CurrentMachine.sMachIniFile)
|
||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical")})
|
||||
If nSlicingType >= 1 Then
|
||||
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45deg X"))
|
||||
If nSlicingType >= 2 Then
|
||||
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45_Y, "45deg Y"))
|
||||
If nSlicingType >= 3 Then
|
||||
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Dim nNewSlicingType As Integer = CurrentMachine.GetSlicingType()
|
||||
m_ValueList = New List(Of IdNameStruct)
|
||||
If (nNewSlicingType And 1) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical"))
|
||||
If (nNewSlicingType And 2) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45deg X"))
|
||||
If (nNewSlicingType And 4) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45_Y, "45deg Y"))
|
||||
If (nNewSlicingType And 8) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal"))
|
||||
If (nNewSlicingType And 16) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR, "MultiPlanar"))
|
||||
If (nNewSlicingType And 32) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45, "MultiPlanar 45deg"))
|
||||
If (nNewSlicingType And 64) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_HORIZ, "MultiPlanar Horiz"))
|
||||
Dim nSelValue As Double = ReadMachiningParamDouble(nIndex, MAC_SLICINGTYPE, -1)
|
||||
If nSelValue = -1 Then
|
||||
Dim dSlicing45 As Double = 0
|
||||
@@ -1655,6 +1811,7 @@ Public Class CheckMachiningParam
|
||||
Set(value As Boolean)
|
||||
m_bValue = value
|
||||
NotifyPropertyChanged(NameOf(bValue))
|
||||
ManageDependencyParam()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -1694,8 +1851,14 @@ Public Class CheckMachiningParam
|
||||
Select Case Type
|
||||
Case Params.SPIRALVASE
|
||||
m_bValue = ReadMachiningParamDouble(nIndex, MAC_SPIRALVASE, 0)
|
||||
Case Params.SINGLELEADIN
|
||||
m_bValue = ReadMachiningParamDouble(nIndex, MAC_SINGLELEADIN, 0)
|
||||
Case Params.RIBSLINK
|
||||
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLINK, 0)
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSMERGEWITHSHELL, 0)
|
||||
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
||||
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSINVERTMERGEDSHELLMAINLINK, 0)
|
||||
Case Params.RIBSINVERTORDER
|
||||
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSINVERTORDER, 0)
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
@@ -1717,12 +1880,28 @@ Public Class CheckMachiningParam
|
||||
m_bOrigValue = m_bValue
|
||||
End Sub
|
||||
|
||||
Friend Sub ManageDependencyParam(Optional Cathegory As MachiningCathegory = Nothing)
|
||||
' gestisco dis/attivazione parametri dipendenti
|
||||
Select Case m_Type
|
||||
Case Params.SPIRALVASE
|
||||
Dim ShellCathegory As MachiningCathegory = If(Not IsNothing(Cathegory), Cathegory, m_Cathegory.Machining.CathegoryList.FirstOrDefault(Function(z) z.Type= MachiningCathegory.Cathegories.LINK))
|
||||
Dim NumMachiningParam As NumericMachiningParam = ShellCathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.SPIRALVASELEN)
|
||||
NumMachiningParam.SetIsActive(m_bValue)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
|
||||
Select Case Type
|
||||
Case Params.SPIRALVASE
|
||||
WriteMachiningParam(nIndex, MAC_SPIRALVASE, If(m_bValue, 1, 0), sFilePath)
|
||||
Case Params.SINGLELEADIN
|
||||
WriteMachiningParam(nIndex, MAC_SINGLELEADIN, If(m_bValue, 1, 0), sFilePath)
|
||||
Case Params.RIBSLINK
|
||||
WriteMachiningParam(nIndex, MAC_RIBSLINK, If(m_bValue, 1, 0), sFilePath)
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
WriteMachiningParam(nIndex, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0), sFilePath)
|
||||
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
||||
WriteMachiningParam(nIndex, MAC_RIBSINVERTMERGEDSHELLMAINLINK, If(m_bValue, 1, 0), sFilePath)
|
||||
Case Params.RIBSINVERTORDER
|
||||
WriteMachiningParam(nIndex, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0), sFilePath)
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
|
||||
@@ -143,6 +143,7 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||
Margin="0,0,2.5,0"
|
||||
ToolTip="{StaticResource MachiningParam_Tooltip}"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<TextBlock Text=" (BETA)"
|
||||
Margin="0,0,2.5,0"
|
||||
@@ -166,6 +167,7 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||
Margin="0,0,2.5,0"
|
||||
ToolTip="{StaticResource MachiningParam_Tooltip}"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<TextBlock Text=" (BETA)"
|
||||
Margin="0,0,2.5,0"
|
||||
@@ -192,6 +194,7 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||
Margin="0,0,2.5,0"
|
||||
ToolTip="{StaticResource MachiningParam_Tooltip}"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<TextBlock Text=" (BETA)"
|
||||
Margin="0,0,2.5,0"
|
||||
@@ -231,6 +234,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Margin="0,0,2.5,0"
|
||||
ToolTip="{StaticResource MachiningParam_Tooltip}"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -113,28 +113,6 @@ Public Class MachiningDbVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Tooltip"
|
||||
|
||||
Public ReadOnly Property Import_ToolTip As String
|
||||
Get
|
||||
Return "Import"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Export_ToolTip As String
|
||||
Get
|
||||
Return "Export"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property EditName_ToolTip As String
|
||||
Get
|
||||
Return "Edit Name"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Tooltip
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdNew As ICommand
|
||||
@@ -358,9 +336,15 @@ Public Class MachiningDbVM
|
||||
|
||||
Public Sub Import()
|
||||
' chiedo il nome del file .data da aprire
|
||||
Dim OpenFileDlg As New System.Windows.Forms.OpenFileDialog() With {.Title = EgtMsg(31451) & " " & EgtMsg(31452),
|
||||
.Filter = "File data (*" & ImportExportMachiningPanelVM.MachiningDataExtension & ")|*" & ImportExportMachiningPanelVM.MachiningDataExtension,
|
||||
.FileName = String.Empty}
|
||||
'Dim OpenFileDlg As New System.Windows.Forms.OpenFileDialog() With {.Title = EgtMsg(31451) & " " & EgtMsg(31452),
|
||||
' .Filter = "File data (*" & ImportExportMachiningPanelVM.MachiningDataExtension & ")|*" & ImportExportMachiningPanelVM.MachiningDataExtension,
|
||||
' .FileName = String.Empty}
|
||||
Dim OpenFileDlg As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
|
||||
.Title = EgtMsg(31451) & " " & EgtMsg(31452),
|
||||
.Filter = "File data (*" & ImportExportMachiningPanelVM.MachiningDataExtension & ")|*" & ImportExportMachiningPanelVM.MachiningDataExtension,
|
||||
.FileName = String.Empty,
|
||||
.Mode = 1
|
||||
}
|
||||
If OpenFileDlg.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then Return
|
||||
Dim ImportWindow As New ImportExportMachiningPanelV(Application.Current.MainWindow, New ImportExportMachiningPanelVM(ImportExportMachiningPanelVM.WindowTypeEnum.MACHINING, ImportExportMachiningPanelVM.WindowModeEnum.IMPORT, OpenFileDlg.FileName))
|
||||
ImportWindow.ShowDialog()
|
||||
|
||||
@@ -8,7 +8,7 @@ Public Class MainWindowM
|
||||
#Region "FIELDS"
|
||||
|
||||
' massimo numero di istanze del programma ammesse
|
||||
Const MAX_INST As Integer = 32
|
||||
Const MAX_INST As Integer = 4
|
||||
|
||||
Private m_objMutex As Mutex
|
||||
|
||||
@@ -191,8 +191,8 @@ Public Class MainWindowM
|
||||
EgtSetLockId( sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2510, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5583, 2510, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5583, 3105, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5583, 3105, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
@@ -317,7 +317,7 @@ Public Class MainWindowM
|
||||
Friend Function GetMaxInstances() As Integer
|
||||
' Leggo il massimo numero di istanze ammesse
|
||||
Dim nMaxInst As Integer = GetMainPrivateProfileInt(S_GENERAL, K_MAXINST, 1)
|
||||
Return 1 ' Max(1, Min(nMaxInst, MAX_INST))
|
||||
Return Max(1, Min(nMaxInst, MAX_INST))
|
||||
End Function
|
||||
|
||||
Friend Sub Close()
|
||||
|
||||
@@ -40,7 +40,7 @@ Class MainWindowV
|
||||
End Sub
|
||||
|
||||
Private Sub MainWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt AndAlso Keyboard.IsKeyDown(Key.F4) Then
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
@@ -61,6 +61,8 @@ Class MainWindowV
|
||||
Me.Activate()
|
||||
' Recupero l'array di stringhe con i nomi del file
|
||||
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
|
||||
' Apro il primo
|
||||
Map.refSecondaryWindowVM.OpenStdFile(sFiles(0))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -159,21 +159,19 @@ Public Class MainWindowVM
|
||||
End Function
|
||||
|
||||
Friend Sub CloseApplication()
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
' Se simulazione in corso
|
||||
If Not IsNothing( Map.refSimulationPanelVM) AndAlso Map.refSimulationPanelVM.MySimul.bSimExecuting Then
|
||||
' Avvio l'arresto della simulazione
|
||||
Map.refSimulationPanelVM.MySimul.SetSimulationStatus(MCH_SIM_ST.UI_STOP)
|
||||
Map.refSimulationPanelVM.MySimul.m_bSimulEndExitApp = True
|
||||
Return
|
||||
End If
|
||||
' gestisco la chiusura della simulazione
|
||||
' Chiusura della simulazione
|
||||
If Map.refRightPanelVM.SelPanel = RightPanelVM.Panels.SIMULATION AndAlso Not IsNothing(Map.refSimulationPanelVM) Then
|
||||
Map.refSimulationPanelVM.MySimul.ResetSimulation()
|
||||
End If
|
||||
' Gestisco eventuale file corrente modificato
|
||||
Dim bOk As Boolean = True
|
||||
'bOk = ProjFileVM.VerifyProjectModification(Map.refProjManagerVM.CurrProj, ProjectType.PROJ)
|
||||
' se salvataggio annullato, rimango
|
||||
If Not bOk Then Return
|
||||
Dim bAllowClose As Boolean = Map.refSceneHostVM.MainController.ManageModified()
|
||||
' Salvo impostazione macchina corrente
|
||||
'Map.refMachinePanelVM.SaveCurrentMachine()
|
||||
' Se non confermata chiusura, esco
|
||||
If Not bAllowClose Then Return
|
||||
' salvo modo di visualizzazione
|
||||
|
||||
@@ -49,8 +49,13 @@
|
||||
Style="{StaticResource BaseTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sName, UpdateSourceTrigger=Explicit}"
|
||||
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
||||
Visibility="{Binding TextBox_Visibility}"
|
||||
Style="{StaticResource OptionTextBox}"/>
|
||||
Visibility="{Binding TextBox_Visibility}">
|
||||
<EgtWPFLib5:EgtTextBox.Style>
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource OptionTextBox}">
|
||||
<EventSetter Event="PreviewKeyDown" Handler="TextBox_PreviewKeyDown"/>
|
||||
</Style>
|
||||
</EgtWPFLib5:EgtTextBox.Style>
|
||||
</EgtWPFLib5:EgtTextBox>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</HierarchicalDataTemplate>
|
||||
@@ -69,8 +74,13 @@
|
||||
Style="{StaticResource BaseTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sName, UpdateSourceTrigger=Explicit}"
|
||||
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
||||
Visibility="{Binding TextBox_Visibility}"
|
||||
Style="{StaticResource OptionTextBox}"/>
|
||||
Visibility="{Binding TextBox_Visibility}">
|
||||
<EgtWPFLib5:EgtTextBox.Style>
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource OptionTextBox}">
|
||||
<EventSetter Event="PreviewKeyDown" Handler="TextBox_PreviewKeyDown"/>
|
||||
</Style>
|
||||
</EgtWPFLib5:EgtTextBox.Style>
|
||||
</EgtWPFLib5:EgtTextBox>
|
||||
</Grid>
|
||||
</HierarchicalDataTemplate>
|
||||
<!-- Menu' tasto destro -->
|
||||
|
||||
@@ -23,4 +23,12 @@
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||
' per evitare che il click del tasto Enter a fine edit faccia scattare anche la chiusura
|
||||
' di tutto il pannello a causa del IsDefault sul tasto di chiusura, termino la gestione del click
|
||||
If e.Key = Key.Enter Then
|
||||
e.Handled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -472,14 +472,6 @@ Public Class ManagePartPanelVM
|
||||
Map.refSliceManagerVM.UpdateDimensions()
|
||||
Next
|
||||
End If
|
||||
'EgtAddMachGroup("3dPrint")
|
||||
'EgtSetTable("Tab")
|
||||
|
||||
'Dim nRawId As Integer = EgtAddRawPart(b3PrintSolid.Min, b3PrintSolid.DimX, b3PrintSolid.DimY, b3PrintSolid.DimZ, New Color3d(128, 128, 128, 30))
|
||||
'EgtAddPartToRawPart(nPartId, b3PrintSolid.Min, nRawId)
|
||||
'EgtMoveToCornerRawPart(nRawId, New Point3d(dPosX, dPosY, 0), MCH_CR.BL)
|
||||
|
||||
'EgtResetCurrMachGroup()
|
||||
|
||||
' seleziono ultimo pezzo aggiunto
|
||||
Map.refTopPanelVM.SelLastPart()
|
||||
|
||||
@@ -285,6 +285,8 @@ Public Class MaterialIndex
|
||||
sParamKey = MAT_KZ
|
||||
Case MaterialParam.Params.KN
|
||||
sParamKey = MAT_KN
|
||||
Case MaterialParam.Params.TDRYER
|
||||
sParamKey = MAT_TDRYER
|
||||
End Select
|
||||
Return ReadMaterialParamDouble(m_nIndex, sParamKey, dDefault)
|
||||
End Function
|
||||
@@ -346,6 +348,7 @@ Public Class MaterialCathegory
|
||||
m_MaterialParamList = New List(Of MaterialParam)({New NumericMaterialParam(MaterialParam.Params.K_EXTRUSION, nIndex),
|
||||
New NumericMaterialParam(MaterialParam.Params.K_LAY_TIME, nIndex),
|
||||
New NumericMaterialParam(MaterialParam.Params.DENSITY, nIndex),
|
||||
New NumericMaterialParam(MaterialParam.Params.TDRYER, nIndex),
|
||||
New StringMaterialParam(MaterialParam.Params.ORIG, nIndex)})
|
||||
m_Cathegory_Visibility = Visibility.Visible
|
||||
Case Cathegories.TEMPERATURES
|
||||
@@ -419,6 +422,7 @@ Public MustInherit Class MaterialParam
|
||||
KZ = 20
|
||||
KN = 21
|
||||
ORIG = 22
|
||||
TDRYER = 23
|
||||
End Enum
|
||||
|
||||
Private m_Type As Params
|
||||
@@ -478,6 +482,8 @@ Public MustInherit Class MaterialParam
|
||||
m_sName = "KZ"
|
||||
Case Params.KN
|
||||
m_sName = "KN"
|
||||
Case Params.TDRYER
|
||||
m_sName = "Dryer Temperature"
|
||||
Case Params.ORIG
|
||||
m_sName = "Original"
|
||||
End Select
|
||||
@@ -498,13 +504,13 @@ Public Class NumericMaterialParam
|
||||
Private m_dValue As Double
|
||||
Public Property dValue As String
|
||||
Get
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue)
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 5), DoubleToString(m_dValue, 5))
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_bIsLen Then
|
||||
StringToLen(value, m_dValue)
|
||||
Else
|
||||
m_dValue = value
|
||||
StringToDouble(value, m_dValue)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(dValue))
|
||||
End Set
|
||||
@@ -583,6 +589,9 @@ Public Class NumericMaterialParam
|
||||
Case Params.KN
|
||||
m_dValue = ReadMaterialParamDouble(nIndex, MAT_KN, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.TDRYER
|
||||
m_dValue = ReadMaterialParamDouble(nIndex, MAT_TDRYER, 0)
|
||||
m_bIsLen = False
|
||||
End Select
|
||||
m_dOrigValue = m_dValue
|
||||
End Sub
|
||||
@@ -633,6 +642,8 @@ Public Class NumericMaterialParam
|
||||
WriteMaterialParam(nIndex, MAT_KZ, sWriteValue, sFilePath)
|
||||
Case Params.KN
|
||||
WriteMaterialParam(nIndex, MAT_KN, sWriteValue, sFilePath)
|
||||
Case Params.TDRYER
|
||||
WriteMaterialParam(nIndex, MAT_TDRYER, sWriteValue, sFilePath)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -285,17 +285,19 @@ Public Class MaterialDbVM
|
||||
' aggiorno lista materiali Db
|
||||
Init()
|
||||
' aggiorno lista materiali TopBar
|
||||
Dim PrevMaterialGuid As String = Map.refTopPanelVM.SelMaterial.sGUID
|
||||
Map.refTopPanelVM.InitMaterialList()
|
||||
Dim PrevMaterial As MaterialIndex = Map.refTopPanelVM.MaterialList.FirstOrDefault(Function(x) x.sGUID = PrevMaterialGuid)
|
||||
If Not IsNothing(PrevMaterial) Then
|
||||
Map.refTopPanelVM.SetSelMaterial(PrevMaterial)
|
||||
Else
|
||||
Map.refTopPanelVM.SelMaterial = Nothing
|
||||
Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.SelMaterial))
|
||||
If Not IsNothing(Map.refTopPanelVM.SelMaterial) Then
|
||||
Dim PrevMaterialGuid As String = Map.refTopPanelVM.SelMaterial.sGUID
|
||||
Dim PrevMaterial As MaterialIndex = Map.refTopPanelVM.MaterialList.FirstOrDefault(Function(x) x.sGUID = PrevMaterialGuid)
|
||||
If Not IsNothing(PrevMaterial) Then
|
||||
Map.refTopPanelVM.SetSelMaterial(PrevMaterial)
|
||||
Else
|
||||
Map.refTopPanelVM.SelMaterial = Nothing
|
||||
Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.SelMaterial))
|
||||
End If
|
||||
' ricarico lavorazioni per aggiorno liste materiali all'interno
|
||||
Map.refMachiningDbVM.Init()
|
||||
End If
|
||||
' ricarico lavorazioni per aggiorno liste materiali all'interno
|
||||
Map.refMachiningDbVM.Init()
|
||||
End If
|
||||
' ripristino modalita' standard
|
||||
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
||||
@@ -429,13 +431,23 @@ Public Class MaterialDbVM
|
||||
|
||||
Public Sub Import()
|
||||
' chiedo il nome del file .data da aprire
|
||||
Dim OpenFileDlg As New System.Windows.Forms.OpenFileDialog() With {.Title = EgtMsg(31451) & " " & EgtMsg(31452),
|
||||
.Filter = "Material file data (*" & ImportExportMachiningPanelVM.MaterialDataExtension & ")|*" & ImportExportMachiningPanelVM.MaterialDataExtension &
|
||||
"|Original Material file data (*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension & ")|*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension &
|
||||
"|All Material file data (*" & ImportExportMachiningPanelVM.MaterialDataExtension & "," & ImportExportMachiningPanelVM.OriginalMaterialDataExtension & ")|*" &
|
||||
ImportExportMachiningPanelVM.MaterialDataExtension & ";*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension,
|
||||
.FilterIndex = 3,
|
||||
.FileName = String.Empty}
|
||||
'Dim OpenFileDlg As New System.Windows.Forms.OpenFileDialog() With {.Title = EgtMsg(31451) & " " & EgtMsg(31452),
|
||||
' .Filter = "Material file data (*" & ImportExportMachiningPanelVM.MaterialDataExtension & ")|*" & ImportExportMachiningPanelVM.MaterialDataExtension &
|
||||
' "|Original Material file data (*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension & ")|*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension &
|
||||
' "|All Material file data (*" & ImportExportMachiningPanelVM.MaterialDataExtension & "," & ImportExportMachiningPanelVM.OriginalMaterialDataExtension & ")|*" &
|
||||
' ImportExportMachiningPanelVM.MaterialDataExtension & ";*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension,
|
||||
' .FilterIndex = 3,
|
||||
' .FileName = String.Empty}
|
||||
Dim OpenFileDlg As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
|
||||
.Title = EgtMsg(31451) & " " & EgtMsg(31452),
|
||||
.Filter = "Material file data (*" & ImportExportMachiningPanelVM.MaterialDataExtension & ")|*" & ImportExportMachiningPanelVM.MaterialDataExtension &
|
||||
"|Original Material file data (*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension & ")|*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension &
|
||||
"|All Material file data (*" & ImportExportMachiningPanelVM.MaterialDataExtension & "," & ImportExportMachiningPanelVM.OriginalMaterialDataExtension & ")|*" &
|
||||
ImportExportMachiningPanelVM.MaterialDataExtension & ";*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension,
|
||||
.FilterIndex = 3,
|
||||
.FileName = String.Empty,
|
||||
.Mode = 1
|
||||
}
|
||||
If OpenFileDlg.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then Return
|
||||
Dim ImportWindowVM As New ImportExportMachiningPanelVM(ImportExportMachiningPanelVM.WindowTypeEnum.MATERIAL, ImportExportMachiningPanelVM.WindowModeEnum.IMPORT, OpenFileDlg.FileName)
|
||||
If ImportWindowVM.WindowMode <> ImportExportMachiningPanelVM.WindowModeEnum.IMPORT_ORIG Then
|
||||
|
||||
@@ -30,7 +30,7 @@ Imports System.Windows
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("Icarus")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2022-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2022-2026 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.10.1")>
|
||||
<Assembly: AssemblyFileVersion("2.5.10.1")>
|
||||
<Assembly: AssemblyVersion("3.1.5.1")>
|
||||
<Assembly: AssemblyFileVersion("3.1.5.1")>
|
||||
|
||||
@@ -15,6 +15,8 @@ Friend Module OptionModule
|
||||
Friend m_bThickLine As Boolean
|
||||
' Flag per visualizzazione smussata delle superfici
|
||||
Friend m_bSmoothTriMesh As Boolean
|
||||
' Flag per visualizzazione semplificate sezione strand
|
||||
Friend m_bUseSimplifiedSection As Boolean
|
||||
|
||||
' Colore di default in disegno
|
||||
Friend m_DefMaterialColor As Color3d
|
||||
@@ -43,6 +45,14 @@ Friend Module OptionModule
|
||||
Friend m_sFont As String
|
||||
Friend m_dTextHeight As Double
|
||||
|
||||
' Parametri per la griglia
|
||||
Friend m_bGridVisibility As Boolean
|
||||
Friend m_dSnapStepMm As Double
|
||||
Friend m_dSnapStepInch As Double
|
||||
Friend m_nMinLineSStep As Integer
|
||||
Friend m_nMajLineSStep As Integer
|
||||
Friend m_nExtSStep As Integer
|
||||
|
||||
' Variabili che indicano per ogni tipo di lavorazione quale geometria è selezionabile
|
||||
'Friend m_SelGeomSawing As SceneSelModeOpt
|
||||
'Friend m_SelGeomDrilling As SceneSelModeOpt
|
||||
@@ -99,6 +109,8 @@ Friend Module OptionModule
|
||||
m_bThickLine = GetMainPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1
|
||||
' Inizializzo flag visualizzazione smussata delle superfici
|
||||
m_bSmoothTriMesh = GetMainPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0
|
||||
' Inizializzo flag visualizzazione sezione strand semplificata
|
||||
m_bUseSimplifiedSection = GetMainPrivateProfileInt(S_SOLIDS, K_SIMPLIFIEDSECTION, 0) <> 0
|
||||
' Inizio colore di default in disegno
|
||||
Dim DefColor As New Color3d(0, 0, 0)
|
||||
GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
||||
@@ -108,6 +120,13 @@ Friend Module OptionModule
|
||||
' Inizializzo variabili per import
|
||||
m_dDxfScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1)
|
||||
m_dStlScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_STLSCALE, 1)
|
||||
' Inizializzo parametri griglia
|
||||
m_bGridVisibility = (GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0)
|
||||
m_dSnapStepMm = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10)
|
||||
m_dSnapStepInch = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 12.7)
|
||||
m_nMinLineSStep = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1)
|
||||
m_nMajLineSStep = GetMainPrivateProfileInt(S_GRID, K_MAJLINESSTEP, 10)
|
||||
m_nExtSStep = GetMainPrivateProfileInt(S_GRID, K_EXTSSTEP, 100)
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
@@ -61,6 +61,7 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding ThickLineMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="0" Margin="0,5,0,5"/>
|
||||
@@ -70,6 +71,10 @@
|
||||
Grid.Row="1" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding SmoothTriMesh}"
|
||||
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding UseSimplifiedSectionMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="2" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding UseSimplifiedSection}"
|
||||
Grid.Column="1" Grid.Row="2" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<!--<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
|
||||
@@ -147,6 +147,7 @@ Public Class OptionWindowVM
|
||||
If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
OptionModule.m_dGeometryTolerance = dVal
|
||||
Map.refSceneHostVM.MainController.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
|
||||
Map.refSceneHostVM.MainController.SetAdvImpTolerance(OptionModule.m_dGeometryTolerance)
|
||||
WriteMainPrivateProfileString(S_GEOMDB, K_SURFTMTOLER, DoubleToString(OptionModule.m_dGeometryTolerance, 5))
|
||||
End If
|
||||
End Set
|
||||
@@ -214,6 +215,16 @@ Public Class OptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property UseSimplifiedSection As Boolean
|
||||
Get
|
||||
Return OptionModule.m_bUseSimplifiedSection
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
OptionModule.m_bUseSimplifiedSection = value
|
||||
WriteMainPrivateProfileString(S_SOLIDS, K_SIMPLIFIEDSECTION, If(value, "1", "0"))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Public Property SelectedTextFont As String
|
||||
' Get
|
||||
' Return m_FontList(m_FontList.IndexOf(OptionModule.m_sFontText))
|
||||
@@ -257,152 +268,6 @@ Public Class OptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Public Property ImageScaleFactor As String
|
||||
' Get
|
||||
' Return LenToString(OptionModule.m_dImgScaleFactor, 5)
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim dVal As Double = 0
|
||||
' If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
' OptionModule.m_dImgScaleFactor = dVal
|
||||
' WritePrivateProfileString(S_IMPORT, K_IMGSCALE, DoubleToString(OptionModule.m_dImgScaleFactor, 5))
|
||||
' Map.refProjectVM.GetController().SetScaleForImageImport(OptionModule.m_dImgScaleFactor)
|
||||
' NotifyPropertyChanged("ImageScaleFactor")
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property ImageWidth As String
|
||||
' Get
|
||||
' Return OptionModule.m_nImgWidth.ToString()
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim nVal As Integer = 0
|
||||
' If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then
|
||||
' OptionModule.m_nImgWidth = nVal
|
||||
' WritePrivateProfileString(S_EXPORT, K_IMGWIDTH, OptionModule.m_nImgWidth.ToString())
|
||||
' Map.refProjectVM.GetController().SetDefaultForImageExport(OptionModule.m_nImgWidth, OptionModule.m_nImgHeight)
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property ImageHeight As String
|
||||
' Get
|
||||
' Return OptionModule.m_nImgHeight.ToString()
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim nVal As Integer = 0
|
||||
' If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then
|
||||
' OptionModule.m_nImgHeight = nVal
|
||||
' WritePrivateProfileString(S_EXPORT, K_IMGHEIGHT, OptionModule.m_nImgHeight.ToString())
|
||||
' Map.refProjectVM.GetController().SetDefaultForImageExport(OptionModule.m_nImgWidth, OptionModule.m_nImgHeight)
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property ExtLineLen As String
|
||||
' Get
|
||||
' Return LenToString(OptionModule.m_dExtLineLen, 5)
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim dVal As Double = 0
|
||||
' If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
' OptionModule.m_dExtLineLen = dVal
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_EXTLINELEN, DoubleToString(OptionModule.m_dExtLineLen, 5))
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property ArrowLen As String
|
||||
' Get
|
||||
' Return LenToString(OptionModule.m_dArrowLen, 5)
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim dVal As Double = 0
|
||||
' If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
' OptionModule.m_dArrowLen = dVal
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_ARROWLEN, DoubleToString(OptionModule.m_dArrowLen, 5))
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property TextDist As String
|
||||
' Get
|
||||
' Return LenToString(OptionModule.m_dTextDist, 5)
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim dVal As Double = 0
|
||||
' If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
' OptionModule.m_dTextDist = dVal
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_TEXTDIST, DoubleToString(OptionModule.m_dTextDist, 5))
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property SelectedUnitMeasure As String
|
||||
' Get
|
||||
' If OptionModule.m_nLenIsMM = 0 Then
|
||||
' Return "inch"
|
||||
' ElseIf OptionModule.m_nLenIsMM = 1 Then
|
||||
' Return "mm"
|
||||
' Else
|
||||
' Return EgtMsg(MSG_OPTIONPAGE + 45)
|
||||
' End If
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim nVal As Integer = 2
|
||||
' If value = "inch" Then
|
||||
' nVal = 0
|
||||
' ElseIf value = "mm" Then
|
||||
' nVal = 1
|
||||
' End If
|
||||
' OptionModule.m_nLenIsMM = nVal
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_LENISMM, OptionModule.m_nLenIsMM.ToString())
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property DecDigit As String
|
||||
' Get
|
||||
' Return OptionModule.m_nDecDigit.ToString()
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim nVal As Integer = 0
|
||||
' If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then
|
||||
' OptionModule.m_nDecDigit = nVal
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_DECDIGIT, OptionModule.m_nDecDigit.ToString())
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property SelectedFont As String
|
||||
' Get
|
||||
' Return m_FontList(m_FontList.IndexOf(OptionModule.m_sFont))
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' OptionModule.m_sFont = value
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_DIMFONT, OptionModule.m_sFont)
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property TextHeight As String
|
||||
' Get
|
||||
' Return LenToString(OptionModule.m_dTextHeight, 5)
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim dVal As Double = 0
|
||||
' If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
' OptionModule.m_dTextHeight = dVal
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_TEXTHEIGHT, DoubleToString(OptionModule.m_dTextHeight, 5))
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private m_DXFScaleEnable As Boolean = False
|
||||
Public Property DXFScaleEnable As Boolean
|
||||
@@ -487,32 +352,6 @@ Public Class OptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Public Property SelectedImageScale As String
|
||||
' Get
|
||||
' If Math.Abs(OptionModule.m_dImgScaleFactor - ONEMM) < EPS_SMALL * 10 Then
|
||||
' Return ScaleImageList(ScaleImageList.IndexOf("mm"))
|
||||
' ElseIf Math.Abs(OptionModule.m_dImgScaleFactor - ONEINCH) < EPS_SMALL * 10 Then
|
||||
' Return ScaleImageList(ScaleImageList.IndexOf("inch"))
|
||||
' Else
|
||||
' ImageScaleEnable = True
|
||||
' Return ScaleImageList(ScaleImageList.IndexOf(EgtMsg(6546)))
|
||||
' ImageScaleEnable = True
|
||||
' End If
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' If value = "mm" Then
|
||||
' ImageScaleFactor = LenToString(ONEMM, 3)
|
||||
' ImageScaleEnable = False
|
||||
' ElseIf value = "inch" Then
|
||||
' ImageScaleFactor = LenToString(ONEINCH, 4)
|
||||
' ImageScaleEnable = False
|
||||
' Else
|
||||
' ImageScaleFactor = LenToString(OptionModule.m_dImgScaleFactor, 4)
|
||||
' ImageScaleEnable = True
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
' Definizione comandi
|
||||
|
||||
Private m_cmdTopSceneBackground As ICommand
|
||||
@@ -571,6 +410,12 @@ Public Class OptionWindowVM
|
||||
Return EgtMsg(6518) ' Superfici smussate
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property UseSimplifiedSectionMsg As String
|
||||
Get
|
||||
Return "Use simplified strand section"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property UpdateLicenceMsg As String
|
||||
Get
|
||||
Return EgtMsg(6553) ' Aggiorna licenza
|
||||
@@ -759,14 +604,14 @@ Public Class OptionWindowVM
|
||||
End If
|
||||
Next
|
||||
' Creo dialogo colori
|
||||
'Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
||||
'ColorDlg.FullOpen = True
|
||||
'ColorDlg.CustomColors = nCustomColors.ToArray()
|
||||
'ColorDlg.Color = Col.ToColor()
|
||||
Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
|
||||
.CustomColors = nCustomColors.ToArray(),
|
||||
.Color = Col.ToColor()
|
||||
}
|
||||
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
||||
ColorDlg.FullOpen = True
|
||||
ColorDlg.CustomColors = nCustomColors.ToArray()
|
||||
ColorDlg.Color = Col.ToColor()
|
||||
'Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
|
||||
' .CustomColors = nCustomColors.ToArray(),
|
||||
' .Color = Col.ToColor()
|
||||
'}
|
||||
' Visualizzo dialogo
|
||||
If ColorDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return False
|
||||
'Recupero colore scelto
|
||||
@@ -801,6 +646,9 @@ Public Class OptionWindowVM
|
||||
''' Manage the MachiningDb closing. This method is invoked by the CloseMachiningDbCommand.
|
||||
''' </summary>
|
||||
Public Sub TopSceneBackgroundCmd()
|
||||
Dim x As New Forms.ColorDialog
|
||||
x.ShowDialog()
|
||||
|
||||
' Recupero colore da Ini
|
||||
Dim BackTopColor As New Color3d(192, 192, 192)
|
||||
GetMainPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
|
||||
@@ -902,15 +750,26 @@ Public Class OptionWindowVM
|
||||
''' </summary>
|
||||
Public Sub UpdateLicenceCmd()
|
||||
' Apro dialogo per richiesta file licenza
|
||||
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.DefaultExt = ".lic",
|
||||
.Filter = "Licences (.lic)|*.lic",
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True
|
||||
'Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
' .DefaultExt = ".lic",
|
||||
' .Filter = "Licences (.lic)|*.lic",
|
||||
' .CheckFileExists = True,
|
||||
' .ValidateNames = True
|
||||
'}
|
||||
Dim LicDlg As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
|
||||
.Title = "Open",
|
||||
.Filter = "Licences (*.lic)|*.lic",
|
||||
.InitialDirectory = Map.refMainWindowVM.MainWindowM.sConfigDir,
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True,
|
||||
.FilterIndex = 1,
|
||||
.Mode = 1
|
||||
}
|
||||
If LicDlg.ShowDialog() = True Then
|
||||
If LicDlg.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
'If LicDlg.ShowDialog() = True Then
|
||||
' Recupero il direttorio del file
|
||||
Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName)
|
||||
'Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName)
|
||||
Dim sDir As String = LicDlg.FileName
|
||||
' Se il file non è già nel direttorio di configurazione lo copio
|
||||
If Not String.Equals(Path.GetFullPath(sDir), Path.GetFullPath(Map.refMainWindowVM.MainWindowM.sConfigDir), StringComparison.OrdinalIgnoreCase) Then
|
||||
Try
|
||||
@@ -945,13 +804,23 @@ Public Class OptionWindowVM
|
||||
''' </summary>
|
||||
Public Sub AddMachineCmd()
|
||||
' Apro dialogo per richiesta file zip di macchina
|
||||
Dim MachDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.DefaultExt = ".zip",
|
||||
.Filter = "Machines (.zip)|*.zip",
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True
|
||||
'Dim MachDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
' .DefaultExt = ".zip",
|
||||
' .Filter = "Machines (.zip)|*.zip",
|
||||
' .CheckFileExists = True,
|
||||
' .ValidateNames = True
|
||||
'}
|
||||
Dim MachDlg As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
|
||||
.Title = "Open",
|
||||
.Filter = "Machines (*.zip)|*.zip",
|
||||
.InitialDirectory = Map.refMainWindowVM.MainWindowM.sMachinesRoot,
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True,
|
||||
.FilterIndex = 1,
|
||||
.Mode = 1
|
||||
}
|
||||
If MachDlg.ShowDialog() <> True Then Return
|
||||
'If MachDlg.ShowDialog() <> True Then Return
|
||||
If MachDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return
|
||||
Dim sMachZip As String = MachDlg.FileName
|
||||
Dim sMachName As String = Path.GetFileNameWithoutExtension(sMachZip)
|
||||
Dim sMachDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, sMachName)
|
||||
@@ -1009,9 +878,8 @@ Public Class OptionWindowVM
|
||||
My.Computer.FileSystem.MoveDirectory(sBackupDir, sMachDir, True)
|
||||
' L'aggiornamento della macchina "{0}" non è riuscito.
|
||||
Dim sKo As String = String.Format(EgtMsg(6535), sMachName)
|
||||
EgtOutLog(sKo)
|
||||
'MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||
EgtOutLog( sKo)
|
||||
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||
Return
|
||||
End Try
|
||||
End If
|
||||
@@ -1053,9 +921,8 @@ Public Class OptionWindowVM
|
||||
End If
|
||||
'La macchina "{0}" è stata aggiornata con successo.
|
||||
Dim sOk As String = String.Format(EgtMsg(6530), sMachName)
|
||||
EgtOutLog(sOk)
|
||||
'MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
|
||||
EgtOutLog( sOk)
|
||||
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
|
||||
' Rimuovo il direttorio temporaneo
|
||||
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
' Aggiorno la lista delle macchina
|
||||
@@ -1100,6 +967,8 @@ Public Class OptionWindowVM
|
||||
End If
|
||||
Try
|
||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||
' aggiungo i file della Macchina
|
||||
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName
|
||||
If Directory.Exists(sMachineDir) Then
|
||||
@@ -1227,15 +1096,15 @@ Public Class LayerColor
|
||||
End If
|
||||
Next
|
||||
' Creo dialogo colori
|
||||
'Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
||||
'ColorDlg.FullOpen = True
|
||||
'ColorDlg.CustomColors = nCustomColors.ToArray()
|
||||
'ColorDlg.Color = Col.ToColor()
|
||||
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
||||
ColorDlg.FullOpen = True
|
||||
ColorDlg.CustomColors = nCustomColors.ToArray()
|
||||
ColorDlg.Color = Col.ToColor()
|
||||
' Visualizzo dialogo
|
||||
Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
|
||||
.CustomColors = nCustomColors.ToArray(),
|
||||
.Color = Col.ToColor()
|
||||
}
|
||||
'Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
|
||||
' .CustomColors = nCustomColors.ToArray(),
|
||||
' .Color = Col.ToColor()
|
||||
'}
|
||||
' Visualizzo dialogo
|
||||
If ColorDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return False
|
||||
' Recupero colore scelto
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Imports System.IO
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class ProjManagerVM
|
||||
Inherits VMBase
|
||||
@@ -160,17 +161,10 @@ Public Class ProjManagerVM
|
||||
"|New geometry EgalTech(*.nge)|*.nge",
|
||||
.FileName = "New.icrs",
|
||||
.FilterIndex = 1,
|
||||
.InitialDirectory = sDir}
|
||||
.InitialDirectory = sDir,
|
||||
.Mode = 1}
|
||||
od.ShowDialog()
|
||||
Dim sFilePath As String = od.FileName
|
||||
|
||||
'Dim save As New EgtSaveDialogV(Application.Current.MainWindow, New EgtSaveDialogVM()) With {
|
||||
' .Title = "Save",
|
||||
' .Filter = "Icarus project(*.icrs)|*.icrs",
|
||||
' .FileName = "New.icrs",
|
||||
' .InitialDirectory = sDir}
|
||||
'save.ShowDialog()
|
||||
'Dim sFilePath As String = save.FileName
|
||||
End Sub
|
||||
|
||||
Friend Sub NewProject(bDialog As Boolean)
|
||||
@@ -417,14 +411,6 @@ Public Class ProjManagerVM
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' Verifico se il progetto corrente è una porta
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
If nPartId = GDB_ID.NULL Then
|
||||
nPartId = EgtGetFirstPartInRawPart(EgtGetFirstRawPart())
|
||||
End If
|
||||
Dim sPartName As String = String.Empty
|
||||
EgtGetName(nPartId, sPartName)
|
||||
Dim bPrjIsDoor As Boolean = (String.Compare(sPartName, "DOOR") = 0)
|
||||
' Recupero macchine dei gruppi di lavoro del progetto
|
||||
Dim Machines As New List(Of String)
|
||||
Dim nMchGrpId As Integer = EgtGetFirstMachGroup()
|
||||
@@ -441,9 +427,12 @@ Public Class ProjManagerVM
|
||||
If Not String.IsNullOrWhiteSpace(sCurrProject) Then
|
||||
Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject)
|
||||
If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then
|
||||
Dim sCurrProjName As String = Path.GetFileNameWithoutExtension(sCurrProject).ToUpper()
|
||||
Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
|
||||
For FileIndex = 0 To TempFiles.Count - 1
|
||||
If Path.GetFileNameWithoutExtension(TempFiles(FileIndex)).Contains(Path.GetFileNameWithoutExtension(sCurrProject)) AndAlso TempFiles(FileIndex) <> sCurrProject Then
|
||||
If TempFiles(FileIndex) = sCurrProject Then Continue For
|
||||
Dim sCurrFileName As String = Path.GetFileNameWithoutExtension( TempFiles(FileIndex)).ToUpper()
|
||||
If String.Compare(sCurrFileName, sCurrProjName) = 0 Then
|
||||
OtherFiles.Add(TempFiles(FileIndex))
|
||||
End If
|
||||
Next
|
||||
@@ -456,11 +445,13 @@ Public Class ProjManagerVM
|
||||
End If
|
||||
Try
|
||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||
' aggiungo file macchine
|
||||
For Each sMachineName As String In Machines
|
||||
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sMachineName
|
||||
If Directory.Exists(sMachineDir) Then
|
||||
zip.AddItem(sMachineDir, sMachineName)
|
||||
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sMachineName, True)
|
||||
End If
|
||||
Next
|
||||
' aggiungo progetto corrente
|
||||
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 6.2 KiB |