Compare commits
226 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e2e365765d | |||
| e88e19ed3f | |||
| 87fba7e739 | |||
| 92a6cefe67 | |||
| 9193518d4f | |||
| 6e06d76a7c | |||
| dda46787db | |||
| ca2144f058 | |||
| e0ea153122 | |||
| 0b471786cc | |||
| ece48a6523 | |||
| 5e151fd7ec | |||
| ade3d5c1aa | |||
| b3db41c0ae | |||
| ad21ccf4d8 | |||
| 29dd3ca6d4 | |||
| 2174bdfd20 | |||
| d28ac71a5e | |||
| 1f92a28e44 | |||
| 3944eb085f | |||
| 30b436c33b | |||
| d2f947b9b1 | |||
| 50c06fee70 | |||
| 265938c37f | |||
| 3d4cfc0eb8 | |||
| c5ddcff63f | |||
| dc7a3b78cd | |||
| 4147457b7d | |||
| f2d465ff14 | |||
| 3cac37cb0d | |||
| ffa0ce03bb | |||
| 68063e5b39 | |||
| 18505bfa5d | |||
| a7999c4182 | |||
| b0186d096f | |||
| 6e5f917d6f | |||
| 5819bc4bf8 | |||
| dee67518e7 | |||
| 50f5e0528f | |||
| 08ea864a5e | |||
| 7a25e8d634 | |||
| f4163dc818 | |||
| 7beff98f1c | |||
| 4a2928192d | |||
| 1d32d9b634 | |||
| 4a7f552db6 | |||
| f456fedda8 | |||
| 084c4e01ed | |||
| 8d20d1d071 | |||
| a3eae73a52 | |||
| a821341706 | |||
| 9946b15588 | |||
| 4d610cea8b | |||
| 2648b704cc | |||
| e59e8a051a | |||
| 9d8188521e | |||
| 18de1a1ab7 | |||
| 0a7f872912 | |||
| 84b2edd17a | |||
| 7a8c883259 | |||
| 4f06a19553 | |||
| 3a7152066b | |||
| 2ce61cd5ab | |||
| 50ad698187 | |||
| 85591b39a7 | |||
| 18be9679c5 | |||
| 2c9061619a | |||
| 575bcc02d0 | |||
| e965ceb26c | |||
| 0c18c822f1 | |||
| e6d85c573a | |||
| 592e7161ce | |||
| 08c4d9c7b9 | |||
| 4ae5efb94b | |||
| 69261c7c73 | |||
| 361dc20f9b | |||
| 95d1e4b5ac | |||
| 621a31931c | |||
| 4f7dd6ef17 | |||
| 722e0c243d | |||
| 921e681759 | |||
| d065c0beeb | |||
| f8ea19537a | |||
| 289a6b1608 | |||
| f6baeb6afc | |||
| 9fa231f68a | |||
| bba92a4980 | |||
| cfaf513a91 | |||
| 8d33111af2 | |||
| fd565e96cc | |||
| b7628fff66 | |||
| cd3c90764e | |||
| 0db2ce6b91 | |||
| 993e7e86a2 | |||
| e335308709 | |||
| 4c13cdb8f4 | |||
| 9b06802cf9 | |||
| caf4fbcff9 | |||
| 218eeaffe8 | |||
| 03509c7022 | |||
| 6a600e632d | |||
| b866cd273e | |||
| 7be4dd9c75 | |||
| 1d156eddc1 | |||
| 726afaa58d | |||
| d1592cce43 | |||
| dc6c075508 | |||
| f126f72c3b | |||
| 2735c66b11 | |||
| a4b48377c7 | |||
| bc22e32821 | |||
| 5624f05ad6 | |||
| 0c68d8c142 | |||
| e2480dcf1d | |||
| cc63f278c6 | |||
| 54360bbccf | |||
| c71d7c84f7 | |||
| 9e9aad2eed | |||
| a2a1b83888 | |||
| f44ae792c6 | |||
| 4692bd0308 | |||
| 2e863c0ce2 | |||
| 1735e281e5 | |||
| 125e7346d4 | |||
| bd3cdf7ea0 | |||
| d90a49248f | |||
| 3833b7c7c5 | |||
| 89b063b92f | |||
| df26bef2aa | |||
| 5cddbffb45 | |||
| 2daa33ba91 | |||
| f83e8294bc | |||
| 1dfc46e6ce | |||
| d7df513bf7 | |||
| 8aac3ea989 | |||
| a514a70b5b | |||
| cf86b93725 | |||
| fef104b371 | |||
| afe756aada | |||
| 34fa0909ab | |||
| 7954077676 | |||
| 60673cd9e3 | |||
| 9d62cf6b99 | |||
| 6e2c4d8b35 | |||
| d8bff8ac9e | |||
| 0926456513 | |||
| bf424a49e1 | |||
| be4bc812da | |||
| ce18ea3ade | |||
| 931c96a587 | |||
| a662d1dca2 | |||
| e5a32f9c21 | |||
| 5e53f20fec | |||
| 44e919c134 | |||
| 52c4b2c424 | |||
| 53fb9b3416 | |||
| 0c7718d91d | |||
| 0fed5c356f | |||
| 2b6e4c36df | |||
| cdc9caf4ee | |||
| 5970a97c15 | |||
| bfc4af4c1e | |||
| 07f51ed6cd | |||
| 5490884eb4 | |||
| 62803684c4 | |||
| 11316a5a5c | |||
| 99333a0bbe | |||
| 3446cbd3c9 | |||
| c5fe1bc7b9 | |||
| a1569b4cd8 | |||
| 5f669acc74 | |||
| e0b69567e3 | |||
| 8c45250a6f | |||
| ef4ad38d23 | |||
| 85de8e95a5 | |||
| 4387d75ee7 | |||
| ddf1f320c5 | |||
| 9f33d1b236 | |||
| 60f035991d | |||
| 24607ec445 | |||
| d75250d5f9 | |||
| be5985cfcd | |||
| 6aa7e850e8 | |||
| 9833802aed | |||
| 47aacebd3a | |||
| 62a9dd2048 | |||
| 220d70013f | |||
| 1633ed140d | |||
| 07634b79b4 | |||
| c5e367e41c | |||
| 3f487c7328 | |||
| 639834d797 | |||
| 7a0a504876 | |||
| 3253b7b8d4 | |||
| a4b3fa8c28 | |||
| 841dce8d72 | |||
| e62b6aaccc | |||
| ad7b0ed010 | |||
| b3d113e4f3 | |||
| f506ce9c64 | |||
| 459d6f6739 | |||
| 469037e3d8 | |||
| 0a4a7c4efa | |||
| 69ba413d31 | |||
| 8164b2e654 | |||
| 514b8a7bb9 | |||
| cfa709fb40 | |||
| 0936baf254 | |||
| d328fbb186 | |||
| fcc36d7b44 | |||
| 3ebba7cb81 | |||
| 88be7fa40d | |||
| 033d76b4fb | |||
| 3f2b8eaf08 | |||
| 42348e6ca0 | |||
| e1f0e122ec | |||
| 21c0a8cad7 | |||
| afe5dc58b1 | |||
| 2beb910d2c | |||
| 31ce0ca0e0 | |||
| f7b92d1537 | |||
| fe2dd7f9ce | |||
| 1099a25b59 | |||
| 22e329c74e | |||
| 2e5b87d38c | |||
| d2886ec79b |
@@ -30,7 +30,7 @@ Public Class AboutBoxWndV
|
|||||||
" Inst" & IniFile.m_nInstance.ToString() &
|
" Inst" & IniFile.m_nInstance.ToString() &
|
||||||
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & Environment.NewLine
|
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & Environment.NewLine
|
||||||
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
|
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
|
||||||
sInfo &= "SupportPlane " & sAssStatus & Environment.NewLine
|
sInfo &= "SupportPlan " & sAssStatus & Environment.NewLine
|
||||||
sInfo &= "DataRoot " & IniFile.m_sDataRoot & Environment.NewLine
|
sInfo &= "DataRoot " & IniFile.m_sDataRoot & Environment.NewLine
|
||||||
If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then
|
If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then
|
||||||
sInfo &= "MachinesRoot " & IniFile.m_sMachinesRoot & Environment.NewLine
|
sInfo &= "MachinesRoot " & IniFile.m_sMachinesRoot & Environment.NewLine
|
||||||
@@ -70,6 +70,24 @@ Public Class AboutBoxWndV
|
|||||||
IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion)
|
IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion)
|
||||||
sInfo &= Environment.NewLine & "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
sInfo &= Environment.NewLine & "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
||||||
End If
|
End If
|
||||||
|
If IniFile.IsActiveWindow() Then
|
||||||
|
bExtensions = True
|
||||||
|
Dim sVersion As String = "---"
|
||||||
|
IniFile.GetSpecialLuaVersion( IniFile.m_sWindowDirPath, sVersion)
|
||||||
|
sInfo &= Environment.NewLine & "Window ver. " & sVersion & " " & IniFile.m_sWindowDirPath
|
||||||
|
End If
|
||||||
|
If IniFile.IsActiveTrimming() Then
|
||||||
|
bExtensions = True
|
||||||
|
Dim sVersion As String = "---"
|
||||||
|
IniFile.GetSpecialLuaVersion( IniFile.m_sTrimmingDirPath, sVersion)
|
||||||
|
sInfo &= Environment.NewLine & "Trimming ver. " & sVersion & " " & IniFile.m_sTrimmingDirPath
|
||||||
|
End If
|
||||||
|
If IniFile.IsActiveReversePost() Then
|
||||||
|
bExtensions = True
|
||||||
|
Dim sVersion As String = "---"
|
||||||
|
IniFile.GetSpecialLuaVersion( IniFile.m_sReversePostDirPath, sVersion)
|
||||||
|
sInfo &= Environment.NewLine & "ReversePost ver. " & sVersion & " " & IniFile.m_sReversePostDirPath
|
||||||
|
End If
|
||||||
If IniFile.IsActiveGunStock() Then
|
If IniFile.IsActiveGunStock() Then
|
||||||
bExtensions = True
|
bExtensions = True
|
||||||
Dim sVersion As String = "---"
|
Dim sVersion As String = "---"
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ Public Class TreeViewItemBase
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_isExpanded As Boolean
|
Friend m_isExpanded As Boolean
|
||||||
Public Property IsExpanded As Boolean
|
Public Property IsExpanded As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_isExpanded
|
Return m_isExpanded
|
||||||
End Get
|
End Get
|
||||||
@@ -92,6 +92,7 @@ Public Class InheritableTreeViewItem
|
|||||||
Implements INotifyPropertyChanged
|
Implements INotifyPropertyChanged
|
||||||
|
|
||||||
Friend m_Name As String
|
Friend m_Name As String
|
||||||
|
|
||||||
Public Property Name As String
|
Public Property Name As String
|
||||||
Get
|
Get
|
||||||
Return m_Name
|
Return m_Name
|
||||||
@@ -195,7 +196,6 @@ Public Class ParentItem
|
|||||||
Inherits TreeViewItemBase
|
Inherits TreeViewItemBase
|
||||||
|
|
||||||
Private m_sPictureString As String
|
Private m_sPictureString As String
|
||||||
Private m_Items As ObservableCollection(Of ChildItem)
|
|
||||||
|
|
||||||
Public Property PictureString As String
|
Public Property PictureString As String
|
||||||
Get
|
Get
|
||||||
@@ -209,6 +209,7 @@ Public Class ParentItem
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_Items As ObservableCollection(Of ChildItem)
|
||||||
Public Property Items As ObservableCollection(Of ChildItem)
|
Public Property Items As ObservableCollection(Of ChildItem)
|
||||||
Get
|
Get
|
||||||
Return m_Items
|
Return m_Items
|
||||||
@@ -255,4 +256,4 @@ Public Class ChildItem
|
|||||||
MyBase.New(Name, IsSelected, IsExpanded, IsActive)
|
MyBase.New(Name, IsSelected, IsExpanded, IsActive)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -13,7 +13,7 @@ Public Class BeamMachiningsWindowV
|
|||||||
m_BeamMachiningsWindowVM = BeamMachiningsWindowVM
|
m_BeamMachiningsWindowVM = BeamMachiningsWindowVM
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BeamMachiningsWindowVM.m_CloseWindow
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BeamMachiningsWindowVM.OnCloseWindow
|
||||||
Me.DialogResult = bDialogResult
|
Me.DialogResult = bDialogResult
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,9 @@ Module ConstGen
|
|||||||
' Chiave di Info in gruppo di lavoro per none part-program
|
' Chiave di Info in gruppo di lavoro per none part-program
|
||||||
Public Const KEY_MCHGRP_NCNAME As String = "NcName"
|
Public Const KEY_MCHGRP_NCNAME As String = "NcName"
|
||||||
|
|
||||||
|
' File Dimensioni Griglia CAM5
|
||||||
|
Public Const DIMENSION_FILE_NAME As String = "Dimension.ini"
|
||||||
|
|
||||||
' Costante per flag di BBox
|
' Costante per flag di BBox
|
||||||
Public Const BBFLAG As Integer = GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM
|
Public Const BBFLAG As Integer = GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM
|
||||||
|
|
||||||
|
|||||||
+27
-5
@@ -69,10 +69,11 @@ Module ConstIni
|
|||||||
Public Const K_SHOWGFRAME As String = "ShowGFrame"
|
Public Const K_SHOWGFRAME As String = "ShowGFrame"
|
||||||
Public Const K_LINEWIDTH As String = "LineWidth"
|
Public Const K_LINEWIDTH As String = "LineWidth"
|
||||||
Public Const K_MARK As String = "Mark"
|
Public Const K_MARK As String = "Mark"
|
||||||
|
Public Const K_MARK2 As String = "Mark2"
|
||||||
Public Const K_SELSURF As String = "SelSurf"
|
Public Const K_SELSURF As String = "SelSurf"
|
||||||
Public Const K_SHOWMODE As String = "ShowMode"
|
Public Const K_SHOWMODE As String = "ShowMode"
|
||||||
Public Const K_CURVEDIR As String = "CurveDir"
|
Public Const K_CURVEDIR As String = "CurveDir"
|
||||||
Public Const K_SHOWTRIAADV As String = "ShowTriaAdv"
|
Public Const K_SHOWSURFQUALITY As String = "ShowSurfQuality"
|
||||||
Public Const K_SHOWZMAP As String = "ShowZmap"
|
Public Const K_SHOWZMAP As String = "ShowZmap"
|
||||||
Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
|
Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
|
||||||
Public Const K_ZOOMWIN As String = "ZoomWin"
|
Public Const K_ZOOMWIN As String = "ZoomWin"
|
||||||
@@ -104,11 +105,15 @@ Module ConstIni
|
|||||||
Public Const S_IMPORT As String = "Import"
|
Public Const S_IMPORT As String = "Import"
|
||||||
Public Const K_DXFSCALE As String = "DxfScale"
|
Public Const K_DXFSCALE As String = "DxfScale"
|
||||||
Public Const K_STLSCALE As String = "StlScale"
|
Public Const K_STLSCALE As String = "StlScale"
|
||||||
|
Public Const K_OFFSCALE As String = "OffScale"
|
||||||
|
Public Const K_PLYSCALE As String = "PlyScale"
|
||||||
Public Const K_IMGSCALE As String = "ImgScale"
|
Public Const K_IMGSCALE As String = "ImgScale"
|
||||||
Public Const K_CNCFLAG As String = "CncFlag"
|
Public Const K_CNCFLAG As String = "CncFlag"
|
||||||
Public Const K_BTLFLAG As String = "BtlFlag"
|
Public Const K_BTLFLAG As String = "BtlFlag"
|
||||||
Public Const K_BTLAUXDIR As String = "BtlAuxDir"
|
Public Const K_BTLAUXDIR As String = "BtlAuxDir"
|
||||||
|
Public Const K_3MFFLAG As String = "3mfFlag"
|
||||||
Public Const K_ADVFLAG As String = "AdvFlag"
|
Public Const K_ADVFLAG As String = "AdvFlag"
|
||||||
|
Public Const K_ADVTOLER As String = "AdvToler"
|
||||||
|
|
||||||
Public Const S_EXPORT As String = "Export"
|
Public Const S_EXPORT As String = "Export"
|
||||||
Public Const K_DXFFLAG As String = "DxfFlag"
|
Public Const K_DXFFLAG As String = "DxfFlag"
|
||||||
@@ -139,10 +144,6 @@ Module ConstIni
|
|||||||
Public Const K_BEAMWALLBASEDIR As String = "BaseDir"
|
Public Const K_BEAMWALLBASEDIR As String = "BaseDir"
|
||||||
Public Const K_BEAMWALLBUTTON As String = "Button"
|
Public Const K_BEAMWALLBUTTON As String = "Button"
|
||||||
|
|
||||||
Public Const S_PRINTING3D As String = "3dPrinting"
|
|
||||||
Public Const K_ENABLE As String = "Enable"
|
|
||||||
Public Const K_3PRNBASEDIR As String = "BaseDir"
|
|
||||||
|
|
||||||
Public Const S_DOORS As String = "Doors"
|
Public Const S_DOORS As String = "Doors"
|
||||||
Public Const K_DDFENABLE As String = "DdfEnable"
|
Public Const K_DDFENABLE As String = "DdfEnable"
|
||||||
Public Const K_BASEDIR As String = "BaseDir"
|
Public Const K_BASEDIR As String = "BaseDir"
|
||||||
@@ -154,6 +155,22 @@ Module ConstIni
|
|||||||
Public Const K_TABLESDIR As String = "TablesDir"
|
Public Const K_TABLESDIR As String = "TablesDir"
|
||||||
Public Const K_CURRMTABLE As String = "CurrMTable"
|
Public Const K_CURRMTABLE As String = "CurrMTable"
|
||||||
Public Const K_MTABLEWINPLACE As String = "MTableWinPlace"
|
Public Const K_MTABLEWINPLACE As String = "MTableWinPlace"
|
||||||
|
Public Const K_OPTIMIZEMACHFORLINE As String = "OptimizeMachForLine"
|
||||||
|
|
||||||
|
Public Const S_WINDOW As String = "Window"
|
||||||
|
Public Const K_WINDOWENABLE As String = "JwdEnable"
|
||||||
|
Public Const K_WINDOWBASEDIR As String = "BaseDir"
|
||||||
|
Public Const K_WINDOWBUTTON As String = "Button"
|
||||||
|
|
||||||
|
Public Const S_TRIMMING As String = "Trimming"
|
||||||
|
Public Const K_TRIMMINGENABLE As String = "TrimEnable"
|
||||||
|
Public Const K_TRIMMINGBASEDIR As String = "BaseDir"
|
||||||
|
Public Const K_TRIMMINGBUTTON As String = "Button"
|
||||||
|
|
||||||
|
Public Const S_REVERSEPOST As String = "ReversePost"
|
||||||
|
Public Const K_REVERSEPOSTENABLE As String = "RevEnable"
|
||||||
|
Public Const K_REVERSEPOSTBASEDIR As String = "BaseDir"
|
||||||
|
Public Const K_REVERSEPOSTBUTTON As String = "Button"
|
||||||
|
|
||||||
Public Const S_GUNSTOCK As String = "GunStock"
|
Public Const S_GUNSTOCK As String = "GunStock"
|
||||||
Public Const K_GUNSTOCKENABLE As String = "GsEnable"
|
Public Const K_GUNSTOCKENABLE As String = "GsEnable"
|
||||||
@@ -181,6 +198,10 @@ Module ConstIni
|
|||||||
Public Const K_SELGEOMGENMACHINING As String = "SelGeomGenMachining"
|
Public Const K_SELGEOMGENMACHINING As String = "SelGeomGenMachining"
|
||||||
Public Const K_SELGEOMCHISELING As String = "SelGeomChiseling"
|
Public Const K_SELGEOMCHISELING As String = "SelGeomChiseling"
|
||||||
Public Const K_SELGEOMSURFFINISHING As String = "SelGeomSurfFinishing"
|
Public Const K_SELGEOMSURFFINISHING As String = "SelGeomSurfFinishing"
|
||||||
|
Public Const K_SELGEOMSURFROUGHING As String = "SelGeomSurfRoughing"
|
||||||
|
Public Const K_SELGEOMFIVEAXMILLING As String = "SelGeomFiveAxMilling"
|
||||||
|
Public Const K_SELGEOMPROBING As String = "SelGeomProbing"
|
||||||
|
Public Const K_VMILLQUALITY As String = "VMillQuality"
|
||||||
Public Const K_MACHININGGROUP As String = "MachiningGroup"
|
Public Const K_MACHININGGROUP As String = "MachiningGroup"
|
||||||
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
|
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
|
||||||
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
|
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
|
||||||
@@ -189,6 +210,7 @@ Module ConstIni
|
|||||||
Public Const S_SIMUL As String = "Simul"
|
Public Const S_SIMUL As String = "Simul"
|
||||||
Public Const K_SLIDERX As String = "SliderX"
|
Public Const K_SLIDERX As String = "SliderX"
|
||||||
Public Const K_SLIDERVAL As String = "SliderVal"
|
Public Const K_SLIDERVAL As String = "SliderVal"
|
||||||
|
Public Const K_TRACEENABLE As String = "TraceEnable"
|
||||||
|
|
||||||
Public Const S_OPTIONS As String = "Options"
|
Public Const S_OPTIONS As String = "Options"
|
||||||
Public Const K_NEWMACHININGISLASTONE As String = "NewMachiningIsLastOne"
|
Public Const K_NEWMACHININGISLASTONE As String = "NewMachiningIsLastOne"
|
||||||
|
|||||||
+20
-15
@@ -1,6 +1,13 @@
|
|||||||
Module ConstMachIni
|
Module ConstMachIni
|
||||||
|
|
||||||
|
Public Const S_MCH_GENERAL As String = "General"
|
||||||
|
Public Const K_MATERIAL As String = "Material"
|
||||||
|
|
||||||
|
Public Const S_PARTPROGRAM As String = "PartProgram"
|
||||||
|
Public Const K_EXTENSION As String = "Extension"
|
||||||
|
|
||||||
Public Const S_TOOLS As String = "Tools"
|
Public Const S_TOOLS As String = "Tools"
|
||||||
|
Public Const K_PROBE As String = "Probe"
|
||||||
Public Const K_DRILLBIT As String = "Drillbit"
|
Public Const K_DRILLBIT As String = "Drillbit"
|
||||||
Public Const K_SAWBLADE As String = "Sawblade"
|
Public Const K_SAWBLADE As String = "Sawblade"
|
||||||
Public Const K_MILL As String = "Mill"
|
Public Const K_MILL As String = "Mill"
|
||||||
@@ -8,22 +15,17 @@
|
|||||||
Public Const K_CHISEL As String = "Chisel"
|
Public Const K_CHISEL As String = "Chisel"
|
||||||
Public Const K_WATERJET As String = "WaterJet"
|
Public Const K_WATERJET As String = "WaterJet"
|
||||||
Public Const K_COMPO As String = "Compo"
|
Public Const K_COMPO As String = "Compo"
|
||||||
Public Const K_SHOWTOOLCHANGER As String = "ShowToolChanger"
|
|
||||||
Public Const K_SHOWHEADEXIT As String = "ShowHeadExit"
|
|
||||||
Public Const K_DRILLHOLDER As String = "DrillHolder"
|
|
||||||
Public Const K_SAWBLADEHOLDER As String = "SawBladeHolder"
|
|
||||||
Public Const K_MILLHOLDER As String = "MillHolder"
|
|
||||||
Public Const K_DRILLMAKER As String = "DrillMaker"
|
Public Const K_DRILLMAKER As String = "DrillMaker"
|
||||||
Public Const K_SAWBLADEMAKER As String = "SawbladeMaker"
|
Public Const K_SAWBLADEMAKER As String = "SawbladeMaker"
|
||||||
Public Const K_MILLMAKER As String = "MillMaker"
|
Public Const K_MILLMAKER As String = "MillMaker"
|
||||||
Public Const K_MORTISEMAKER As String = "MortiseMaker"
|
Public Const K_MORTISEMAKER As String = "MortiseMaker"
|
||||||
Public Const K_CHISELMAKER As String = "ChiselMaker"
|
Public Const K_CHISELMAKER As String = "ChiselMaker"
|
||||||
Public Const K_MOUNTEDTOOLCONFIG As String = "MountedToolConfig"
|
|
||||||
Public Const K_ACTIVE As String = "Active"
|
Public Const K_ACTIVE As String = "Active"
|
||||||
|
|
||||||
Public Const S_TOOLHOLDER As String = "ToolHolder"
|
Public Const S_TOOLHOLDER As String = "ToolHolder"
|
||||||
|
|
||||||
Public Const S_MACHININGS As String = "Machinings"
|
Public Const S_MACHININGS As String = "Machinings"
|
||||||
|
Public Const K_PROBING As String = "Probing"
|
||||||
Public Const K_SAWING As String = "Sawing"
|
Public Const K_SAWING As String = "Sawing"
|
||||||
Public Const K_DRILLING As String = "Drilling"
|
Public Const K_DRILLING As String = "Drilling"
|
||||||
Public Const K_MILLING As String = "Milling"
|
Public Const K_MILLING As String = "Milling"
|
||||||
@@ -35,20 +37,14 @@
|
|||||||
Public Const K_CHISELING As String = "Chiseling"
|
Public Const K_CHISELING As String = "Chiseling"
|
||||||
Public Const K_SURFROUGHING As String = "SurfRoughing"
|
Public Const K_SURFROUGHING As String = "SurfRoughing"
|
||||||
Public Const K_SURFFINISHING As String = "SurfFinishing"
|
Public Const K_SURFFINISHING As String = "SurfFinishing"
|
||||||
Public Const K_5AXMACHINING As String = "5axMachining"
|
Public Const K_5AXMILLING As String = "5AxMilling"
|
||||||
Public Const K_WATERJETTING As String = "WaterJetting"
|
Public Const K_WATERJETTING As String = "WaterJetting"
|
||||||
Public Const K_SAWINGONARCS As String = "SawingOnArcs"
|
|
||||||
|
|
||||||
Public Const S_GENMACHINING As String = "GenMachining"
|
Public Const S_GENMACHINING As String = "GenMachining"
|
||||||
Public Const K_GENSCRIPT As String = "GenScript"
|
Public Const K_GENSCRIPT As String = "GenScript"
|
||||||
|
|
||||||
Public Const S_TOOLCHANGER As String = "ToolChanger"
|
Public Const S_5AXMILLING As String = "5AxMilling"
|
||||||
Public Const K_NUMBER As String = "Number"
|
Public Const K_5AXSCRIPT As String = "5AxScript"
|
||||||
Public Const K_POS As String = "Pos"
|
|
||||||
Public Const K_NAME As String = "Name"
|
|
||||||
Public Const K_MANUALNUMBER As String = "ManualNumber"
|
|
||||||
Public Const K_MANUALPOS As String = "ManualPos"
|
|
||||||
Public Const K_MANUALNAME As String = "ManualName"
|
|
||||||
|
|
||||||
Public Const S_DISPOSITION As String = "Disposition"
|
Public Const S_DISPOSITION As String = "Disposition"
|
||||||
Public Const K_DISP_INITSCRIPT As String = "InitScript"
|
Public Const K_DISP_INITSCRIPT As String = "InitScript"
|
||||||
@@ -68,7 +64,16 @@
|
|||||||
Public Const S_VMILL As String = "VMill"
|
Public Const S_VMILL As String = "VMill"
|
||||||
Public Const K_VM_ENABLE As String = "Enable"
|
Public Const K_VM_ENABLE As String = "Enable"
|
||||||
|
|
||||||
|
Public Const S_TOOLTRACE As String = "ToolTrace"
|
||||||
|
Public Const K_TT_ENABLE As String = "Enable"
|
||||||
|
|
||||||
Public Const S_ESTIMATIONS As String = "Estimations"
|
Public Const S_ESTIMATIONS As String = "Estimations"
|
||||||
Public Const K_EST_ENABLE As String = "Enable"
|
Public Const K_EST_ENABLE As String = "Enable"
|
||||||
|
|
||||||
|
' Tipi di materiali previsti attualmente per le macchine
|
||||||
|
Public Const MCH_MAT_STONE As String = "Stone"
|
||||||
|
Public Const MCH_MAT_WOOD As String = "Wood"
|
||||||
|
Public Const MCH_MAT_BEAM As String = "Beam"
|
||||||
|
Public Const MCH_MAT_ADDITIVE As String = "Additive"
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
m_CurrSetUpVM = CurrSetUpVM
|
m_CurrSetUpVM = CurrSetUpVM
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.m_CloseWindow
|
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.OnCloseWindow
|
||||||
' Me.DialogResult = bDialogResult
|
' Me.DialogResult = bDialogResult
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
Public Interface IListItemConverter
|
||||||
|
Function Convert(ByVal masterListItem As Object) As Object
|
||||||
|
Function ConvertBack(ByVal targetListItem As Object) As Object
|
||||||
|
End Interface
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
Imports System.Windows.Controls.Primitives
|
||||||
|
Imports System.ComponentModel
|
||||||
|
|
||||||
|
|
||||||
|
Public Class MultiSelectorBehaviours
|
||||||
|
|
||||||
|
Public Shared ReadOnly SynchronizedSelectedItemsProperty As DependencyProperty = DependencyProperty.RegisterAttached("SynchronizedSelectedItems", GetType(IList), GetType(MultiSelectorBehaviours), New PropertyMetadata(Nothing, AddressOf OnSynchronizedSelectedItemsChanged))
|
||||||
|
Public Shared ReadOnly SynchronizationManagerProperty As DependencyProperty = DependencyProperty.RegisterAttached("SynchronizationManager", GetType(SynchronizationManager), GetType(MultiSelectorBehaviours), New PropertyMetadata(Nothing))
|
||||||
|
|
||||||
|
|
||||||
|
Public Shared Function GetSynchronizedSelectedItems(ByVal dependencyObject As DependencyObject) As IList
|
||||||
|
Return CType(dependencyObject.GetValue(SynchronizedSelectedItemsProperty), IList)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Sub SetSynchronizedSelectedItems(ByVal dependencyObject As DependencyObject, ByVal value As IList)
|
||||||
|
dependencyObject.SetValue(SynchronizedSelectedItemsProperty, value)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Shared Function GetSynchronizationManager(ByVal dependencyObject As DependencyObject) As SynchronizationManager
|
||||||
|
Return CType(dependencyObject.GetValue(SynchronizationManagerProperty), SynchronizationManager)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Shared Sub SetSynchronizationManager(ByVal dependencyObject As DependencyObject, ByVal value As SynchronizationManager)
|
||||||
|
dependencyObject.SetValue(SynchronizationManagerProperty, value)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Shared Sub OnSynchronizedSelectedItemsChanged(ByVal dependencyObject As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
|
||||||
|
If e.OldValue IsNot Nothing Then
|
||||||
|
Dim synchronizer As SynchronizationManager = GetSynchronizationManager(dependencyObject)
|
||||||
|
synchronizer.StopSynchronizing()
|
||||||
|
SetSynchronizationManager(dependencyObject, Nothing)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim list As IList = TryCast(e.NewValue, IList)
|
||||||
|
Dim selector As Selector = TryCast(dependencyObject, Selector)
|
||||||
|
|
||||||
|
If list IsNot Nothing AndAlso selector IsNot Nothing Then
|
||||||
|
Dim synchronizer As SynchronizationManager = GetSynchronizationManager(dependencyObject)
|
||||||
|
|
||||||
|
If synchronizer Is Nothing Then
|
||||||
|
synchronizer = New SynchronizationManager(selector)
|
||||||
|
SetSynchronizationManager(dependencyObject, synchronizer)
|
||||||
|
End If
|
||||||
|
|
||||||
|
synchronizer.StartSynchronizingList()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Class SynchronizationManager
|
||||||
|
Private ReadOnly _multiSelector As Selector
|
||||||
|
Private _synchronizer As TwoListSynchronizer
|
||||||
|
|
||||||
|
Friend Sub New(ByVal selector As Selector)
|
||||||
|
_multiSelector = selector
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub StartSynchronizingList()
|
||||||
|
Dim list As IList = GetSynchronizedSelectedItems(_multiSelector)
|
||||||
|
|
||||||
|
If list IsNot Nothing Then
|
||||||
|
_synchronizer = New TwoListSynchronizer(GetSelectedItemsCollection(_multiSelector), list)
|
||||||
|
_synchronizer.StartSynchronizing()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub StopSynchronizing()
|
||||||
|
_synchronizer.StopSynchronizing()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Function GetSelectedItemsCollection(ByVal selector As Selector) As IList
|
||||||
|
If TypeOf selector Is MultiSelector Then
|
||||||
|
Return (TryCast(selector, MultiSelector)).SelectedItems
|
||||||
|
ElseIf TypeOf selector Is ListBox Then
|
||||||
|
Return (TryCast(selector, ListBox)).SelectedItems
|
||||||
|
Else
|
||||||
|
Throw New InvalidOperationException("Target object has no SelectedItems property to bind.")
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,163 @@
|
|||||||
|
Imports System.Collections.Specialized
|
||||||
|
|
||||||
|
Public Class TwoListSynchronizer
|
||||||
|
Implements IWeakEventListener
|
||||||
|
|
||||||
|
Private Shared ReadOnly DefaultConverter As IListItemConverter = New DoNothingListItemConverter()
|
||||||
|
Private ReadOnly _masterList As IList
|
||||||
|
Private ReadOnly _masterTargetConverter As IListItemConverter
|
||||||
|
Private ReadOnly _targetList As IList
|
||||||
|
|
||||||
|
Public Sub New(ByVal masterList As IList, ByVal targetList As IList, ByVal masterTargetConverter As IListItemConverter)
|
||||||
|
_masterList = masterList
|
||||||
|
_targetList = targetList
|
||||||
|
_masterTargetConverter = masterTargetConverter
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub New(ByVal masterList As IList, ByVal targetList As IList)
|
||||||
|
Me.New(masterList, targetList, DefaultConverter)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Delegate Sub ChangeListAction(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
|
||||||
|
|
||||||
|
Public Sub StartSynchronizing()
|
||||||
|
ListenForChangeEvents(_masterList)
|
||||||
|
ListenForChangeEvents(_targetList)
|
||||||
|
SetListValuesFromSource(_masterList, _targetList, New Converter(Of Object, Object)(AddressOf ConvertFromMasterToTarget))
|
||||||
|
|
||||||
|
If Not TargetAndMasterCollectionsAreEqual() Then
|
||||||
|
SetListValuesFromSource(_targetList, _masterList, New Converter(Of Object, Object)(AddressOf ConvertFromTargetToMaster))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub StopSynchronizing()
|
||||||
|
StopListeningForChangeEvents(_masterList)
|
||||||
|
StopListeningForChangeEvents(_targetList)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function ReceiveWeakEvent(ByVal managerType As Type, ByVal sender As Object, ByVal e As EventArgs) As Boolean Implements IWeakEventListener.ReceiveWeakEvent
|
||||||
|
HandleCollectionChanged(TryCast(sender, IList), TryCast(e, NotifyCollectionChangedEventArgs))
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Protected Sub ListenForChangeEvents(ByVal list As IList)
|
||||||
|
If TypeOf list Is INotifyCollectionChanged Then
|
||||||
|
CollectionChangedEventManager.AddListener(TryCast(list, INotifyCollectionChanged), Me)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub StopListeningForChangeEvents(ByVal list As IList)
|
||||||
|
If TypeOf list Is INotifyCollectionChanged Then
|
||||||
|
CollectionChangedEventManager.RemoveListener(TryCast(list, INotifyCollectionChanged), Me)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub AddItems(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
|
||||||
|
Dim itemCount As Integer = e.NewItems.Count
|
||||||
|
|
||||||
|
For i As Integer = 0 To itemCount - 1
|
||||||
|
Dim insertionPoint As Integer = e.NewStartingIndex + i
|
||||||
|
|
||||||
|
If insertionPoint > list.Count Then
|
||||||
|
list.Add(converter(e.NewItems(i)))
|
||||||
|
Else
|
||||||
|
list.Insert(insertionPoint, converter(e.NewItems(i)))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function ConvertFromMasterToTarget(ByVal masterListItem As Object) As Object
|
||||||
|
Return If(_masterTargetConverter Is Nothing, masterListItem, _masterTargetConverter.Convert(masterListItem))
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function ConvertFromTargetToMaster(ByVal targetListItem As Object) As Object
|
||||||
|
Return If(_masterTargetConverter Is Nothing, targetListItem, _masterTargetConverter.ConvertBack(targetListItem))
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub HandleCollectionChanged(ByVal sender As Object, ByVal e As NotifyCollectionChangedEventArgs)
|
||||||
|
Dim sourceList As IList = TryCast(sender, IList)
|
||||||
|
|
||||||
|
Select Case e.Action
|
||||||
|
Case NotifyCollectionChangedAction.Add
|
||||||
|
PerformActionOnAllLists(AddressOf AddItems, sourceList, e)
|
||||||
|
Case NotifyCollectionChangedAction.Move
|
||||||
|
PerformActionOnAllLists(AddressOf MoveItems, sourceList, e)
|
||||||
|
Case NotifyCollectionChangedAction.Remove
|
||||||
|
PerformActionOnAllLists(AddressOf RemoveItems, sourceList, e)
|
||||||
|
Case NotifyCollectionChangedAction.Replace
|
||||||
|
PerformActionOnAllLists(AddressOf ReplaceItems, sourceList, e)
|
||||||
|
Case NotifyCollectionChangedAction.Reset
|
||||||
|
UpdateListsFromSource(TryCast(sender, IList))
|
||||||
|
Case Else
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MoveItems(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
|
||||||
|
RemoveItems(list, e, converter)
|
||||||
|
AddItems(list, e, converter)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub PerformActionOnAllLists(ByVal action As ChangeListAction, ByVal sourceList As IList, ByVal collectionChangedArgs As NotifyCollectionChangedEventArgs)
|
||||||
|
If sourceList Is _masterList Then
|
||||||
|
PerformActionOnList(_targetList, action, collectionChangedArgs, New Converter(Of Object, Object)(AddressOf ConvertFromMasterToTarget))
|
||||||
|
Else
|
||||||
|
PerformActionOnList(_masterList, action, collectionChangedArgs, New Converter(Of Object, Object)(AddressOf ConvertFromTargetToMaster))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub PerformActionOnList(ByVal list As IList, ByVal action As ChangeListAction, ByVal collectionChangedArgs As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
|
||||||
|
StopListeningForChangeEvents(list)
|
||||||
|
action(list, collectionChangedArgs, converter)
|
||||||
|
ListenForChangeEvents(list)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RemoveItems(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
|
||||||
|
If e.OldItems.Count = 1 AndAlso e.OldStartingIndex <= list.Count - 1 Then
|
||||||
|
list.RemoveAt(e.OldStartingIndex)
|
||||||
|
Else
|
||||||
|
For Each Item In e.OldItems
|
||||||
|
list.Remove(Item)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ReplaceItems(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
|
||||||
|
RemoveItems(list, e, converter)
|
||||||
|
AddItems(list, e, converter)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetListValuesFromSource(ByVal sourceList As IList, ByVal targetList As IList, ByVal converter As Converter(Of Object, Object))
|
||||||
|
StopListeningForChangeEvents(targetList)
|
||||||
|
targetList.Clear()
|
||||||
|
|
||||||
|
For Each o As Object In sourceList
|
||||||
|
targetList.Add(converter(o))
|
||||||
|
Next
|
||||||
|
|
||||||
|
ListenForChangeEvents(targetList)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function TargetAndMasterCollectionsAreEqual() As Boolean
|
||||||
|
Return _masterList.Cast(Of Object)().SequenceEqual(_targetList.Cast(Of Object)().[Select](Function(item) ConvertFromTargetToMaster(item)))
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub UpdateListsFromSource(ByVal sourceList As IList)
|
||||||
|
If sourceList Is _masterList Then
|
||||||
|
SetListValuesFromSource(_masterList, _targetList, New Converter(Of Object, Object)(AddressOf ConvertFromMasterToTarget))
|
||||||
|
Else
|
||||||
|
SetListValuesFromSource(_targetList, _masterList, New Converter(Of Object, Object)(AddressOf ConvertFromTargetToMaster))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Class DoNothingListItemConverter
|
||||||
|
Implements IListItemConverter
|
||||||
|
|
||||||
|
Public Function Convert(ByVal masterListItem As Object) As Object Implements IListItemConverter.Convert
|
||||||
|
Return masterListItem
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ConvertBack(ByVal targetListItem As Object) As Object Implements IListItemConverter.ConvertBack
|
||||||
|
Return targetListItem
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
End Class
|
||||||
@@ -34,6 +34,11 @@
|
|||||||
Command="{Binding ArcCSECommand}" IsEnabled="{Binding bLayerOk}">
|
Command="{Binding ArcCSECommand}" IsEnabled="{Binding bLayerOk}">
|
||||||
<Image Source="/Resources/DrawPanel/ArcCSE.png" Stretch="Uniform"/>
|
<Image Source="/Resources/DrawPanel/ArcCSE.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button ToolTip="{Binding Arc2PRToolTip}" Style="{StaticResource DrawPanelButton}"
|
||||||
|
ToolTipService.ShowOnDisabled="True"
|
||||||
|
Command="{Binding Arc2PRCommand}" IsEnabled="{Binding bLayerOk}">
|
||||||
|
<Image Source="/Resources/DrawPanel/Arc2PR.png" Stretch="Uniform"/>
|
||||||
|
</Button>
|
||||||
<Button ToolTip="{Binding Arc3PToolTip}" Style="{StaticResource DrawPanelButton}"
|
<Button ToolTip="{Binding Arc3PToolTip}" Style="{StaticResource DrawPanelButton}"
|
||||||
ToolTipService.ShowOnDisabled="True"
|
ToolTipService.ShowOnDisabled="True"
|
||||||
Command="{Binding Arc3PCommand}" IsEnabled="{Binding bLayerOk}">
|
Command="{Binding Arc3PCommand}" IsEnabled="{Binding bLayerOk}">
|
||||||
@@ -44,21 +49,28 @@
|
|||||||
Command="{Binding ArcPDPCommand}" IsEnabled="{Binding bLayerOk}">
|
Command="{Binding ArcPDPCommand}" IsEnabled="{Binding bLayerOk}">
|
||||||
<Image Source="/Resources/DrawPanel/ArcPDP.png" Stretch="Uniform"/>
|
<Image Source="/Resources/DrawPanel/ArcPDP.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button ToolTip="{Binding CirclePDToolTip}" Style="{StaticResource DrawPanelButton}"
|
<Button ToolTip="{Binding BiArcToolTip}" Style="{StaticResource DrawPanelButton}"
|
||||||
|
ToolTipService.ShowOnDisabled="True"
|
||||||
|
Command="{Binding BiArcCommand}" IsEnabled="{Binding bLayerOk}">
|
||||||
|
<Image Source="/Resources/DrawPanel/BiArc.png" Stretch="Uniform"/>
|
||||||
|
</Button>
|
||||||
|
<Button Style="{StaticResource DrawPanelButton}"
|
||||||
|
Visibility="Hidden"/>
|
||||||
|
<Button ToolTip="{Binding CircleCPToolTip}" Style="{StaticResource DrawPanelButton}"
|
||||||
ToolTipService.ShowOnDisabled="True"
|
ToolTipService.ShowOnDisabled="True"
|
||||||
Command="{Binding CircleCPCommand}" IsEnabled="{Binding bLayerOk}">
|
Command="{Binding CircleCPCommand}" IsEnabled="{Binding bLayerOk}">
|
||||||
<Image Source="/Resources/DrawPanel/CircleCP.png" Stretch="Uniform"/>
|
<Image Source="/Resources/DrawPanel/CircleCP.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button ToolTip="{Binding Circle3PToolTip}" Style="{StaticResource DrawPanelButton}"
|
|
||||||
ToolTipService.ShowOnDisabled="True"
|
|
||||||
Command="{Binding Circle3PCommand}" IsEnabled="{Binding bLayerOk}">
|
|
||||||
<Image Source="/Resources/DrawPanel/Circle3P.png" Stretch="Uniform"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="{Binding CircleCDToolTip}" Style="{StaticResource DrawPanelButton}"
|
<Button ToolTip="{Binding CircleCDToolTip}" Style="{StaticResource DrawPanelButton}"
|
||||||
ToolTipService.ShowOnDisabled="True"
|
ToolTipService.ShowOnDisabled="True"
|
||||||
Command="{Binding CircleCDCommand}" IsEnabled="{Binding bLayerOk}">
|
Command="{Binding CircleCDCommand}" IsEnabled="{Binding bLayerOk}">
|
||||||
<Image Source="/Resources/DrawPanel/CircleCD.png" Stretch="Uniform"/>
|
<Image Source="/Resources/DrawPanel/CircleCD.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button ToolTip="{Binding Circle3PToolTip}" Style="{StaticResource DrawPanelButton}"
|
||||||
|
ToolTipService.ShowOnDisabled="True"
|
||||||
|
Command="{Binding Circle3PCommand}" IsEnabled="{Binding bLayerOk}">
|
||||||
|
<Image Source="/Resources/DrawPanel/Circle3P.png" Stretch="Uniform"/>
|
||||||
|
</Button>
|
||||||
<Button ToolTip="{Binding Rectangle2PToolTip}" Style="{StaticResource DrawPanelButton}"
|
<Button ToolTip="{Binding Rectangle2PToolTip}" Style="{StaticResource DrawPanelButton}"
|
||||||
ToolTipService.ShowOnDisabled="True"
|
ToolTipService.ShowOnDisabled="True"
|
||||||
Command="{Binding Rectangle2PCommand}" IsEnabled="{Binding bLayerOk}">
|
Command="{Binding Rectangle2PCommand}" IsEnabled="{Binding bLayerOk}">
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ Public Class DrawPanelVM
|
|||||||
Return EgtMsg(MSG_DRAWPANEL + 3)
|
Return EgtMsg(MSG_DRAWPANEL + 3)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property CirclePDToolTip As String
|
Public ReadOnly Property CircleCPToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(MSG_DRAWPANEL + 4)
|
Return EgtMsg(MSG_DRAWPANEL + 4)
|
||||||
End Get
|
End Get
|
||||||
@@ -72,14 +72,25 @@ Public Class DrawPanelVM
|
|||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property Arc3PToolTip As String
|
Public ReadOnly Property Arc3PToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(MSG_DRAWPANEL + 7)
|
Return EgtMsg(5207)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property Arc2PRToolTip As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(5169)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property ArcPDPToolTip As String
|
Public ReadOnly Property ArcPDPToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(MSG_DRAWPANEL + 8)
|
Return EgtMsg(MSG_DRAWPANEL + 8)
|
||||||
End Get
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property BiArcToolTip As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(5170)
|
||||||
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property Rectangle2PToolTip As String
|
Public ReadOnly Property Rectangle2PToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(MSG_DRAWPANEL + 11)
|
Return EgtMsg(MSG_DRAWPANEL + 11)
|
||||||
@@ -470,7 +481,9 @@ Public Class DrawPanelVM
|
|||||||
Private m_cmdCircle3P As ICommand
|
Private m_cmdCircle3P As ICommand
|
||||||
Private m_cmdArcCSE As ICommand
|
Private m_cmdArcCSE As ICommand
|
||||||
Private m_cmdArc3P As ICommand
|
Private m_cmdArc3P As ICommand
|
||||||
|
Private m_cmdArc2PR As ICommand
|
||||||
Private m_cmdArcPDP As ICommand
|
Private m_cmdArcPDP As ICommand
|
||||||
|
Private m_cmdBiArc As ICommand
|
||||||
Private m_cmdRectangle2P As ICommand
|
Private m_cmdRectangle2P As ICommand
|
||||||
Private m_cmdPolygon As ICommand
|
Private m_cmdPolygon As ICommand
|
||||||
Private m_cmdPolygonSide As ICommand
|
Private m_cmdPolygonSide As ICommand
|
||||||
@@ -748,6 +761,29 @@ Public Class DrawPanelVM
|
|||||||
|
|
||||||
#End Region ' Arc3PCommand
|
#End Region ' Arc3PCommand
|
||||||
|
|
||||||
|
#Region "Arc2PRCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Arc2PR.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property Arc2PRCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdArc2PR Is Nothing Then
|
||||||
|
m_cmdArc2PR = New RelayCommand(AddressOf Arc2PR)
|
||||||
|
End If
|
||||||
|
Return m_cmdArc2PR
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Arc2PR. This method is invoked by the Arc2PRCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub Arc2PR(ByVal param As Object)
|
||||||
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC2PR)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Arc2PRCommand
|
||||||
|
|
||||||
#Region "ArcPDPCommand"
|
#Region "ArcPDPCommand"
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@@ -770,6 +806,7 @@ Public Class DrawPanelVM
|
|||||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPVP)
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPVP)
|
||||||
ElseIf (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
|
ElseIf (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
|
||||||
Map.refProjectVM.GetController.SetContinue()
|
Map.refProjectVM.GetController.SetContinue()
|
||||||
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPDP)
|
||||||
Else
|
Else
|
||||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPDP)
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPDP)
|
||||||
End If
|
End If
|
||||||
@@ -777,6 +814,33 @@ Public Class DrawPanelVM
|
|||||||
|
|
||||||
#End Region ' ArcPDPCommand
|
#End Region ' ArcPDPCommand
|
||||||
|
|
||||||
|
#Region "BiArcCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do BiArc.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property BiArcCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdBiArc Is Nothing Then
|
||||||
|
m_cmdBiArc = New RelayCommand(AddressOf BiArc)
|
||||||
|
End If
|
||||||
|
Return m_cmdBiArc
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the BiArc. This method is invoked by the BiArcCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub BiArc(ByVal param As Object)
|
||||||
|
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
|
||||||
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.BIARC)
|
||||||
|
Else
|
||||||
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CURVEBEZIER)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' BiArcCommand
|
||||||
|
|
||||||
#Region "Rectangle2PCommand"
|
#Region "Rectangle2PCommand"
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@@ -1466,6 +1530,8 @@ Public Class DrawPanelVM
|
|||||||
Public Sub SolidIntersectSurf(ByVal param As Object)
|
Public Sub SolidIntersectSurf(ByVal param As Object)
|
||||||
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CUTSURFSURF)
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CUTSURFSURF)
|
||||||
|
ElseIf (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
|
||||||
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.TRIMSURFTMWITHCURVE)
|
||||||
Else
|
Else
|
||||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SOLIDINTERSECTSURF)
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SOLIDINTERSECTSURF)
|
||||||
End If
|
End If
|
||||||
@@ -2155,6 +2221,7 @@ Public Class DrawPanelVM
|
|||||||
If Not IniFile.m_ProjectSceneContext = 0 Then
|
If Not IniFile.m_ProjectSceneContext = 0 Then
|
||||||
bSelOk = EgtGetFirstSelectedObj() <> GDB_ID.NULL
|
bSelOk = EgtGetFirstSelectedObj() <> GDB_ID.NULL
|
||||||
bLayerOkAndSelOk = m_bLayerOk And m_bSelOk
|
bLayerOkAndSelOk = m_bLayerOk And m_bSelOk
|
||||||
|
Map.refStatusBarVM.UpdateSelectedCount()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Application.m_UpdateLayerTree Then
|
If Application.m_UpdateLayerTree Then
|
||||||
|
|||||||
+76
-1
@@ -161,6 +161,13 @@
|
|||||||
<DependentUpon>CurrSetUpV.xaml</DependentUpon>
|
<DependentUpon>CurrSetUpV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="CurrSetUp\CurrSetUpVM.vb" />
|
<Compile Include="CurrSetUp\CurrSetUpVM.vb" />
|
||||||
|
<Compile Include="DataGridMultiselectManaging\IListItemConverter.vb" />
|
||||||
|
<Compile Include="DataGridMultiselectManaging\MultiSelectorBehaviours.vb" />
|
||||||
|
<Compile Include="DataGridMultiselectManaging\TwoListSynchronizer.vb" />
|
||||||
|
<Compile Include="ExecuteWindow\ExecuteWindowV.xaml.vb">
|
||||||
|
<DependentUpon>ExecuteWindowV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ExecuteWindow\ExecuteWindowVM.vb" />
|
||||||
<Compile Include="LeftTray\LeftTrayV.xaml.vb">
|
<Compile Include="LeftTray\LeftTrayV.xaml.vb">
|
||||||
<DependentUpon>LeftTrayV.xaml</DependentUpon>
|
<DependentUpon>LeftTrayV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -170,6 +177,12 @@
|
|||||||
<DependentUpon>EstimationsExpanderV.xaml</DependentUpon>
|
<DependentUpon>EstimationsExpanderV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="OptionPanel\MachiningOptionPanel\EstimationsExpander\EstimationsExpander.vb" />
|
<Compile Include="OptionPanel\MachiningOptionPanel\EstimationsExpander\EstimationsExpander.vb" />
|
||||||
|
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\ProbingParameterExpanderV.xaml.vb">
|
||||||
|
<DependentUpon>ProbingParameterExpanderV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\FiveAxisMachinigParameterExpanderV.xaml.vb">
|
||||||
|
<DependentUpon>FiveAxisMachinigParameterExpanderV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfFinishingParameterExpanderV.xaml.vb">
|
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfFinishingParameterExpanderV.xaml.vb">
|
||||||
<DependentUpon>SurfFinishingParameterExpanderV.xaml</DependentUpon>
|
<DependentUpon>SurfFinishingParameterExpanderV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -188,6 +201,9 @@
|
|||||||
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\StoneDrillingParameterExpanderV.xaml.vb">
|
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\StoneDrillingParameterExpanderV.xaml.vb">
|
||||||
<DependentUpon>StoneDrillingParameterExpanderV.xaml</DependentUpon>
|
<DependentUpon>StoneDrillingParameterExpanderV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfRoughingParameterExpanderV.xaml.vb">
|
||||||
|
<DependentUpon>SurfRoughingParameterExpanderV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\WoodDrillingParameterExpanderV.xaml.vb">
|
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\WoodDrillingParameterExpanderV.xaml.vb">
|
||||||
<DependentUpon>WoodDrillingParameterExpanderV.xaml</DependentUpon>
|
<DependentUpon>WoodDrillingParameterExpanderV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -277,8 +293,20 @@
|
|||||||
<Compile Include="Special-BeamWall\WallPanelV.xaml.vb">
|
<Compile Include="Special-BeamWall\WallPanelV.xaml.vb">
|
||||||
<DependentUpon>WallPanelV.xaml</DependentUpon>
|
<DependentUpon>WallPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Special-BeamWall\WallPanelVM.vb" />
|
|
||||||
<Compile Include="Special-BeamWall\Wall.vb" />
|
<Compile Include="Special-BeamWall\Wall.vb" />
|
||||||
|
<Compile Include="Special-BeamWall\WallPanelVM.vb" />
|
||||||
|
<Compile Include="Special-ReversePost\ReversePostPanelV.xaml.vb">
|
||||||
|
<DependentUpon>ReversePostPanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Special-ReversePost\ReversePostPanelVM.vb" />
|
||||||
|
<Compile Include="Special-Trimming\TrimmingPanelV.xaml.vb">
|
||||||
|
<DependentUpon>TrimmingPanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Special-Trimming\TrimmingPanelVM.vb" />
|
||||||
|
<Compile Include="Special-Window\WindowPanelV.xaml.vb">
|
||||||
|
<DependentUpon>WindowPanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Special-Window\WindowPanelVM.vb" />
|
||||||
<Compile Include="SpecialPanel\SpecialPanelV.xaml.vb">
|
<Compile Include="SpecialPanel\SpecialPanelV.xaml.vb">
|
||||||
<DependentUpon>SpecialPanelV.xaml</DependentUpon>
|
<DependentUpon>SpecialPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -294,6 +322,7 @@
|
|||||||
<Compile Include="Utility\Analyze.vb" />
|
<Compile Include="Utility\Analyze.vb" />
|
||||||
<Compile Include="Utility\BasePanelVM.vb" />
|
<Compile Include="Utility\BasePanelVM.vb" />
|
||||||
<Compile Include="Utility\BindingProxy.vb" />
|
<Compile Include="Utility\BindingProxy.vb" />
|
||||||
|
<Compile Include="Utility\DynamicGridModule.vb" />
|
||||||
<Compile Include="Utility\Map.vb" />
|
<Compile Include="Utility\Map.vb" />
|
||||||
<Compile Include="Internals\MruList.vb" />
|
<Compile Include="Internals\MruList.vb" />
|
||||||
<Compile Include="Utility\MachineModel.vb" />
|
<Compile Include="Utility\MachineModel.vb" />
|
||||||
@@ -454,6 +483,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="ExecuteWindow\ExecuteWindowV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="LeftTray\LeftTrayV.xaml">
|
<Page Include="LeftTray\LeftTrayV.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -466,6 +499,14 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\ProbingParameterExpanderV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\FiveAxisMachinigParameterExpanderV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfFinishingParameterExpanderV.xaml">
|
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfFinishingParameterExpanderV.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -490,6 +531,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfRoughingParameterExpanderV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\WoodDrillingParameterExpanderV.xaml">
|
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\WoodDrillingParameterExpanderV.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -610,6 +655,18 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Special-ReversePost\ReversePostPanelV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Special-Trimming\TrimmingPanelV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Special-Window\WindowPanelV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Include="SpecialPanel\SpecialPanelV.xaml">
|
<Page Include="SpecialPanel\SpecialPanelV.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -1021,6 +1078,24 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\DrawPanel\StmMoveVertex.png" />
|
<Resource Include="Resources\DrawPanel\StmMoveVertex.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\DrawPanel\Arc2PR.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\DrawPanel\BiArc.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ExecuteWindow\reload.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ToolPreview\Head.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ToolPreview\Tool.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ToolPreview\Delete.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
|
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Button Command="{Binding ExecCommand}" ToolTip="{Binding ExecToolTip}"
|
<Button Command="{Binding ExecCommand}" ToolTip="{Binding ExecToolTip}"
|
||||||
Style="{StaticResource GridViewPanelButton}" ContextMenuService.Placement="Bottom">
|
Style="{StaticResource GridViewPanelButton}" ContextMenuService.Placement="Bottom">
|
||||||
<Button.ContextMenu>
|
<Button.ContextMenu>
|
||||||
<ContextMenu ItemsSource="{Binding MruScriptNames}" ItemContainerStyle="{StaticResource MruScriptItem}">
|
<ContextMenu ItemsSource="{Binding MruScriptNames}" ItemContainerStyle="{StaticResource MruScriptItem}">
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
|
|||||||
@@ -65,8 +65,13 @@ Public Class ExecutePanelVM
|
|||||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub Exec(ByVal param As Object)
|
Public Sub Exec(ByVal param As Object)
|
||||||
Map.refProjectVM.PreExecScript(True)
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||||
Map.refProjectVM.ExecScript(String.Empty)
|
Dim ExecuteWindow As New ExecuteWindowV(Application.Current.MainWindow, New ExecuteWindowVM)
|
||||||
|
ExecuteWindow.ShowDialog()
|
||||||
|
Else
|
||||||
|
Map.refProjectVM.PreExecScript(True)
|
||||||
|
Map.refProjectVM.ExecScript(String.Empty)
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' ExecCommand
|
#End Region ' ExecCommand
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<EgtWPFLib5:EgtCustomWindow x:Class="ExecuteWindowV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
|
Title="Execute Window"
|
||||||
|
Height="500" Width="400"
|
||||||
|
IsResizable="True"
|
||||||
|
IsMinimizable="False"
|
||||||
|
WindowStartupLocation="CenterOwner"
|
||||||
|
ShowInTaskbar="False"
|
||||||
|
TitleBarHeight="32"
|
||||||
|
PreviewKeyDown="EgtCustomWindow_PreviewKeyDown"
|
||||||
|
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBox Text="{Binding sScriptText}"
|
||||||
|
Style="{StaticResource ExecuteWindow_TextBox}"/>
|
||||||
|
<Button Grid.Row="1"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Content="{Binding OkMsg}"
|
||||||
|
Command="{Binding Ok_Command}"
|
||||||
|
Style="{StaticResource EgtCAM5_InputButton}"/>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Command="{Binding Reload_Command}"
|
||||||
|
IsEnabled="{Binding bReload_IsEnable}"
|
||||||
|
Style="{StaticResource ExecuteWindow_Button}">
|
||||||
|
<Image Source="/Resources/ExecuteWindow/reload.png" Stretch="Uniform"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</EgtWPFLib5:EgtCustomWindow>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
Public Class ExecuteWindowV
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private WithEvents m_ExecuteWindowVM As ExecuteWindowVM
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New(Owner As Window, ExecuteWindowVM As ExecuteWindowVM)
|
||||||
|
MyBase.New(Owner)
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = ExecuteWindowVM
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
m_ExecuteWindowVM = ExecuteWindowVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ExecuteWindowVM.OnCloseWindow
|
||||||
|
Me.DialogResult = bDialogResult
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub EgtCustomWindow_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||||
|
If e.Key = Key.Escape Then
|
||||||
|
Me.Close()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
Imports System.Text
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
|
Public Class ExecuteWindowVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
' Evento per chiusura finestra
|
||||||
|
Friend Event OnCloseWindow(bDialogResult As Boolean)
|
||||||
|
|
||||||
|
Private ReadOnly sScriptFilePath As String = Path.Combine(IniFile.m_sTempDir, "ImmExec" & IniFile.m_nInstance.ToString() & ".lua")
|
||||||
|
|
||||||
|
Private m_sScriptText As String
|
||||||
|
Public Property sScriptText As String
|
||||||
|
Get
|
||||||
|
Return m_sScriptText
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sScriptText = value
|
||||||
|
NotifyPropertyChanged(NameOf(sScriptText))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Sub SetScriptFile(value As String)
|
||||||
|
m_sScriptText = value
|
||||||
|
NotifyPropertyChanged(NameOf(sScriptText))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_bReload_IsEnable As Boolean = File.Exists(sScriptFilePath)
|
||||||
|
Public ReadOnly Property bReload_IsEnable As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bReload_IsEnable
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "Messages"
|
||||||
|
|
||||||
|
Public ReadOnly Property OkMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(20041)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property SaveMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6453)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Messages
|
||||||
|
|
||||||
|
' Definizione Comandi
|
||||||
|
Private m_cmdOk As ICommand
|
||||||
|
Private m_cmdReload As ICommand
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Private Sub SaveScript(sPathFileScript As String, sScriptText As String)
|
||||||
|
If String.IsNullOrWhiteSpace(sPathFileScript) OrElse String.IsNullOrWhiteSpace(sScriptText) Then Return
|
||||||
|
File.WriteAllText(sPathFileScript, sScriptText, Encoding.UTF8)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function ReadScript(sPathFileScript As String) As String
|
||||||
|
If String.IsNullOrWhiteSpace(sPathFileScript) Then Return String.Empty
|
||||||
|
Return File.ReadAllText(sPathFileScript)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "Ok_Command"
|
||||||
|
|
||||||
|
Public ReadOnly Property Ok_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdOk Is Nothing Then
|
||||||
|
m_cmdOk = New Command(AddressOf Ok)
|
||||||
|
End If
|
||||||
|
Return m_cmdOk
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Ok()
|
||||||
|
' Verifico ci sia del testo
|
||||||
|
If String.IsNullOrWhiteSpace(m_sScriptText) Then Return
|
||||||
|
' Salva il file script
|
||||||
|
SaveScript(sScriptFilePath, m_sScriptText)
|
||||||
|
' Esegue il file script
|
||||||
|
Map.refProjectVM.PreExecScript(False)
|
||||||
|
Map.refProjectVM.ExecScript(sScriptFilePath)
|
||||||
|
' Se non passato a lavorazione, aggiornamento visualizzazione
|
||||||
|
If IniFile.m_ProjectMode <> ProjectModeOpt.MACHINING Then EgtDraw()
|
||||||
|
' Chiudo finestra
|
||||||
|
RaiseEvent OnCloseWindow(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Ok_Command
|
||||||
|
|
||||||
|
#Region "Reload_Command"
|
||||||
|
|
||||||
|
Public ReadOnly Property Reload_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdReload Is Nothing Then
|
||||||
|
m_cmdReload = New Command(AddressOf Reload)
|
||||||
|
End If
|
||||||
|
Return m_cmdReload
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Reload()
|
||||||
|
If File.Exists(sScriptFilePath) Then
|
||||||
|
SetScriptFile(ReadScript(sScriptFilePath))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Reload_Command
|
||||||
|
|
||||||
|
#End Region ' Commands
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports EgtCAM5.MyMachinePanelVM
|
Imports EgtCAM5.MyMachinePanelVM
|
||||||
Imports System.Security.Cryptography
|
Imports System.Security.Cryptography
|
||||||
Imports System.Windows.Forms.AxHost
|
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
@@ -98,20 +97,23 @@ Public Class MyMachGroupPanelVM
|
|||||||
' Vuoi creare un nuovo Gruppo di Lavoro con i pezzi selezionati ? - LAVORA
|
' Vuoi creare un nuovo Gruppo di Lavoro con i pezzi selezionati ? - LAVORA
|
||||||
If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||||
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
|
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
|
||||||
Else
|
Else
|
||||||
Return -2
|
Return -2
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Se non ci sono pezzi selezionati
|
' Se non ci sono pezzi selezionati
|
||||||
Else
|
Else
|
||||||
' se ci sono gruppi di lavorazione
|
' se ci sono gruppi di lavorazione
|
||||||
If bMachGroup Then
|
If bMachGroup Then
|
||||||
nGroupId = EgtGetLastMachGroup()
|
nGroupId = EgtGetCurrMachGroup()
|
||||||
|
If nGroupId = GDB_ID.NULL Then
|
||||||
|
nGroupId = EgtGetFirstMachGroup()
|
||||||
|
End If
|
||||||
Return If(EgtSetCurrMachGroup(nGroupId), 0, 1)
|
Return If(EgtSetCurrMachGroup(nGroupId), 0, 1)
|
||||||
' se altrimenti ammessi gruppi di lavoro vuoti
|
' se altrimenti ammessi gruppi di lavoro vuoti
|
||||||
ElseIf bAllowEmpty Then
|
ElseIf bAllowEmpty Then
|
||||||
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
|
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
|
||||||
' altrimenti esco
|
' altrimenti esco
|
||||||
Else
|
Else
|
||||||
Return -1
|
Return -1
|
||||||
End If
|
End If
|
||||||
@@ -309,19 +311,19 @@ Public Class MyMachGroupPanelVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LoadMaterialType()
|
Private Sub LoadMaterialType()
|
||||||
Dim sMatType As String = "Wood"
|
Dim sMatType As String = MCH_MAT_WOOD
|
||||||
' IniFile.m_sMachineName = Map.refStatusBarVM.SelectedMachine.Name
|
' IniFile.m_sMachineName = Map.refStatusBarVM.SelectedMachine.Name
|
||||||
' IniFile.m_sCurrMachIniFilePath = Map.refStatusBarVM.SelectedMachine.MachineDirPath & "\" & Map.refStatusBarVM.SelectedMachine.Name & ".ini"
|
' IniFile.m_sCurrMachIniFilePath = Map.refStatusBarVM.SelectedMachine.MachineDirPath & "\" & Map.refStatusBarVM.SelectedMachine.Name & ".ini"
|
||||||
Dim sMachineIniPath = IniFile.m_sCurrMachIniFilePath
|
Dim sMachineIniPath = IniFile.m_sCurrMachIniFilePath
|
||||||
EgtUILib.GetPrivateProfileString(S_GENERAL, EgtWPFLib5.EstConstMachIni.K_MATERIAL, sMatType, sMatType, sMachineIniPath)
|
EgtUILib.GetPrivateProfileString(S_MCH_GENERAL, K_MATERIAL, sMatType, sMatType, sMachineIniPath)
|
||||||
Select Case sMatType
|
Select Case sMatType
|
||||||
Case "Stone"
|
Case MCH_MAT_STONE
|
||||||
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.STONE
|
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.STONE5
|
||||||
Case "Wood"
|
Case MCH_MAT_WOOD
|
||||||
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
|
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
|
||||||
Case "Beam"
|
Case MCH_MAT_BEAM
|
||||||
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.BEAM
|
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.BEAM
|
||||||
Case "Additive"
|
Case MCH_MAT_ADDITIVE
|
||||||
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
|
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
|
||||||
Case Else
|
Case Else
|
||||||
' Se il materiale specificato nel file INI della macchina non corrisponde ai 4 sopracitati viene emesso un messaggio di errore
|
' Se il materiale specificato nel file INI della macchina non corrisponde ai 4 sopracitati viene emesso un messaggio di errore
|
||||||
@@ -422,6 +424,8 @@ Public Class MyMachGroupPanelVM
|
|||||||
(EgtUILib.GetPrivateProfileInt(S_ESTIMATIONS, K_EST_ENABLE, 0, IniFile.m_sCurrMachIniFilePath) <> 0)
|
(EgtUILib.GetPrivateProfileInt(S_ESTIMATIONS, K_EST_ENABLE, 0, IniFile.m_sCurrMachIniFilePath) <> 0)
|
||||||
' Setto il Materiale in base alla Macchina associata al MachGroup corrente
|
' Setto il Materiale in base alla Macchina associata al MachGroup corrente
|
||||||
LoadMaterialType()
|
LoadMaterialType()
|
||||||
|
' Zoom all
|
||||||
|
EgtZoom( ZM.ALL)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
|
|||||||
@@ -16,10 +16,8 @@
|
|||||||
|
|
||||||
<Grid Margin="10">
|
<Grid Margin="10">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="40*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="20*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
@@ -28,6 +26,8 @@
|
|||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<UniformGrid Grid.Row="0" Columns="2" Margin="0,0,0,5">
|
<UniformGrid Grid.Row="0" Columns="2" Margin="0,0,0,5">
|
||||||
@@ -57,12 +57,24 @@
|
|||||||
</ComboBox>
|
</ComboBox>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
<UniformGrid Grid.Row="4" Columns="2" Margin="0,0,0,5">
|
<UniformGrid Grid.Row="4" Columns="2" Margin="0,0,0,5"
|
||||||
|
Visibility="{Binding StoneVisibility}">
|
||||||
|
<TextBlock Text="{Binding ExtSawArcMinRadMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding ExtSawArcMinRad}" Height="25" Margin="10,0,0,0"/>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
<UniformGrid Grid.Row="5" Columns="2" Margin="0,0,0,5"
|
||||||
|
Visibility="{Binding StoneVisibility}">
|
||||||
|
<TextBlock Text="{Binding IntSawArcMaxSideAngMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding IntSawArcMaxSideAng}" Height="25" Margin="10,0,0,0"/>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
<UniformGrid Grid.Row="6" Columns="2" Margin="0,0,0,5">
|
||||||
<TextBlock Text="{Binding ApproxLinTolMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding ApproxLinTolMsg}" VerticalAlignment="Center"/>
|
||||||
<TextBox Text="{Binding ApproxLinTol}" Height="25" Margin="10,0,0,0"/>
|
<TextBox Text="{Binding ApproxLinTol}" Height="25" Margin="10,0,0,0"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
<UniformGrid Grid.Row="5" Columns="2">
|
<UniformGrid Grid.Row="7" Columns="2">
|
||||||
<TextBlock Text="{Binding DefaultSetUpMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding DefaultSetUpMsg}" VerticalAlignment="Center"/>
|
||||||
<ComboBox ItemsSource="{Binding ArchivedSetUpList}" Height="25" Margin="10,0,0,0"
|
<ComboBox ItemsSource="{Binding ArchivedSetUpList}" Height="25" Margin="10,0,0,0"
|
||||||
SelectedItem="{Binding SelectedDefaultSetUp}" IsEnabled="{Binding IsActiveDefaultSetUp}"/>
|
SelectedItem="{Binding SelectedDefaultSetUp}" IsEnabled="{Binding IsActiveDefaultSetUp}"/>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class MachOptionVM
|
Public Class MachOptionVM
|
||||||
|
|
||||||
@@ -48,21 +49,6 @@ Public Class MachOptionVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_sApproxLinTol As String
|
|
||||||
Public Property ApproxLinTol As String
|
|
||||||
Get
|
|
||||||
Return m_sApproxLinTol
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
Dim dApproxLinTol As Double = 0
|
|
||||||
If StringToLen(value, dApproxLinTol) Then
|
|
||||||
EgtMdbSetGeneralParam(MCH_GP.APPROXLINTOL, dApproxLinTol)
|
|
||||||
EgtMdbSave()
|
|
||||||
m_sApproxLinTol = value
|
|
||||||
End If
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_SplitArcsList As New List(Of MCH_SA)({MCH_SA.NEVER, MCH_SA.GEN_PLANE, MCH_SA.NO_XY_PLANE, MCH_SA.ALWAYS})
|
Private m_SplitArcsList As New List(Of MCH_SA)({MCH_SA.NEVER, MCH_SA.GEN_PLANE, MCH_SA.NO_XY_PLANE, MCH_SA.ALWAYS})
|
||||||
Public ReadOnly Property SplitArcsList As List(Of MCH_SA)
|
Public ReadOnly Property SplitArcsList As List(Of MCH_SA)
|
||||||
Get
|
Get
|
||||||
@@ -82,6 +68,51 @@ Public Class MachOptionVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_sExtSawArcMinRad As String
|
||||||
|
Public Property ExtSawArcMinRad As String
|
||||||
|
Get
|
||||||
|
Return m_sExtSawArcMinRad
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
Dim dExtSawArcMinRad As Double = 0
|
||||||
|
If StringToLen(value, dExtSawArcMinRad) Then
|
||||||
|
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dExtSawArcMinRad)
|
||||||
|
EgtMdbSave()
|
||||||
|
m_sExtSawArcMinRad = value
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sIntSawArcMaxSideAng As String
|
||||||
|
Public Property IntSawArcMaxSideAng As String
|
||||||
|
Get
|
||||||
|
Return m_sIntSawArcMaxSideAng
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
Dim dIntSawArcMaxSideAng As Double = 0
|
||||||
|
If StringToLen(value, dIntSawArcMaxSideAng) Then
|
||||||
|
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dIntSawArcMaxSideAng)
|
||||||
|
EgtMdbSave()
|
||||||
|
m_sIntSawArcMaxSideAng = value
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sApproxLinTol As String
|
||||||
|
Public Property ApproxLinTol As String
|
||||||
|
Get
|
||||||
|
Return m_sApproxLinTol
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
Dim dApproxLinTol As Double = 0
|
||||||
|
If StringToLen(value, dApproxLinTol) Then
|
||||||
|
EgtMdbSetGeneralParam(MCH_GP.APPROXLINTOL, dApproxLinTol)
|
||||||
|
EgtMdbSave()
|
||||||
|
m_sApproxLinTol = value
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_ArchivedSetUpList As New List(Of String)
|
Private m_ArchivedSetUpList As New List(Of String)
|
||||||
Public Property ArchivedSetUpList As List(Of String)
|
Public Property ArchivedSetUpList As List(Of String)
|
||||||
Get
|
Get
|
||||||
@@ -121,11 +152,6 @@ Public Class MachOptionVM
|
|||||||
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 9)
|
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 9)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property ApproxLinTolMsg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(6410) ' Tolleranza di approssimazione
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property SplitArcsMsg As String
|
Public ReadOnly Property SplitArcsMsg As String
|
||||||
Get
|
Get
|
||||||
@@ -133,6 +159,24 @@ Public Class MachOptionVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ExtSawArcMinRadMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6411) ' Minimo raggio arco esterno con lama
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property IntSawArcMaxSideAngMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6412) ' Massima inclinazione arco interno con lama
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ApproxLinTolMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6410) ' Tolleranza di approssimazione
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property DefaultSetUpMsg As String
|
Public ReadOnly Property DefaultSetUpMsg As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 7)
|
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 7)
|
||||||
@@ -161,6 +205,14 @@ Public Class MachOptionVM
|
|||||||
Dim nVal As Integer = 0
|
Dim nVal As Integer = 0
|
||||||
EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal)
|
EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal)
|
||||||
m_SelectedSplitArcs = DirectCast(nVal, MCH_SA)
|
m_SelectedSplitArcs = DirectCast(nVal, MCH_SA)
|
||||||
|
' Leggo minimo raggio arco esterno lavorabile con lama
|
||||||
|
dVal = 0
|
||||||
|
EgtMdbGetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||||
|
m_sExtSawArcMinRad = LenToString(dVal, 4)
|
||||||
|
' Leggo massima inclinazione lama per lavorare archi interni
|
||||||
|
dVal = 0
|
||||||
|
EgtMdbGetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||||
|
m_sIntSawArcMaxSideAng = LenToString(dVal, 4)
|
||||||
' Leggo tolleranza lineare di approssimazione
|
' Leggo tolleranza lineare di approssimazione
|
||||||
dVal = 0
|
dVal = 0
|
||||||
EgtMdbGetGeneralParam(MCH_GP.APPROXLINTOL, dVal)
|
EgtMdbGetGeneralParam(MCH_GP.APPROXLINTOL, dVal)
|
||||||
@@ -185,6 +237,17 @@ Public Class MachOptionVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "Visibility"
|
||||||
|
Public ReadOnly Property StoneVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Dim sGenMat As String = ""
|
||||||
|
EgtUILib.GetPrivateProfileString(S_MCH_GENERAL, K_MATERIAL, MCH_MAT_WOOD, sGenMat, IniFile.m_sCurrMachIniFilePath)
|
||||||
|
Return If( sGenMat = MCH_MAT_STONE, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "CloseMachOptionsCommand"
|
#Region "CloseMachOptionsCommand"
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ Public Class MyMachinePanelVM
|
|||||||
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9, True)
|
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9, True)
|
||||||
Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
|
Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
|
||||||
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
|
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
|
||||||
MachDbWindowV.Height = 794 '674
|
MachDbWindowV.Height = 800 '674
|
||||||
MachDbWindowV.Width = 1024
|
MachDbWindowV.Width = 1024
|
||||||
MachDbWindowV.Owner = Application.Current.MainWindow
|
MachDbWindowV.Owner = Application.Current.MainWindow
|
||||||
MachDbWindowV.ShowDialog()
|
MachDbWindowV.ShowDialog()
|
||||||
@@ -290,7 +290,7 @@ Public Class MyMachinePanelVM
|
|||||||
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9, True)
|
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9, True)
|
||||||
Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
|
Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
|
||||||
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
|
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
|
||||||
MachDbWindowV.Height = 794 '674
|
MachDbWindowV.Height = 800 '674
|
||||||
MachDbWindowV.Width = 1024
|
MachDbWindowV.Width = 1024
|
||||||
MachDbWindowV.Owner = Application.Current.MainWindow
|
MachDbWindowV.Owner = Application.Current.MainWindow
|
||||||
MachDbWindowV.ShowDialog()
|
MachDbWindowV.ShowDialog()
|
||||||
|
|||||||
+58
-34
@@ -46,6 +46,13 @@ Public Class MainWindowVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_sDimensionDir As String = String.Empty
|
||||||
|
Public ReadOnly Property DimensionDir As String
|
||||||
|
Get
|
||||||
|
Return m_sDimensionDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_cmdMainWindow_ContentRendered As ICommand
|
Private m_cmdMainWindow_ContentRendered As ICommand
|
||||||
Private m_cmdAboutBox As ICommand
|
Private m_cmdAboutBox As ICommand
|
||||||
' MainWindow Activated Event
|
' MainWindow Activated Event
|
||||||
@@ -97,11 +104,11 @@ Public Class MainWindowVM
|
|||||||
|
|
||||||
Public ReadOnly Property IconSource As String
|
Public ReadOnly Property IconSource As String
|
||||||
Get
|
Get
|
||||||
#If PLATFORM = "x64" Then
|
#If PLATFORM = "x64" Then
|
||||||
Return "/Resources/EgtCAM5_64.ico"
|
Return "/Resources/EgtCAM5_64.ico"
|
||||||
#else
|
#Else
|
||||||
Return "/Resources/EgtCAM5.ico"
|
Return "/Resources/EgtCAM5.ico"
|
||||||
#End If
|
#End If
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -189,13 +196,7 @@ Public Class MainWindowVM
|
|||||||
' Salvo impostazione macchina corrente
|
' Salvo impostazione macchina corrente
|
||||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
' Aggiorno istanze usate
|
' Aggiorno istanze usate
|
||||||
m_objMutex.WaitOne(1000)
|
ReleaseInstance()
|
||||||
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
|
||||||
nTmp -= (1 << (IniFile.m_nInstance - 1))
|
|
||||||
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
|
||||||
m_objMutex.ReleaseMutex()
|
|
||||||
' Rilascio mutex
|
|
||||||
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
|
||||||
' Chiudo la finestra principale del programma
|
' Chiudo la finestra principale del programma
|
||||||
Application.Current.MainWindow.Close()
|
Application.Current.MainWindow.Close()
|
||||||
Else
|
Else
|
||||||
@@ -203,15 +204,9 @@ Public Class MainWindowVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function OnTerminateProcess( nExitCode As Integer) As Boolean
|
Private Function OnTerminateProcess(nExitCode As Integer) As Boolean
|
||||||
' Aggiorno istanze usate
|
' Aggiorno istanze usate
|
||||||
m_objMutex.WaitOne(1000)
|
ReleaseInstance()
|
||||||
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
|
||||||
nTmp -= (1 << (IniFile.m_nInstance - 1))
|
|
||||||
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
|
||||||
m_objMutex.ReleaseMutex()
|
|
||||||
' Rilascio mutex
|
|
||||||
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
|
||||||
' Dichiaro di procedere con la terminazione del programma
|
' Dichiaro di procedere con la terminazione del programma
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
@@ -306,12 +301,9 @@ Public Class MainWindowVM
|
|||||||
Map.refMainWindowVM.ManageClosingApplication()
|
Map.refMainWindowVM.ManageClosingApplication()
|
||||||
' Terminazione generale di EgtInterface
|
' Terminazione generale di EgtInterface
|
||||||
EgtExit()
|
EgtExit()
|
||||||
' Rilascio mutex
|
|
||||||
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
|
||||||
' Aggiorno istanze usate
|
' Aggiorno istanze usate
|
||||||
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
ReleaseInstance()
|
||||||
nTmp -= (1 << (IniFile.m_nInstance - 1))
|
' Termino
|
||||||
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
|
||||||
Application.Current.Shutdown()
|
Application.Current.Shutdown()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -362,6 +354,8 @@ Public Class MainWindowVM
|
|||||||
Else
|
Else
|
||||||
IniFile.m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKER_DFL_DIR
|
IniFile.m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKER_DFL_DIR
|
||||||
End If
|
End If
|
||||||
|
' Recupero percorso file Dimension
|
||||||
|
m_sDimensionDir = m_sConfigDir & "\" & DIMENSION_FILE_NAME
|
||||||
' Verifico indice di istanza
|
' Verifico indice di istanza
|
||||||
ManageInstance()
|
ManageInstance()
|
||||||
' Imposto tipo di chiave
|
' Imposto tipo di chiave
|
||||||
@@ -385,8 +379,8 @@ Public Class MainWindowVM
|
|||||||
EgtSetLockId(sLockId)
|
EgtSetLockId(sLockId)
|
||||||
End If
|
End If
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2605, 1, IniFile.m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(3279, 3103, 1, IniFile.m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(3279, 2605, 1, IniFile.m_nKeyOptions)
|
EgtGetKeyOptions(3279, 3103, 1, IniFile.m_nKeyOptions)
|
||||||
' Leggo e imposto livello utilizzatore
|
' Leggo e imposto livello utilizzatore
|
||||||
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
||||||
' Imposto abilitazione lavorazioni avanzate
|
' Imposto abilitazione lavorazioni avanzate
|
||||||
@@ -422,14 +416,6 @@ Public Class MainWindowVM
|
|||||||
GetPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
|
GetPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
|
||||||
GetPrivateProfileString(S_GEOMDB, K_DEFAULTFONT, "", OptionModule.m_sFontText)
|
GetPrivateProfileString(S_GEOMDB, K_DEFAULTFONT, "", OptionModule.m_sFontText)
|
||||||
EgtSetFont(sNfeDir, OptionModule.m_sFontText)
|
EgtSetFont(sNfeDir, OptionModule.m_sFontText)
|
||||||
' Imposto direttorio ausiliario per import/gestione BTL
|
|
||||||
Dim sBtlAuxDir As String = String.Empty
|
|
||||||
GetPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
|
|
||||||
EgtSetBtlAuxDir(sBtlAuxDir)
|
|
||||||
' Imposto direttorio libreria per export ThreeJs
|
|
||||||
Dim sThreeJSLibDir As String = String.Empty
|
|
||||||
GetPrivateProfileString(S_EXPORT, K_THREEJSLIBDIR, "", sThreeJSLibDir)
|
|
||||||
EgtSetThreeJSLibDir(sThreeJSLibDir)
|
|
||||||
' Imposto dir di default per libreria Lua e lancio libreria di base
|
' Imposto dir di default per libreria Lua e lancio libreria di base
|
||||||
Dim sLuaLibsDir As String = String.Empty
|
Dim sLuaLibsDir As String = String.Empty
|
||||||
GetPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
|
GetPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
|
||||||
@@ -437,6 +423,14 @@ Public Class MainWindowVM
|
|||||||
Dim sLuaBaseLib As String = String.Empty
|
Dim sLuaBaseLib As String = String.Empty
|
||||||
GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
||||||
EgtLuaRequire(sLuaBaseLib)
|
EgtLuaRequire(sLuaBaseLib)
|
||||||
|
' Imposto direttorio ausiliario per import/gestione BTL (sempre dopo impostazioni lua)
|
||||||
|
Dim sBtlAuxDir As String = String.Empty
|
||||||
|
GetPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
|
||||||
|
EgtSetBtlAuxDir(sBtlAuxDir)
|
||||||
|
' Imposto direttorio libreria per export ThreeJs
|
||||||
|
Dim sThreeJSLibDir As String = String.Empty
|
||||||
|
GetPrivateProfileString(S_EXPORT, K_THREEJSLIBDIR, "", sThreeJSLibDir)
|
||||||
|
EgtSetThreeJSLibDir(sThreeJSLibDir)
|
||||||
' Imposto direttorio temporaneo a EgtInterface
|
' Imposto direttorio temporaneo a EgtInterface
|
||||||
EgtSetTempDir(m_sTempDir)
|
EgtSetTempDir(m_sTempDir)
|
||||||
' Imposto IniFile a EgtInterface
|
' Imposto IniFile a EgtInterface
|
||||||
@@ -529,6 +523,17 @@ Public Class MainWindowVM
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ReleaseInstance()
|
||||||
|
' Aggiorno istanze usate
|
||||||
|
Dim bOk As Boolean = m_objMutex.WaitOne(1000)
|
||||||
|
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||||
|
nTmp -= (1 << (IniFile.m_nInstance - 1))
|
||||||
|
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
||||||
|
If bOk Then m_objMutex.ReleaseMutex()
|
||||||
|
' Rilascio mutex
|
||||||
|
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub NotifyMainWindow_ContentRendered()
|
Friend Sub NotifyMainWindow_ContentRendered()
|
||||||
' Notifico ProjectVM
|
' Notifico ProjectVM
|
||||||
@@ -597,6 +602,25 @@ Public Class MainWindowVM
|
|||||||
' pulisco output
|
' pulisco output
|
||||||
Map.refStatusBarVM.NotifyStatusOutput("")
|
Map.refStatusBarVM.NotifyStatusOutput("")
|
||||||
Map.refInputExpanderVM.ResetInputBox()
|
Map.refInputExpanderVM.ResetInputBox()
|
||||||
|
If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
|
||||||
|
' Nascondo la combobox delle usernotes
|
||||||
|
Map.refMachiningParameterExpanderVM.CurrOperation.SetComboAddVisibility(Visibility.Collapsed)
|
||||||
|
'riattivo il pulsante per visualizzare la combobox delle note
|
||||||
|
Map.refMachiningParameterExpanderVM.CurrOperation.SetShowNoteListCombo_IsEnable(True)
|
||||||
|
End If
|
||||||
|
ElseIf (e.Key = Key.Left OrElse e.Key = Key.Right) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
|
||||||
|
Map.refMachiningParameterExpanderVM.FocusSlider()
|
||||||
|
Dim nStep As Integer = If(e.Key = Key.Right, 1, -1)
|
||||||
|
Map.refMachiningParameterExpanderVM.SetSliderValue(nStep)
|
||||||
|
e.Handled = True
|
||||||
|
ElseIf (e.Key = Key.Up OrElse e.Key = Key.Down) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
|
||||||
|
Map.refMachiningParameterExpanderVM.FocusButtonPreview()
|
||||||
|
If e.Key = Key.Down Then
|
||||||
|
Map.refMachiningParameterExpanderVM.RevertPreviewMachiningTool()
|
||||||
|
Else
|
||||||
|
Map.refMachiningParameterExpanderVM.PreviewMachiningTool()
|
||||||
|
End If
|
||||||
|
e.Handled = True
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Imports System.Windows
|
|||||||
#End If
|
#End If
|
||||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyProduct("EgtCAM5")>
|
<Assembly: AssemblyProduct("EgtCAM5")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2016-2024 by Egalware s.r.l.")>
|
<Assembly: AssemblyCopyright("Copyright © 2016-2026 by Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
<Assembly: ComVisible(false)>
|
<Assembly: ComVisible(false)>
|
||||||
|
|
||||||
@@ -70,6 +70,6 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.6.5.1")>
|
<Assembly: AssemblyVersion("3.1.3.2")>
|
||||||
<Assembly: AssemblyFileVersion("2.6.5.1")>
|
<Assembly: AssemblyFileVersion("3.1.3.2")>
|
||||||
|
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
'------------------------------------------------------------------------------
|
'------------------------------------------------------------------------------
|
||||||
' <auto-generated>
|
' <auto-generated>
|
||||||
' This code was generated by a tool.
|
' This code was generated by a tool.
|
||||||
' Runtime Version:4.0.30319.34209
|
' Runtime Version:4.0.30319.42000
|
||||||
'
|
'
|
||||||
' Changes to this file may cause incorrect behavior and will be lost if
|
' Changes to this file may cause incorrect behavior and will be lost if
|
||||||
' the code is regenerated.
|
' the code is regenerated.
|
||||||
@@ -22,7 +22,7 @@ Namespace My.Resources
|
|||||||
'''<summary>
|
'''<summary>
|
||||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
|
||||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||||
|
|||||||
Generated
+22
-20
@@ -1,7 +1,7 @@
|
|||||||
'------------------------------------------------------------------------------
|
'------------------------------------------------------------------------------
|
||||||
' <auto-generated>
|
' <auto-generated>
|
||||||
' This code was generated by a tool.
|
' This code was generated by a tool.
|
||||||
' Runtime Version:4.0.30319.34209
|
' Runtime Version:4.0.30319.42000
|
||||||
'
|
'
|
||||||
' Changes to this file may cause incorrect behavior and will be lost if
|
' Changes to this file may cause incorrect behavior and will be lost if
|
||||||
' the code is regenerated.
|
' the code is regenerated.
|
||||||
@@ -12,15 +12,16 @@ Option Strict On
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
|
||||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
|
|
||||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
|
||||||
Partial Friend NotInheritable Class MySettings
|
|
||||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
|
||||||
|
|
||||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
|
||||||
|
|
||||||
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _
|
||||||
|
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Partial Friend NotInheritable Class MySettings
|
||||||
|
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||||
|
|
||||||
|
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||||
|
|
||||||
#Region "My.Settings Auto-Save Functionality"
|
#Region "My.Settings Auto-Save Functionality"
|
||||||
#If _MyType = "WindowsForms" Then
|
#If _MyType = "WindowsForms" Then
|
||||||
Private Shared addedHandler As Boolean
|
Private Shared addedHandler As Boolean
|
||||||
@@ -28,17 +29,17 @@ Partial Friend NotInheritable Class MySettings
|
|||||||
Private Shared addedHandlerLockObject As New Object
|
Private Shared addedHandlerLockObject As New Object
|
||||||
|
|
||||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||||
If My.Application.SaveMySettingsOnExit Then
|
If My.Application.SaveMySettingsOnExit Then
|
||||||
My.Settings.Save()
|
My.Settings.Save()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End If
|
#End If
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Shared ReadOnly Property [Default]() As MySettings
|
Public Shared ReadOnly Property [Default]() As MySettings
|
||||||
Get
|
Get
|
||||||
|
|
||||||
#If _MyType = "WindowsForms" Then
|
#If _MyType = "WindowsForms" Then
|
||||||
If Not addedHandler Then
|
If Not addedHandler Then
|
||||||
SyncLock addedHandlerLockObject
|
SyncLock addedHandlerLockObject
|
||||||
@@ -49,10 +50,11 @@ Partial Friend NotInheritable Class MySettings
|
|||||||
End SyncLock
|
End SyncLock
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
Return defaultInstance
|
Return defaultInstance
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
End Class
|
End Class
|
||||||
|
End Namespace
|
||||||
|
|
||||||
Namespace My
|
Namespace My
|
||||||
|
|
||||||
@@ -62,9 +64,9 @@ Namespace My
|
|||||||
Friend Module MySettingsProperty
|
Friend Module MySettingsProperty
|
||||||
|
|
||||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||||
Friend ReadOnly Property Settings() As Global.EgtCAM5.MySettings
|
Friend ReadOnly Property Settings() As Global.EgtCAM5.My.MySettings
|
||||||
Get
|
Get
|
||||||
Return Global.EgtCAM5.MySettings.Default
|
Return Global.EgtCAM5.My.MySettings.Default
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
@@ -3,14 +3,12 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
<Expander IsExpanded="{Binding IsEnabled}" IsEnabled="{Binding IsEnabled}"
|
<Expander IsExpanded="{Binding IsEnabled}" IsEnabled="{Binding IsEnabled}"
|
||||||
Style="{StaticResource ExpanderStyle}">
|
Style="{StaticResource ExpanderStyle}">
|
||||||
<Expander.Header>
|
<Expander.Header>
|
||||||
<TextBlock Text="{Binding PropertiesMsg}"/>
|
<TextBlock Text="{Binding PropertiesMsg}"/>
|
||||||
</Expander.Header>
|
</Expander.Header>
|
||||||
<UniformGrid>
|
<TextBox Text="{Binding InfoBox, Mode=OneWay}" IsReadOnly="True"
|
||||||
<TextBox Text="{Binding InfoBox, Mode=OneWay}" MaxHeight="100" IsReadOnly="True"
|
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
|
||||||
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
|
|
||||||
</UniformGrid>
|
|
||||||
</Expander>
|
</Expander>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ Public Class InfoExpanderVM
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If value <> m_IsExpanded Then
|
If value <> m_IsExpanded Then
|
||||||
m_IsExpanded = value
|
m_IsExpanded = value
|
||||||
|
Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(m_IsExpanded)
|
||||||
OnPropertyChanged("IsEnabled")
|
OnPropertyChanged("IsEnabled")
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
<UserControl x:Class="InputExpanderV"
|
<UserControl x:Class="InputExpanderV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||||
|
|
||||||
<Expander Header="{Binding Title}" IsExpanded="{Binding IsExpanded}" IsEnabled="{Binding IsEnabled}"
|
<Expander Header="{Binding Title}" IsExpanded="{Binding IsExpanded}" IsEnabled="{Binding IsEnabled}"
|
||||||
Style="{StaticResource ExpanderStyle}">
|
Style="{StaticResource ExpanderStyle}">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<StackPanel.Style>
|
<StackPanel.Style>
|
||||||
<Style TargetType="{x:Type StackPanel}">
|
<Style TargetType="{x:Type StackPanel}">
|
||||||
@@ -16,26 +18,42 @@
|
|||||||
</StackPanel.Style>
|
</StackPanel.Style>
|
||||||
<TextBlock Text="{Binding TextBlock}"
|
<TextBlock Text="{Binding TextBlock}"
|
||||||
Visibility="{Binding TextVisibility}" Margin="5,5,0,5"/>
|
Visibility="{Binding TextVisibility}" Margin="5,5,0,5"/>
|
||||||
<TextBox Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}"
|
<Grid>
|
||||||
Visibility="{Binding TextVisibility}" Margin="5,0,5,5">
|
<Grid.ColumnDefinitions>
|
||||||
<TextBox.InputBindings>
|
<ColumnDefinition Width="1*"/>
|
||||||
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/>
|
</Grid.ColumnDefinitions>
|
||||||
</TextBox.InputBindings>
|
<TextBox x:Name="Txt" Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}"
|
||||||
</TextBox>
|
PreviewKeyDown="TextBox_PreviewKeyDown" IsVisibleChanged="Txt_IsVisibleChanged"
|
||||||
|
Visibility="{Binding TextVisibility}" Height="Auto" Margin="5,0,5,5" >
|
||||||
|
<TextBox.InputBindings>
|
||||||
|
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
|
||||||
|
<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/>
|
||||||
|
</TextBox.InputBindings>
|
||||||
|
</TextBox>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Content="+"
|
||||||
|
Command="{Binding ShowInfoItemCommand}"
|
||||||
|
Visibility="{Binding ShowInfoItemVisibility}"
|
||||||
|
Width="20"
|
||||||
|
Height="20"
|
||||||
|
Margin="5,-1,5,0"
|
||||||
|
VerticalAlignment="Top"/>
|
||||||
|
</Grid>
|
||||||
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
|
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
|
||||||
Visibility="{Binding CheckVisibility}" Margin="5,0,5,5"/>
|
Visibility="{Binding CheckVisibility}" Margin="5,0,5,5"/>
|
||||||
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
|
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
|
||||||
Visibility="{Binding ComboVisibility}" Margin="5,0,5,5"/>
|
Visibility="{Binding ComboVisibility}" Margin="5,5,5,5"/>
|
||||||
|
|
||||||
<Grid Margin="5,0,5,5">
|
<Grid Margin="5,0,5,5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Command="{Binding ShowCommand}" Visibility="{Binding ShowBtnVisibility}"
|
<Button Command="{Binding ShowCommand}" Visibility="{Binding ShowBtnVisibility}"
|
||||||
Content="{Binding ShowMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
|
Content="{Binding ShowMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
|
||||||
<Button Command="{Binding DoneCommand}" Grid.Column="1"
|
<Button Command="{Binding DoneCommand}" Grid.Column="1"
|
||||||
Content="{Binding OkMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
|
Content="{Binding OkMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Expander>
|
</Expander>
|
||||||
|
|||||||
@@ -1,3 +1,17 @@
|
|||||||
Public Class InputExpanderV
|
Public Class InputExpanderV
|
||||||
|
|
||||||
|
Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||||
|
If (e.Key = Key.Enter And (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) Or
|
||||||
|
(e.Key = Key.V And (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control) Then
|
||||||
|
Txt.AcceptsReturn = True
|
||||||
|
Txt.TextWrapping = TextWrapping.Wrap
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Txt_IsVisibleChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
|
||||||
|
If Txt.IsVisible Then
|
||||||
|
Txt.Focus()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports MS.Internal
|
||||||
|
|
||||||
Public Class InputExpanderVM
|
Public Class InputExpanderVM
|
||||||
Inherits ViewModelBase
|
Inherits ViewModelBase
|
||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
' Variabile temporanea per salvare bShow
|
||||||
|
Private m_bTempShow As Boolean
|
||||||
|
|
||||||
|
' Lista temporanea delle Info
|
||||||
|
Private m_TempInfoList As New List(Of InfoItem)
|
||||||
|
|
||||||
' Expander fields
|
' Expander fields
|
||||||
Private m_IsExpanded As Boolean
|
Private m_IsExpanded As Boolean
|
||||||
Public Property IsExpanded As Boolean
|
Public Property IsExpanded As Boolean
|
||||||
@@ -146,9 +153,26 @@ Public Class InputExpanderVM
|
|||||||
Return m_ComboSelectedIndex
|
Return m_ComboSelectedIndex
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
Map.refProjectVM.SetLastInteger(value)
|
If m_bTempShow Then Map.refProjectVM.SetLastInteger(value)
|
||||||
m_ComboSelectedIndex = value
|
m_ComboSelectedIndex = value
|
||||||
|
' se la combo è di Info ed è valida, la aggiungo alla textbox
|
||||||
|
If m_ComboSelectedIndex >= 0 AndAlso m_TempInfoList.Count() > 0 Then
|
||||||
|
Dim CurrItem As InfoItem = m_TempInfoList(m_ComboSelectedIndex)
|
||||||
|
If String.IsNullOrEmpty(m_TextBox) Then
|
||||||
|
m_TextBox = CurrItem.sKey & "=" & CurrItem.sValue
|
||||||
|
Else
|
||||||
|
If Not m_TextBox.EndsWith(vbCrLf) Then m_TextBox &= vbCrLf
|
||||||
|
m_TextBox &= CurrItem.sKey & "=" & CurrItem.sValue
|
||||||
|
End If
|
||||||
|
ComboVisibility = Visibility.Collapsed
|
||||||
|
ComboItemsList.RemoveAt(m_ComboSelectedIndex)
|
||||||
|
m_TempInfoList.RemoveAt(m_ComboSelectedIndex)
|
||||||
|
m_ComboSelectedIndex = -1
|
||||||
|
If ComboItemsList.Count <= 0 Then ShowInfoItemVisibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
OnPropertyChanged("ComboSelectedIndex")
|
OnPropertyChanged("ComboSelectedIndex")
|
||||||
|
OnPropertyChanged("ComboItemsList")
|
||||||
|
OnPropertyChanged("TextBox")
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -177,9 +201,26 @@ Public Class InputExpanderVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_ShowInfoItemVisibility As Visibility
|
||||||
|
''' <summary>
|
||||||
|
''' Propietà visibilità bottone +
|
||||||
|
''' </summary>
|
||||||
|
Public Property ShowInfoItemVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_ShowInfoItemVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
If value <> m_ShowInfoItemVisibility Then
|
||||||
|
m_ShowInfoItemVisibility = value
|
||||||
|
OnPropertyChanged("ShowInfoItemVisibility")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
' Commands definition
|
' Commands definition
|
||||||
Private m_cmdShow As ICommand
|
Private m_cmdShow As ICommand
|
||||||
Private m_cmdDone As ICommand
|
Private m_cmdDone As ICommand
|
||||||
|
Private m_cmdShowInfoItem As ICommand
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
@@ -203,6 +244,7 @@ Public Class InputExpanderVM
|
|||||||
Sub New()
|
Sub New()
|
||||||
' Creo riferimento a questa classe in EgtCAM5Map
|
' Creo riferimento a questa classe in EgtCAM5Map
|
||||||
Map.SetRefInputExpanderVM(Me)
|
Map.SetRefInputExpanderVM(Me)
|
||||||
|
ComboSelectedIndex = -1
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Constructor
|
#End Region ' Constructor
|
||||||
@@ -269,23 +311,69 @@ Public Class InputExpanderVM
|
|||||||
|
|
||||||
#End Region ' DoneCommand
|
#End Region ' DoneCommand
|
||||||
|
|
||||||
|
#Region "ShowInfoItemCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Comando per la visualizzazione della combobox
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property ShowInfoItemCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdShowInfoItem Is Nothing Then
|
||||||
|
m_cmdShowInfoItem = New Command(AddressOf ShowInfoItem)
|
||||||
|
End If
|
||||||
|
Return m_cmdShowInfoItem
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione per la visualizzazione della combobox
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="param"></param>
|
||||||
|
Public Sub ShowInfoItem(ByVal param As Object)
|
||||||
|
' Se presente info inserita in textbox
|
||||||
|
If Not String.IsNullOrWhiteSpace( m_TextBox) Then
|
||||||
|
Dim vLines As String() = m_TextBox.Split( vbCrLf.ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
|
||||||
|
For Each sLine As String In vLines
|
||||||
|
Dim vKeyVal As String() = sLine.Split("="c)
|
||||||
|
Dim nInd As Integer = m_TempInfoList.FindIndex( Function(x) x.sKey = vKeyVal(0))
|
||||||
|
If nInd <> -1 Then
|
||||||
|
ComboItemsList.RemoveAt( nInd)
|
||||||
|
m_TempInfoList.RemoveAt( nInd)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
ComboVisibility = Visibility.Visible
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ShowInfoItemCommand
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
Friend Sub PrepareInputBox(PrepareInputBoxParam As PrepareInputBoxParam)
|
Friend Sub PrepareInputBox(PrepareInputBoxParam As PrepareInputBoxParam)
|
||||||
Title = PrepareInputBoxParam.sTitle
|
' Divido il titolo che può contenere comandi dopo il ';'
|
||||||
|
Dim vsSplitTitle As String() = PrepareInputBoxParam.sTitle.Split(";"c)
|
||||||
|
Title = vsSplitTitle(0)
|
||||||
If PrepareInputBoxParam.sLabel <> "" Then
|
If PrepareInputBoxParam.sLabel <> "" Then
|
||||||
TextBlock = PrepareInputBoxParam.sLabel
|
TextBlock = PrepareInputBoxParam.sLabel
|
||||||
TextBox = ""
|
TextBox = ""
|
||||||
TextVisibility = Visibility.Visible
|
TextVisibility = Visibility.Visible
|
||||||
|
' Se presente il comando "Sic=1"
|
||||||
|
If vsSplitTitle.Count() > 1 AndAlso vsSplitTitle(1) = "Sic=1" Then
|
||||||
|
m_bTempShow = False
|
||||||
|
ComboInfo()
|
||||||
|
If ComboItemsList.Count > 0 Then ShowInfoItemVisibility = Visibility.Visible
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
If PrepareInputBoxParam.sCheckLabel <> "" Then
|
If PrepareInputBoxParam.sCheckLabel <> "" Then
|
||||||
CheckBoxText = PrepareInputBoxParam.sCheckLabel
|
CheckBoxText = PrepareInputBoxParam.sCheckLabel
|
||||||
CheckVisibility = Visibility.Visible
|
CheckVisibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
If PrepareInputBoxParam.bShowCombo Then
|
If PrepareInputBoxParam.bShowCombo Then
|
||||||
|
m_bTempShow = PrepareInputBoxParam.bShowCombo
|
||||||
ComboItemsList.Clear()
|
ComboItemsList.Clear()
|
||||||
|
m_TempInfoList.Clear()
|
||||||
ComboVisibility = Visibility.Visible
|
ComboVisibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
If PrepareInputBoxParam.bShowBtn Then
|
If PrepareInputBoxParam.bShowBtn Then
|
||||||
@@ -302,6 +390,7 @@ Public Class InputExpanderVM
|
|||||||
CheckVisibility = Visibility.Collapsed
|
CheckVisibility = Visibility.Collapsed
|
||||||
ComboVisibility = Visibility.Collapsed
|
ComboVisibility = Visibility.Collapsed
|
||||||
ShowBtnVisibility = Visibility.Collapsed
|
ShowBtnVisibility = Visibility.Collapsed
|
||||||
|
ShowInfoItemVisibility = Visibility.Collapsed
|
||||||
IsExpanded = False
|
IsExpanded = False
|
||||||
IsEnabled = False
|
IsEnabled = False
|
||||||
End Sub
|
End Sub
|
||||||
@@ -329,12 +418,33 @@ Public Class InputExpanderVM
|
|||||||
|
|
||||||
Private Function AddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) As Boolean
|
Private Function AddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) As Boolean
|
||||||
ComboItemsList.Add(sText)
|
ComboItemsList.Add(sText)
|
||||||
|
|
||||||
If bSelected Then
|
If bSelected Then
|
||||||
ComboSelectedIndex = ComboItemsList.Count - 1
|
ComboSelectedIndex = ComboItemsList.Count - 1
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che popola la lista ComboItemsList
|
||||||
|
''' </summary>
|
||||||
|
Private Sub ComboInfo()
|
||||||
|
|
||||||
|
m_TempInfoList.Clear()
|
||||||
|
ComboItemsList.Clear()
|
||||||
|
|
||||||
|
Dim vsInfo As String() = Nothing
|
||||||
|
EgtGetAllInfo( Map.refManageLayerExpanderVM.RightClickedTreeItemId, vsInfo)
|
||||||
|
|
||||||
|
If Not m_bTempShow And Not IsNothing( vsInfo) Then
|
||||||
|
For nInd As Integer = 0 To vsInfo.Count() - 1
|
||||||
|
Dim vKeyVal As String() = vsInfo( nInd).Split("="c)
|
||||||
|
m_TempInfoList.Add(New InfoItem( nInd, vKeyVal(0), vKeyVal(1)))
|
||||||
|
ComboItemsList.Add( vsInfo( nInd))
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Methods
|
#End Region ' Methods
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -19,11 +19,12 @@ Public Class LayerTreeViewItem
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Public Overrides Property IsSelected As Boolean
|
Public Overrides Property IsSelected As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_IsSelected
|
Return m_isSelected
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If (value <> m_IsSelected) Then
|
If (value <> m_isSelected) Then
|
||||||
m_IsSelected = value
|
m_isSelected = value
|
||||||
|
Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(value)
|
||||||
If value Then
|
If value Then
|
||||||
' recupero l'Id del nuovo oggetto selezionato
|
' recupero l'Id del nuovo oggetto selezionato
|
||||||
Map.refManageLayerExpanderVM.IsRightClickedLayerTreeItem(False)
|
Map.refManageLayerExpanderVM.IsRightClickedLayerTreeItem(False)
|
||||||
@@ -69,17 +70,17 @@ Public Class LayerTreeViewItem
|
|||||||
Return m_bOnOff
|
Return m_bOnOff
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If Map.refProjectVM.GetController().GetStep() <> 0 Then Return
|
'If Map.refProjectVM.GetController().GetStep() <> 0 Then Return
|
||||||
If m_bOnOff <> value Then
|
If m_bOnOff <> value Then
|
||||||
m_bOnOff = value
|
m_bOnOff = value
|
||||||
' se abilitato, eseguo operazione
|
' se abilitato, eseguo operazione
|
||||||
If m_SendCmd Then
|
If m_SendCmd Then
|
||||||
Map.refProjectVM.SetLastInteger(Id)
|
|
||||||
If value Then
|
If value Then
|
||||||
Map.refProjectVM.ExecuteCommand(Controller.CMD.SHOW)
|
EgtSetStatus(Id, GDB_ST.ON_)
|
||||||
Else
|
Else
|
||||||
Map.refProjectVM.ExecuteCommand(Controller.CMD.HIDE)
|
EgtSetStatus(Id, GDB_ST.OFF)
|
||||||
End If
|
End If
|
||||||
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
Dim bOnOffGroup As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) AndAlso Items.Count > 0
|
Dim bOnOffGroup As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) AndAlso Items.Count > 0
|
||||||
If bOnOffGroup Then
|
If bOnOffGroup Then
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<UserControl x:Class="ManageLayerExpanderV"
|
<UserControl x:Class="ManageLayerExpanderV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
xmlns:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
|
xmlns:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
|
||||||
xmlns:local="clr-namespace:EgtCAM5">
|
xmlns:local="clr-namespace:EgtCAM5">
|
||||||
|
|
||||||
<Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}">
|
<Expander IsExpanded="{Binding ManageLayerIsExpanded}" Style="{StaticResource ExpanderStyle}">
|
||||||
<Expander.Header>
|
<Expander.Header>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock Text="{Binding HeaderName}" Margin="0,0,5,0"/>
|
<TextBlock Text="{Binding HeaderName}" Margin="0,0,5,0"/>
|
||||||
@@ -13,18 +13,22 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Expander.Header>
|
</Expander.Header>
|
||||||
|
|
||||||
<StackPanel>
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<UniformGrid Rows="1">
|
<UniformGrid Rows="1">
|
||||||
<Button Content="{Binding NewPartMsg}" Command="{Binding NewPartCommand}" Height="30"/>
|
<Button Content="{Binding NewPartMsg}" Command="{Binding NewPartCommand}" Height="30"/>
|
||||||
<Button Content="{Binding NewLayerMsg}" Command="{Binding NewLayerCommand}" Height="30"/>
|
<Button Content="{Binding NewLayerMsg}" Command="{Binding NewLayerCommand}" Height="30"/>
|
||||||
<Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/>
|
<Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
<TreeView Name="LayerTreeView" MinHeight="150" MaxHeight="250"
|
<TreeView Grid.Row="1" x:Name="LayerTreeView"
|
||||||
ItemsSource="{Binding Path=LayerList}"
|
ItemsSource="{Binding Path=LayerList}"
|
||||||
VirtualizingStackPanel.IsVirtualizing = "True"
|
VirtualizingStackPanel.IsVirtualizing = "True"
|
||||||
VirtualizingStackPanel.VirtualizationMode = "Recycling">
|
VirtualizingStackPanel.VirtualizationMode = "Recycling">
|
||||||
<interactivity:Interaction.Triggers>
|
<interactivity:Interaction.Triggers>
|
||||||
<interactivity:EventTrigger EventName="MouseDoubleClick">
|
<interactivity:EventTrigger EventName="MouseDoubleClick">
|
||||||
<interactivity:InvokeCommandAction Command="{Binding TreeViewDoubleClickCommand}"/>
|
<interactivity:InvokeCommandAction Command="{Binding TreeViewDoubleClickCommand}"/>
|
||||||
@@ -50,8 +54,8 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="0"
|
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="0"
|
||||||
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="False" Height="15" Width="15" Margin="0,0,5,0"/>
|
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>
|
||||||
<Image Grid.Column="1" Source="{Binding PictureString}" Height="15" Margin="0,0,5,0"/>
|
<Image Grid.Column="1" Source="{Binding PictureString}" Height="15" Margin="0,0,5,0"/>
|
||||||
<TextBlock Grid.Column="2" Text="{Binding Name}" Margin="0,0,5,0"/>
|
<TextBlock Grid.Column="2" Text="{Binding Name}" Margin="0,0,5,0"/>
|
||||||
<Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" />
|
<Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" />
|
||||||
@@ -61,7 +65,7 @@
|
|||||||
</TreeView.Resources>
|
</TreeView.Resources>
|
||||||
|
|
||||||
<!--Style dei nodi CathegoryItem che li riquadra di azzurro quando clicckati ed elimina l'ombra grigia
|
<!--Style dei nodi CathegoryItem che li riquadra di azzurro quando clicckati ed elimina l'ombra grigia
|
||||||
che si presenta quando la categoria rimane vuota (ombra causata dal multibinding).-->
|
che si presenta quando la categoria rimane vuota (ombra causata dal multibinding).-->
|
||||||
<TreeView.ItemContainerStyle>
|
<TreeView.ItemContainerStyle>
|
||||||
<Style TargetType="{x:Type TreeViewItem}">
|
<Style TargetType="{x:Type TreeViewItem}">
|
||||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
@@ -116,6 +120,6 @@
|
|||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</TreeView.ContextMenu>
|
</TreeView.ContextMenu>
|
||||||
</TreeView>
|
</TreeView>
|
||||||
</StackPanel>
|
</Grid>
|
||||||
</Expander>
|
</Expander>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtCAM5.IniFile
|
|
||||||
|
|
||||||
Public Class ManageLayerExpanderVM
|
Public Class ManageLayerExpanderVM
|
||||||
Inherits ViewModelBase
|
Inherits ViewModelBase
|
||||||
@@ -30,22 +29,6 @@ Public Class ManageLayerExpanderVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
' Definizione comandi
|
|
||||||
Private m_cmdNewPart As ICommand
|
|
||||||
Private m_cmdNewLayer As ICommand
|
|
||||||
Private m_cmdLayerColor As ICommand
|
|
||||||
Private m_cmdTreeViewDoubleClick As ICommand
|
|
||||||
Private m_cmdTreeViewMouseUp As ICommand
|
|
||||||
Private m_cmdTreeViewMouseRightButton As ICommand
|
|
||||||
Private m_cmdSelect As ICommand
|
|
||||||
Private m_cmdDeselect As ICommand
|
|
||||||
Private m_cmdName As ICommand
|
|
||||||
Private m_cmdInfo As ICommand
|
|
||||||
Private m_cmdRelocate As ICommand
|
|
||||||
Private m_cmdCopy As ICommand
|
|
||||||
Private m_cmdDelete As ICommand
|
|
||||||
Private m_cmdSave As ICommand
|
|
||||||
|
|
||||||
' Lista dei layer
|
' Lista dei layer
|
||||||
Private m_LayerList As New ObservableCollection(Of LayerTreeViewItem)
|
Private m_LayerList As New ObservableCollection(Of LayerTreeViewItem)
|
||||||
Public Property LayerList As ObservableCollection(Of LayerTreeViewItem)
|
Public Property LayerList As ObservableCollection(Of LayerTreeViewItem)
|
||||||
@@ -54,6 +37,7 @@ Public Class ManageLayerExpanderVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As ObservableCollection(Of LayerTreeViewItem))
|
Set(value As ObservableCollection(Of LayerTreeViewItem))
|
||||||
m_LayerList = value
|
m_LayerList = value
|
||||||
|
OnPropertyChanged("LayerList")
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -71,6 +55,22 @@ Public Class ManageLayerExpanderVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_ManageLayerIsExpanded As Boolean
|
||||||
|
Public Property ManageLayerIsExpanded As Boolean
|
||||||
|
Get
|
||||||
|
Return m_ManageLayerIsExpanded
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_ManageLayerIsExpanded = value
|
||||||
|
Map.refDrawOptionPanelVM.SetManageLayerRowIsExpanded(m_ManageLayerIsExpanded)
|
||||||
|
OnPropertyChanged("ManageLayerIsExpanded")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetManageLayerIsExpanded(value As Boolean)
|
||||||
|
m_ManageLayerIsExpanded = value
|
||||||
|
OnPropertyChanged("ManageLayerIsExpanded")
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
Public ReadOnly Property NewPartMsg As String
|
Public ReadOnly Property NewPartMsg As String
|
||||||
@@ -131,6 +131,22 @@ Public Class ManageLayerExpanderVM
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdNewPart As ICommand
|
||||||
|
Private m_cmdNewLayer As ICommand
|
||||||
|
Private m_cmdLayerColor As ICommand
|
||||||
|
Private m_cmdTreeViewDoubleClick As ICommand
|
||||||
|
Private m_cmdTreeViewMouseUp As ICommand
|
||||||
|
Private m_cmdTreeViewMouseRightButton As ICommand
|
||||||
|
Private m_cmdSelect As ICommand
|
||||||
|
Private m_cmdDeselect As ICommand
|
||||||
|
Private m_cmdName As ICommand
|
||||||
|
Private m_cmdInfo As ICommand
|
||||||
|
Private m_cmdRelocate As ICommand
|
||||||
|
Private m_cmdCopy As ICommand
|
||||||
|
Private m_cmdDelete As ICommand
|
||||||
|
Private m_cmdSave As ICommand
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
@@ -140,6 +156,7 @@ Public Class ManageLayerExpanderVM
|
|||||||
Map.SetRefManageLayerExpanderVM(Me)
|
Map.SetRefManageLayerExpanderVM(Me)
|
||||||
'Imposto tempo di evidenziazione delle entità clickate
|
'Imposto tempo di evidenziazione delle entità clickate
|
||||||
ObjTreeTimer.Interval = TimeSpan.FromMilliseconds(1000)
|
ObjTreeTimer.Interval = TimeSpan.FromMilliseconds(1000)
|
||||||
|
SetManageLayerIsExpanded(True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Constructor
|
#End Region ' Constructor
|
||||||
@@ -166,7 +183,7 @@ Public Class ManageLayerExpanderVM
|
|||||||
Public Sub NewPart(ByVal param As Object)
|
Public Sub NewPart(ByVal param As Object)
|
||||||
Map.refProjectVM.ExecuteCommand(Controller.CMD.NEWPART)
|
Map.refProjectVM.ExecuteCommand(Controller.CMD.NEWPART)
|
||||||
' Seleziono nell'albero il layer del pezzo appena creato
|
' Seleziono nell'albero il layer del pezzo appena creato
|
||||||
SelectIdInObjTree(EgtGetCurrLayer(), False)
|
SelectIdInObjTreeNoMark(EgtGetCurrLayer())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' NewPartCommand
|
#End Region ' NewPartCommand
|
||||||
@@ -191,7 +208,7 @@ Public Class ManageLayerExpanderVM
|
|||||||
Public Sub NewLayer(ByVal param As Object)
|
Public Sub NewLayer(ByVal param As Object)
|
||||||
Map.refProjectVM.ExecuteCommand(Controller.CMD.NEWLAYER)
|
Map.refProjectVM.ExecuteCommand(Controller.CMD.NEWLAYER)
|
||||||
' Seleziono nell'albero il layer appena creato
|
' Seleziono nell'albero il layer appena creato
|
||||||
SelectIdInObjTree(EgtGetCurrLayer(), False)
|
SelectIdInObjTreeNoMark(EgtGetCurrLayer())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' NewLayerCommand
|
#End Region ' NewLayerCommand
|
||||||
@@ -241,6 +258,7 @@ Public Class ManageLayerExpanderVM
|
|||||||
If m_nObjTreeOldId <> GDB_ID.NULL Then
|
If m_nObjTreeOldId <> GDB_ID.NULL Then
|
||||||
Map.refProjectVM.SetLastInteger(m_nObjTreeOldId)
|
Map.refProjectVM.SetLastInteger(m_nObjTreeOldId)
|
||||||
Map.refProjectVM.ExecuteCommand(Controller.CMD.SETCURRPARTLAYER)
|
Map.refProjectVM.ExecuteCommand(Controller.CMD.SETCURRPARTLAYER)
|
||||||
|
Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(True)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -492,7 +510,7 @@ Public Class ManageLayerExpanderVM
|
|||||||
Map.refProjectVM.SetLastInteger(RightClickedTreeItemId)
|
Map.refProjectVM.SetLastInteger(RightClickedTreeItemId)
|
||||||
Map.refProjectVM.ExecuteCommand(Controller.CMD.DELETE)
|
Map.refProjectVM.ExecuteCommand(Controller.CMD.DELETE)
|
||||||
' Seleziono prossimo
|
' Seleziono prossimo
|
||||||
SelectIdInObjTree(nNewId, False)
|
SelectIdInObjTreeNoMark(nNewId)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' DeleteCommand
|
#End Region ' DeleteCommand
|
||||||
@@ -528,16 +546,18 @@ Public Class ManageLayerExpanderVM
|
|||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
Private WithEvents ObjTreeTimer As New System.Windows.Threading.DispatcherTimer
|
Private WithEvents ObjTreeTimer As New System.Windows.Threading.DispatcherTimer
|
||||||
Private m_nObjTreeOldId As Integer = GDB_ID.NULL
|
Friend m_nObjTreeOldId As Integer = GDB_ID.NULL
|
||||||
Private m_nObjTreeMenuId As Integer = GDB_ID.NULL
|
Private m_nObjTreeMenuId As Integer = GDB_ID.NULL
|
||||||
Private m_bEnableUpdateObjInObjTree As Boolean = True
|
Private m_bEnableUpdateObjInObjTree As Boolean = True
|
||||||
|
|
||||||
Friend Sub SelectIdInObjTreeNoMark(nId As Integer)
|
Friend Sub SelectIdInObjTreeNoMark(nId As Integer)
|
||||||
SelectIdInObjTree(nId, False)
|
LayerTreeViewItem.m_MarkOnSel = False
|
||||||
|
MySelectIdInObjTree(nId)
|
||||||
|
LayerTreeViewItem.m_MarkOnSel = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub SelectIdInObjTree(nId As Integer)
|
Friend Sub SelectIdInObjTree(nId As Integer)
|
||||||
SelectIdInObjTree(nId, True)
|
MySelectIdInObjTree(nId)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub UpdateObjTreeOldId(ObjTreeOldId As Integer)
|
Friend Sub UpdateObjTreeOldId(ObjTreeOldId As Integer)
|
||||||
@@ -581,7 +601,7 @@ Public Class ManageLayerExpanderVM
|
|||||||
AddGroupInObjTree(GDB_ID.ROOT, GDB_LV.USER, GDB_MD.STD, 0, LayerList)
|
AddGroupInObjTree(GDB_ID.ROOT, GDB_LV.USER, GDB_MD.STD, 0, LayerList)
|
||||||
If nOldId <> GDB_ID.NULL Then
|
If nOldId <> GDB_ID.NULL Then
|
||||||
m_bEnableUpdateObjInObjTree = False
|
m_bEnableUpdateObjInObjTree = False
|
||||||
If Not SelectIdInObjTree(nOldId, True) Then
|
If Not MySelectIdInObjTree(nOldId) Then
|
||||||
Map.refInfoExpanderVM.SetInfoBox(String.Empty)
|
Map.refInfoExpanderVM.SetInfoBox(String.Empty)
|
||||||
End If
|
End If
|
||||||
m_bEnableUpdateObjInObjTree = True
|
m_bEnableUpdateObjInObjTree = True
|
||||||
@@ -803,14 +823,11 @@ Public Class ManageLayerExpanderVM
|
|||||||
Return nOldId
|
Return nOldId
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function SelectIdInObjTree(nId As Integer, bMark As Boolean) As Boolean
|
Private Function MySelectIdInObjTree(nId As Integer) As Boolean
|
||||||
Dim tNode As LayerTreeViewItem = SearchIdInLayerList(LayerList, nId, True)
|
Dim tNode As LayerTreeViewItem = SearchIdInLayerList(LayerList, nId, True)
|
||||||
If Not IsNothing(tNode) Then
|
If Not IsNothing(tNode) Then
|
||||||
If Not bMark Then LayerTreeViewItem.m_MarkOnSel = False
|
|
||||||
tNode.IsSelected = True
|
tNode.IsSelected = True
|
||||||
tNode.NotifyPropertyChanged("IsSelected")
|
tNode.NotifyPropertyChanged("IsSelected")
|
||||||
If Not bMark Then LayerTreeViewItem.m_MarkOnSel = True
|
|
||||||
tNode.IsExpanded = True
|
|
||||||
m_nObjTreeOldId = nId
|
m_nObjTreeOldId = nId
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -1,16 +1,29 @@
|
|||||||
<UserControl x:Class="DrawOptionPanelV"
|
<UserControl x:Class="DrawOptionPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
|
||||||
|
|
||||||
<StackPanel Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
<Grid x:Name="DrawGrid" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition MinHeight="100" MaxHeight="800"
|
||||||
|
EgtCAM5:DrawOptionPanelVM.RowId="ManageLayer"
|
||||||
|
EgtCAM5:DrawOptionPanelVM.IsExpanded="{Binding ManageLayerRowIsExpanded}"
|
||||||
|
EgtCAM5:DrawOptionPanelVM.TargetSplitter="{Binding ElementName=ManagerLayerGridSplitter}"/>
|
||||||
|
<RowDefinition MinHeight="100" MaxHeight="400"
|
||||||
|
EgtCAM5:DrawOptionPanelVM.RowId="Info"
|
||||||
|
EgtCAM5:DrawOptionPanelVM.IsExpanded="{Binding InfoRowIsExpanded}"
|
||||||
|
EgtCAM5:DrawOptionPanelVM.TargetSplitter="{Binding ElementName=InfoGridSplitter}"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
<!--ContentPresenter that contains the ManageLayerExpander-->
|
<!--ContentPresenter that contains the ManageLayerExpander-->
|
||||||
<ContentPresenter Content="{Binding ManageLayerExpander,Mode=OneWay}"/>
|
<ContentPresenter Content="{Binding ManageLayerExpander,Mode=OneWay}"/>
|
||||||
|
<GridSplitter x:Name="ManagerLayerGridSplitter" Style="{StaticResource General_GridSplitter}"/>
|
||||||
<!--ContentPresenter that contains the InfoExpander-->
|
<!--ContentPresenter that contains the InfoExpander-->
|
||||||
<ContentPresenter Content="{Binding InfoExpander}"/>
|
<ContentPresenter Grid.Row="1" Content="{Binding InfoExpander}"/>
|
||||||
|
<GridSplitter x:Name="InfoGridSplitter" Grid.Row="1" Style="{StaticResource General_GridSplitter}"/>
|
||||||
<!--ContentPresenter that contains the InputExpander-->
|
<!--ContentPresenter that contains the InputExpander-->
|
||||||
<ContentPresenter Content="{Binding InputExpander}"/>
|
<ContentPresenter Grid.Row="2" Content="{Binding InputExpander}"/>
|
||||||
</StackPanel>
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -1,7 +1,30 @@
|
|||||||
Public Class DrawOptionPanelV
|
Public Class DrawOptionPanelV
|
||||||
|
|
||||||
Private Sub Me_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
|
Sub New()
|
||||||
Dim x = ciao.MaxHeight
|
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
' Add any initialization after the InitializeComponent() call.
|
||||||
|
Map.SetRefDrawOptionPanelV(Me)
|
||||||
|
If Not IsActivePlugin() Then
|
||||||
|
AddHandler DrawGrid.Loaded,
|
||||||
|
Sub()
|
||||||
|
DynamicGridModule.RestoreDrawGridLayout(DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||||
|
DynamicGridModule.RestoreDrawGridLayout(DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||||
|
DrawGrid.UpdateLayout()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
AddHandler ManagerLayerGridSplitter.DragCompleted,
|
||||||
|
Sub()
|
||||||
|
DynamicGridModule.SaveDrawGridLayout(DrawGrid, "ManageLayer", If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
AddHandler InfoGridSplitter.DragCompleted,
|
||||||
|
Sub()
|
||||||
|
DynamicGridModule.SaveDrawGridLayout(DrawGrid, "Info", If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||||
|
End Sub
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Imports EgtUILib
|
Imports System.IO
|
||||||
|
|
||||||
Public Class DrawOptionPanelVM
|
Public Class DrawOptionPanelVM
|
||||||
Inherits ViewModelBase
|
Inherits ViewModelBase
|
||||||
@@ -37,6 +37,28 @@ Public Class DrawOptionPanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_ManageLayerRowIsExpanded As Boolean = True
|
||||||
|
Public ReadOnly Property ManageLayerRowIsExpanded As Boolean
|
||||||
|
Get
|
||||||
|
Return m_ManageLayerRowIsExpanded
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetManageLayerRowIsExpanded(value As Boolean)
|
||||||
|
m_ManageLayerRowIsExpanded = value
|
||||||
|
OnPropertyChanged("ManageLayerRowIsExpanded")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_InfoRowIsExpanded As Boolean = True
|
||||||
|
Public ReadOnly Property InfoRowIsExpanded As Boolean
|
||||||
|
Get
|
||||||
|
Return m_InfoRowIsExpanded
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetInfoRowIsExpanded(value As Boolean)
|
||||||
|
m_InfoRowIsExpanded = value
|
||||||
|
OnPropertyChanged("InfoRowIsExpanded")
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
@@ -60,4 +82,93 @@ Public Class DrawOptionPanelVM
|
|||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
#Region "DEPENCY PROPERTY"
|
||||||
|
|
||||||
|
Public Shared ReadOnly RowIdProperty As DependencyProperty =
|
||||||
|
DependencyProperty.RegisterAttached(
|
||||||
|
"RowId",
|
||||||
|
GetType(String),
|
||||||
|
GetType(DrawOptionPanelVM),
|
||||||
|
New PropertyMetadata(Nothing)
|
||||||
|
)
|
||||||
|
|
||||||
|
Public Shared Sub SetRowId(element As DependencyObject, value As String)
|
||||||
|
element.SetValue(RowIdProperty, value)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Function GetRowId(element As DependencyObject) As String
|
||||||
|
Return CType(element.GetValue(RowIdProperty), String)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared ReadOnly IsExpandedProperty As DependencyProperty =
|
||||||
|
DependencyProperty.RegisterAttached(
|
||||||
|
"IsExpanded",
|
||||||
|
GetType(Boolean),
|
||||||
|
GetType(DrawOptionPanelVM),
|
||||||
|
New PropertyMetadata(True, AddressOf OnIsExpandedChanged)
|
||||||
|
)
|
||||||
|
|
||||||
|
Public Shared Sub SetIsExpanded(element As DependencyObject, value As Boolean)
|
||||||
|
element.SetValue(IsExpandedProperty, value)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Function GetIsExpanded(element As DependencyObject) As Boolean
|
||||||
|
Return CType(element.GetValue(IsExpandedProperty), Boolean)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetTargetSplitter(d As DependencyObject) As GridSplitter
|
||||||
|
Return CType(d.GetValue(TargetSplitterProperty), GridSplitter)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Sub SetTargetSplitter(d As DependencyObject, value As GridSplitter)
|
||||||
|
d.SetValue(TargetSplitterProperty, value)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared ReadOnly TargetSplitterProperty As DependencyProperty =
|
||||||
|
DependencyProperty.RegisterAttached(
|
||||||
|
"TargetSplitter",
|
||||||
|
GetType(GridSplitter),
|
||||||
|
GetType(DrawOptionPanelVM),
|
||||||
|
New PropertyMetadata(Nothing)
|
||||||
|
)
|
||||||
|
|
||||||
|
Private Shared Sub OnIsExpandedChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
|
||||||
|
Dim row As RowDefinition = TryCast(d, RowDefinition)
|
||||||
|
If IsNothing(row) Then Return
|
||||||
|
|
||||||
|
Dim isExpanded As Boolean = CBool(e.NewValue)
|
||||||
|
|
||||||
|
Dim splitter = DrawOptionPanelVM.GetTargetSplitter(row)
|
||||||
|
If splitter IsNot Nothing Then
|
||||||
|
splitter.IsEnabled = isExpanded
|
||||||
|
splitter.Visibility = If(isExpanded, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim rowId As String = GetRowId(row)
|
||||||
|
Dim rowHeight As Double = 0
|
||||||
|
|
||||||
|
If rowId = "ManageLayer" Then
|
||||||
|
rowHeight = 400
|
||||||
|
ElseIf rowId = "Info" Then
|
||||||
|
rowHeight = 150
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not isExpanded Then
|
||||||
|
row.ClearValue(RowDefinition.HeightProperty)
|
||||||
|
|
||||||
|
row.Height = New GridLength(1, GridUnitType.Auto)
|
||||||
|
row.MinHeight = 0
|
||||||
|
Else
|
||||||
|
If File.Exists(Map.refMainWindowVM.DimensionDir) Then
|
||||||
|
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||||
|
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||||
|
Map.refDrawOptionPanelV.DrawGrid.UpdateLayout()
|
||||||
|
Else
|
||||||
|
row.Height = New GridLength(rowHeight)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Depency Property
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -18,6 +18,7 @@ Public Class EstimationsExpanderVM
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If value <> m_Estimation_IsExpanded Then
|
If value <> m_Estimation_IsExpanded Then
|
||||||
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.ESTIMATIONS, value)
|
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.ESTIMATIONS, value)
|
||||||
|
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -138,7 +139,7 @@ Public Class EstimationsExpanderVM
|
|||||||
If Not String.IsNullOrEmpty(sCurrFilePath) Then
|
If Not String.IsNullOrEmpty(sCurrFilePath) Then
|
||||||
sInfo = "EgtCAM5 - " & sCurrFilePath
|
sInfo = "EgtCAM5 - " & sCurrFilePath
|
||||||
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sEstFile) AndAlso Not String.IsNullOrWhiteSpace(sEstFile) Then
|
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sEstFile) AndAlso Not String.IsNullOrWhiteSpace(sEstFile) Then
|
||||||
sEstFile = Path.ChangeExtension(Path.GetDirectoryName(sCurrFilePath) & "\" & sEstFile, ".html")
|
sEstFile = Path.ChangeExtension(Path.GetDirectoryName(sCurrFilePath) & "\" & Path.GetFileName( sEstFile), ".html")
|
||||||
Else
|
Else
|
||||||
sEstFile = Path.ChangeExtension(sCurrFilePath, Nothing)
|
sEstFile = Path.ChangeExtension(sCurrFilePath, Nothing)
|
||||||
If IniFile.m_bMachiningGroup Then
|
If IniFile.m_bMachiningGroup Then
|
||||||
@@ -177,12 +178,17 @@ Public Class EstimationsExpanderVM
|
|||||||
If Not bOk Then Return False
|
If Not bOk Then Return False
|
||||||
' Calcolo della stima
|
' Calcolo della stima
|
||||||
If Not EgtEstimate(sEstFile, sInfo) Then
|
If Not EgtEstimate(sEstFile, sInfo) Then
|
||||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
|
||||||
|
If nErr = 1000 Then
|
||||||
|
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr = 1001 Then
|
||||||
|
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr <> 0 Then
|
||||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||||
sErr = sErr.Replace("Cnc", "Est")
|
sErr = sErr.Replace("Cnc", "Est")
|
||||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||||
Else
|
Else
|
||||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 17), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(EgtMsg(5317), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
End If
|
End If
|
||||||
bOk = False
|
bOk = False
|
||||||
End If
|
End If
|
||||||
|
|||||||
+15
-19
@@ -94,26 +94,18 @@ Public Class MachiningTreeExpanderVM
|
|||||||
' Sposto la lavorazione aggiunta subito dopo quella appena selezionata
|
' Sposto la lavorazione aggiunta subito dopo quella appena selezionata
|
||||||
EgtRelocate(MachiningId, nSelectedOperationId, GDB_POS.AFTER)
|
EgtRelocate(MachiningId, nSelectedOperationId, GDB_POS.AFTER)
|
||||||
End If
|
End If
|
||||||
' Recupero geometria correntemente selezionata e la metto in un vettore
|
' Imposto geometria da lavorare (tutta quella selezionata)
|
||||||
Dim SelectedEntities As New List(Of Integer)
|
Dim vId(EgtGetSelectedObjCount() - 1) As Integer
|
||||||
Dim EntityId As Integer = EgtGetFirstSelectedObj()
|
Dim vSub(EgtGetSelectedObjCount() - 1) As Integer
|
||||||
While EntityId <> GDB_ID.NULL
|
Dim nInd As Integer = 0
|
||||||
SelectedEntities.Add(EntityId)
|
Dim EntId As Integer = EgtGetFirstSelectedObj()
|
||||||
EntityId = EgtGetNextSelectedObj()
|
While EntId <> GDB_ID.NULL
|
||||||
|
vId(nInd) = EntId
|
||||||
|
SelData.GetSubFromId( EntId, vSub(nInd))
|
||||||
|
nInd += 1
|
||||||
|
EntId = EgtGetNextSelectedObj()
|
||||||
End While
|
End While
|
||||||
' Imposto l'operazione appena creata come corrente
|
EgtSetMachiningGeometry(vId, vSub)
|
||||||
EgtSetCurrMachining(MachiningId)
|
|
||||||
' Gestione speciale per superfici ( si aggiunge l'identificazione della faccia)
|
|
||||||
If SelectedEntities.Count() > 0 AndAlso EgtGetType(SelectedEntities(0)) = GDB_TY.SRF_MESH Then
|
|
||||||
Dim vId() As Integer = Nothing
|
|
||||||
Dim vSub() As Integer = Nothing
|
|
||||||
SelData.GetAllIdSub(vId, vSub)
|
|
||||||
EgtSetMachiningGeometry(vId, vSub)
|
|
||||||
' Gestione standard per altre entità (curve, regioni, ...)
|
|
||||||
Else
|
|
||||||
' Imposto il vettore come geometria di lavorazione
|
|
||||||
EgtSetMachiningGeometry(SelectedEntities.ToArray)
|
|
||||||
End If
|
|
||||||
' Calcolo la lavorazione con la nuova geometria
|
' Calcolo la lavorazione con la nuova geometria
|
||||||
EgtApplyMachining(True)
|
EgtApplyMachining(True)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -150,6 +142,10 @@ Public Class MachiningTreeExpanderVM
|
|||||||
Return EgtMsg(MSG_MACHININGSDBPAGE + 11)
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 11)
|
||||||
Case MCH_MY.WATERJETTING
|
Case MCH_MY.WATERJETTING
|
||||||
Return EgtMsg(MSG_MACHININGSDBPAGE + 12)
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 12)
|
||||||
|
Case MCH_MY.FIVEAXISMILLING
|
||||||
|
Return EgtMsg(31213)
|
||||||
|
Case MCH_MY.PROBING
|
||||||
|
Return EgtMsg(31220)
|
||||||
Case Else
|
Case Else
|
||||||
Return "Mach"
|
Return "Mach"
|
||||||
End Select
|
End Select
|
||||||
|
|||||||
+59
-5
@@ -1,4 +1,6 @@
|
|||||||
Imports EgtUILib
|
Imports System.ComponentModel
|
||||||
|
Imports System.Globalization
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class DispositionParameterExpanderVM
|
Public Class DispositionParameterExpanderVM
|
||||||
Inherits ViewModelBase
|
Inherits ViewModelBase
|
||||||
@@ -273,7 +275,7 @@ Public Class DispositionParameterExpanderVM
|
|||||||
End If
|
End If
|
||||||
Select Case m_ActiveObject
|
Select Case m_ActiveObject
|
||||||
Case ObjectType.RAWPART
|
Case ObjectType.RAWPART
|
||||||
' Abilito la selezione delle Fixture
|
' Abilito la selezione dei Grezzi
|
||||||
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPART
|
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPART
|
||||||
Case ObjectType.FIXTURE
|
Case ObjectType.FIXTURE
|
||||||
' Abilito la selezione delle Fixture
|
' Abilito la selezione delle Fixture
|
||||||
@@ -281,6 +283,7 @@ Public Class DispositionParameterExpanderVM
|
|||||||
End Select
|
End Select
|
||||||
Map.refRawPartOptionVM.SetMoveWithFixture(False)
|
Map.refRawPartOptionVM.SetMoveWithFixture(False)
|
||||||
Map.refFixtureParametersVM.UpdateFixtureTypeList()
|
Map.refFixtureParametersVM.UpdateFixtureTypeList()
|
||||||
|
DispositionUtility.InitHookData()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
@@ -310,12 +313,16 @@ Public Class DispositionParameterExpanderVM
|
|||||||
' se movimento di traslazione
|
' se movimento di traslazione
|
||||||
If m_MoveIsChecked Then
|
If m_MoveIsChecked Then
|
||||||
Dim InputPoint As New Point3d(0, 0, 0)
|
Dim InputPoint As New Point3d(0, 0, 0)
|
||||||
|
Dim dSupp As Double = -1
|
||||||
Dim Values() As String = m_InputValue.Split(","c)
|
Dim Values() As String = m_InputValue.Split(","c)
|
||||||
If Values.Count = 2 Then
|
If Values.Count >= 2 Then
|
||||||
StringToLen(Values(0), InputPoint.x)
|
StringToLen(Values(0), InputPoint.x)
|
||||||
StringToLen(Values(1), InputPoint.y)
|
StringToLen(Values(1), InputPoint.y)
|
||||||
|
If Values.Count >= 3 Then
|
||||||
|
StringToLen(Values(2), dSupp)
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
m_InputErrorMsg = "Il valore non è una cordinata XY"
|
m_InputErrorMsg = "Il valore non è un punto X,Y"
|
||||||
OnPropertyChanged("InputErrorMsg")
|
OnPropertyChanged("InputErrorMsg")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
@@ -328,13 +335,44 @@ Public Class DispositionParameterExpanderVM
|
|||||||
' imposto il riferimento della tavola
|
' imposto il riferimento della tavola
|
||||||
Dim ptTableRef As Point3d
|
Dim ptTableRef As Point3d
|
||||||
EgtGetTableRef(1, ptTableRef)
|
EgtGetTableRef(1, ptTableRef)
|
||||||
' calcolo il punto del grezzo da posizionar nelle coordinate di input
|
' calcolo il punto del grezzo da posizionare nelle coordinate di input
|
||||||
Dim ptRawRefPoint As Point3d = DispositionUtility.GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition)
|
Dim ptRawRefPoint As Point3d = DispositionUtility.GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition)
|
||||||
' creo un punto con le coordinate di input espresse rispetto alla tavola
|
' creo un punto con le coordinate di input espresse rispetto alla tavola
|
||||||
Dim TableRefInputPoint As New Point3d(InputPoint)
|
Dim TableRefInputPoint As New Point3d(InputPoint)
|
||||||
TableRefInputPoint.LocToLoc(EgtGetGridFrame(), New Frame3d(ptTableRef))
|
TableRefInputPoint.LocToLoc(EgtGetGridFrame(), New Frame3d(ptTableRef))
|
||||||
' calcolo il vettore di spostamento del grezzo
|
' calcolo il vettore di spostamento del grezzo
|
||||||
vtMove = TableRefInputPoint - ptRawRefPoint
|
vtMove = TableRefInputPoint - ptRawRefPoint
|
||||||
|
vtMove.z = 0
|
||||||
|
' verifico ed aggiusto eventuale supporto
|
||||||
|
Dim dOldSupp As Double = 0
|
||||||
|
Dim nOldSuppId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, SUPPORT)
|
||||||
|
If nOldSuppId <> GDB_ID.NULL Then
|
||||||
|
Dim bboxSupport As New BBox3d
|
||||||
|
EgtGetBBoxGlob(nOldSuppId, GDB_BB.STANDARD, bboxSupport)
|
||||||
|
dOldSupp = bboxSupport.DimZ()
|
||||||
|
End If
|
||||||
|
If dSupp > -EPS_SMALL AndAlso Math.Abs( dSupp - dOldSupp) > EPS_SMALL Then
|
||||||
|
' da cancellare
|
||||||
|
If dSupp < EPS_SMALL Then
|
||||||
|
EgtErase( nOldSuppId)
|
||||||
|
vtMove.z = dSupp - dOldSupp
|
||||||
|
' da creare o modificare
|
||||||
|
Else
|
||||||
|
EgtErase( nOldSuppId)
|
||||||
|
Dim nNewSuppId As Integer = GDB_ID.NULL
|
||||||
|
Dim nRawOutLnId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, RAWOUTLINE)
|
||||||
|
If nRawOutLnId <> GDB_ID.NULL Then
|
||||||
|
Dim vtExtr As New Vector3d( 0, 0, -dSupp)
|
||||||
|
nNewSuppId = EgtCreateSurfTmByRegionExtrusion( nFirstSelectedId, 1, {nRawOutLnId}, vtExtr, 0.05, GDB_RT.GLOB)
|
||||||
|
End If
|
||||||
|
If nNewSuppId <> GDB_ID.NULL Then
|
||||||
|
EgtSetName( nNewSuppId, SUPPORT)
|
||||||
|
EgtSetColor( nNewSuppId, New Color3d(150, 75, 0))
|
||||||
|
If nOldSuppId <> GDB_ID.NULL Then EgtChangeId( nNewSuppId, nOldSuppId)
|
||||||
|
vtMove.z = dSupp - dOldSupp
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
' se è una ventosa
|
' se è una ventosa
|
||||||
ElseIf EgtVerifyFixture(nFirstSelectedId) Then
|
ElseIf EgtVerifyFixture(nFirstSelectedId) Then
|
||||||
Dim SelObjFrame3d As New Frame3d(Frame3d.GLOB)
|
Dim SelObjFrame3d As New Frame3d(Frame3d.GLOB)
|
||||||
@@ -433,8 +471,24 @@ Public Class DispositionParameterExpanderVM
|
|||||||
''' Execute the Point. This method is invoked by the DoneCommand.
|
''' Execute the Point. This method is invoked by the DoneCommand.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub CheckedRawRef(ByVal param As Object)
|
Public Sub CheckedRawRef(ByVal param As Object)
|
||||||
|
' Assegno corner di riferimento
|
||||||
Dim nRawRef As MCH_CR = DirectCast(param, MCH_CR)
|
Dim nRawRef As MCH_CR = DirectCast(param, MCH_CR)
|
||||||
m_RawRefPosition = nRawRef
|
m_RawRefPosition = nRawRef
|
||||||
|
' Se grezzo selezionato, visualizzo sua posizione
|
||||||
|
Dim nFirstSelectedId As Integer = EgtGetFirstSelectedObj()
|
||||||
|
If EgtVerifyRawPartCurrPhase(nFirstSelectedId) Then
|
||||||
|
Dim ptR As Point3d = DispositionUtility.GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition)
|
||||||
|
Dim sSupp As String = ""
|
||||||
|
Dim nSuppId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, SUPPORT)
|
||||||
|
If nSuppId <> GDB_ID.NULL Then
|
||||||
|
Dim bboxSupport As New BBox3d
|
||||||
|
EgtGetBBoxGlob(nSuppId, GDB_BB.STANDARD, bboxSupport)
|
||||||
|
Dim dSupp As Double = bboxSupport.DimZ()
|
||||||
|
sSupp = "," & LenToString( dSupp, 2)
|
||||||
|
End If
|
||||||
|
m_InputValue = LenToString( ptR.x, 2) & "," & LenToString( ptR.y, 2) & sSupp
|
||||||
|
OnPropertyChanged( "InputValue")
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CheckedRawRefCommand
|
#End Region ' CheckedRawRefCommand
|
||||||
|
|||||||
+685
-389
File diff suppressed because it is too large
Load Diff
+204
-144
@@ -5,8 +5,6 @@ Imports EgtUILib
|
|||||||
Public Class FixtureParametersVM
|
Public Class FixtureParametersVM
|
||||||
Inherits ViewModelBase
|
Inherits ViewModelBase
|
||||||
|
|
||||||
Friend Const USED As String = "USED"
|
|
||||||
|
|
||||||
Private m_FixtureTypeList As ObservableCollection(Of FixtureListItem)
|
Private m_FixtureTypeList As ObservableCollection(Of FixtureListItem)
|
||||||
Public ReadOnly Property FixtureTypeList As ObservableCollection(Of FixtureListItem)
|
Public ReadOnly Property FixtureTypeList As ObservableCollection(Of FixtureListItem)
|
||||||
Get
|
Get
|
||||||
@@ -64,8 +62,8 @@ Public Class FixtureParametersVM
|
|||||||
Dim nUsedFixtureId As Integer = EgtGetFirstFixture()
|
Dim nUsedFixtureId As Integer = EgtGetFirstFixture()
|
||||||
While nUsedFixtureId <> GDB_ID.NULL
|
While nUsedFixtureId <> GDB_ID.NULL
|
||||||
Dim sUsedFixtureName As String = String.Empty
|
Dim sUsedFixtureName As String = String.Empty
|
||||||
|
EgtGetName(nUsedFixtureId, sUsedFixtureName)
|
||||||
For Index = 0 To m_FixtureTypeList.Count - 1
|
For Index = 0 To m_FixtureTypeList.Count - 1
|
||||||
EgtGetName(nUsedFixtureId, sUsedFixtureName)
|
|
||||||
If sUsedFixtureName = m_FixtureTypeList(Index).Name Then
|
If sUsedFixtureName = m_FixtureTypeList(Index).Name Then
|
||||||
Dim CurrFixtureType As FixtureType = DirectCast(m_FixtureTypeList(Index), FixtureType)
|
Dim CurrFixtureType As FixtureType = DirectCast(m_FixtureTypeList(Index), FixtureType)
|
||||||
CurrFixtureType.UsedNumber += 1
|
CurrFixtureType.UsedNumber += 1
|
||||||
@@ -78,6 +76,7 @@ Public Class FixtureParametersVM
|
|||||||
|
|
||||||
Friend Sub UpdateFixtureTypeList()
|
Friend Sub UpdateFixtureTypeList()
|
||||||
m_FixtureTypeList = New ObservableCollection(Of FixtureListItem)(FixtureType.ReadFixtureTypeFromMachIni())
|
m_FixtureTypeList = New ObservableCollection(Of FixtureListItem)(FixtureType.ReadFixtureTypeFromMachIni())
|
||||||
|
UpdateFixtureCount()
|
||||||
OnPropertyChanged("FixtureTypeList")
|
OnPropertyChanged("FixtureTypeList")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -122,27 +121,36 @@ Public Class FixtureParametersVM
|
|||||||
OnPropertyChanged("FixtureErrorMsg")
|
OnPropertyChanged("FixtureErrorMsg")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
' dimensioni tavola
|
||||||
|
Dim vtTabDim As Vector3d = ptTableMax - ptTableMin
|
||||||
' calcolo il centro della tavola
|
' calcolo il centro della tavola
|
||||||
Dim ptTableMid As New Point3d((ptTableMax.x - ptTableMin.x) / 2, (ptTableMax.y - ptTableMin.y) / 2, (ptTableMax.z - ptTableMin.z) / 2)
|
Dim ptTableMid As Point3d = Point3d.ORIG() + 0.5 * vtTabDim
|
||||||
' posiziono il nuovo sottopezzo al centro della tavola
|
' posiziono il nuovo sottopezzo al centro della tavola
|
||||||
Dim nAddedFixtureId As Integer = EgtAddFixture(SelectedFixture.Name, ptTableMid, 0, 0)
|
Dim nAddedFixtureId As Integer = EgtAddFixture(SelectedFixture.Name, ptTableMid, 0, 20)
|
||||||
If nAddedFixtureId = GDB_ID.NULL Then
|
If nAddedFixtureId = GDB_ID.NULL Then
|
||||||
m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
|
m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
|
||||||
OnPropertyChanged("FixtureErrorMsg")
|
OnPropertyChanged("FixtureErrorMsg")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' verifico se la ventosa ha punti di hook da ancorare
|
' Se la ventosa ha punti di hook da ancorare
|
||||||
If IsFixtureWithHook(nAddedFixtureId) Then
|
If IsFixtureWithHook(nAddedFixtureId) Then
|
||||||
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
|
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
|
||||||
' non ci sono punti liberi, quindi rimuovo la ventosa e segnalo
|
EgtMoveFixture( nAddedFixtureId, 0.2 * vtTabDim.y * Vector3d.Y_AX())
|
||||||
EgtRemoveFixture(nAddedFixtureId)
|
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
|
||||||
MessageBox.Show("No free hook point!", "ERROR")
|
EgtMoveFixture( nAddedFixtureId, 0.2 * vtTabDim.y * Vector3d.Y_AX())
|
||||||
Return
|
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
|
||||||
|
' non ci sono punti liberi, quindi rimuovo la ventosa e segnalo
|
||||||
|
EgtRemoveFixture(nAddedFixtureId)
|
||||||
|
EgtSetFixtureLink( nAddedFixtureId, "")
|
||||||
|
MessageBox.Show("No free hook point!", "ERROR")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
' altrimenti ventosa con movimento continuo
|
||||||
Else
|
Else
|
||||||
' se non ha punti di ancoraggio
|
' verifico se è in una posizione valida
|
||||||
' verifico se è in una posizione valida
|
If Not DispositionUtility.VerifyFixturePosition(nAddedFixtureId, New Vector3d) Then
|
||||||
If Not DispositionUtility.VerifyFixturePosition(nAddedFixtureId, New Vector3d) Then
|
|
||||||
' se non trovo una posizione valida, esco
|
' se non trovo una posizione valida, esco
|
||||||
If Not SearchOkFixturePosition(nAddedFixtureId, ptTableMin, ptTableMax, ptTableMid) Then
|
If Not SearchOkFixturePosition(nAddedFixtureId, ptTableMin, ptTableMax, ptTableMid) Then
|
||||||
Return
|
Return
|
||||||
@@ -157,76 +165,76 @@ Public Class FixtureParametersVM
|
|||||||
|
|
||||||
' Funzione che cerca una posizione valida per la ventosa libera di muoversi
|
' Funzione che cerca una posizione valida per la ventosa libera di muoversi
|
||||||
Private Function SearchOkFixturePosition(nAddedFixtureId As Integer, ptTableMin As Point3d, ptTableMax As Point3d, ptTableMid As Point3d) As Boolean
|
Private Function SearchOkFixturePosition(nAddedFixtureId As Integer, ptTableMin As Point3d, ptTableMax As Point3d, ptTableMid As Point3d) As Boolean
|
||||||
' creo un gruppo temporaneo
|
' creo un gruppo temporaneo
|
||||||
Dim nTempGroupId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nTempGroupId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
EgtSetLevel(nTempGroupId, GDB_LV.USER)
|
EgtSetLevel(nTempGroupId, GDB_LV.USER)
|
||||||
EgtSetMode(nTempGroupId, GDB_MD.STD)
|
EgtSetMode(nTempGroupId, GDB_MD.STD)
|
||||||
' calcolo ingombro sottopezzo aggiunto
|
' calcolo ingombro sottopezzo aggiunto
|
||||||
Dim bboxAddedFixture As New BBox3d
|
Dim bboxAddedFixture As New BBox3d
|
||||||
EgtGetBBoxGlob(nAddedFixtureId, GDB_BB.STANDARD, bboxAddedFixture)
|
EgtGetBBoxGlob(nAddedFixtureId, GDB_BB.STANDARD, bboxAddedFixture)
|
||||||
' calcolo bbox tavolo
|
' calcolo bbox tavolo
|
||||||
Dim bboxTableArea As New BBox3d(ptTableMin, ptTableMax)
|
Dim bboxTableArea As New BBox3d(ptTableMin, ptTableMax)
|
||||||
bboxTableArea.Expand(-bboxAddedFixture.DimX / 2, -bboxAddedFixture.DimY / 2, 0)
|
bboxTableArea.Expand(-bboxAddedFixture.DimX / 2, -bboxAddedFixture.DimY / 2, 0)
|
||||||
' creo superficie delle misure della tavola
|
' creo superficie delle misure della tavola
|
||||||
Dim nTableFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, bboxTableArea.Min, bboxTableArea.Max)
|
Dim nTableFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, bboxTableArea.Min, bboxTableArea.Max)
|
||||||
' ciclo su tutti i pezzi di questa fase
|
' ciclo su tutti i pezzi di questa fase
|
||||||
Dim nFixtureId As Integer = EgtGetFirstFixture()
|
Dim nFixtureId As Integer = EgtGetFirstFixture()
|
||||||
While nFixtureId <> GDB_ID.NULL
|
While nFixtureId <> GDB_ID.NULL
|
||||||
' creo il bbox del sottopezzo
|
' creo il bbox del sottopezzo
|
||||||
Dim bboxFixture As New BBox3d
|
Dim bboxFixture As New BBox3d
|
||||||
EgtGetBBoxGlob(nFixtureId, GDB_BB.STANDARD, bboxFixture)
|
EgtGetBBoxGlob(nFixtureId, GDB_BB.STANDARD, bboxFixture)
|
||||||
' faccio offset del bbox del sottopezzo per includere metà del sottopezzo da aggiungere
|
' faccio offset del bbox del sottopezzo per includere metà del sottopezzo da aggiungere
|
||||||
bboxFixture.Expand(bboxAddedFixture.DimX / 2, bboxAddedFixture.DimY / 2, 0)
|
bboxFixture.Expand(bboxAddedFixture.DimX / 2, bboxAddedFixture.DimY / 2, 0)
|
||||||
' lo porto all'altezza della tavola
|
' lo porto all'altezza della tavola
|
||||||
Dim ptMinFixtureFr As New Point3d(bboxFixture.Min)
|
Dim ptMinFixtureFr As New Point3d(bboxFixture.Min)
|
||||||
Dim ptMaxFixtureFr As New Point3d(bboxFixture.Max)
|
Dim ptMaxFixtureFr As New Point3d(bboxFixture.Max)
|
||||||
ptMinFixtureFr.z = ptTableMin.z
|
ptMinFixtureFr.z = ptTableMin.z
|
||||||
ptMaxFixtureFr.z = ptTableMin.z
|
ptMaxFixtureFr.z = ptTableMin.z
|
||||||
' creo la regione occupata dal bbox del sottopezzo
|
' creo la regione occupata dal bbox del sottopezzo
|
||||||
Dim nFixtureFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, ptMinFixtureFr, ptMaxFixtureFr)
|
Dim nFixtureFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, ptMinFixtureFr, ptMaxFixtureFr)
|
||||||
' sottraggo la regione del sottopezzo da quella della tavola
|
' sottraggo la regione del sottopezzo da quella della tavola
|
||||||
Dim x = EgtSurfFrSubtract(nTableFrId, nFixtureFrId)
|
Dim x = EgtSurfFrSubtract(nTableFrId, nFixtureFrId)
|
||||||
nFixtureId = EgtGetNextFixture(nFixtureId)
|
nFixtureId = EgtGetNextFixture(nFixtureId)
|
||||||
End While
|
End While
|
||||||
' creo gruppo con i bordi della regione di tavola avanzata
|
' creo gruppo con i bordi della regione di tavola avanzata
|
||||||
Dim TableFrBorderGroupId As Integer = EgtCreateGroup(nTempGroupId)
|
Dim TableFrBorderGroupId As Integer = EgtCreateGroup(nTempGroupId)
|
||||||
Dim nTableFrBorderCount As Integer = 0
|
Dim nTableFrBorderCount As Integer = 0
|
||||||
Dim nChunk As Integer = EgtSurfFrChunkCount(nTableFrId)
|
Dim nChunk As Integer = EgtSurfFrChunkCount(nTableFrId)
|
||||||
For Index = 0 To nChunk - 1
|
For Index = 0 To nChunk - 1
|
||||||
EgtExtractSurfFrChunkLoops(nTableFrId, Index, TableFrBorderGroupId, nTableFrBorderCount)
|
EgtExtractSurfFrChunkLoops(nTableFrId, Index, TableFrBorderGroupId, nTableFrBorderCount)
|
||||||
Next
|
Next
|
||||||
' verifico se c'è almeno un bordo
|
' verifico se c'è almeno un bordo
|
||||||
If nTableFrBorderCount = 0 Then
|
If nTableFrBorderCount = 0 Then
|
||||||
m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
|
m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
|
||||||
OnPropertyChanged("FixtureErrorMsg")
|
OnPropertyChanged("FixtureErrorMsg")
|
||||||
Return False
|
Return False
|
||||||
|
End If
|
||||||
|
' converto il punto medio della tavola in coordinate globali
|
||||||
|
Dim PtTableRef As Point3d
|
||||||
|
EgtGetTableRef(1, PtTableRef)
|
||||||
|
Dim frTableRef As New Frame3d(PtTableRef)
|
||||||
|
ptTableMid.ToGlob(frTableRef)
|
||||||
|
' ciclo sui bordi per trovare il punto più vicino
|
||||||
|
Dim dMinDist As Double = (bboxTableArea.Max - bboxTableArea.Min).SqLenXY
|
||||||
|
Dim ptMinAbs As Point3d
|
||||||
|
Dim BorderId As Integer = EgtGetFirstInGroup(TableFrBorderGroupId)
|
||||||
|
While BorderId <> GDB_ID.NULL
|
||||||
|
Dim dDist As Double = 0
|
||||||
|
Dim ptMinRel As Point3d
|
||||||
|
Dim nSide As Integer = 0
|
||||||
|
EgtPointCurveDistSide(ptTableMid, BorderId, Vector3d.Z_AX, GDB_ID.ROOT, dDist, ptMinRel, nSide)
|
||||||
|
If dDist < dMinDist Then
|
||||||
|
dMinDist = dDist
|
||||||
|
ptMinAbs = ptMinRel
|
||||||
End If
|
End If
|
||||||
' converto il punto medio della tavola in coordinate globali
|
BorderId = EgtGetNext(BorderId)
|
||||||
Dim PtTableRef As Point3d
|
End While
|
||||||
EgtGetTableRef(1, PtTableRef)
|
' sposto il sottopezzo nel punto trovato
|
||||||
Dim frTableRef As New Frame3d(PtTableRef)
|
Dim vtFixtureMove As Vector3d = ptMinAbs - ptTableMid
|
||||||
ptTableMid.ToGlob(frTableRef)
|
vtFixtureMove.z = 0
|
||||||
' ciclo sui bordi per trovare il punto più vicino
|
EgtMoveFixture(nAddedFixtureId, vtFixtureMove)
|
||||||
Dim dMinDist As Double = (bboxTableArea.Max - bboxTableArea.Min).SqLenXY
|
' cancello il gruppo temporaneo
|
||||||
Dim ptMinAbs As Point3d
|
EgtErase(nTempGroupId)
|
||||||
Dim BorderId As Integer = EgtGetFirstInGroup(TableFrBorderGroupId)
|
|
||||||
While BorderId <> GDB_ID.NULL
|
|
||||||
Dim dDist As Double = 0
|
|
||||||
Dim ptMinRel As Point3d
|
|
||||||
Dim nSide As Integer = 0
|
|
||||||
EgtPointCurveDistSide(ptTableMid, BorderId, Vector3d.Z_AX, GDB_ID.ROOT, dDist, ptMinRel, nSide)
|
|
||||||
If dDist < dMinDist Then
|
|
||||||
dMinDist = dDist
|
|
||||||
ptMinAbs = ptMinRel
|
|
||||||
End If
|
|
||||||
BorderId = EgtGetNext(BorderId)
|
|
||||||
End While
|
|
||||||
' sposto il sottopezzo nel punto trovato
|
|
||||||
Dim vtFixtureMove As Vector3d = ptMinAbs - ptTableMid
|
|
||||||
vtFixtureMove.z = 0
|
|
||||||
EgtMoveFixture(nAddedFixtureId, vtFixtureMove)
|
|
||||||
' cancello il gruppo temporaneo
|
|
||||||
EgtErase(nTempGroupId)
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -239,9 +247,7 @@ Public Class FixtureParametersVM
|
|||||||
' leggo tipo
|
' leggo tipo
|
||||||
Dim sType As String = ""
|
Dim sType As String = ""
|
||||||
EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType)
|
EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType)
|
||||||
If sType.Equals(DispositionUtility.FREE) Then
|
If sType.Equals(DispositionUtility.POINT) Then
|
||||||
Return False
|
|
||||||
ElseIf sType.Equals(DispositionUtility.POINT) Then
|
|
||||||
Return True
|
Return True
|
||||||
ElseIf sType.Equals(DispositionUtility.LINE) Then
|
ElseIf sType.Equals(DispositionUtility.LINE) Then
|
||||||
Return True
|
Return True
|
||||||
@@ -250,7 +256,7 @@ Public Class FixtureParametersVM
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' Funzione che aggancia la ventosa al più vicino hook libero
|
' Funzione che cerca un hook libero adatto alla ventosa e se trovato la posiziona
|
||||||
Friend Shared Function PositionFixtureOnNearestHook(nFixtureId As Integer) As Boolean
|
Friend Shared Function PositionFixtureOnNearestHook(nFixtureId As Integer) As Boolean
|
||||||
' cerco punto hook sulla ventosa
|
' cerco punto hook sulla ventosa
|
||||||
Dim nFixtSolidId As Integer = EgtGetFirstNameInGroup(nFixtureId, SOLID)
|
Dim nFixtSolidId As Integer = EgtGetFirstNameInGroup(nFixtureId, SOLID)
|
||||||
@@ -262,26 +268,21 @@ Public Class FixtureParametersVM
|
|||||||
Dim nFixtHookType As DispositionUtility.HOOKTYPE = DispositionUtility.HOOKTYPE.FREE
|
Dim nFixtHookType As DispositionUtility.HOOKTYPE = DispositionUtility.HOOKTYPE.FREE
|
||||||
Dim sType As String = ""
|
Dim sType As String = ""
|
||||||
EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType)
|
EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType)
|
||||||
If sType.Equals(DispositionUtility.FREE) Then
|
If sType.Equals(DispositionUtility.POINT) Then
|
||||||
nFixtHookType = DispositionUtility.HOOKTYPE.FREE
|
|
||||||
' esco perchè non devo cercare alcun punto
|
|
||||||
Return True
|
|
||||||
ElseIf sType.Equals(DispositionUtility.POINT) Then
|
|
||||||
nFixtHookType = DispositionUtility.HOOKTYPE.POINT
|
nFixtHookType = DispositionUtility.HOOKTYPE.POINT
|
||||||
ElseIf sType.Equals(DispositionUtility.LINE) Then
|
ElseIf sType.Equals(DispositionUtility.LINE) Then
|
||||||
nFixtHookType = DispositionUtility.HOOKTYPE.LINE
|
nFixtHookType = DispositionUtility.HOOKTYPE.LINE
|
||||||
Else
|
Else
|
||||||
nFixtHookType = DispositionUtility.HOOKTYPE.FREE
|
|
||||||
' esco perchè non devo cercare alcun punto
|
' esco perchè non devo cercare alcun punto
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
Dim nFixtHookClass As Integer = 0
|
Dim nFixtHookClass As Integer = 0
|
||||||
EgtGetInfo(nFixtHookId, DispositionUtility.CLASS_, nFixtHookClass)
|
EgtGetInfo(nFixtHookId, DispositionUtility.CLASS_, nFixtHookClass)
|
||||||
' cerco id tavola
|
' Recupero Id tavola corrente
|
||||||
Dim sTableName As String = ""
|
Dim sTableName As String = ""
|
||||||
EgtGetTableName(sTableName)
|
EgtGetTableName(sTableName)
|
||||||
Dim nTableId As Integer = EgtGetTableId(sTableName)
|
Dim nTableId As Integer = EgtGetTableId(sTableName)
|
||||||
' cerco hook su tavola macchina
|
' *** Cerco hook su tavola ***
|
||||||
Dim nTableSolidId As Integer = EgtGetFirstNameInGroup(nTableId, SOLID)
|
Dim nTableSolidId As Integer = EgtGetFirstNameInGroup(nTableId, SOLID)
|
||||||
Dim nCurrHookId As Integer = EgtGetFirstNameInGroup(nTableSolidId, DispositionUtility.HOOK)
|
Dim nCurrHookId As Integer = EgtGetFirstNameInGroup(nTableSolidId, DispositionUtility.HOOK)
|
||||||
' Punto di hook a cui spostare la ventosa
|
' Punto di hook a cui spostare la ventosa
|
||||||
@@ -293,33 +294,23 @@ Public Class FixtureParametersVM
|
|||||||
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
|
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
|
||||||
' verifico se è in una posizione valida
|
' verifico se è in una posizione valida
|
||||||
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
|
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
|
||||||
EgtSetInfo(nCurrHookId, used, nFixtureId)
|
If nFixtHookType = DispositionUtility.HOOKTYPE.POINT then
|
||||||
|
DispositionUtility.SetHookUsed( nCurrHookId, nFixtureId)
|
||||||
|
Else
|
||||||
|
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
|
||||||
|
End If
|
||||||
|
EgtSetFixtureLink( nFixtureId, "")
|
||||||
Return True
|
Return True
|
||||||
|
Else
|
||||||
|
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
|
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
|
||||||
End While
|
End While
|
||||||
' cerco hook su barra fissa
|
' *** Cerco hook su barre fisse ***
|
||||||
Dim nTableFixedId As Integer = EgtGetFirstNameInGroup(nTableId, DispositionUtility.FIXED)
|
Dim nTableFixedId As Integer = EgtGetFirstNameInGroup(nTableId, DispositionUtility.FIXED)
|
||||||
nCurrHookId = EgtGetFirstNameInGroup(nTableFixedId, DispositionUtility.HOOK)
|
While nTableFixedId <> GDB_ID.NULL
|
||||||
While nCurrHookId <> GDB_ID.NULL
|
nCurrHookId = EgtGetFirstNameInGroup(nTableFixedId, DispositionUtility.HOOK)
|
||||||
' se punto di aggancio valido
|
|
||||||
If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then
|
|
||||||
' sposto la ventosa
|
|
||||||
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
|
|
||||||
' verifico se è in una posizione valida
|
|
||||||
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
|
|
||||||
EgtSetInfo(nCurrHookId, USED, nFixtureId)
|
|
||||||
Return True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
|
|
||||||
End While
|
|
||||||
' cerco hook su barre mobili
|
|
||||||
Dim nMobileInd As Integer = 1
|
|
||||||
Dim nMobile As Integer = EgtGetFirstNameInGroup(nTableId, DispositionUtility.MOBILE & nMobileInd)
|
|
||||||
While nMobile <> GDB_ID.NULL
|
|
||||||
nCurrHookId = EgtGetFirstNameInGroup(nMobile, DispositionUtility.HOOK)
|
|
||||||
While nCurrHookId <> GDB_ID.NULL
|
While nCurrHookId <> GDB_ID.NULL
|
||||||
' se punto di aggancio valido
|
' se punto di aggancio valido
|
||||||
If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then
|
If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then
|
||||||
@@ -327,46 +318,114 @@ Public Class FixtureParametersVM
|
|||||||
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
|
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
|
||||||
' verifico se è in una posizione valida
|
' verifico se è in una posizione valida
|
||||||
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
|
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
|
||||||
EgtSetInfo(nCurrHookId, USED, nFixtureId)
|
If nFixtHookType = DispositionUtility.HOOKTYPE.POINT then
|
||||||
|
DispositionUtility.SetHookUsed( nCurrHookId, nFixtureId)
|
||||||
|
Else
|
||||||
|
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
|
||||||
|
End If
|
||||||
|
EgtSetFixtureLink( nFixtureId, "")
|
||||||
Return True
|
Return True
|
||||||
|
Else
|
||||||
|
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
|
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
|
||||||
End While
|
End While
|
||||||
nMobileInd += 1
|
nTableFixedId = EgtGetNextName( nTableFixedId, DispositionUtility.FIXED)
|
||||||
nMobile = EgtGetFirstNameInGroup(nTableId, DispositionUtility.MOBILE & nMobileInd)
|
End While
|
||||||
|
' *** Cerco hook su barre mobili ***
|
||||||
|
Dim nBarId As Integer = EgtGetFirstGroupInGroup(nTableId)
|
||||||
|
While nBarId <> GDB_ID.NULL
|
||||||
|
Dim sBarName As String = ""
|
||||||
|
If EgtGetName( nBarId, sBarName) AndAlso EgtGetAxisId( sBarName) <> GDB_ID.NULL Then
|
||||||
|
nCurrHookId = EgtGetFirstNameInGroup(nBarId, DispositionUtility.HOOK)
|
||||||
|
While nCurrHookId <> GDB_ID.NULL
|
||||||
|
' se punto di aggancio valido
|
||||||
|
If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then
|
||||||
|
' sposto la ventosa
|
||||||
|
Dim vtMove As Vector3d = ptCurrHook - ptFixtHook
|
||||||
|
EgtMoveFixture(nFixtureId, vtMove)
|
||||||
|
' verifico se è in una posizione valida
|
||||||
|
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
|
||||||
|
If nFixtHookType = DispositionUtility.HOOKTYPE.POINT then
|
||||||
|
DispositionUtility.SetHookUsed( nCurrHookId, nFixtureId)
|
||||||
|
Else
|
||||||
|
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
|
||||||
|
End If
|
||||||
|
EgtSetFixtureLink( nFixtureId, sBarName)
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
|
||||||
|
End While
|
||||||
|
' Cerco su eventuali carrelli
|
||||||
|
Dim nCharId As Integer = EgtGetFirstGroupInGroup(nBarId)
|
||||||
|
While nCharId <> GDB_ID.NULL
|
||||||
|
Dim sCharName As String = ""
|
||||||
|
If EgtGetName( nCharId, sCharName) AndAlso EgtGetAxisId( sCharName) <> GDB_ID.NULL Then
|
||||||
|
nCurrHookId = EgtGetFirstNameInGroup(nCharId, DispositionUtility.HOOK)
|
||||||
|
While nCurrHookId <> GDB_ID.NULL
|
||||||
|
' se punto di aggancio valido
|
||||||
|
If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then
|
||||||
|
' sposto la ventosa
|
||||||
|
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
|
||||||
|
' verifico se è in una posizione valida
|
||||||
|
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
|
||||||
|
If nFixtHookType = DispositionUtility.HOOKTYPE.POINT then
|
||||||
|
DispositionUtility.SetHookUsed( nCurrHookId, nFixtureId)
|
||||||
|
Else
|
||||||
|
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
|
||||||
|
End If
|
||||||
|
EgtSetFixtureLink( nFixtureId, sCharName)
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
nCharId = EgtGetNextGroup(nCharId)
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
nBarId = EgtGetNextGroup(nBarId)
|
||||||
End While
|
End While
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' Funzione che analizza l'hook e se valido ne prestituisce lo posizione(punto)
|
' Funzione che analizza l'hook e se valido ne restituisce la posizione (punto)
|
||||||
Private Shared Function HookAnalyzer(nCurrHookId As Integer, nFixtHookType As Integer, nFixtHookClass As Integer, ptFixtHook As Point3d, ByRef ptCurrHook As Point3d) As Boolean
|
Private Shared Function HookAnalyzer(nCurrHookId As Integer, nFixtHookType As Integer, nFixtHookClass As Integer,
|
||||||
' verifico se del tipo giusto
|
ptFixtHook As Point3d, ByRef ptCurrHook As Point3d) As Boolean
|
||||||
|
' Verifico se del tipo giusto
|
||||||
Dim nTableHookType As GDB_TY = EgtGetType(nCurrHookId)
|
Dim nTableHookType As GDB_TY = EgtGetType(nCurrHookId)
|
||||||
If (nTableHookType = GDB_TY.GEO_POINT And nFixtHookType = DispositionUtility.HOOKTYPE.POINT) OrElse (nTableHookType = GDB_TY.CRV_LINE And nFixtHookType = DispositionUtility.HOOKTYPE.LINE) Then
|
If Not (nTableHookType = GDB_TY.GEO_POINT And nFixtHookType = DispositionUtility.HOOKTYPE.POINT) AndAlso
|
||||||
' verifico se della stessa classe
|
Not (nTableHookType = GDB_TY.CRV_LINE And nFixtHookType = DispositionUtility.HOOKTYPE.LINE) Then
|
||||||
Dim nTableHookClass As Integer = 0
|
Return False
|
||||||
EgtGetInfo(nCurrHookId, DispositionUtility.CLASS_, nTableHookClass)
|
End If
|
||||||
If nTableHookClass = nFixtHookClass Then
|
|
||||||
Dim dDist As Double = 0
|
' Verifico se della stessa classe
|
||||||
' punto a distanza minima sull'hook
|
Dim nTableHookClass As Integer = DispositionUtility.GetHookClass( nCurrHookId)
|
||||||
If nTableHookType = GDB_TY.GEO_POINT Then
|
If nTableHookClass <> nFixtHookClass Then
|
||||||
' verifico se utilizzato
|
Return False
|
||||||
Dim nTableHookUsed As Boolean = False
|
End If
|
||||||
If Not EgtGetInfo(nCurrHookId, DispositionUtility.USED, nTableHookUsed) Then
|
|
||||||
' calcolo distanza punto hook tavola dal punto hook della ventosa
|
Dim dDist As Double = 0
|
||||||
EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook)
|
' punto a distanza minima sull'hook
|
||||||
Return True
|
If nTableHookType = GDB_TY.GEO_POINT Then
|
||||||
End If
|
' verifico se utilizzato
|
||||||
ElseIf nTableHookType = GDB_TY.CRV_LINE Then
|
If Not DispositionUtility.GetIsHookUsed( nCurrHookId) Then
|
||||||
' calcolo distanza linea hook tavola dal punto hook della ventosa
|
' calcolo distanza punto hook tavola dal punto hook della ventosa
|
||||||
Dim nRefId As Integer = 0
|
EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook)
|
||||||
Dim dU As Double = 0
|
Return True
|
||||||
EgtPointCurveDist(ptFixtHook, nCurrHookId, nRefId, dDist, dU)
|
|
||||||
EgtAtParamPoint(nCurrHookId, dU, GDB_ID.ROOT, ptCurrHook)
|
|
||||||
Return True
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
ElseIf nTableHookType = GDB_TY.CRV_LINE Then
|
||||||
|
' calcolo distanza linea hook tavola dal punto hook della ventosa
|
||||||
|
Dim ptL1 As Point3d : EgtStartPoint( nCurrHookId, GDB_ID.ROOT, ptL1)
|
||||||
|
Dim ptL2 As Point3d : EgtEndPoint( nCurrHookId, GDB_ID.ROOT, ptL2)
|
||||||
|
ptCurrHook = DispositionUtility.DistPointSegment( ptFixtHook, ptL1, ptL2)
|
||||||
|
Return True
|
||||||
End If
|
End If
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
@@ -396,6 +455,7 @@ Public Class FixtureParametersVM
|
|||||||
Dim NextSelectedId As Integer = EgtGetNextSelectedObj()
|
Dim NextSelectedId As Integer = EgtGetNextSelectedObj()
|
||||||
If EgtVerifyFixture(SelectedFixtureId) Then
|
If EgtVerifyFixture(SelectedFixtureId) Then
|
||||||
EgtRemoveFixture(SelectedFixtureId)
|
EgtRemoveFixture(SelectedFixtureId)
|
||||||
|
DispositionUtility.RemoveFixtureFromHook( SelectedFixtureId)
|
||||||
For Index = 0 To FixtureTypeList.Count - 1
|
For Index = 0 To FixtureTypeList.Count - 1
|
||||||
Dim SelFixtureName As String = String.Empty
|
Dim SelFixtureName As String = String.Empty
|
||||||
EgtGetName(SelectedFixtureId, SelFixtureName)
|
EgtGetName(SelectedFixtureId, SelFixtureName)
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
<CheckBox Content="Move with Fixture" IsChecked="{Binding MoveWithFixture, Mode=TwoWay}"/>
|
<CheckBox Content="Move with Fixture" IsChecked="{Binding MoveWithFixture, Mode=TwoWay}"/>
|
||||||
<UniformGrid Columns="2" Margin="0,5,0,0">
|
<UniformGrid Columns="2" Margin="0,5,0,0">
|
||||||
<Button Content="New" Command="{Binding NewRawPartCommand}"/>
|
<Button Content="New" Command="{Binding NewRawPartCommand}"/>
|
||||||
<Button Content="Remove"/> <!--Command="{Binding RemoveRawPartCommand}"-->
|
<Button Content="Remove" Command="{Binding RemoveRawPartCommand}"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
<Grid Visibility="{Binding RawPartParamVisibility, Mode=OneWay}">
|
<Grid Visibility="{Binding RawPartParamVisibility, Mode=OneWay}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
|||||||
+31
-1
@@ -117,7 +117,7 @@ Public Class RawPartOptionVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Execute the Point. This method is invoked by the DoneCommand.
|
''' Execute NewRawPart. This method is invoked by the DoneCommand.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub NewRawPart()
|
Public Sub NewRawPart()
|
||||||
DispositionUtility.ShowParts()
|
DispositionUtility.ShowParts()
|
||||||
@@ -127,6 +127,36 @@ Public Class RawPartOptionVM
|
|||||||
|
|
||||||
#End Region ' NewRawPartCommand
|
#End Region ' NewRawPartCommand
|
||||||
|
|
||||||
|
#Region "RemoveRawPartCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Done.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property RemoveRawPartCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdRemoveRawPart Is Nothing Then
|
||||||
|
m_cmdRemoveRawPart = New RelayCommand(AddressOf RemoveRawPart)
|
||||||
|
End If
|
||||||
|
Return m_cmdRemoveRawPart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute RemoveRawPart. This method is invoked by the DoneCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub RemoveRawPart()
|
||||||
|
' ciclo sui grezzi selezionati
|
||||||
|
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
|
||||||
|
While nSelRawPartId <> GDB_ID.NULL
|
||||||
|
' rimuovo il grezzo dalla disposizione
|
||||||
|
EgtRemoveRawPart(nSelRawPartId)
|
||||||
|
nSelRawPartId = EgtGetNextSelectedObj()
|
||||||
|
End While
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' RemoveRawPartCommand
|
||||||
|
|
||||||
#End Region ' Commands
|
#End Region ' Commands
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
+6
-1
@@ -236,7 +236,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+6
-1
@@ -224,7 +224,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+291
@@ -0,0 +1,291 @@
|
|||||||
|
<UserControl x:Class="FiveAxisMachiningParameterExpanderV"
|
||||||
|
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:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||||
|
|
||||||
|
<UserControl.Resources>
|
||||||
|
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
|
||||||
|
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
|
||||||
|
<sys:Int32 x:Key="Invert">0</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LeaveTab">1</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="WorkSide">2</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="HeadSide">3</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LeadInType">4</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LeadOutType">6</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="CurveUse">7</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StepType">8</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Speed">10</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Feed">11</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StartFeed">12</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="EndFeed">13</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TipFeed">14</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OffSr">15</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OffSl">16</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="SideAngle">17</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Approx">18</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StartPos">19</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StepPar">23</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ReturnPos">24</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TabLen">25</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TabDist">26</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TabHeight">27</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TabAngle">28</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LiTang">29</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LiPerp">30</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LiElev">31</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LiCompLen">32</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LoTang">33</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LoPerp">34</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LoElev">35</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LoCompLen">36</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StartAddLen">37</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="EndAddLen">38</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StepExtArc">39</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StepIntArc">40</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="SideStep">41</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="VertFeed">42</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="NamePar">43</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Tool">44</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="DepthStr">45</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="UserNotes">46</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OverLapStr">47</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OffsetStr">48</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="SubType">49</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="AxRotRef">51</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="FaceUseType">53</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ApproxGen">57</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OscEnable">58</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OscHeight">59</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OscRampLen">60</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OscFlatLen">61</sys:Int32>
|
||||||
|
</UserControl.Resources>
|
||||||
|
|
||||||
|
<StackPanel Name="OperationParametersStackPanel">
|
||||||
|
<StackPanel Name="OperationFirstParametersStackPanel">
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
|
||||||
|
Converter={StaticResource DepthUnitConverter}}"
|
||||||
|
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
|
||||||
|
ParamChBx="{Binding Path=Invert,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource CheckParamV_Margin}"/>
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="{Binding UserNotesTxBl}"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
|
||||||
|
<EgtWPFLib5:EgtTextBox.ToolTip>
|
||||||
|
<TextBlock Text="{Binding UserNotesTooltip}"/>
|
||||||
|
</EgtWPFLib5:EgtTextBox.ToolTip>
|
||||||
|
</EgtWPFLib5:EgtTextBox>
|
||||||
|
<TextBlock Text="{Binding SystemNotesTxBl}"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
|
||||||
|
Visibility="{Binding SysNotes_Visibility}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
|
||||||
|
Visibility="{Binding SysNotes_Visibility}"
|
||||||
|
IsReadOnly="True"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Name="AutomaticCloseExpanderStackPanel">
|
||||||
|
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
|
||||||
|
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
|
||||||
|
<StackPanel>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=StartPos,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
|
||||||
|
ParamCmBxList="{Binding Path=SubTypeList,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
|
||||||
|
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=OffSr,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=OffSl,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Expander>
|
||||||
|
|
||||||
|
<Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
|
||||||
|
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
|
||||||
|
<Expander.Header>
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="{Binding AdvancedParamMsg}"
|
||||||
|
Margin="2.5"/>
|
||||||
|
<Button Command="{Binding ShowNoteListComboCommand}"
|
||||||
|
ToolTip="{Binding ShowNoteToolTip}"
|
||||||
|
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
|
||||||
|
Visibility="{Binding ShowNoteListCombo_Visibility}"
|
||||||
|
Grid.Column="1"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Margin="2.5,2.5,7,2.5"
|
||||||
|
Width="20">
|
||||||
|
<Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
|
||||||
|
</Button>
|
||||||
|
</UniformGrid>
|
||||||
|
</Expander.Header>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel>
|
||||||
|
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertToolDirTxBl}"
|
||||||
|
ParamChBx="{Binding Path=InvertToolDir,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource CheckParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=InitAngs,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding BlockedAxisTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=BlockedAxis,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SolChoiceTypeTxBl}"
|
||||||
|
ParamCmBxList="{Binding Path=SolChoiceTypeList,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True,
|
||||||
|
Mode=OneWay}"
|
||||||
|
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}"
|
||||||
|
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Grid Grid.Row="1" Margin="0,5,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ItemsControl ItemsSource="{Binding NotesList}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding Description}"
|
||||||
|
Margin="0,5.5,29,0"
|
||||||
|
Width="82"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
|
||||||
|
<TabControl SelectedIndex="{Binding SelTypeValue}"
|
||||||
|
Grid.Column="1"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderBrush="Transparent">
|
||||||
|
<TabControl.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type TabItem}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
</Style>
|
||||||
|
</TabControl.ItemContainerStyle>
|
||||||
|
<TabItem Header="TEXT">
|
||||||
|
<TextBox Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
IsReadOnly="False"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="CHECKBOX">
|
||||||
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
Grid.Column="2"
|
||||||
|
Width="20"
|
||||||
|
Height="20"
|
||||||
|
Margin="5,0,0,0">
|
||||||
|
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
<ComboBox ItemsSource="{Binding NotesListCombo}"
|
||||||
|
SelectedItem="{Binding SelNoteItemCombo}"
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.ColumnSpan="1"
|
||||||
|
Visibility="{Binding ComboAddVisibility}">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Description}"
|
||||||
|
Margin="2.5"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Expander>
|
||||||
|
|
||||||
|
<Expander Style="{StaticResource ExpanderStyle}">
|
||||||
|
<Expander.Header>
|
||||||
|
<TextBlock Text="{Binding ToolExpanderHeader}"/>
|
||||||
|
</Expander.Header>
|
||||||
|
<StackPanel>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=Speed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
ParamErrorMsg="{Binding Path=SpeedErrorMsg}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=Feed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=TipFeed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=StartFeed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=EndFeed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Expander>
|
||||||
|
<Interactivity:Interaction.Behaviors>
|
||||||
|
<EgtCAM5:AutomaticCloseExpander/>
|
||||||
|
</Interactivity:Interaction.Behaviors>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
</UserControl>
|
||||||
+83
@@ -0,0 +1,83 @@
|
|||||||
|
Imports EgtWPFLib5.EgtFloating
|
||||||
|
|
||||||
|
Public Class FiveAxisMachiningParameterExpanderV
|
||||||
|
|
||||||
|
Private m_RightTrayV As RightTrayV
|
||||||
|
Private EgtFloatingPanel As EgtFloatingPanel
|
||||||
|
|
||||||
|
Private m_bFirst As Boolean = True
|
||||||
|
|
||||||
|
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
|
||||||
|
If m_bFirst Then
|
||||||
|
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
|
||||||
|
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
|
||||||
|
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
|
||||||
|
PanelHeight = EgtFloatingPanel.DesiredSize.Height
|
||||||
|
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
|
||||||
|
m_bFirst = False
|
||||||
|
End If
|
||||||
|
CalculateOperationParametersStackPanelMaxHeight()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Dim m_bSizeChanging As Boolean = False
|
||||||
|
|
||||||
|
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
|
||||||
|
If m_bSizeChanging Then Return
|
||||||
|
m_bSizeChanging = True
|
||||||
|
CalculateOperationParametersStackPanelMaxHeight()
|
||||||
|
m_bSizeChanging = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Dim PanelHeight As Double = 0
|
||||||
|
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
|
||||||
|
|
||||||
|
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
|
||||||
|
Private Sub CalculateOperationParametersStackPanelMaxHeight()
|
||||||
|
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
|
||||||
|
Dim OpenedExpanderList As New List(Of Boolean)
|
||||||
|
For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
|
||||||
|
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
|
||||||
|
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
|
||||||
|
If IndexedExpander.IsExpanded Then
|
||||||
|
OpenedExpanderList.Add(True)
|
||||||
|
IndexedExpander.IsExpanded = False
|
||||||
|
Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
|
||||||
|
CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
|
||||||
|
AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
|
||||||
|
' Sottraggo anche i padding
|
||||||
|
AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
|
||||||
|
Else
|
||||||
|
OpenedExpanderList.Add(False)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
OpenedExpanderList.Add(False)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
|
||||||
|
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
|
||||||
|
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
|
||||||
|
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
|
||||||
|
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
|
||||||
|
If OpenedExpanderList(Index) Then
|
||||||
|
IndexedExpander.IsExpanded = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
|
||||||
|
Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
|
||||||
|
Dim target As DependencyObject = dependencyObject
|
||||||
|
Do
|
||||||
|
target = LogicalTreeHelper.GetParent(target)
|
||||||
|
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
|
||||||
|
If IsNothing(target) Then
|
||||||
|
target = dependencyObject
|
||||||
|
Do
|
||||||
|
target = VisualTreeHelper.GetParent(target)
|
||||||
|
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
|
||||||
|
End If
|
||||||
|
Return TryCast(target, T)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
+6
-1
@@ -214,7 +214,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+34
-25
@@ -1,10 +1,10 @@
|
|||||||
<UserControl x:Class="MachiningParameterExpanderV"
|
<UserControl x:Class="MachiningParameterExpanderV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||||
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||||
|
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
|
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
|
||||||
@@ -73,26 +73,35 @@
|
|||||||
<sys:Int32 x:Key="OscFlatLen">61</sys:Int32>
|
<sys:Int32 x:Key="OscFlatLen">61</sys:Int32>
|
||||||
<sys:Int32 x:Key="TabMax">62</sys:Int32>
|
<sys:Int32 x:Key="TabMax">62</sys:Int32>
|
||||||
<sys:Int32 x:Key="TabMin">63</sys:Int32>
|
<sys:Int32 x:Key="TabMin">63</sys:Int32>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<ContentControl Content="{Binding Path=ParamExpanderPageV}" />
|
<ContentControl Content="{Binding Path=ParamExpanderPageV}" />
|
||||||
|
|
||||||
<Button Name="ApplyMachBtn" Height="30" Content="{Binding UpdateMachiningBtnMsg}"
|
<Button Name="ApplyMachBtn" Height="30" Content="{Binding UpdateMachiningBtnMsg}"
|
||||||
Command="{Binding UpdateMachiningCommand}" Background="{Binding UpdateMachiningBtn_Background}"/>
|
Command="{Binding UpdateMachiningCommand}" Background="{Binding UpdateMachiningBtn_Background}"/>
|
||||||
<Grid>
|
<Grid Margin="0,2.5,0,2.5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
</Grid.ColumnDefinitions>
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<ToggleButton Name="ViewToolBtn" Grid.Column="0" Height="30" Content="{Binding ViewToolBtnMsg}"
|
<Button Command="{Binding PreviewMachiningTool_Command}"
|
||||||
IsChecked="{Binding ViewTool}" />
|
x:Name="ButtonPreview"
|
||||||
<Button Name="NextStepToolBtn" Grid.Column="1" Height="30" Content="{Binding NextStepToolBtnMsg}"
|
Style="{StaticResource PreviewTool_Button}">
|
||||||
Command="{Binding NextStepToolCommand}" IsEnabled="{Binding IsChecked, ElementName=ViewToolBtn}"/>
|
<Image Source="{Binding sToolPreview_Image}" Stretch="Uniform"/>
|
||||||
<Button Name="PrevStepToolBtn" Grid.Column="2" Height="30" Content="{Binding PrevStepToolBtnMsg}"
|
</Button>
|
||||||
Command="{Binding PrevStepToolCommand}" IsEnabled="{Binding IsChecked, ElementName=ViewToolBtn}"/>
|
|
||||||
</Grid>
|
<Slider Grid.Column="1"
|
||||||
</StackPanel>
|
x:Name="SliderV"
|
||||||
|
Value="{Binding SliderValue}"
|
||||||
|
IsEnabled="{Binding Slider_IsEnable}"
|
||||||
|
TickFrequency="{Binding SliderTick}"
|
||||||
|
Minimum="1"
|
||||||
|
Maximum="{Binding SliderScale}"
|
||||||
|
Style="{StaticResource SliderValue_Slider}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
+24
-73
@@ -1,83 +1,34 @@
|
|||||||
Imports EgtWPFLib5
|
Imports EgtCAM5.MachiningParameterExpanderVM
|
||||||
Imports EgtWPFLib5.EgtFloating
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class MachiningParameterExpanderV
|
Public Class MachiningParameterExpanderV
|
||||||
|
|
||||||
'Private EgtFloatingTray As EgtFloatingTray
|
Sub New()
|
||||||
'Private EgtFloatingPanel As EgtFloatingPanel
|
|
||||||
|
|
||||||
'Private m_bFirst As Boolean = True
|
' La chiamata è richiesta dalla finestra di progettazione.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
'Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
|
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||||
' If m_bFirst Then
|
Me.SliderV.Focusable = False
|
||||||
' EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
|
' Associo il gestore evento m_EventFocusOnSlider all'evento generato da FocusOnSlider
|
||||||
' EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
|
AddHandler Map.refMachiningParameterExpanderVM.m_EventFocusOnSlider, AddressOf FocusOnSlider
|
||||||
' AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
|
' Associo il gestore evento m_EventFocusOnButtonPreview all'evento generato da FocusOnButtonPreview
|
||||||
' PanelHeight = EgtFloatingPanel.ActualHeight
|
AddHandler Map.refMachiningParameterExpanderVM.m_EventFocusOnButtonPreview, AddressOf FocusOnButtonPreview
|
||||||
' Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
|
|
||||||
' m_bFirst = False
|
|
||||||
' End If
|
|
||||||
' CalculateOperationParametersStackPanelMaxHeight()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
'Dim m_bSizeChanging As Boolean = False
|
End Sub
|
||||||
|
|
||||||
'Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
|
''' <summary>
|
||||||
' If m_bSizeChanging Then Return
|
''' Funzione che mette il focus allo slider
|
||||||
' m_bSizeChanging = True
|
''' </summary>
|
||||||
' CalculateOperationParametersStackPanelMaxHeight()
|
Friend Sub FocusOnSlider()
|
||||||
' m_bSizeChanging = False
|
Me.SliderV.Focus()
|
||||||
'End Sub
|
End Sub
|
||||||
|
|
||||||
'Dim PanelHeight As Double = 0
|
''' <summary>
|
||||||
'Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
|
''' Funzione che mette il focus sul bottone
|
||||||
|
''' </summary>
|
||||||
'Private Sub CalculateOperationParametersStackPanelMaxHeight()
|
Friend Sub FocusOnButtonPreview()
|
||||||
' Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
|
Me.ButtonPreview.Focus()
|
||||||
' Dim OpenedExpanderList As New List(Of Boolean)
|
End Sub
|
||||||
' For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
|
|
||||||
' If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
|
|
||||||
' Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
|
|
||||||
' If IndexedExpander.IsExpanded Then
|
|
||||||
' OpenedExpanderList.Add(True)
|
|
||||||
' IndexedExpander.IsExpanded = False
|
|
||||||
' Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
|
|
||||||
' CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
|
|
||||||
' AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
|
|
||||||
' ' Sottraggo anche i padding
|
|
||||||
' AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
|
|
||||||
' Else
|
|
||||||
' OpenedExpanderList.Add(False)
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' OpenedExpanderList.Add(False)
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
' Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
|
|
||||||
' AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
|
|
||||||
' For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
|
|
||||||
' If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
|
|
||||||
' Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
|
|
||||||
' If OpenedExpanderList(Index) Then
|
|
||||||
' IndexedExpander.IsExpanded = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
'' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
|
|
||||||
'Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
|
|
||||||
' Dim target As DependencyObject = dependencyObject
|
|
||||||
' Do
|
|
||||||
' target = LogicalTreeHelper.GetParent(target)
|
|
||||||
' Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
|
|
||||||
' If IsNothing(target) Then
|
|
||||||
' target = dependencyObject
|
|
||||||
' Do
|
|
||||||
' target = VisualTreeHelper.GetParent(target)
|
|
||||||
' Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
|
|
||||||
' End If
|
|
||||||
' Return TryCast(target, T)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
+226
-173
@@ -1,11 +1,40 @@
|
|||||||
Imports System.ComponentModel
|
Imports EgtUILib
|
||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class MachiningParameterExpanderVM
|
Public Class MachiningParameterExpanderVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Evento che permette di mettere il focus sullo slider
|
||||||
|
''' </summary>
|
||||||
|
Friend Event m_EventFocusOnSlider()
|
||||||
|
''' <summary>
|
||||||
|
''' Evento che permette di mettere il focus sul bottone
|
||||||
|
''' </summary>
|
||||||
|
Friend Event m_EventFocusOnButtonPreview()
|
||||||
|
|
||||||
|
Private m_nPreviewMachiningTool As Integer
|
||||||
|
Public ReadOnly Property nPreviewMachiningTool As Integer
|
||||||
|
Get
|
||||||
|
Return m_nPreviewMachiningTool
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetPreviewMachiningTool(value As MCH_LOOK)
|
||||||
|
m_nPreviewMachiningTool = value
|
||||||
|
NotifyPropertyChanged(NameOf(nPreviewMachiningTool))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_sToolPreview_Image As String
|
||||||
|
Public ReadOnly Property sToolPreview_Image As String
|
||||||
|
Get
|
||||||
|
Return m_sToolPreview_Image
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetToolPreview_Image(value As String)
|
||||||
|
m_sToolPreview_Image = value
|
||||||
|
NotifyPropertyChanged(NameOf(sToolPreview_Image))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private WithEvents m_CurrOperation As MachiningTreeViewItem
|
Private WithEvents m_CurrOperation As MachiningTreeViewItem
|
||||||
Public Property CurrOperation As MachiningTreeViewItem
|
Public Property CurrOperation As MachiningTreeViewItem
|
||||||
Get
|
Get
|
||||||
@@ -49,25 +78,77 @@ Public Class MachiningParameterExpanderVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_bPreviewTool As Boolean = False
|
' Slider per muovere l'utensile in aggiunta ai pulsanti indietro e avanti
|
||||||
Private m_nPtEntId As Integer = GDB_ID.NULL
|
Private m_SliderScale As Integer = 100
|
||||||
Public Property ViewTool As Boolean
|
Public ReadOnly Property SliderScale As Integer
|
||||||
Get
|
Get
|
||||||
Return m_bPreviewTool
|
Return m_SliderScale
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
End Property
|
||||||
If value Then
|
Friend Sub SetSliderScale(value As Integer)
|
||||||
EgtPreparePreviewMachiningTool()
|
m_SliderScale = Math.Max(value, 1)
|
||||||
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
|
If m_SliderScale <= 10 Then
|
||||||
m_bPreviewTool = True
|
m_SliderTick = 1
|
||||||
Else
|
Else
|
||||||
EgtRemovePreviewMachiningTool()
|
m_SliderTick = CInt(m_SliderScale / 10)
|
||||||
m_bPreviewTool = False
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(SliderScale))
|
||||||
|
NotifyPropertyChanged(NameOf(SliderTick))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_SliderTick As Integer = 10
|
||||||
|
Public ReadOnly Property SliderTick As Integer
|
||||||
|
Get
|
||||||
|
Return m_SliderTick
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nPtEntId As Integer = GDB_ID.NULL
|
||||||
|
Private m_SliderValue As Integer = 1
|
||||||
|
Public Property SliderValue As Integer
|
||||||
|
Get
|
||||||
|
Return m_SliderValue
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
If m_nPreviewMachiningTool = MCH_LOOK.TAB_TOOL OrElse m_nPreviewMachiningTool = MCH_LOOK.TAB_HEAD Then
|
||||||
|
Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, value - m_SliderValue)
|
||||||
|
If nId <> GDB_ID.NULL Then m_nPtEntId = nId
|
||||||
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
EgtDraw()
|
m_SliderValue = value
|
||||||
NotifyPropertyChanged("ViewTool")
|
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Friend Sub ResetSliderValue()
|
||||||
|
If m_nPreviewMachiningTool = MCH_LOOK.TAB_TOOL OrElse m_nPreviewMachiningTool = MCH_LOOK.TAB_HEAD Then
|
||||||
|
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
|
||||||
|
Else
|
||||||
|
m_nPtEntId = GDB_ID.NULL
|
||||||
|
End If
|
||||||
|
m_SliderValue = 1
|
||||||
|
NotifyPropertyChanged(NameOf(SliderValue))
|
||||||
|
End Sub
|
||||||
|
Friend Sub SetSliderValue(value As Integer)
|
||||||
|
If m_nPreviewMachiningTool = MCH_LOOK.NONE Then Return
|
||||||
|
Dim nOldSliderValue As Integer = m_SliderValue
|
||||||
|
m_SliderValue = Math.Min(Math.Max(m_SliderValue + value, 1), m_SliderScale)
|
||||||
|
Dim nStep As Integer = m_SliderValue - nOldSliderValue
|
||||||
|
If nStep = 0 Then Return
|
||||||
|
Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, nStep)
|
||||||
|
If nId <> GDB_ID.NULL Then m_nPtEntId = nId
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged(NameOf(SliderValue))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_Slider_IsEnable As Boolean
|
||||||
|
Public ReadOnly Property Slider_IsEnable As Boolean
|
||||||
|
Get
|
||||||
|
Return m_Slider_IsEnable
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSlider_IsEnable(value As Boolean)
|
||||||
|
m_Slider_IsEnable = value
|
||||||
|
NotifyPropertyChanged(NameOf(Slider_IsEnable))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Dim WoodDrillParamExpanderV As WoodDrillingParameterExpanderV
|
Dim WoodDrillParamExpanderV As WoodDrillingParameterExpanderV
|
||||||
Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV
|
Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV
|
||||||
@@ -84,6 +165,9 @@ Public Class MachiningParameterExpanderVM
|
|||||||
Dim StoneDrillParamExpanderV As StoneDrillingParameterExpanderV
|
Dim StoneDrillParamExpanderV As StoneDrillingParameterExpanderV
|
||||||
Dim SurfFinishParamExpanderV As SurfFinishingParameterExpanderV
|
Dim SurfFinishParamExpanderV As SurfFinishingParameterExpanderV
|
||||||
Dim WjParamExpanderV As WaterjettingParameterExpanderV
|
Dim WjParamExpanderV As WaterjettingParameterExpanderV
|
||||||
|
Dim FiveAxExpanderV As FiveAxisMachiningParameterExpanderV
|
||||||
|
Dim SurfRoughExpanderV As SurfRoughingParameterExpanderV
|
||||||
|
Dim ProbExpanderV As ProbingParameterExpanderV
|
||||||
|
|
||||||
Private Sub Dummy()
|
Private Sub Dummy()
|
||||||
|
|
||||||
@@ -106,24 +190,11 @@ Public Class MachiningParameterExpanderVM
|
|||||||
EgtGetMachiningParam(MCH_MP.TYPE, nType)
|
EgtGetMachiningParam(MCH_MP.TYPE, nType)
|
||||||
m_CurrOperation = New MachiningTreeViewItem(sName, DirectCast(nType, MCH_MY))
|
m_CurrOperation = New MachiningTreeViewItem(sName, DirectCast(nType, MCH_MY))
|
||||||
|
|
||||||
'WoodDrillParamExpanderV.DataContext = Nothing
|
|
||||||
'WoodSawParamExpanderV.DataContext = Nothing
|
|
||||||
'WoodMillParamExpanderV.DataContext = Nothing
|
|
||||||
'BeamMillParamExpanderV.DataContext = Nothing
|
|
||||||
'PocketParamExpanderV.DataContext = Nothing
|
|
||||||
'MortiseParamExpanderV.DataContext = Nothing
|
|
||||||
'GenMachinParamExpanderV.DataContext = Nothing
|
|
||||||
'ChiselParamExpanderV.DataContext = Nothing
|
|
||||||
'StoneSawParamExpanderV.DataContext = Nothing
|
|
||||||
'StoneSawFinishParamExpanderV.DataContext = Nothing
|
|
||||||
'StoneSawRoughParamExpanderV.DataContext = Nothing
|
|
||||||
'StoneMillParamExpanderV.DataContext = Nothing
|
|
||||||
'StoneDrillParamExpanderV.DataContext = Nothing
|
|
||||||
'SurfFinishParamExpanderV.DataContext = Nothing
|
|
||||||
'WjParamExpanderV.DataContext = Nothing
|
|
||||||
|
|
||||||
m_CurrOperation.ReadOperationParam()
|
m_CurrOperation.ReadOperationParam()
|
||||||
|
|
||||||
|
' Riferimento a operazione selezionata
|
||||||
|
EgtWPFLib5.MachiningTreeViewItem.sh_SelMach = m_CurrOperation
|
||||||
|
|
||||||
IsModified(False)
|
IsModified(False)
|
||||||
ErrorOnOperation(False)
|
ErrorOnOperation(False)
|
||||||
|
|
||||||
@@ -135,7 +206,7 @@ Public Class MachiningParameterExpanderVM
|
|||||||
|
|
||||||
Select Case nType
|
Select Case nType
|
||||||
Case MCH_OY.DRILLING
|
Case MCH_OY.DRILLING
|
||||||
If MatType = MaterialType.STONE Then
|
If MatType = MaterialType.STONE5 Then
|
||||||
If IsNothing(StoneDrillParamExpanderV) Then StoneDrillParamExpanderV = New StoneDrillingParameterExpanderV
|
If IsNothing(StoneDrillParamExpanderV) Then StoneDrillParamExpanderV = New StoneDrillingParameterExpanderV
|
||||||
StoneDrillParamExpanderV.DataContext = m_CurrOperation
|
StoneDrillParamExpanderV.DataContext = m_CurrOperation
|
||||||
Return StoneDrillParamExpanderV
|
Return StoneDrillParamExpanderV
|
||||||
@@ -145,7 +216,7 @@ Public Class MachiningParameterExpanderVM
|
|||||||
Return WoodDrillParamExpanderV
|
Return WoodDrillParamExpanderV
|
||||||
End If
|
End If
|
||||||
Case MCH_OY.SAWING
|
Case MCH_OY.SAWING
|
||||||
If MatType = MaterialType.STONE Then
|
If MatType = MaterialType.STONE5 Then
|
||||||
If IsNothing(StoneSawParamExpanderV) Then StoneSawParamExpanderV = New StoneSawingParameterExpanderV
|
If IsNothing(StoneSawParamExpanderV) Then StoneSawParamExpanderV = New StoneSawingParameterExpanderV
|
||||||
StoneSawParamExpanderV.DataContext = m_CurrOperation
|
StoneSawParamExpanderV.DataContext = m_CurrOperation
|
||||||
Return StoneSawParamExpanderV
|
Return StoneSawParamExpanderV
|
||||||
@@ -159,7 +230,7 @@ Public Class MachiningParameterExpanderVM
|
|||||||
If IsNothing(BeamMillParamExpanderV) Then BeamMillParamExpanderV = New BeamMillingParameterExpanderV
|
If IsNothing(BeamMillParamExpanderV) Then BeamMillParamExpanderV = New BeamMillingParameterExpanderV
|
||||||
BeamMillParamExpanderV.DataContext = m_CurrOperation
|
BeamMillParamExpanderV.DataContext = m_CurrOperation
|
||||||
Return BeamMillParamExpanderV
|
Return BeamMillParamExpanderV
|
||||||
ElseIf MatType = MaterialType.STONE Then
|
ElseIf MatType = MaterialType.STONE5 Then
|
||||||
If IsNothing(StoneMillParamExpanderV) Then StoneMillParamExpanderV = New StoneMillingParameterExpanderV
|
If IsNothing(StoneMillParamExpanderV) Then StoneMillParamExpanderV = New StoneMillingParameterExpanderV
|
||||||
StoneMillParamExpanderV.DataContext = m_CurrOperation
|
StoneMillParamExpanderV.DataContext = m_CurrOperation
|
||||||
Return StoneMillParamExpanderV
|
Return StoneMillParamExpanderV
|
||||||
@@ -177,7 +248,7 @@ Public Class MachiningParameterExpanderVM
|
|||||||
StoneSawFinishParamExpanderV.DataContext = m_CurrOperation
|
StoneSawFinishParamExpanderV.DataContext = m_CurrOperation
|
||||||
Return StoneSawFinishParamExpanderV
|
Return StoneSawFinishParamExpanderV
|
||||||
Case MCH_OY.POCKETING
|
Case MCH_OY.POCKETING
|
||||||
If MatType = MaterialType.STONE Or MatType = MaterialType.STONE5 Then
|
If MatType = MaterialType.STONE5 Then
|
||||||
' se macchina di tipo STONE ricavo il tipo di utensile
|
' se macchina di tipo STONE ricavo il tipo di utensile
|
||||||
Dim sMachiningToolName = String.Empty
|
Dim sMachiningToolName = String.Empty
|
||||||
EgtMdbSetCurrMachining(sName)
|
EgtMdbSetCurrMachining(sName)
|
||||||
@@ -212,6 +283,18 @@ Public Class MachiningParameterExpanderVM
|
|||||||
If IsNothing(WjParamExpanderV) Then WjParamExpanderV = New WaterjettingParameterExpanderV
|
If IsNothing(WjParamExpanderV) Then WjParamExpanderV = New WaterjettingParameterExpanderV
|
||||||
WjParamExpanderV.DataContext = m_CurrOperation
|
WjParamExpanderV.DataContext = m_CurrOperation
|
||||||
Return WjParamExpanderV
|
Return WjParamExpanderV
|
||||||
|
Case MCH_OY.FIVEAXISMILLING
|
||||||
|
If IsNothing(FiveAxExpanderV) Then FiveAxExpanderV = New FiveAxisMachiningParameterExpanderV
|
||||||
|
FiveAxExpanderV.DataContext = m_CurrOperation
|
||||||
|
Return FiveAxExpanderV
|
||||||
|
Case MCH_OY.SURFROUGHING
|
||||||
|
If IsNothing(SurfRoughExpanderV) Then SurfRoughExpanderV = New SurfRoughingParameterExpanderV
|
||||||
|
SurfRoughExpanderV.DataContext = m_CurrOperation
|
||||||
|
Return SurfRoughExpanderV
|
||||||
|
Case MCH_OY.PROBING
|
||||||
|
If IsNothing(ProbExpanderV) Then ProbExpanderV = New ProbingParameterExpanderV
|
||||||
|
ProbExpanderV.DataContext = m_CurrOperation
|
||||||
|
Return ProbExpanderV
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
'MachiningParameterExpanderItem.ReadOperationParam()
|
'MachiningParameterExpanderItem.ReadOperationParam()
|
||||||
@@ -249,92 +332,77 @@ Public Class MachiningParameterExpanderVM
|
|||||||
#End Region ' Messages
|
#End Region ' Messages
|
||||||
|
|
||||||
' Definizione comando
|
' Definizione comando
|
||||||
Private m_cmdNextStepTool As ICommand
|
|
||||||
Private m_cmdPrevStepTool As ICommand
|
|
||||||
Private m_cmdUpdateMachining As ICommand
|
Private m_cmdUpdateMachining As ICommand
|
||||||
|
Private m_cmdPreviewMachiningTool As ICommand
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
EgtWPFLib5.MachiningDbWindowVM.m_sMachineIniPath = IniFile.m_sCurrMachIniFilePath
|
EgtWPFLib5.MachiningDbWindowVM.m_sMachineIniPath = IniFile.m_sCurrMachIniFilePath
|
||||||
|
Map.SetRefMachiningParameterExpanderVM(Me)
|
||||||
'WoodDrillParamExpanderV = New WoodDrillingParameterExpanderV
|
|
||||||
'WoodSawParamExpanderV = New WoodSawingParameterExpanderV
|
|
||||||
'WoodMillParamExpanderV = New WoodMillingParameterExpanderV
|
|
||||||
'BeamMillParamExpanderV = New BeamMillingParameterExpanderV
|
|
||||||
'PocketParamExpanderV = New PocketingParameterExpanderV
|
|
||||||
'MortiseParamExpanderV = New MortisingParameterExpanderV
|
|
||||||
'GenMachinParamExpanderV = New GenMachiningParameterExpanderV
|
|
||||||
'ChiselParamExpanderV = New ChiselingParameterExpanderV
|
|
||||||
'StoneSawParamExpanderV = New StoneSawingParameterExpanderV
|
|
||||||
'StoneSawFinishParamExpanderV = New StoneSawFinishingParameterExpanderV
|
|
||||||
'StoneSawRoughParamExpanderV = New StoneSawRoughingParameterExpanderV
|
|
||||||
'StoneMillParamExpanderV = New StoneMillingParameterExpanderV
|
|
||||||
'StoneDrillParamExpanderV = New StoneDrillingParameterExpanderV
|
|
||||||
'SurfFinishParamExpanderV = New SurfFinishingParameterExpanderV
|
|
||||||
'WjParamExpanderV = New WaterjettingParameterExpanderV
|
|
||||||
|
|
||||||
NotifyPropertyChanged("ParamExpanderPageV")
|
NotifyPropertyChanged("ParamExpanderPageV")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Constructor
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che attiva l'evento che mette il focus sullo slider
|
||||||
|
''' </summary>
|
||||||
|
Public Sub FocusSlider()
|
||||||
|
RaiseEvent m_EventFocusOnSlider()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che attiva l'evento che mette il focus sul bottone
|
||||||
|
''' </summary>
|
||||||
|
Public Sub FocusButtonPreview()
|
||||||
|
RaiseEvent m_EventFocusOnButtonPreview()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub PreviewMachiningTool()
|
||||||
|
Select Case nPreviewMachiningTool
|
||||||
|
Case MCH_LOOK.NONE
|
||||||
|
SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
|
||||||
|
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
|
||||||
|
SetSlider_IsEnable(True)
|
||||||
|
Case MCH_LOOK.TAB_TOOL
|
||||||
|
SetPreviewMachiningTool(MCH_LOOK.TAB_HEAD)
|
||||||
|
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Head.png")
|
||||||
|
SetSlider_IsEnable(True)
|
||||||
|
Case MCH_LOOK.TAB_HEAD
|
||||||
|
SetPreviewMachiningTool(MCH_LOOK.NONE)
|
||||||
|
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Delete.png")
|
||||||
|
SetSlider_IsEnable(False)
|
||||||
|
End Select
|
||||||
|
EgtChangePreviewMachiningToolShow(nPreviewMachiningTool)
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub RevertPreviewMachiningTool()
|
||||||
|
Select Case nPreviewMachiningTool
|
||||||
|
Case MCH_LOOK.NONE
|
||||||
|
SetPreviewMachiningTool(MCH_LOOK.TAB_HEAD)
|
||||||
|
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Head.png")
|
||||||
|
SetSlider_IsEnable(True)
|
||||||
|
Case MCH_LOOK.TAB_TOOL
|
||||||
|
SetPreviewMachiningTool(MCH_LOOK.NONE)
|
||||||
|
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Delete.png")
|
||||||
|
SetSlider_IsEnable(False)
|
||||||
|
Case MCH_LOOK.TAB_HEAD
|
||||||
|
SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
|
||||||
|
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
|
||||||
|
SetSlider_IsEnable(True)
|
||||||
|
End Select
|
||||||
|
EgtChangePreviewMachiningToolShow(nPreviewMachiningTool)
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "NextStepToolCommand"
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Restituisce funzione per ricalcolo lavorazione.
|
|
||||||
''' </summary>
|
|
||||||
Public ReadOnly Property NextStepToolCommand As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdNextStepTool Is Nothing Then
|
|
||||||
m_cmdNextStepTool = New RelayCommand(AddressOf NextStepTool)
|
|
||||||
End If
|
|
||||||
Return m_cmdNextStepTool
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Ricalcola una lavorazione.
|
|
||||||
''' </summary>
|
|
||||||
Public Sub NextStepTool(ByVal param As Object)
|
|
||||||
If m_bPreviewTool Then
|
|
||||||
Dim nNextId = EgtPreviewMachiningTool(m_nPtEntId, MCH_PTM.AFTER)
|
|
||||||
If nNextId <> GDB_ID.NULL Then m_nPtEntId = nNextId
|
|
||||||
EgtDraw()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' NextStepToolCommand
|
|
||||||
|
|
||||||
#Region "PrevStepToolCommand"
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Restituisce funzione per ricalcolo lavorazione.
|
|
||||||
''' </summary>
|
|
||||||
Public ReadOnly Property PrevStepToolCommand As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdPrevStepTool Is Nothing Then
|
|
||||||
m_cmdPrevStepTool = New RelayCommand(AddressOf PrevStepTool)
|
|
||||||
End If
|
|
||||||
Return m_cmdPrevStepTool
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Ricalcola una lavorazione.
|
|
||||||
''' </summary>
|
|
||||||
Public Sub PrevStepTool(ByVal param As Object)
|
|
||||||
If m_bPreviewTool Then
|
|
||||||
Dim nPrevId = EgtPreviewMachiningTool(m_nPtEntId, MCH_PTM.BEFORE)
|
|
||||||
If nPrevId <> GDB_ID.NULL Then m_nPtEntId = nPrevId
|
|
||||||
EgtDraw()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' PrevStepToolCommand
|
|
||||||
|
|
||||||
#Region "UpdateMachiningCommand"
|
#Region "UpdateMachiningCommand"
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@@ -364,66 +432,28 @@ Public Class MachiningParameterExpanderVM
|
|||||||
MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
Dim bRecalc As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift)
|
|
||||||
' La modifica di alcuni parametri forza il ricalcolo della geometria
|
' Verifico se forzato ricalcolo da interfaccia
|
||||||
Dim ModifiedGeometry As Boolean = m_CurrOperation.m_IsModifiedSelectedFaceUseType
|
Dim bRecalc As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) <> 0)
|
||||||
' aggiorno valori modificati
|
|
||||||
|
' Aggiorno parametri di lavorazione
|
||||||
m_CurrOperation.WriteOperationParam()
|
m_CurrOperation.WriteOperationParam()
|
||||||
' Carico tutta la geometria selezionata in una lista
|
|
||||||
Dim SelectedGeometry As New List(Of Integer)
|
' Imposto geometria da lavorare (tutta quella selezionata)
|
||||||
Dim EntityIndex As Integer = EgtGetFirstSelectedObj()
|
Dim vId(EgtGetSelectedObjCount() - 1) As Integer
|
||||||
While EntityIndex <> GDB_ID.NULL
|
Dim vSub(EgtGetSelectedObjCount() - 1) As Integer
|
||||||
SelectedGeometry.Add(EntityIndex)
|
Dim nInd As Integer = 0
|
||||||
EntityIndex = EgtGetNextSelectedObj()
|
Dim EntId As Integer = EgtGetFirstSelectedObj()
|
||||||
|
While EntId <> GDB_ID.NULL
|
||||||
|
vId(nInd) = EntId
|
||||||
|
SelData.GetSubFromId(EntId, vSub(nInd))
|
||||||
|
nInd += 1
|
||||||
|
EntId = EgtGetNextSelectedObj()
|
||||||
End While
|
End While
|
||||||
' Gestione speciale per superfici ( si aggiunge l'identificazione della faccia)
|
EgtSetMachiningGeometry(vId, vSub)
|
||||||
If SelectedGeometry.Count() > 0 AndAlso
|
|
||||||
(EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_MESH Or EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_FRGN) Then
|
' Rigenero la lavorazione
|
||||||
' Aggiorno lista speciale con facce
|
If Not EgtApplyMachining(bRecalc) Then
|
||||||
SelData.VerifyIdSub()
|
|
||||||
' Verifico se geometria cambiata, confrontando selezione attuale con facet con geometria di lavorazione
|
|
||||||
Dim nInd As Integer = 0
|
|
||||||
Dim nMchId, nMchSub As Integer
|
|
||||||
EgtGetMachiningGeometry(nInd, nMchId, nMchSub)
|
|
||||||
Dim nSelId, nSelSub As Integer
|
|
||||||
SelData.GetIdSub(nInd, nSelId, nSelSub)
|
|
||||||
While Not ModifiedGeometry And (nMchId <> GDB_ID.NULL Or nSelId <> GDB_ID.NULL)
|
|
||||||
' Controllo uguaglianza
|
|
||||||
If nMchId <> nSelId Or nMchSub <> nSelSub Then ModifiedGeometry = True
|
|
||||||
' Passo al successivo
|
|
||||||
nInd += 1
|
|
||||||
EgtGetMachiningGeometry(nInd, nMchId, nMchSub)
|
|
||||||
SelData.GetIdSub(nInd, nSelId, nSelSub)
|
|
||||||
End While
|
|
||||||
If ModifiedGeometry Then
|
|
||||||
Dim vId() As Integer = Nothing
|
|
||||||
Dim vSub() As Integer = Nothing
|
|
||||||
SelData.GetAllIdSub(vId, vSub)
|
|
||||||
EgtSetMachiningGeometry(vId, vSub)
|
|
||||||
End If
|
|
||||||
' Gestione standard per altre entità (curve, testi, ...)
|
|
||||||
Else
|
|
||||||
' Verifico se geometria cambiata, confrontando selezione attuale con geometria di lavorazione
|
|
||||||
Dim nInd As Integer = 0
|
|
||||||
Dim nMchId, nMchSub As Integer
|
|
||||||
EgtGetMachiningGeometry(nInd, nMchId, nMchSub)
|
|
||||||
Dim nSelId As Integer
|
|
||||||
nSelId = If(nInd < SelectedGeometry.Count(), SelectedGeometry(nInd), GDB_ID.NULL)
|
|
||||||
While Not ModifiedGeometry And (nMchId <> GDB_ID.NULL Or nSelId <> GDB_ID.NULL)
|
|
||||||
' Controllo uguaglianza
|
|
||||||
If nMchId <> nSelId Then ModifiedGeometry = True
|
|
||||||
' Passo al successivo
|
|
||||||
nInd += 1
|
|
||||||
EgtGetMachiningGeometry(nInd, nMchId, nMchSub)
|
|
||||||
nSelId = If(nInd < SelectedGeometry.Count(), SelectedGeometry(nInd), GDB_ID.NULL)
|
|
||||||
End While
|
|
||||||
' Imposto geometria selezionata come geometria di lavorazione
|
|
||||||
If ModifiedGeometry Then
|
|
||||||
EgtSetMachiningGeometry(SelectedGeometry.ToArray)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
' Ricalcolo la lavorazione
|
|
||||||
If Not EgtApplyMachining(bRecalc Or ModifiedGeometry) Then
|
|
||||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||||
Dim sInfo As String = String.Empty
|
Dim sInfo As String = String.Empty
|
||||||
@@ -442,12 +472,14 @@ Public Class MachiningParameterExpanderVM
|
|||||||
Map.refStatusBarVM.NotifyStatusOutput("")
|
Map.refStatusBarVM.NotifyStatusOutput("")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Restart visualizzazione utensile
|
' Restart visualizzazione utensile
|
||||||
If m_bPreviewTool Then
|
EgtPreparePreviewMachiningTool()
|
||||||
EgtPreparePreviewMachiningTool()
|
EgtChangePreviewMachiningToolShow(nPreviewMachiningTool)
|
||||||
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
|
SetSliderScale(EgtGetPreviewMachiningToolStepCount())
|
||||||
End If
|
SetSlider_IsEnable(True)
|
||||||
IsModified(False) ' NotifyPropertyChanged("UpdateMachiningBtn_Background")
|
ResetSliderValue()
|
||||||
|
IsModified(False)
|
||||||
ErrorOnOperation(False)
|
ErrorOnOperation(False)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
Map.refProjectVM.EmitTitle()
|
Map.refProjectVM.EmitTitle()
|
||||||
@@ -455,6 +487,23 @@ Public Class MachiningParameterExpanderVM
|
|||||||
|
|
||||||
#End Region ' UpdateMachiningCommand
|
#End Region ' UpdateMachiningCommand
|
||||||
|
|
||||||
|
#Region "PreviewMachiningTool_Command"
|
||||||
|
|
||||||
|
Public ReadOnly Property PreviewMachiningTool_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdPreviewMachiningTool Is Nothing Then
|
||||||
|
m_cmdPreviewMachiningTool = New RelayCommand(AddressOf PreviewMachiningTool)
|
||||||
|
End If
|
||||||
|
Return m_cmdPreviewMachiningTool
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub PreviewMachiningTool(ByVal param As Object)
|
||||||
|
PreviewMachiningTool()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' PreviewMachiningTool_Command
|
||||||
|
|
||||||
#End Region ' Commands
|
#End Region ' Commands
|
||||||
|
|
||||||
Private Sub IsModified(IsModified As Boolean) Handles m_CurrOperation.m_IsModified
|
Private Sub IsModified(IsModified As Boolean) Handles m_CurrOperation.m_IsModified
|
||||||
@@ -503,8 +552,12 @@ Public Class OperationParamVisibilityConverter
|
|||||||
Return TMDbParamVisibility.Chiseling(CInt(parameter))
|
Return TMDbParamVisibility.Chiseling(CInt(parameter))
|
||||||
Case MCH_OY.SURFFINISHING
|
Case MCH_OY.SURFFINISHING
|
||||||
Return TMDbParamVisibility.SurfFinishing(CInt(parameter))
|
Return TMDbParamVisibility.SurfFinishing(CInt(parameter))
|
||||||
|
Case MCH_OY.SURFROUGHING
|
||||||
|
Return TMDbParamVisibility.SurfRoughing(CInt(parameter))
|
||||||
Case MCH_OY.WATERJETTING
|
Case MCH_OY.WATERJETTING
|
||||||
Return TMDbParamVisibility.WaterJetting(CInt(parameter))
|
Return TMDbParamVisibility.WaterJetting(CInt(parameter))
|
||||||
|
Case MCH_OY.FIVEAXISMILLING
|
||||||
|
Return TMDbParamVisibility.FiveAxMachining(CInt(parameter))
|
||||||
Case Else
|
Case Else
|
||||||
Return Visibility.Hidden
|
Return Visibility.Hidden
|
||||||
End Select
|
End Select
|
||||||
|
|||||||
+6
-1
@@ -232,7 +232,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+10
-5
@@ -129,13 +129,13 @@
|
|||||||
UpdateSourceTrigger=PropertyChanged,
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
ValidatesOnDataErrors=True}"
|
ValidatesOnDataErrors=True}"
|
||||||
Style="{DynamicResource StringParamV_Margin}"/>
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
|
||||||
ParamTxBx="{Binding Path=OffSl,
|
ParamTxBx="{Binding Path=OffSr,
|
||||||
UpdateSourceTrigger=PropertyChanged,
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
ValidatesOnDataErrors=True}"
|
ValidatesOnDataErrors=True}"
|
||||||
Style="{DynamicResource StringParamV_Margin}"/>
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
|
||||||
ParamTxBx="{Binding Path=OffSr,
|
ParamTxBx="{Binding Path=OffSl,
|
||||||
UpdateSourceTrigger=PropertyChanged,
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
ValidatesOnDataErrors=True}"
|
ValidatesOnDataErrors=True}"
|
||||||
Style="{DynamicResource StringParamV_Margin}"/>
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
@@ -241,7 +241,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+275
@@ -0,0 +1,275 @@
|
|||||||
|
<UserControl x:Class="ProbingParameterExpanderV"
|
||||||
|
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:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||||
|
|
||||||
|
<UserControl.Resources>
|
||||||
|
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
|
||||||
|
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
|
||||||
|
<sys:Int32 x:Key="Invert">0</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LeaveTab">1</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="WorkSide">2</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="HeadSide">3</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LeadInType">4</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LeadOutType">6</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="CurveUse">7</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StepType">8</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Speed">10</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Feed">11</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StartFeed">12</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="EndFeed">13</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TipFeed">14</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OffSr">15</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OffSl">16</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="SideAngle">17</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Approx">18</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StartPos">19</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StepPar">23</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ReturnPos">24</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TabLen">25</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TabDist">26</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TabHeight">27</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TabAngle">28</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LiTang">29</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LiPerp">30</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LiElev">31</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LiCompLen">32</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LoTang">33</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LoPerp">34</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LoElev">35</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LoCompLen">36</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StartAddLen">37</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="EndAddLen">38</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StepExtArc">39</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StepIntArc">40</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="SideStep">41</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="VertFeed">42</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="NamePar">43</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Tool">44</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="DepthStr">45</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="UserNotes">46</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OverLapStr">47</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OffsetStr">48</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="SubType">49</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="AxRotRef">51</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="FaceUseType">53</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ApproxGen">57</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OscEnable">58</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OscHeight">59</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OscRampLen">60</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OscFlatLen">61</sys:Int32>
|
||||||
|
</UserControl.Resources>
|
||||||
|
|
||||||
|
<StackPanel Name="OperationParametersStackPanel">
|
||||||
|
<StackPanel Name="OperationFirstParametersStackPanel">
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
|
||||||
|
Converter={StaticResource DepthUnitConverter}}"
|
||||||
|
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
|
||||||
|
ParamChBx="{Binding Path=Invert,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource CheckParamV_Margin}"/>
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="{Binding UserNotesTxBl}"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
|
||||||
|
<EgtWPFLib5:EgtTextBox.ToolTip>
|
||||||
|
<TextBlock Text="{Binding UserNotesTooltip}"/>
|
||||||
|
</EgtWPFLib5:EgtTextBox.ToolTip>
|
||||||
|
</EgtWPFLib5:EgtTextBox>
|
||||||
|
<TextBlock Text="{Binding SystemNotesTxBl}"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
|
||||||
|
Visibility="{Binding SysNotes_Visibility}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
|
||||||
|
Visibility="{Binding SysNotes_Visibility}"
|
||||||
|
IsReadOnly="True"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Name="AutomaticCloseExpanderStackPanel">
|
||||||
|
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
|
||||||
|
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
|
||||||
|
<StackPanel>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=StartPos,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
|
||||||
|
ParamCmBxList="{Binding Path=SubTypeList,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
|
||||||
|
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Expander>
|
||||||
|
|
||||||
|
<Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
|
||||||
|
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
|
||||||
|
<Expander.Header>
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="{Binding AdvancedParamMsg}"
|
||||||
|
Margin="2.5"/>
|
||||||
|
<Button Command="{Binding ShowNoteListComboCommand}"
|
||||||
|
ToolTip="{Binding ShowNoteToolTip}"
|
||||||
|
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
|
||||||
|
Visibility="{Binding ShowNoteListCombo_Visibility}"
|
||||||
|
Grid.Column="1"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Margin="2.5,2.5,7,2.5"
|
||||||
|
Width="20">
|
||||||
|
<Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
|
||||||
|
</Button>
|
||||||
|
</UniformGrid>
|
||||||
|
</Expander.Header>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel>
|
||||||
|
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertToolDirTxBl}"
|
||||||
|
ParamChBx="{Binding Path=InvertToolDir,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource CheckParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=InitAngs,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding BlockedAxisTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=BlockedAxis,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SolChoiceTypeTxBl}"
|
||||||
|
ParamCmBxList="{Binding Path=SolChoiceTypeList,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True,
|
||||||
|
Mode=OneWay}"
|
||||||
|
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}"
|
||||||
|
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Grid Grid.Row="1" Margin="0,5,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ItemsControl ItemsSource="{Binding NotesList}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding Description}"
|
||||||
|
Margin="0,5.5,29,0"
|
||||||
|
Width="82"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
|
||||||
|
<TabControl SelectedIndex="{Binding SelTypeValue}"
|
||||||
|
Grid.Column="1"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderBrush="Transparent">
|
||||||
|
<TabControl.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type TabItem}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
</Style>
|
||||||
|
</TabControl.ItemContainerStyle>
|
||||||
|
<TabItem Header="TEXT">
|
||||||
|
<TextBox Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
IsReadOnly="False"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="CHECKBOX">
|
||||||
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
Grid.Column="2"
|
||||||
|
Width="20"
|
||||||
|
Height="20"
|
||||||
|
Margin="5,0,0,0">
|
||||||
|
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
<ComboBox ItemsSource="{Binding NotesListCombo}"
|
||||||
|
SelectedItem="{Binding SelNoteItemCombo}"
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.ColumnSpan="1"
|
||||||
|
Visibility="{Binding ComboAddVisibility}">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Description}"
|
||||||
|
Margin="2.5"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Expander>
|
||||||
|
|
||||||
|
<Expander Style="{StaticResource ExpanderStyle}">
|
||||||
|
<Expander.Header>
|
||||||
|
<TextBlock Text="{Binding ToolExpanderHeader}"/>
|
||||||
|
</Expander.Header>
|
||||||
|
<StackPanel>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=Feed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=TipFeed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=StartFeed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=EndFeed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Expander>
|
||||||
|
<Interactivity:Interaction.Behaviors>
|
||||||
|
<EgtCAM5:AutomaticCloseExpander/>
|
||||||
|
</Interactivity:Interaction.Behaviors>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
</UserControl>
|
||||||
+83
@@ -0,0 +1,83 @@
|
|||||||
|
Imports EgtWPFLib5.EgtFloating
|
||||||
|
|
||||||
|
Public Class ProbingParameterExpanderV
|
||||||
|
|
||||||
|
Private m_RightTrayV As RightTrayV
|
||||||
|
Private EgtFloatingPanel As EgtFloatingPanel
|
||||||
|
|
||||||
|
Private m_bFirst As Boolean = True
|
||||||
|
|
||||||
|
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
|
||||||
|
If m_bFirst Then
|
||||||
|
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
|
||||||
|
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
|
||||||
|
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
|
||||||
|
PanelHeight = EgtFloatingPanel.DesiredSize.Height
|
||||||
|
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
|
||||||
|
m_bFirst = False
|
||||||
|
End If
|
||||||
|
CalculateOperationParametersStackPanelMaxHeight()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Dim m_bSizeChanging As Boolean = False
|
||||||
|
|
||||||
|
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
|
||||||
|
If m_bSizeChanging Then Return
|
||||||
|
m_bSizeChanging = True
|
||||||
|
CalculateOperationParametersStackPanelMaxHeight()
|
||||||
|
m_bSizeChanging = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Dim PanelHeight As Double = 0
|
||||||
|
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
|
||||||
|
|
||||||
|
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
|
||||||
|
Private Sub CalculateOperationParametersStackPanelMaxHeight()
|
||||||
|
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
|
||||||
|
Dim OpenedExpanderList As New List(Of Boolean)
|
||||||
|
For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
|
||||||
|
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
|
||||||
|
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
|
||||||
|
If IndexedExpander.IsExpanded Then
|
||||||
|
OpenedExpanderList.Add(True)
|
||||||
|
IndexedExpander.IsExpanded = False
|
||||||
|
Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
|
||||||
|
CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
|
||||||
|
AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
|
||||||
|
' Sottraggo anche i padding
|
||||||
|
AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
|
||||||
|
Else
|
||||||
|
OpenedExpanderList.Add(False)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
OpenedExpanderList.Add(False)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
|
||||||
|
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
|
||||||
|
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
|
||||||
|
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
|
||||||
|
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
|
||||||
|
If OpenedExpanderList(Index) Then
|
||||||
|
IndexedExpander.IsExpanded = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
|
||||||
|
Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
|
||||||
|
Dim target As DependencyObject = dependencyObject
|
||||||
|
Do
|
||||||
|
target = LogicalTreeHelper.GetParent(target)
|
||||||
|
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
|
||||||
|
If IsNothing(target) Then
|
||||||
|
target = dependencyObject
|
||||||
|
Do
|
||||||
|
target = VisualTreeHelper.GetParent(target)
|
||||||
|
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
|
||||||
|
End If
|
||||||
|
Return TryCast(target, T)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
+6
-1
@@ -213,7 +213,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+6
-1
@@ -217,7 +217,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+6
-1
@@ -211,7 +211,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+8
-3
@@ -124,10 +124,10 @@
|
|||||||
ValidatesOnDataErrors=True}"
|
ValidatesOnDataErrors=True}"
|
||||||
Style="{DynamicResource StringParamV_Margin}"/>
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtLinkTypeTxBl}"
|
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtLinkTypeTxBl}"
|
||||||
ParamCmBxList="{Binding Path=ExtLinkTypeList,
|
ParamCmBxList="{Binding Path=LeadLinkTypeList,
|
||||||
UpdateSourceTrigger=PropertyChanged,
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
ValidatesOnDataErrors=True}"
|
ValidatesOnDataErrors=True}"
|
||||||
ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}"
|
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
|
||||||
Style="{DynamicResource ComboParamV_Margin}"/>
|
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Expander>
|
</Expander>
|
||||||
@@ -209,7 +209,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+6
-1
@@ -217,7 +217,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+6
-7
@@ -124,12 +124,6 @@
|
|||||||
UpdateSourceTrigger=PropertyChanged,
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
ValidatesOnDataErrors=True}"
|
ValidatesOnDataErrors=True}"
|
||||||
Style="{DynamicResource StringParamV_Margin}"/>
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadLinkTypeTxBl}"
|
|
||||||
ParamCmBxList="{Binding Path=LeadLinkTypeList,
|
|
||||||
UpdateSourceTrigger=PropertyChanged,
|
|
||||||
ValidatesOnDataErrors=True}"
|
|
||||||
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
|
|
||||||
Style="{DynamicResource ComboParamV_Margin}"/>
|
|
||||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
|
||||||
ParamTxBx="{Binding Path=SideAngle,
|
ParamTxBx="{Binding Path=SideAngle,
|
||||||
UpdateSourceTrigger=PropertyChanged,
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
@@ -230,7 +224,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+351
@@ -0,0 +1,351 @@
|
|||||||
|
<UserControl x:Class="SurfRoughingParameterExpanderV"
|
||||||
|
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:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||||
|
|
||||||
|
<UserControl.Resources>
|
||||||
|
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
|
||||||
|
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
|
||||||
|
<sys:Int32 x:Key="Invert">0</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LeaveTab">1</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="WorkSide">2</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="HeadSide">3</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LeadInType">4</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LeadOutType">6</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="CurveUse">7</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StepType">8</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Speed">10</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Feed">11</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StartFeed">12</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="EndFeed">13</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TipFeed">14</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OffSr">15</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OffSl">16</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="SideAngle">17</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Approx">18</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StartPos">19</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StepPar">23</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ReturnPos">24</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TabLen">25</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TabDist">26</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TabHeight">27</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="TabAngle">28</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LiTang">29</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LiPerp">30</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LiElev">31</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LiCompLen">32</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LoTang">33</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LoPerp">34</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LoElev">35</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="LoCompLen">36</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StartAddLen">37</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="EndAddLen">38</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StepExtArc">39</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="StepIntArc">40</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="SideStep">41</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="VertFeed">42</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="NamePar">43</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Tool">44</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="DepthStr">45</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="UserNotes">46</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OverLapStr">47</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OffsetStr">48</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="SubType">49</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="AxRotRef">51</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="FaceUseType">53</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="ApproxGen">57</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OscEnable">58</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OscHeight">59</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OscRampLen">60</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="OscFlatLen">61</sys:Int32>
|
||||||
|
</UserControl.Resources>
|
||||||
|
|
||||||
|
<StackPanel Name="OperationParametersStackPanel">
|
||||||
|
<StackPanel Name="OperationFirstParametersStackPanel">
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
|
||||||
|
Converter={StaticResource DepthUnitConverter}}"
|
||||||
|
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
|
||||||
|
ParamChBx="{Binding Path=Invert,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource CheckParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
|
||||||
|
ParamCmBxList="{Binding Path=SubTypeList,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
|
||||||
|
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="{Binding UserNotesTxBl}"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
|
||||||
|
<EgtWPFLib5:EgtTextBox.ToolTip>
|
||||||
|
<TextBlock Text="{Binding UserNotesTooltip}"/>
|
||||||
|
</EgtWPFLib5:EgtTextBox.ToolTip>
|
||||||
|
</EgtWPFLib5:EgtTextBox>
|
||||||
|
<TextBlock Text="{Binding SystemNotesTxBl}"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
|
||||||
|
Visibility="{Binding SysNotes_Visibility}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
|
||||||
|
Visibility="{Binding SysNotes_Visibility}"
|
||||||
|
IsReadOnly="True"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Name="AutomaticCloseExpanderStackPanel">
|
||||||
|
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
|
||||||
|
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
|
||||||
|
<StackPanel>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=StartPos,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=SideAngle,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=StepPar,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SubStepTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=SubStep,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideStepTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=SideStep,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=OffSr,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=OffSl,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding ApproxTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=Approx,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Expander>
|
||||||
|
|
||||||
|
<Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
|
||||||
|
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
|
||||||
|
<Expander.Header>
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="{Binding AdvancedParamMsg}"
|
||||||
|
Margin="2.5"/>
|
||||||
|
<Button Command="{Binding ShowNoteListComboCommand}"
|
||||||
|
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
|
||||||
|
Visibility="{Binding ShowNoteListCombo_Visibility}"
|
||||||
|
ToolTip="{Binding ShowNoteToolTip}"
|
||||||
|
Grid.Column="1"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Margin="2.5,2.5,7,2.5"
|
||||||
|
Width="20">
|
||||||
|
<Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
|
||||||
|
</Button>
|
||||||
|
</UniformGrid>
|
||||||
|
</Expander.Header>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=InitAngs,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding BlockedAxisTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=BlockedAxis,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SolChoiceTypeTxBl}"
|
||||||
|
ParamCmBxList="{Binding Path=SolChoiceTypeList,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True,
|
||||||
|
Mode=OneWay}"
|
||||||
|
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}"
|
||||||
|
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Grid Grid.Row="1" Margin="0,5,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ItemsControl ItemsSource="{Binding NotesList}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding Description}"
|
||||||
|
Margin="0,5.5,29,0"
|
||||||
|
Width="82"
|
||||||
|
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
|
||||||
|
<TabControl SelectedIndex="{Binding SelTypeValue}"
|
||||||
|
Grid.Column="1"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderBrush="Transparent">
|
||||||
|
<TabControl.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type TabItem}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
</Style>
|
||||||
|
</TabControl.ItemContainerStyle>
|
||||||
|
<TabItem Header="TEXT">
|
||||||
|
<TextBox Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
IsReadOnly="False"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="CHECKBOX">
|
||||||
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
Grid.Column="2"
|
||||||
|
Width="20"
|
||||||
|
Height="20"
|
||||||
|
Margin="5,0,0,0">
|
||||||
|
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
<ComboBox ItemsSource="{Binding NotesListCombo}"
|
||||||
|
SelectedItem="{Binding SelNoteItemCombo}"
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.ColumnSpan="1"
|
||||||
|
Visibility="{Binding ComboAddVisibility}">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Description}"
|
||||||
|
Margin="2.5"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Expander>
|
||||||
|
|
||||||
|
<Expander Style="{StaticResource ExpanderStyle}">
|
||||||
|
<Expander.Header>
|
||||||
|
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
|
||||||
|
ParamCmBxList="{Binding Path=LeadInTypeList,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
|
||||||
|
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||||
|
</Expander.Header>
|
||||||
|
<StackPanel>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=LiTang,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiElevTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=LiElev,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Expander>
|
||||||
|
|
||||||
|
<Expander Style="{StaticResource ExpanderStyle}">
|
||||||
|
<Expander.Header>
|
||||||
|
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
|
||||||
|
ParamCmBxList="{Binding Path=LeadOutTypeList,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
|
||||||
|
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||||
|
</Expander.Header>
|
||||||
|
<StackPanel>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoTangTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=LoTang,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Expander>
|
||||||
|
|
||||||
|
<Expander Style="{StaticResource ExpanderStyle}">
|
||||||
|
<Expander.Header>
|
||||||
|
<TextBlock Text="{Binding ToolExpanderHeader}"/>
|
||||||
|
</Expander.Header>
|
||||||
|
<StackPanel>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=Speed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=Feed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=TipFeed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=StartFeed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
|
||||||
|
ParamTxBx="{Binding Path=EndFeed,
|
||||||
|
UpdateSourceTrigger=PropertyChanged,
|
||||||
|
ValidatesOnDataErrors=True}"
|
||||||
|
Style="{DynamicResource StringParamV_Margin}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Expander>
|
||||||
|
<Interactivity:Interaction.Behaviors>
|
||||||
|
<EgtCAM5:AutomaticCloseExpander/>
|
||||||
|
</Interactivity:Interaction.Behaviors>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
</UserControl>
|
||||||
+83
@@ -0,0 +1,83 @@
|
|||||||
|
Imports EgtWPFLib5.EgtFloating
|
||||||
|
|
||||||
|
Public Class SurfRoughingParameterExpanderV
|
||||||
|
|
||||||
|
Private m_RightTrayV As RightTrayV
|
||||||
|
Private EgtFloatingPanel As EgtFloatingPanel
|
||||||
|
|
||||||
|
Private m_bFirst As Boolean = True
|
||||||
|
|
||||||
|
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
|
||||||
|
If m_bFirst Then
|
||||||
|
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
|
||||||
|
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
|
||||||
|
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
|
||||||
|
PanelHeight = EgtFloatingPanel.DesiredSize.Height
|
||||||
|
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
|
||||||
|
m_bFirst = False
|
||||||
|
End If
|
||||||
|
CalculateOperationParametersStackPanelMaxHeight()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Dim m_bSizeChanging As Boolean = False
|
||||||
|
|
||||||
|
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
|
||||||
|
If m_bSizeChanging Then Return
|
||||||
|
m_bSizeChanging = True
|
||||||
|
CalculateOperationParametersStackPanelMaxHeight()
|
||||||
|
m_bSizeChanging = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Dim PanelHeight As Double = 0
|
||||||
|
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
|
||||||
|
|
||||||
|
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
|
||||||
|
Private Sub CalculateOperationParametersStackPanelMaxHeight()
|
||||||
|
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
|
||||||
|
Dim OpenedExpanderList As New List(Of Boolean)
|
||||||
|
For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
|
||||||
|
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
|
||||||
|
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
|
||||||
|
If IndexedExpander.IsExpanded Then
|
||||||
|
OpenedExpanderList.Add(True)
|
||||||
|
IndexedExpander.IsExpanded = False
|
||||||
|
Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
|
||||||
|
CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
|
||||||
|
AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
|
||||||
|
' Sottraggo anche i padding
|
||||||
|
AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
|
||||||
|
Else
|
||||||
|
OpenedExpanderList.Add(False)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
OpenedExpanderList.Add(False)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
|
||||||
|
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
|
||||||
|
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
|
||||||
|
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
|
||||||
|
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
|
||||||
|
If OpenedExpanderList(Index) Then
|
||||||
|
IndexedExpander.IsExpanded = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
|
||||||
|
Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
|
||||||
|
Dim target As DependencyObject = dependencyObject
|
||||||
|
Do
|
||||||
|
target = LogicalTreeHelper.GetParent(target)
|
||||||
|
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
|
||||||
|
If IsNothing(target) Then
|
||||||
|
target = dependencyObject
|
||||||
|
Do
|
||||||
|
target = VisualTreeHelper.GetParent(target)
|
||||||
|
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
|
||||||
|
End If
|
||||||
|
Return TryCast(target, T)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
+6
-1
@@ -199,7 +199,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+6
-1
@@ -218,7 +218,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+6
-1
@@ -236,7 +236,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+6
-1
@@ -226,7 +226,12 @@
|
|||||||
IsReadOnly="False"/>
|
IsReadOnly="False"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="CHECKBOX">
|
<TabItem Header="CHECKBOX">
|
||||||
<CheckBox IsChecked="{Binding Value}"/>
|
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="COMBOBOX">
|
||||||
|
<ComboBox ItemsSource="{Binding ListKeyValue}"
|
||||||
|
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="KeyValue"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||||
|
|||||||
+25
@@ -28,6 +28,31 @@ Public Class DispositionOpListBoxItem
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property OnOffAll As Boolean?
|
||||||
|
Get
|
||||||
|
Dim OpIndexes As List(Of Integer) = GetOpIndexes()
|
||||||
|
' Ritorno il valore specificato in base agli stati delle operazioni di cui abbiamo raccolto gli indici
|
||||||
|
If OpIndexes.Count = 0 Then Return False
|
||||||
|
Dim bTemp As Boolean = DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(OpIndexes(0)), MachiningOpListBoxItem).OnOff
|
||||||
|
For OpInDispIndex = 1 To OpIndexes.Count - 1
|
||||||
|
If DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(OpIndexes(OpInDispIndex)), MachiningOpListBoxItem).OnOff <> bTemp Then Return Nothing
|
||||||
|
Next
|
||||||
|
Return bTemp
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean?)
|
||||||
|
' Recupero gli indici delle operazioni della Disposizione corrente
|
||||||
|
Dim OpIndexes As List(Of Integer) = GetOpIndexes()
|
||||||
|
If OpIndexes.Count = 0 Then
|
||||||
|
NotifyPropertyChanged(NameOf(OnOffAll))
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
For Each OpInDispIndex In OpIndexes
|
||||||
|
DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(OpInDispIndex), MachiningOpListBoxItem).OnOff = If(IsNothing(value), False, CBool(value))
|
||||||
|
Next
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Private m_Image As String = String.Empty
|
Private m_Image As String = String.Empty
|
||||||
Public Property Image As String
|
Public Property Image As String
|
||||||
Get
|
Get
|
||||||
|
|||||||
+43
-2
@@ -1,5 +1,4 @@
|
|||||||
Imports System.ComponentModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class MachiningOpListBoxItem
|
Public Class MachiningOpListBoxItem
|
||||||
@@ -126,6 +125,31 @@ Public Class MachiningOpListBoxItem
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Private m_bOnOff As Boolean = True
|
||||||
|
Public Property OnOff As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bOnOff
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
If m_bOnOff <> value Then
|
||||||
|
m_bOnOff = value
|
||||||
|
Dim bOldEnMod As Boolean = EgtGetEnableModified()
|
||||||
|
EgtDisableModified()
|
||||||
|
' se abilitato, eseguo operazione
|
||||||
|
Dim status As Integer = GDB_ST.OFF
|
||||||
|
If value Then
|
||||||
|
status = GDB_ST.ON_
|
||||||
|
End If
|
||||||
|
ModifyStatusLamp()
|
||||||
|
EgtSetStatus(Id, status)
|
||||||
|
If bOldEnMod Then EgtEnableModified()
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(OnOff))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdModifyNameEnter As ICommand
|
Private m_cmdModifyNameEnter As ICommand
|
||||||
Private m_cmdModifyNameEsc As ICommand
|
Private m_cmdModifyNameEsc As ICommand
|
||||||
@@ -170,11 +194,28 @@ Public Class MachiningOpListBoxItem
|
|||||||
Return ""
|
Return ""
|
||||||
Case MCH_OY.CHISELING
|
Case MCH_OY.CHISELING
|
||||||
Return ""
|
Return ""
|
||||||
|
Case MCH_OY.FIVEAXISMILLING
|
||||||
|
Return ""
|
||||||
Case Else
|
Case Else
|
||||||
Return String.Empty
|
Return String.Empty
|
||||||
End Select
|
End Select
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Sub ModifyStatusLamp()
|
||||||
|
' Recupero l'indice dell'operazione a cui abbiamo appena modificato lo Status e l'indice della Disposizione che la contiene
|
||||||
|
Dim DispIndex As Integer = 0
|
||||||
|
Dim OpIndex As Integer = 0
|
||||||
|
For Each OpItem In Map.refOperationsListExpanderVM.OperationList
|
||||||
|
If EgtGetOperationType(OpItem.Id) = MCH_OY.DISP Then DispIndex = OpIndex
|
||||||
|
If OpItem.Id = Id Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
OpIndex += 1
|
||||||
|
Next
|
||||||
|
' Notifico StatusAll per calcolare lo stato della CheckBox della Disposizione
|
||||||
|
Map.refOperationsListExpanderVM.OperationList(DispIndex).NotifyPropertyChanged(NameOf(DispositionOpListBoxItem.OnOffAll))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "ModifyNameEnterCommand"
|
#Region "ModifyNameEnterCommand"
|
||||||
|
|||||||
+12
-6
@@ -74,7 +74,7 @@ Public Class OperationListBoxItem
|
|||||||
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
|
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
|
||||||
NotifyPropertyChanged("IsSelected")
|
NotifyPropertyChanged("IsSelected")
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtDraw()
|
If Map.refOperationsListExpanderVM.ForceDrawInIsSelected Then EgtDraw()
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Imposto la fase di lavorazione corrente
|
' Imposto la fase di lavorazione corrente
|
||||||
@@ -106,26 +106,32 @@ Public Class OperationListBoxItem
|
|||||||
Dim EntityIndex As Integer = 0
|
Dim EntityIndex As Integer = 0
|
||||||
Dim SubEntityIndex As Integer = 0
|
Dim SubEntityIndex As Integer = 0
|
||||||
While EgtGetMachiningGeometry(CountIndex, EntityIndex, SubEntityIndex)
|
While EgtGetMachiningGeometry(CountIndex, EntityIndex, SubEntityIndex)
|
||||||
EgtSelectObj( EntityIndex)
|
EgtSelectObj(EntityIndex)
|
||||||
If EgtGetType( EntityIndex) = GDB_TY.SRF_MESH Or EgtGetType( EntityIndex) = GDB_TY.SRF_FRGN Then
|
If EgtGetType(EntityIndex) = GDB_TY.SRF_MESH Or EgtGetType(EntityIndex) = GDB_TY.SRF_FRGN Then
|
||||||
SelData.AddIdSub(EntityIndex, SubEntityIndex)
|
SelData.AddIdSub(EntityIndex, SubEntityIndex)
|
||||||
End If
|
End If
|
||||||
CountIndex += 1
|
CountIndex += 1
|
||||||
End While
|
End While
|
||||||
End If
|
End If
|
||||||
' Notifico al contentcontrol OperationParameter di aggiornarsi
|
' Notifico al contentcontrol OperationParameter di aggiornarsi
|
||||||
If Not IsNothing( Map.refOperationParametersExpanderVM) Then
|
If Not IsNothing(Map.refOperationParametersExpanderVM) Then
|
||||||
Map.refOperationParametersExpanderVM.OnPropertyChanged("OperationParameters")
|
Map.refOperationParametersExpanderVM.OnPropertyChanged("OperationParameters")
|
||||||
End If
|
End If
|
||||||
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveUp_IsEnabled")
|
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveUp_IsEnabled")
|
||||||
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
|
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
|
||||||
' Notifico l'operazione selezionata all'expander con l'albero delle lavorazioni aggiungibili
|
' Notifico l'operazione selezionata all'expander con l'albero delle lavorazioni aggiungibili
|
||||||
If Not IsNothing( Map.refMachiningTreeExpanderVM) Then
|
If Not IsNothing(Map.refMachiningTreeExpanderVM) Then
|
||||||
Map.refMachiningTreeExpanderVM.nSelectedOperationId = Me.Id
|
Map.refMachiningTreeExpanderVM.nSelectedOperationId = Me.Id
|
||||||
End If
|
End If
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtDraw()
|
If Map.refOperationsListExpanderVM.ForceDrawInIsSelected Then EgtDraw()
|
||||||
End If
|
End If
|
||||||
|
' Resetto valori slider
|
||||||
|
If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
|
||||||
|
Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount())
|
||||||
|
Map.refMachiningParameterExpanderVM.ResetSliderValue()
|
||||||
|
End If
|
||||||
|
|
||||||
'OnPropertyChanged("ToolExpanderHeader")
|
'OnPropertyChanged("ToolExpanderHeader")
|
||||||
Map.refOperationsListExpanderVM.OnPropertyChanged("DuplicateCmd_IsEnabled")
|
Map.refOperationsListExpanderVM.OnPropertyChanged("DuplicateCmd_IsEnabled")
|
||||||
Map.refOperationsListExpanderVM.OnPropertyChanged("MachToDb_IsEnabled")
|
Map.refOperationsListExpanderVM.OnPropertyChanged("MachToDb_IsEnabled")
|
||||||
|
|||||||
+20
-8
@@ -1,7 +1,4 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports EgtUILib
|
||||||
Imports System.IO
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class OperationParametersExpanderVM
|
Public Class OperationParametersExpanderVM
|
||||||
Inherits ViewModelBase
|
Inherits ViewModelBase
|
||||||
@@ -32,6 +29,7 @@ Public Class OperationParametersExpanderVM
|
|||||||
' disattivo MTable e SpecialPanel se vado sulla modifica di una lavorazione
|
' disattivo MTable e SpecialPanel se vado sulla modifica di una lavorazione
|
||||||
Map.refDoorPanelVM.MTableIsEnabled(Not m_ParametersIsExpanded)
|
Map.refDoorPanelVM.MTableIsEnabled(Not m_ParametersIsExpanded)
|
||||||
Map.refSpecialPanelVM.SpecialPanelIsEnabled(Not m_ParametersIsExpanded)
|
Map.refSpecialPanelVM.SpecialPanelIsEnabled(Not m_ParametersIsExpanded)
|
||||||
|
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -70,9 +68,10 @@ Public Class OperationParametersExpanderVM
|
|||||||
Return m_DispositionParameterExpander
|
Return m_DispositionParameterExpander
|
||||||
Else
|
Else
|
||||||
If IsNothing(m_MachiningParameterExpander) Then
|
If IsNothing(m_MachiningParameterExpander) Then
|
||||||
m_MachiningParameterExpander = New MachiningParameterExpanderV
|
|
||||||
m_MachiningParameterExpanderVM = New MachiningParameterExpanderVM()
|
m_MachiningParameterExpanderVM = New MachiningParameterExpanderVM()
|
||||||
m_MachiningParameterExpander.DataContext = m_MachiningParameterExpanderVM
|
m_MachiningParameterExpander = New MachiningParameterExpanderV With {
|
||||||
|
.DataContext = m_MachiningParameterExpanderVM
|
||||||
|
}
|
||||||
End If
|
End If
|
||||||
m_MachiningParameterExpanderVM.NotifyPropertyChanged("ParamExpanderPageV")
|
m_MachiningParameterExpanderVM.NotifyPropertyChanged("ParamExpanderPageV")
|
||||||
Return m_MachiningParameterExpander
|
Return m_MachiningParameterExpander
|
||||||
@@ -170,11 +169,21 @@ Public Class OperationParametersExpanderVM
|
|||||||
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomChiseling
|
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomChiseling
|
||||||
Case MCH_OY.SURFFINISHING
|
Case MCH_OY.SURFFINISHING
|
||||||
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomSurfFinishing
|
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomSurfFinishing
|
||||||
|
Case MCH_OY.SURFROUGHING
|
||||||
|
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomSurfRoughing
|
||||||
Case MCH_OY.WATERJETTING
|
Case MCH_OY.WATERJETTING
|
||||||
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomWaterJetting
|
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomWaterJetting
|
||||||
|
Case MCH_OY.FIVEAXISMILLING
|
||||||
|
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomFiveAxMilling
|
||||||
|
Case MCH_OY.PROBING
|
||||||
|
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomProbing
|
||||||
End Select
|
End Select
|
||||||
' Imposto visualizzazione utensile
|
' Imposto visualizzazione utensile
|
||||||
DirectCast(m_MachiningParameterExpander.DataContext, MachiningParameterExpanderVM).ViewTool = True
|
Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
|
||||||
|
Map.refMachiningParameterExpanderVM.SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
|
||||||
|
Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(True)
|
||||||
|
EgtPreparePreviewMachiningTool()
|
||||||
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
OnPropertyChanged("ParametersIsExpanded")
|
OnPropertyChanged("ParametersIsExpanded")
|
||||||
Return True
|
Return True
|
||||||
@@ -204,7 +213,10 @@ Public Class OperationParametersExpanderVM
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
Else
|
Else
|
||||||
' Nascondo visualizzazione utensile
|
' Nascondo visualizzazione utensile
|
||||||
DirectCast(m_MachiningParameterExpander.DataContext, MachiningParameterExpanderVM).ViewTool = False
|
Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.NONE)
|
||||||
|
Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(False)
|
||||||
|
Map.refMachiningParameterExpanderVM.ResetSliderValue()
|
||||||
|
EgtRemovePreviewMachiningTool()
|
||||||
End If
|
End If
|
||||||
ParametersExpanderName = String.Empty
|
ParametersExpanderName = String.Empty
|
||||||
' Disabilito la selezione delle lavorazioni
|
' Disabilito la selezione delle lavorazioni
|
||||||
|
|||||||
+156
-150
@@ -1,170 +1,176 @@
|
|||||||
<UserControl x:Class="OperationsListExpanderV"
|
<UserControl x:Class="OperationsListExpanderV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||||
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||||
|
|
||||||
<StackPanel Name="OperationsListExpanderViewStackPanel" IsEnabled="{Binding OpersListViewIsEnabled}">
|
<Expander Header="{Binding OperationListHeader}"
|
||||||
|
IsEnabled="{Binding OpersListViewIsEnabled}"
|
||||||
|
IsExpanded="{Binding ListIsExpanded}" Name="OperationsListExpander"
|
||||||
|
Style="{StaticResource ExpanderStyle}">
|
||||||
|
<Expander.InputBindings>
|
||||||
|
<KeyBinding Key="Escape" Command="{Binding CancelOperationCommand}" CommandParameter="Escape"/>
|
||||||
|
</Expander.InputBindings>
|
||||||
|
|
||||||
<Expander Header="{Binding OperationListHeader}" IsExpanded="{Binding ListIsExpanded}" Name="OperationsListExpander"
|
<Grid>
|
||||||
Style="{StaticResource ExpanderStyle}">
|
<Grid.RowDefinitions>
|
||||||
<Expander.InputBindings>
|
<RowDefinition Height="Auto"/>
|
||||||
<KeyBinding Key="Escape" Command="{Binding CancelOperationCommand}" CommandParameter="Escape"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Expander.InputBindings>
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<StackPanel>
|
<UniformGrid Rows="1">
|
||||||
|
<Button Content="{Binding NewMachiningBtnContent}" Command="{Binding NewMachiningCommand}" Height="30"/>
|
||||||
|
<Button Content="{Binding NewPositioningBtnContent}" Command="{Binding NewPositioningCommand}" Height="30"/>
|
||||||
|
<Button Content="{Binding CancelOperationBtnContent}" Command="{Binding CancelOperationCommand}" Height="30"/>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
<UniformGrid Rows="1">
|
<ListBox Grid.Row="1"
|
||||||
<Button Content="{Binding NewMachiningBtnContent}" Command="{Binding NewMachiningCommand}" Height="30"/>
|
IsSynchronizedWithCurrentItem="False"
|
||||||
<Button Content="{Binding NewPositioningBtnContent}" Command="{Binding NewPositioningCommand}" Height="30"/>
|
ItemsSource="{Binding OperationList}"
|
||||||
<Button Content="{Binding CancelOperationBtnContent}" Command="{Binding CancelOperationCommand}" Height="30"/>
|
x:Name="OperationList" IsEnabled="{Binding IsEnabledOperationList}" SelectionMode="Extended">
|
||||||
</UniformGrid>
|
<ListBox.Resources>
|
||||||
<ListBox IsSynchronizedWithCurrentItem="False" ItemsSource="{Binding OperationList}"
|
<DataTemplate DataType="{x:Type EgtCAM5:MachiningOpListBoxItem}">
|
||||||
Height="200" x:Name="OperationList" IsEnabled="{Binding IsEnabledOperationList}" SelectionMode="Extended">
|
<DataTemplate.Resources>
|
||||||
<ListBox.Resources>
|
<Style x:Key="LayoutRoot" TargetType="Grid"/>
|
||||||
<DataTemplate DataType="{x:Type EgtCAM5:MachiningOpListBoxItem}">
|
</DataTemplate.Resources>
|
||||||
<DataTemplate.Resources>
|
<Border Background="Transparent">
|
||||||
<Style x:Key="LayoutRoot" TargetType="Grid">
|
<Border.InputBindings>
|
||||||
<!--<Style.Triggers>
|
<MouseBinding MouseAction="LeftDoubleClick"
|
||||||
--><!--these are the triggers that make the code cursor jump from box 1 to box 2 to box 3.--><!--
|
|
||||||
<DataTrigger Binding="{Binding ElementName=Box, Path=Visibility}" Value="Visible">
|
|
||||||
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=Box}"/>
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>-->
|
|
||||||
</Style>
|
|
||||||
</DataTemplate.Resources>
|
|
||||||
<Border Background="Transparent">
|
|
||||||
<Border.InputBindings>
|
|
||||||
<MouseBinding MouseAction="LeftDoubleClick"
|
|
||||||
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
|
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
|
||||||
CommandParameter="{Binding Id}"/>
|
CommandParameter="{Binding Id}"/>
|
||||||
</Border.InputBindings>
|
</Border.InputBindings>
|
||||||
<Grid Style="{StaticResource LayoutRoot}">
|
<Grid Style="{StaticResource LayoutRoot}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition Width="1*"/>
|
||||||
<CheckBox IsChecked="{Binding Status}" Margin="0,0,5,0"/>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
|
<CheckBox IsChecked="{Binding Status}" Margin="0,0,5,0"/>
|
||||||
<TextBlock Grid.Column="1" Text="{Binding Name}"
|
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
|
||||||
Visibility="{Binding Name_Visibility}" Margin="0,0,5,0"/>
|
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="1"
|
||||||
<TextBox Grid.Column="1" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}"
|
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>
|
||||||
Width="150"
|
|
||||||
x:Name="Box"
|
<TextBlock Grid.Column="2" Text="{Binding Name}"
|
||||||
Visibility="{Binding ModifyName_Visibility}" Margin="0,0,5,0">
|
Visibility="{Binding Name_Visibility}" Margin="0,0,5,0"/>
|
||||||
<!--IsVisibleChanged="MachiningOpListBoxItem_IsVisibleChanged"
|
<TextBox Grid.Column="2" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Width="150"
|
||||||
|
x:Name="Box"
|
||||||
|
Visibility="{Binding ModifyName_Visibility}" Margin="0,0,5,0">
|
||||||
|
<!--IsVisibleChanged="MachiningOpListBoxItem_IsVisibleChanged"
|
||||||
LostKeyboardFocus="MachiningOpListBoxItem_LostKeyboardFocus">-->
|
LostKeyboardFocus="MachiningOpListBoxItem_LostKeyboardFocus">-->
|
||||||
<TextBox.InputBindings>
|
<TextBox.InputBindings>
|
||||||
<KeyBinding Key="Enter" Command="{Binding ModifyNameEnterCommand}"/>
|
<KeyBinding Key="Enter" Command="{Binding ModifyNameEnterCommand}"/>
|
||||||
<KeyBinding Key="Escape" Command="{Binding ModifyNameEscCommand}"/>
|
<KeyBinding Key="Escape" Command="{Binding ModifyNameEscCommand}"/>
|
||||||
</TextBox.InputBindings>
|
</TextBox.InputBindings>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
<TextBlock Grid.Column="2" Text="{Binding Info}"/>
|
<TextBlock Grid.Column="3" Text="{Binding Info}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type EgtCAM5:DispositionOpListBoxItem}">
|
<DataTemplate DataType="{x:Type EgtCAM5:DispositionOpListBoxItem}">
|
||||||
<Border CornerRadius="1" Background="{StaticResource EgaltechBlue3}">
|
<Border CornerRadius="1" Background="{StaticResource EgaltechBlue3}">
|
||||||
<Border.InputBindings>
|
<Border.InputBindings>
|
||||||
<MouseBinding MouseAction="LeftDoubleClick"
|
<MouseBinding MouseAction="LeftDoubleClick"
|
||||||
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
|
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
|
||||||
CommandParameter="{Binding Id}"/>
|
CommandParameter="{Binding Id}"/>
|
||||||
</Border.InputBindings>
|
</Border.InputBindings>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<CheckBox IsChecked="{Binding StatusAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
|
<CheckBox IsChecked="{Binding StatusAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
|
||||||
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
|
<CheckBox IsChecked="{Binding OnOffAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
|
||||||
<TextBlock Text="{Binding Name}" Foreground="White"
|
<!--<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}"
|
||||||
FontSize="15" FontWeight="SemiBold"/>
|
IsChecked="{Binding OnOffAll}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>-->
|
||||||
</StackPanel>
|
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
|
||||||
</Border>
|
<TextBlock Text="{Binding Name}" Foreground="White"
|
||||||
</DataTemplate>
|
FontSize="15" FontWeight="SemiBold"/>
|
||||||
</ListBox.Resources>
|
</StackPanel>
|
||||||
<ListBox.ItemsPanel>
|
</Border>
|
||||||
<ItemsPanelTemplate>
|
</DataTemplate>
|
||||||
<StackPanel Orientation="Vertical"/>
|
</ListBox.Resources>
|
||||||
</ItemsPanelTemplate>
|
<!--<ListBox.ItemsPanel>
|
||||||
</ListBox.ItemsPanel>
|
<ItemsPanelTemplate>
|
||||||
<!--<Interactivity:Interaction.Triggers>
|
<StackPanel Orientation="Vertical"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ListBox.ItemsPanel>-->
|
||||||
|
<!--<Interactivity:Interaction.Triggers>
|
||||||
<Interactivity:EventTrigger EventName="MouseDoubleClick">
|
<Interactivity:EventTrigger EventName="MouseDoubleClick">
|
||||||
<Interactivity:InvokeCommandAction Command="{Binding OperationListDoubleClickCommand}"/>
|
<Interactivity:InvokeCommandAction Command="{Binding OperationListDoubleClickCommand}"/>
|
||||||
</Interactivity:EventTrigger>
|
</Interactivity:EventTrigger>
|
||||||
</Interactivity:Interaction.Triggers>-->
|
</Interactivity:Interaction.Triggers>-->
|
||||||
<!--<Interactivity:Interaction.Behaviors>
|
<!--<Interactivity:Interaction.Behaviors>
|
||||||
<EgtCAM5:ScrollIntoViewForListBox/>
|
<EgtCAM5:ScrollIntoViewForListBox/>
|
||||||
</Interactivity:Interaction.Behaviors>-->
|
</Interactivity:Interaction.Behaviors>-->
|
||||||
<ListBox.InputBindings>
|
<ListBox.InputBindings>
|
||||||
<KeyBinding Key="Delete" Command="{Binding CancelOperationCommand}"/>
|
<KeyBinding Key="Delete" Command="{Binding CancelOperationCommand}"/>
|
||||||
</ListBox.InputBindings>
|
</ListBox.InputBindings>
|
||||||
<ListBox.ItemContainerStyle>
|
<ListBox.ItemContainerStyle>
|
||||||
<Style TargetType="ListBoxItem">
|
<Style TargetType="ListBoxItem">
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||||
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
<Condition Property="Selector.IsSelectionActive" Value="False"/>
|
<Condition Property="Selector.IsSelectionActive" Value="False"/>
|
||||||
<Condition Property="IsSelected" Value="True"/>
|
<Condition Property="IsSelected" Value="True"/>
|
||||||
</MultiTrigger.Conditions>
|
</MultiTrigger.Conditions>
|
||||||
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
|
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
|
||||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
|
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
|
||||||
</MultiTrigger>
|
</MultiTrigger>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
<Condition Property="Selector.IsSelectionActive" Value="True"/>
|
<Condition Property="Selector.IsSelectionActive" Value="True"/>
|
||||||
<Condition Property="IsSelected" Value="True"/>
|
<Condition Property="IsSelected" Value="True"/>
|
||||||
</MultiTrigger.Conditions>
|
</MultiTrigger.Conditions>
|
||||||
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
|
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
|
||||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
|
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
|
||||||
</MultiTrigger>
|
</MultiTrigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</ListBox.ItemContainerStyle>
|
</ListBox.ItemContainerStyle>
|
||||||
<ListBox.ContextMenu>
|
<ListBox.ContextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<MenuItem Header="{Binding DuplicateMachMsg}"
|
<MenuItem Header="{Binding DuplicateMachMsg}"
|
||||||
Command="{Binding DuplicateMachCommand}"
|
Command="{Binding DuplicateMachCommand}"
|
||||||
IsEnabled="{Binding DuplicateCmd_IsEnabled}">
|
IsEnabled="{Binding DuplicateCmd_IsEnabled}">
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="{Binding MachToDbMsg}"
|
<MenuItem Header="{Binding MachToDbMsg}"
|
||||||
Command="{Binding MachToDbCommand}"
|
Command="{Binding MachToDbCommand}"
|
||||||
IsEnabled="{Binding MachToDb_IsEnabled}">
|
IsEnabled="{Binding MachToDb_IsEnabled}">
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="{Binding RenameMsg}"
|
<MenuItem Header="{Binding RenameMsg}"
|
||||||
Command="{Binding RenameCommand}"
|
Command="{Binding RenameCommand}"
|
||||||
IsEnabled="{Binding Rename_IsEnabled}">
|
IsEnabled="{Binding Rename_IsEnabled}">
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</ListBox.ContextMenu>
|
</ListBox.ContextMenu>
|
||||||
<ListBox.Style>
|
<ListBox.Style>
|
||||||
<Style TargetType="ListBox">
|
<Style TargetType="ListBox">
|
||||||
<EventSetter Event="SelectionChanged" Handler="ItemsControl_SelectionChanged"/>
|
<EventSetter Event="SelectionChanged" Handler="ItemsControl_SelectionChanged"/>
|
||||||
</Style>
|
</Style>
|
||||||
</ListBox.Style>
|
</ListBox.Style>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<UniformGrid Rows="1">
|
<UniformGrid Grid.Row="2" Rows="1">
|
||||||
<Button Content="{Binding MoveUpMsg}" Command="{Binding MoveUpCommand}" Height="30" IsEnabled="{Binding MoveUp_IsEnabled}" />
|
<Button Content="{Binding MoveUpMsg}" Command="{Binding MoveUpCommand}" Height="30" IsEnabled="{Binding MoveUp_IsEnabled}" />
|
||||||
<Button Content="{Binding MoveDownMsg}" Command="{Binding MoveDownCommand}" Height="30" IsEnabled="{Binding MoveDown_IsEnabled}"/>
|
<Button Content="{Binding MoveDownMsg}" Command="{Binding MoveDownCommand}" Height="30" IsEnabled="{Binding MoveDown_IsEnabled}"/>
|
||||||
<Button Content="{Binding UpdateMsg}" Command="{Binding UpdateCommand}" Height="30"/>
|
<Button Content="{Binding UpdateMsg}" Command="{Binding UpdateCommand}" Height="30"/>
|
||||||
<Button Content="{Binding SetUpMsg}" Command="{Binding SetUpCommand}" Height="30"/>
|
<Button Content="{Binding SetUpMsg}" Command="{Binding SetUpCommand}" Height="30"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
</StackPanel>
|
</Grid>
|
||||||
</Expander>
|
</Expander>
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
+191
-55
@@ -84,6 +84,8 @@ Public Class OperationsListExpanderVM
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If value <> m_ListIsExpanded Then
|
If value <> m_ListIsExpanded Then
|
||||||
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.OPERATIONLIST, value)
|
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.OPERATIONLIST, value)
|
||||||
|
SetStatusOnLamp()
|
||||||
|
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(value)
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -111,6 +113,37 @@ Public Class OperationsListExpanderVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_tmpOperationList As New ObservableCollection(Of MachiningOpListBoxItem)
|
||||||
|
Public Property tmpOperationList As ObservableCollection(Of MachiningOpListBoxItem)
|
||||||
|
Get
|
||||||
|
Return m_tmpOperationList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of MachiningOpListBoxItem))
|
||||||
|
m_tmpOperationList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_StatusLampList As New ObservableCollection(Of StatusLamp)
|
||||||
|
Public Property StatusLampList As ObservableCollection(Of StatusLamp)
|
||||||
|
Get
|
||||||
|
Return m_StatusLampList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of StatusLamp))
|
||||||
|
m_StatusLampList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Forza il disegno quando seleziono la lampadina
|
||||||
|
Private m_ForceDrawInIsSelected As Boolean = True
|
||||||
|
Public Property ForceDrawInIsSelected As Boolean
|
||||||
|
Get
|
||||||
|
Return m_ForceDrawInIsSelected
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_ForceDrawInIsSelected = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property DuplicateCmd_IsEnabled As Boolean
|
Public ReadOnly Property DuplicateCmd_IsEnabled As Boolean
|
||||||
Get
|
Get
|
||||||
Dim SelType As Integer = MCH_OY.NONE
|
Dim SelType As Integer = MCH_OY.NONE
|
||||||
@@ -258,7 +291,7 @@ Public Class OperationsListExpanderVM
|
|||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
m_bMoveThroughDisps = ( GetPrivateProfileInt( S_MACH, K_MOVETHROUGHDISPS, 0) <> 0)
|
m_bMoveThroughDisps = (GetPrivateProfileInt(S_MACH, K_MOVETHROUGHDISPS, 0) <> 0)
|
||||||
' Creo riferimento a questa classe in Map
|
' Creo riferimento a questa classe in Map
|
||||||
Map.SetRefOperationsListExpanderVM(Me)
|
Map.SetRefOperationsListExpanderVM(Me)
|
||||||
Me.ListIsExpanded = True
|
Me.ListIsExpanded = True
|
||||||
@@ -329,10 +362,11 @@ Public Class OperationsListExpanderVM
|
|||||||
' Aggiungo la nuova fase
|
' Aggiungo la nuova fase
|
||||||
Dim nPhase As Integer = EgtAddPhase()
|
Dim nPhase As Integer = EgtAddPhase()
|
||||||
Dim nDispId As Integer = EgtGetPhaseDisposition(nPhase)
|
Dim nDispId As Integer = EgtGetPhaseDisposition(nPhase)
|
||||||
' Confermo grezzi e bloccaggi sopra salvati
|
' Confermo grezzi, movimenti assi di disposizione e bloccaggi sopra salvati
|
||||||
For Each nId As Integer In vRawId
|
For Each nId As Integer In vRawId
|
||||||
EgtKeepRawPart(nId, nLastPhase)
|
EgtKeepRawPart(nId, nLastPhase)
|
||||||
Next
|
Next
|
||||||
|
EgtKeepAllDispAxes(nLastPhase)
|
||||||
For Each nId As Integer In vFxtId
|
For Each nId As Integer In vFxtId
|
||||||
EgtKeepFixture(nId, nLastPhase)
|
EgtKeepFixture(nId, nLastPhase)
|
||||||
Next
|
Next
|
||||||
@@ -433,7 +467,14 @@ Public Class OperationsListExpanderVM
|
|||||||
|
|
||||||
If EgtGetOperationMode(selOperation.Id) Then
|
If EgtGetOperationMode(selOperation.Id) Then
|
||||||
Map.refOperationParametersExpanderVM.ParametersIsExpanded = True
|
Map.refOperationParametersExpanderVM.ParametersIsExpanded = True
|
||||||
|
If EgtGetOperationType(selOperation.Id) <> MCH_OY.DISP Then
|
||||||
|
Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount())
|
||||||
|
Map.refMachiningParameterExpanderVM.ResetSliderValue()
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' OperationListDoubleClickCommand
|
#End Region ' OperationListDoubleClickCommand
|
||||||
@@ -457,55 +498,55 @@ Public Class OperationsListExpanderVM
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub MoveUp()
|
Public Sub MoveUp()
|
||||||
' Verifico il numero di elementi selezionati
|
' Verifico il numero di elementi selezionati
|
||||||
Dim indexes As New List( Of Integer)()
|
Dim indexes As New List(Of Integer)()
|
||||||
For index As Integer = 0 To OperationList.Count - 1
|
For index As Integer = 0 To OperationList.Count - 1
|
||||||
' Verifico gli elementi selezionati
|
' Verifico gli elementi selezionati
|
||||||
If OperationList.Item( index).IsSelected Then
|
If OperationList.Item(index).IsSelected Then
|
||||||
' Se presente una disposizione esco
|
' Se presente una disposizione esco
|
||||||
If EgtGetOperationType( OperationList.Item( index).Id) = MCH_OY.DISP Then Return
|
If EgtGetOperationType(OperationList.Item(index).Id) = MCH_OY.DISP Then Return
|
||||||
' Aggiungo l'operazione
|
' Aggiungo l'operazione
|
||||||
indexes.Add( index)
|
indexes.Add(index)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Dim lenIndexes As Integer = indexes.Count
|
Dim lenIndexes As Integer = indexes.Count
|
||||||
' Recupero Id ultima entità selezionata e precedente a quelle selezionate
|
' Recupero Id ultima entità selezionata e precedente a quelle selezionate
|
||||||
Dim LastSelectedId As Integer = OperationList( indexes( lenIndexes - 1)).Id
|
Dim LastSelectedId As Integer = OperationList(indexes(lenIndexes - 1)).Id
|
||||||
Dim PreviousId As Integer = OperationList( indexes( 0) - 1).Id
|
Dim PreviousId As Integer = OperationList(indexes(0) - 1).Id
|
||||||
' Sposto l'operazione precedente a quelle selezionate nell'ambiente Egt
|
' Sposto l'operazione precedente a quelle selezionate nell'ambiente Egt
|
||||||
If EgtRelocate( PreviousId, LastSelectedId, GDB_POS.AFTER) Then
|
If EgtRelocate(PreviousId, LastSelectedId, GDB_POS.AFTER) Then
|
||||||
' Sposto l'operazione precedente a quelle selezionate nella grafica
|
' Sposto l'operazione precedente a quelle selezionate nella grafica
|
||||||
OperationList.Move( indexes(0) - 1, indexes( lenIndexes - 1)) ' + 1)
|
OperationList.Move(indexes(0) - 1, indexes(lenIndexes - 1)) ' + 1)
|
||||||
' Ricalcolo le lavorazioni selezionate e quella che era precedente (e ora è seguente)
|
' Ricalcolo le lavorazioni selezionate e quella che era precedente (e ora è seguente)
|
||||||
If Not m_bMoveThroughDisps Then
|
If Not m_bMoveThroughDisps Then
|
||||||
For index As Integer = 0 To indexes.Count - 1
|
For index As Integer = 0 To indexes.Count - 1
|
||||||
EgtSetCurrMachining( OperationList( indexes( index)).Id)
|
EgtSetCurrMachining(OperationList(indexes(index)).Id)
|
||||||
EgtApplyMachining( False)
|
EgtApplyMachining(False)
|
||||||
Next
|
Next
|
||||||
EgtSetCurrMachining( PreviousId)
|
EgtSetCurrMachining(PreviousId)
|
||||||
EgtApplyMachining( False)
|
EgtApplyMachining(False)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
OnPropertyChanged( "MoveUp_IsEnabled")
|
OnPropertyChanged("MoveUp_IsEnabled")
|
||||||
OnPropertyChanged( "MoveDown_IsEnabled")
|
OnPropertyChanged("MoveDown_IsEnabled")
|
||||||
Map.refProjectVM.EmitTitle()
|
Map.refProjectVM.EmitTitle()
|
||||||
Else
|
Else
|
||||||
Dim nCurrPhase As Integer = EgtGetOperationPhase(LastSelectedId)
|
Dim nCurrPhase As Integer = EgtGetOperationPhase(LastSelectedId)
|
||||||
For index As Integer = 0 To indexes.Count - 1
|
For index As Integer = 0 To indexes.Count - 1
|
||||||
Dim nOpeId As Integer = OperationList( indexes( index) - 1).Id
|
Dim nOpeId As Integer = OperationList(indexes(index) - 1).Id
|
||||||
If EgtGetOperationType( nOpeId) <> MCH_OY.DISP Then
|
If EgtGetOperationType(nOpeId) <> MCH_OY.DISP Then
|
||||||
EgtAdjustOperationPhase( nOpeId)
|
EgtAdjustOperationPhase(nOpeId)
|
||||||
EgtSetCurrMachining( nOpeId)
|
EgtSetCurrMachining(nOpeId)
|
||||||
EgtApplyMachining( False)
|
EgtApplyMachining(False)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
If EgtGetOperationType( PreviousId) <> MCH_OY.DISP Then
|
If EgtGetOperationType(PreviousId) <> MCH_OY.DISP Then
|
||||||
EgtSetCurrMachining( PreviousId)
|
EgtSetCurrMachining(PreviousId)
|
||||||
EgtApplyMachining( False)
|
EgtApplyMachining(False)
|
||||||
End If
|
End If
|
||||||
Dim nNewPhase As Integer = EgtGetOperationPhase(LastSelectedId)
|
Dim nNewPhase As Integer = EgtGetOperationPhase(LastSelectedId)
|
||||||
If nNewPhase <> nCurrPhase Then EgtSetCurrPhase( nNewPhase)
|
If nNewPhase <> nCurrPhase Then EgtSetCurrPhase(nNewPhase)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
OnPropertyChanged( NameOf(MoveUp_IsEnabled))
|
OnPropertyChanged(NameOf(MoveUp_IsEnabled))
|
||||||
OnPropertyChanged( NameOf(MoveDown_IsEnabled))
|
OnPropertyChanged(NameOf(MoveDown_IsEnabled))
|
||||||
Map.refProjectVM.EmitTitle()
|
Map.refProjectVM.EmitTitle()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -532,52 +573,52 @@ Public Class OperationsListExpanderVM
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub MoveDown()
|
Public Sub MoveDown()
|
||||||
' Verifico il numero di elementi selezionati
|
' Verifico il numero di elementi selezionati
|
||||||
Dim indexes As New List( Of Integer)()
|
Dim indexes As New List(Of Integer)()
|
||||||
For index As Integer = 0 To OperationList.Count - 1
|
For index As Integer = 0 To OperationList.Count - 1
|
||||||
' Verifico gli elementi selezionati
|
' Verifico gli elementi selezionati
|
||||||
If OperationList.Item( index).IsSelected Then
|
If OperationList.Item(index).IsSelected Then
|
||||||
' Se presente una disposizione esco
|
' Se presente una disposizione esco
|
||||||
If EgtGetOperationType( OperationList.Item( index).Id) = MCH_OY.DISP Then Return
|
If EgtGetOperationType(OperationList.Item(index).Id) = MCH_OY.DISP Then Return
|
||||||
' Aggiungo l'operazione
|
' Aggiungo l'operazione
|
||||||
indexes.Add( index)
|
indexes.Add(index)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Dim lenIndexes As Integer = indexes.Count
|
Dim lenIndexes As Integer = indexes.Count
|
||||||
' Recupero Id prima entità selezionata e successiva a quelle selezionate
|
' Recupero Id prima entità selezionata e successiva a quelle selezionate
|
||||||
Dim FirstSelectedId As Integer = OperationList( indexes( 0)).Id
|
Dim FirstSelectedId As Integer = OperationList(indexes(0)).Id
|
||||||
Dim NextId As Integer = OperationList( indexes( lenIndexes - 1) + 1).Id
|
Dim NextId As Integer = OperationList(indexes(lenIndexes - 1) + 1).Id
|
||||||
' Sposto l'operazione successiva a quelle selezionate nell'ambiente Egt
|
' Sposto l'operazione successiva a quelle selezionate nell'ambiente Egt
|
||||||
If EgtRelocate( NextId, FirstSelectedId, GDB_POS.BEFORE) Then
|
If EgtRelocate(NextId, FirstSelectedId, GDB_POS.BEFORE) Then
|
||||||
' Sposto l'operazione successiva a quelle selezionate nella grafica
|
' Sposto l'operazione successiva a quelle selezionate nella grafica
|
||||||
OperationList.Move( indexes( lenIndexes - 1) + 1, indexes( 0))
|
OperationList.Move(indexes(lenIndexes - 1) + 1, indexes(0))
|
||||||
' Ricalcolo la lavorazioni selezionate e quella che era seguente (e ora è precedente)
|
' Ricalcolo la lavorazioni selezionate e quella che era seguente (e ora è precedente)
|
||||||
If Not m_bMoveThroughDisps Then
|
If Not m_bMoveThroughDisps Then
|
||||||
EgtSetCurrMachining( NextId)
|
EgtSetCurrMachining(NextId)
|
||||||
EgtApplyMachining( False)
|
EgtApplyMachining(False)
|
||||||
For index As Integer = 0 To indexes.Count - 1
|
For index As Integer = 0 To indexes.Count - 1
|
||||||
EgtSetCurrMachining( OperationList( indexes( index)).Id)
|
EgtSetCurrMachining(OperationList(indexes(index)).Id)
|
||||||
EgtApplyMachining( False)
|
EgtApplyMachining(False)
|
||||||
Next
|
Next
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
OnPropertyChanged( "MoveUp_IsEnabled")
|
OnPropertyChanged("MoveUp_IsEnabled")
|
||||||
OnPropertyChanged( "MoveDown_IsEnabled")
|
OnPropertyChanged("MoveDown_IsEnabled")
|
||||||
Map.refProjectVM.EmitTitle()
|
Map.refProjectVM.EmitTitle()
|
||||||
Else
|
Else
|
||||||
If EgtGetOperationType( NextId) <> MCH_OY.DISP Then
|
If EgtGetOperationType(NextId) <> MCH_OY.DISP Then
|
||||||
EgtSetCurrMachining( NextId)
|
EgtSetCurrMachining(NextId)
|
||||||
EgtApplyMachining( False)
|
EgtApplyMachining(False)
|
||||||
End If
|
End If
|
||||||
For index As Integer = 0 To indexes.Count - 1
|
For index As Integer = 0 To indexes.Count - 1
|
||||||
Dim nOpeId As Integer = OperationList( indexes( index) + 1).Id
|
Dim nOpeId As Integer = OperationList(indexes(index) + 1).Id
|
||||||
If EgtGetOperationType( nOpeId) <> MCH_OY.DISP Then
|
If EgtGetOperationType(nOpeId) <> MCH_OY.DISP Then
|
||||||
EgtAdjustOperationPhase( nOpeId)
|
EgtAdjustOperationPhase(nOpeId)
|
||||||
EgtSetCurrMachining( nOpeId)
|
EgtSetCurrMachining(nOpeId)
|
||||||
EgtApplyMachining( False)
|
EgtApplyMachining(False)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
OnPropertyChanged( NameOf( MoveUp_IsEnabled))
|
OnPropertyChanged(NameOf(MoveUp_IsEnabled))
|
||||||
OnPropertyChanged( NameOf( MoveDown_IsEnabled))
|
OnPropertyChanged(NameOf(MoveDown_IsEnabled))
|
||||||
Map.refProjectVM.EmitTitle()
|
Map.refProjectVM.EmitTitle()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -603,6 +644,8 @@ Public Class OperationsListExpanderVM
|
|||||||
''' Execute the Point. This method is invoked by the PointCommand.
|
''' Execute the Point. This method is invoked by the PointCommand.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub Update()
|
Public Sub Update()
|
||||||
|
Dim tmpStatusLamp As New StatusLamp()
|
||||||
|
Map.refOperationsListExpanderVM.StatusLampList = tmpStatusLamp.LoadStatusLamp()
|
||||||
' Cursore di attesa
|
' Cursore di attesa
|
||||||
Application.Current.MainWindow.ForceCursor = True
|
Application.Current.MainWindow.ForceCursor = True
|
||||||
Application.Current.MainWindow.Cursor = Cursors.Wait
|
Application.Current.MainWindow.Cursor = Cursors.Wait
|
||||||
@@ -612,6 +655,7 @@ Public Class OperationsListExpanderVM
|
|||||||
Dim bOk As Boolean = EgtApplyAllMachinings(bRecalc, False, sErr)
|
Dim bOk As Boolean = EgtApplyAllMachinings(bRecalc, False, sErr)
|
||||||
EgtSetModified()
|
EgtSetModified()
|
||||||
' Deseleziono l'Operazione selezionata e la de-evidenzio nel Disegno
|
' Deseleziono l'Operazione selezionata e la de-evidenzio nel Disegno
|
||||||
|
m_ForceDrawInIsSelected = False
|
||||||
For Each Operation In OperationList
|
For Each Operation In OperationList
|
||||||
If Operation.IsSelected Then
|
If Operation.IsSelected Then
|
||||||
Operation.IsSelected = False
|
Operation.IsSelected = False
|
||||||
@@ -619,6 +663,9 @@ Public Class OperationsListExpanderVM
|
|||||||
Next
|
Next
|
||||||
' Ricarico la lista delle Operazioni
|
' Ricarico la lista delle Operazioni
|
||||||
LoadOperationList(GDB_ID.NULL)
|
LoadOperationList(GDB_ID.NULL)
|
||||||
|
' Rimetto le lampadine in modo corretto
|
||||||
|
tmpStatusLamp.UpdateStatusLamp()
|
||||||
|
m_ForceDrawInIsSelected = True
|
||||||
' Aggiorno visualizzazione e ritorno a cursore standard
|
' Aggiorno visualizzazione e ritorno a cursore standard
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
Application.Current.MainWindow.ForceCursor = False
|
Application.Current.MainWindow.ForceCursor = False
|
||||||
@@ -628,7 +675,8 @@ Public Class OperationsListExpanderVM
|
|||||||
If Not String.IsNullOrEmpty(sErr) Then
|
If Not String.IsNullOrEmpty(sErr) Then
|
||||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||||
Else
|
Else
|
||||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
' Errore nell'aggiornamento delle lavorazioni!
|
||||||
|
MessageBox.Show(EgtMsg(5346), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Map.refStatusBarVM.NotifyStatusOutput(EgtMsg(MSG_OPERATION + 11))
|
Map.refStatusBarVM.NotifyStatusOutput(EgtMsg(MSG_OPERATION + 11))
|
||||||
@@ -829,6 +877,7 @@ Public Class OperationsListExpanderVM
|
|||||||
MCH_MP.OFFSET,
|
MCH_MP.OFFSET,
|
||||||
MCH_MP.STEPEXTARC,
|
MCH_MP.STEPEXTARC,
|
||||||
MCH_MP.STEPINTARC,
|
MCH_MP.STEPINTARC,
|
||||||
|
MCH_MP.SUBSTEP,
|
||||||
MCH_MP.SIDESTEP,
|
MCH_MP.SIDESTEP,
|
||||||
MCH_MP.VERTFEED,
|
MCH_MP.VERTFEED,
|
||||||
MCH_MP.STEPSIDEANG,
|
MCH_MP.STEPSIDEANG,
|
||||||
@@ -993,7 +1042,9 @@ Public Class OperationsListExpanderVM
|
|||||||
|
|
||||||
Private Sub LoadOperationList()
|
Private Sub LoadOperationList()
|
||||||
OperationList.Clear()
|
OperationList.Clear()
|
||||||
|
tmpOperationList.Clear()
|
||||||
Dim Id As Integer
|
Dim Id As Integer
|
||||||
|
Dim OpStatusOnOff As Integer
|
||||||
Dim OpStatus As Boolean = True
|
Dim OpStatus As Boolean = True
|
||||||
Dim OpName As String = String.Empty
|
Dim OpName As String = String.Empty
|
||||||
Dim OpType As Integer = 0
|
Dim OpType As Integer = 0
|
||||||
@@ -1006,9 +1057,14 @@ Public Class OperationsListExpanderVM
|
|||||||
If IsValidMachiningType(OpType) Then
|
If IsValidMachiningType(OpType) Then
|
||||||
EgtSetCurrMachining(Id)
|
EgtSetCurrMachining(Id)
|
||||||
OpStatus = EgtGetOperationMode(Id)
|
OpStatus = EgtGetOperationMode(Id)
|
||||||
|
EgtGetStatus(Id, OpStatusOnOff)
|
||||||
EgtGetMachiningParam(MCH_MP.TOOL, OpTool)
|
EgtGetMachiningParam(MCH_MP.TOOL, OpTool)
|
||||||
EgtGetMachiningParam(MCH_MP.NAME, OpMach)
|
EgtGetMachiningParam(MCH_MP.NAME, OpMach)
|
||||||
OperationList.Add(New MachiningOpListBoxItem(Id, OpStatus, OpName, OpType, OpTool, OpMach))
|
' Dichiarato per far si che le due liste operino in contemporaneo
|
||||||
|
Dim local_MachiningOpListBoxItem As New MachiningOpListBoxItem(Id, OpStatus, OpName, OpType, OpTool, OpMach)
|
||||||
|
OperationList.Add(local_MachiningOpListBoxItem)
|
||||||
|
' Lista creata per lavorare solo su le operazioni di macchina, utilizzata per la gestione dello spegnimento e accensione delle lamp
|
||||||
|
tmpOperationList.Add(local_MachiningOpListBoxItem)
|
||||||
ElseIf IsValidDispositionType(OpType) Then
|
ElseIf IsValidDispositionType(OpType) Then
|
||||||
OpStatus = True
|
OpStatus = True
|
||||||
OpTool = String.Empty
|
OpTool = String.Empty
|
||||||
@@ -1249,8 +1305,11 @@ Public Class OperationsListExpanderVM
|
|||||||
' Annullo creazione nuova lavorazione
|
' Annullo creazione nuova lavorazione
|
||||||
If m_NewMachining Then EndNewMachining(GDB_ID.NULL)
|
If m_NewMachining Then EndNewMachining(GDB_ID.NULL)
|
||||||
' Disabilito visualizzazione utensile
|
' Disabilito visualizzazione utensile
|
||||||
If Not IsNothing(m_MachiningParameterExpander) Then
|
If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
|
||||||
DirectCast(m_MachiningParameterExpander.DataContext, MachiningParameterExpanderVM).ViewTool = False
|
Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.NONE)
|
||||||
|
Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(False)
|
||||||
|
Map.refMachiningParameterExpanderVM.ResetSliderValue()
|
||||||
|
EgtRemovePreviewMachiningTool()
|
||||||
End If
|
End If
|
||||||
' Deseleziono le operazioni correnti per eliminare il mark
|
' Deseleziono le operazioni correnti per eliminare il mark
|
||||||
For Each Operation In OperationList
|
For Each Operation In OperationList
|
||||||
@@ -1260,6 +1319,83 @@ Public Class OperationsListExpanderVM
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetStatusOnLamp()
|
||||||
|
If Not IsNothing(m_tmpOperationList) Then
|
||||||
|
For Each ItemOp As MachiningOpListBoxItem In m_tmpOperationList
|
||||||
|
If Not ItemOp.OnOff Then
|
||||||
|
EgtSetStatus(ItemOp.Id, GDB_ST.OFF)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class StatusLamp
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_nId As Integer
|
||||||
|
Public Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_nId = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bStatusLamp As Boolean
|
||||||
|
Public Property bStatusLamp As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bStatusLamp
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bStatusLamp = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New(nId As Integer, bStatusLamp As Boolean)
|
||||||
|
m_nId = nId
|
||||||
|
m_bStatusLamp = bStatusLamp
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Public Function LoadStatusLamp() As ObservableCollection(Of StatusLamp)
|
||||||
|
Dim tmpStatusLampList As New ObservableCollection(Of StatusLamp)
|
||||||
|
For Each ItemOp As MachiningOpListBoxItem In Map.refOperationsListExpanderVM.tmpOperationList
|
||||||
|
tmpStatusLampList.Add(New StatusLamp(ItemOp.Id, ItemOp.OnOff))
|
||||||
|
Next
|
||||||
|
Return tmpStatusLampList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub UpdateStatusLamp()
|
||||||
|
Dim tmpStatusLamp As StatusLamp
|
||||||
|
If Not IsNothing(Map.refOperationsListExpanderVM.tmpOperationList) Then
|
||||||
|
For Each ItemOp As MachiningOpListBoxItem In Map.refOperationsListExpanderVM.tmpOperationList
|
||||||
|
tmpStatusLamp = Map.refOperationsListExpanderVM.StatusLampList.FirstOrDefault(Function(x) x.nId = ItemOp.Id)
|
||||||
|
If Not tmpStatusLamp.bStatusLamp Then
|
||||||
|
EgtSetStatus(ItemOp.Id, GDB_ST.OFF)
|
||||||
|
ItemOp.OnOff = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Methods
|
#End Region ' Methods
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -51,7 +51,14 @@
|
|||||||
<TextBlock Text="{Binding VMillMsg}" Margin="5,0,0,0"/>
|
<TextBlock Text="{Binding VMillMsg}" Margin="5,0,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<Grid>
|
<StackPanel Orientation="Horizontal" Visibility="{Binding Trace_Visibility}"
|
||||||
|
IsEnabled="{Binding Trace_IsEnabled}" Margin="10,5,10,0">
|
||||||
|
<CheckBox HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||||
|
IsChecked="{Binding TraceActive}"/>
|
||||||
|
<TextBlock Text="{Binding TraceMsg}" Margin="5,0,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.IO
|
||||||
Imports System.IO
|
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
@@ -18,6 +17,10 @@ Public Class SimulationExpanderVM
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If value <> m_Simulation_IsExpanded Then
|
If value <> m_Simulation_IsExpanded Then
|
||||||
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.SIMULATION, value)
|
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.SIMULATION, value)
|
||||||
|
Map.refOperationsListExpanderVM.StatusLampList.Clear()
|
||||||
|
Dim tmpStatusLamp As New StatusLamp()
|
||||||
|
Map.refOperationsListExpanderVM.StatusLampList = tmpStatusLamp.LoadStatusLamp()
|
||||||
|
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -33,6 +36,17 @@ Public Class SimulationExpanderVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_bOnlySimulation As Boolean = False
|
||||||
|
Public Property bOnlySimulation As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bOnlySimulation
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bOnlySimulation = value
|
||||||
|
NotifyPropertyChanged("bOnlySimulation")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Overrides Property SliderValue As Double
|
Public Overrides Property SliderValue As Double
|
||||||
Get
|
Get
|
||||||
Return m_SliderValue
|
Return m_SliderValue
|
||||||
@@ -90,9 +104,11 @@ Public Class SimulationExpanderVM
|
|||||||
If Not GetCncFileName(True, sCncFile, sInfo) Then Return
|
If Not GetCncFileName(True, sCncFile, sInfo) Then Return
|
||||||
' Eseguo
|
' Eseguo
|
||||||
If Not EgtGenerate(sCncFile, sInfo) Then
|
If Not EgtGenerate(sCncFile, sInfo) Then
|
||||||
Dim nErr = EgtGetLastMachMgrErrorId()
|
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
|
||||||
If nErr = 1000 Then
|
If nErr = 1000 Then
|
||||||
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr = 1001 Then
|
||||||
|
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
ElseIf nErr <> 0 Then
|
ElseIf nErr <> 0 Then
|
||||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||||
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||||
@@ -151,6 +167,14 @@ Public Class SimulationExpanderVM
|
|||||||
' disattivo MTable e SpecialPanel se vado in simulazione
|
' disattivo MTable e SpecialPanel se vado in simulazione
|
||||||
Map.refDoorPanelVM.MTableIsEnabled(False)
|
Map.refDoorPanelVM.MTableIsEnabled(False)
|
||||||
Map.refSpecialPanelVM.SpecialPanelIsEnabled(False)
|
Map.refSpecialPanelVM.SpecialPanelIsEnabled(False)
|
||||||
|
If m_bOnlySimulation Then
|
||||||
|
Map.refTopCommandBarVM.DrawIsEnabled = False
|
||||||
|
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = False
|
||||||
|
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
|
||||||
|
Map.refEstimationsExpanderVM.Estimation_IsEnabled =False
|
||||||
|
Map.refMachGroupPanelVM.SetMachGroupState(False)
|
||||||
|
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
|
||||||
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -206,11 +230,16 @@ Public Class SimulationExpanderVM
|
|||||||
UpdateUI()
|
UpdateUI()
|
||||||
' Messaggio in caso di errore
|
' Messaggio in caso di errore
|
||||||
If Not bOk Then
|
If Not bOk Then
|
||||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
|
||||||
|
If nErr = 1000 Then
|
||||||
|
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr = 1001 Then
|
||||||
|
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr <> 0 Then
|
||||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||||
Else
|
Else
|
||||||
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
MessageBox.Show(EgtMsg(15010), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Imposto stato corrente
|
' Imposto stato corrente
|
||||||
@@ -220,7 +249,8 @@ Public Class SimulationExpanderVM
|
|||||||
Dim SliderVal As Double = GetPrivateProfileDouble(S_SIMUL, K_SLIDERVAL, 10)
|
Dim SliderVal As Double = GetPrivateProfileDouble(S_SIMUL, K_SLIDERVAL, 10)
|
||||||
SliderValue = SliderVal
|
SliderValue = SliderVal
|
||||||
' Gestione check VMill
|
' Gestione check VMill
|
||||||
If IsKeyEnabledVirtualMilling() And EgtUILib.GetPrivateProfileInt(S_VMILL, K_VM_ENABLE, 0, m_sCurrMachIniFilePath) <> 0 Then
|
If IsKeyEnabledVirtualMilling() And
|
||||||
|
EgtUILib.GetPrivateProfileInt(S_VMILL, K_VM_ENABLE, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||||
VMill_Visibility = Visibility.Visible
|
VMill_Visibility = Visibility.Visible
|
||||||
VMill_IsEnabled = True
|
VMill_IsEnabled = True
|
||||||
Dim bVal As Boolean
|
Dim bVal As Boolean
|
||||||
@@ -233,6 +263,16 @@ Public Class SimulationExpanderVM
|
|||||||
VMillActive = False
|
VMillActive = False
|
||||||
EgtEnableModified()
|
EgtEnableModified()
|
||||||
End If
|
End If
|
||||||
|
' Gestione check Trace
|
||||||
|
If IniFile.GetPrivateProfileInt(S_SIMUL, K_TRACEENABLE, 0) <> 0 And
|
||||||
|
EgtUILib.GetPrivateProfileInt(S_TOOLTRACE, K_TT_ENABLE, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||||
|
Trace_Visibility = Visibility.Visible
|
||||||
|
Trace_IsEnabled = True
|
||||||
|
If TraceActive Then TraceActive = True
|
||||||
|
Else
|
||||||
|
Trace_Visibility = Visibility.Collapsed
|
||||||
|
Trace_IsEnabled = False
|
||||||
|
End If
|
||||||
' Aggiorno visualizzazione dati macchina
|
' Aggiorno visualizzazione dati macchina
|
||||||
ShowCncData()
|
ShowCncData()
|
||||||
StatusMsg = EgtMsg(MSG_SIMULATION + 14) ' HOME
|
StatusMsg = EgtMsg(MSG_SIMULATION + 14) ' HOME
|
||||||
@@ -244,15 +284,20 @@ Public Class SimulationExpanderVM
|
|||||||
Map.refTopCommandBarVM.DrawIsEnabled = False
|
Map.refTopCommandBarVM.DrawIsEnabled = False
|
||||||
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = False
|
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = False
|
||||||
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
|
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
|
||||||
Map.refMachGroupPanelVM.SetMachGroupState(False) ' Map.refMachGroupPanelVM.MachGroupPanelIsEnabled = False
|
Map.refMachGroupPanelVM.SetMachGroupState(False)
|
||||||
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
|
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
|
||||||
m_bStopOnNextCollision = True
|
m_bStopOnNextCollision = True
|
||||||
If Not EgtSimStart(False) Then
|
If Not EgtSimStart(False) Then
|
||||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
|
||||||
|
If nErr = 1000 Then
|
||||||
|
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr = 1001 Then
|
||||||
|
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
|
ElseIf nErr <> 0 Then
|
||||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||||
Else
|
Else
|
||||||
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
MessageBox.Show(EgtMsg(15010), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
||||||
End If
|
End If
|
||||||
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
|
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
|
||||||
End If
|
End If
|
||||||
@@ -317,8 +362,10 @@ Public Class SimulationExpanderVM
|
|||||||
End If
|
End If
|
||||||
' Aggiorno stato visualizzazione macchina (dipende anche da utensile)
|
' Aggiorno stato visualizzazione macchina (dipende anche da utensile)
|
||||||
UpdateMachView()
|
UpdateMachView()
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione (solo se interfaccia non minimizzata, per aumentare velocità)
|
||||||
EgtDraw()
|
If Application.Current.MainWindow.WindowState <> WindowState.Minimized Then
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
' Aggiorno dati CNC
|
' Aggiorno dati CNC
|
||||||
If nShowDataCounter = 5 Or GetSimulationStatus() = MCH_SIM_ST.UI_PAUSE Or GetSimulationStatus() = MCH_SIM_ST.UI_STOP Then
|
If nShowDataCounter = 5 Or GetSimulationStatus() = MCH_SIM_ST.UI_PAUSE Or GetSimulationStatus() = MCH_SIM_ST.UI_STOP Then
|
||||||
ShowCncData()
|
ShowCncData()
|
||||||
@@ -330,17 +377,22 @@ Public Class SimulationExpanderVM
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
' Per evitare di ciclare rapidissimamente e consumare inutilmente CPU
|
' Per evitare di ciclare rapidissimamente e consumare inutilmente CPU
|
||||||
System.Threading.Thread.Sleep(4)
|
System.Threading.Thread.Sleep(5)
|
||||||
End If
|
End If
|
||||||
' Costringo ad aggiornare UI
|
' Costringo ad aggiornare UI
|
||||||
UpdateUI()
|
UpdateUI()
|
||||||
End While
|
End While
|
||||||
SetSimExecuting(False)
|
SetSimExecuting(False)
|
||||||
IniFile.m_bSimulExecuting = False
|
IniFile.m_bSimulExecuting = False
|
||||||
Map.refTopCommandBarVM.DrawIsEnabled = True
|
If m_bOnlySimulation Then
|
||||||
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = True
|
' Impedisco salvataggio eventuale modifica stato virtual milling
|
||||||
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True
|
EgtResetModified()
|
||||||
Map.refMachGroupPanelVM.SetMachGroupState(True) ' Map.refMachGroupPanelVM.MachGroupPanelIsEnabled = True
|
Else
|
||||||
|
Map.refTopCommandBarVM.DrawIsEnabled = True
|
||||||
|
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = True
|
||||||
|
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True
|
||||||
|
Map.refMachGroupPanelVM.SetMachGroupState(True)
|
||||||
|
End If
|
||||||
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
|
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
|
||||||
If IniFile.m_bSimulEndExitApp Then
|
If IniFile.m_bSimulEndExitApp Then
|
||||||
refMainWindowVM.CloseApplication( Nothing)
|
refMainWindowVM.CloseApplication( Nothing)
|
||||||
@@ -357,6 +409,7 @@ Public Class SimulationExpanderVM
|
|||||||
MachineAxisList(Index).IsReadOnlyAxesValue = True
|
MachineAxisList(Index).IsReadOnlyAxesValue = True
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
Trace_IsEnabled = (value = MCH_SIM_ST.UI_PAUSE OrElse value = MCH_SIM_ST.UI_STOP)
|
||||||
EgtSimSetUiStatus(GetStatus())
|
EgtSimSetUiStatus(GetStatus())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -396,18 +449,19 @@ Public Class SimulationExpanderVM
|
|||||||
sInfo = "EgtCAM5 ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
|
sInfo = "EgtCAM5 ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
|
||||||
#End If
|
#End If
|
||||||
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sCncFile) AndAlso Not String.IsNullOrWhiteSpace(sCncFile) Then
|
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sCncFile) AndAlso Not String.IsNullOrWhiteSpace(sCncFile) Then
|
||||||
sCncFile = Path.GetDirectoryName(sCurrFilePath) & "\" & sCncFile
|
sCncFile = Path.GetDirectoryName(sCurrFilePath) & "\" & Path.GetFileName(sCncFile)
|
||||||
Else
|
Else
|
||||||
sCncFile = Path.ChangeExtension(sCurrFilePath, Nothing)
|
sCncFile = Path.ChangeExtension(sCurrFilePath, Nothing)
|
||||||
If IniFile.m_bMachiningGroup Then
|
If IniFile.m_bMachiningGroup Then
|
||||||
Dim sMGrpName As String = String.Empty
|
Dim sMGrpName As String = String.Empty
|
||||||
If EgtGetMachGroupName(EgtGetCurrMachGroup(), sMGrpName) Then
|
If EgtGetMachGroupName(EgtGetCurrMachGroup(), sMGrpName) Then
|
||||||
sCncFile &= "_" & sMGrpName & ".cnc"
|
sCncFile &= "_" & sMGrpName
|
||||||
sInfo &= "-" & sMGrpName
|
sInfo &= "-" & sMGrpName
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
sCncFile &= ".cnc"
|
|
||||||
End If
|
End If
|
||||||
|
Dim sExt As String = ".cnc"
|
||||||
|
EgtUILib.GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, sExt, sExt, IniFile.m_sCurrMachIniFilePath)
|
||||||
|
sCncFile = Path.ChangeExtension(sCncFile, sExt)
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
@@ -415,16 +469,16 @@ Public Class SimulationExpanderVM
|
|||||||
Friend Sub SimulationExpander_Update_CncData( nFlag As Integer)
|
Friend Sub SimulationExpander_Update_CncData( nFlag As Integer)
|
||||||
If Simulation_IsExpanded Then
|
If Simulation_IsExpanded Then
|
||||||
ShowCncData()
|
ShowCncData()
|
||||||
' Se fermo per Collisione rilevata da script Lua
|
' Se fermo per Collisione rilevata da script Lua o per altra richiesta
|
||||||
If nFlag = 11 Then
|
If nFlag = 11 Or nFlag = 12 Then
|
||||||
' Imposto stato Pausa
|
' Imposto stato Pausa
|
||||||
SetSimulationStatus(MCH_SIM_ST.UI_PAUSE)
|
SetSimulationStatus(MCH_SIM_ST.UI_PAUSE)
|
||||||
StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' PAUSA
|
StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' PAUSA
|
||||||
' Aggiornamenti per bottone Play/Pause
|
' Aggiornamenti per bottone Play/Pause
|
||||||
SetShowPlay(True)
|
SetShowPlay(True)
|
||||||
NotifyPropertyChanged("PlayPauseImage")
|
NotifyPropertyChanged("PlayPauseImage")
|
||||||
' Dichiaro di non arrestarsi alla successiva notifica di collisione
|
' Se fermo per Collisione, dichiaro di non arrestarsi alla successiva notifica di collisione
|
||||||
m_bStopOnNextCollision = False
|
If nFlag = 11 Then m_bStopOnNextCollision = False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -1,25 +1,37 @@
|
|||||||
<UserControl x:Class="MachiningOptionPanelV"
|
<UserControl x:Class="MachiningOptionPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
|
||||||
|
|
||||||
<StackPanel Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
<Grid x:Name="MachiningGrid" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition MinHeight="100" Height="400" MaxHeight="800"
|
||||||
|
EgtCAM5:MachiningOptionPanelVM.IsExpanded="{Binding OperationsListRowIsExpanded}"
|
||||||
|
EgtCAM5:MachiningOptionPanelVM.TargetSplitter="{Binding ElementName=MachiningGridSplitter}"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
<!--ContentPresenter that contains the OperationsListExpander-->
|
<!--ContentPresenter that contains the OperationsListExpander-->
|
||||||
<ContentPresenter Content="{Binding OperationsListExpander,Mode=OneWay}"/>
|
<ContentPresenter Content="{Binding OperationsListExpander,Mode=OneWay}"/>
|
||||||
|
<GridSplitter Name="MachiningGridSplitter" Style="{StaticResource General_GridSplitter}"/>
|
||||||
<!--ContentPresenter that contains the OperationParametersExpander-->
|
<!--ContentPresenter that contains the OperationParametersExpander-->
|
||||||
<ContentPresenter Content="{Binding OperationParametersExpander,Mode=OneWay}"/>
|
<ContentPresenter Grid.Row="1" Content="{Binding OperationParametersExpander,Mode=OneWay}"/>
|
||||||
<!--ContentPresenter that contains the MachiningsTreeExpander-->
|
<!--ContentPresenter that contains the MachiningsTreeExpander-->
|
||||||
<ContentPresenter Content="{Binding MachiningsTreeExpander}"/>
|
<ContentPresenter Grid.Row="2" Content="{Binding MachiningsTreeExpander}"/>
|
||||||
<!--ContentPresenter that contains the SimulationExpander-->
|
<!--ContentPresenter that contains the SimulationExpander-->
|
||||||
<ContentPresenter Content="{Binding SimulationExpander}"/>
|
<ContentPresenter Grid.Row="3" Content="{Binding SimulationExpander}"/>
|
||||||
<!--ContentPresenter that contains the EstimationsExpander-->
|
<!--ContentPresenter that contains the EstimationsExpander-->
|
||||||
<ContentPresenter Content="{Binding EstimationsExpander}"/>
|
<ContentPresenter Grid.Row="4" Content="{Binding EstimationsExpander}"/>
|
||||||
|
|
||||||
<Button Content="{Binding GenerateMsg}" Height="30"
|
<Button Grid.Row="5"
|
||||||
|
Content="{Binding GenerateMsg}" Height="30"
|
||||||
IsEnabled="{Binding GenerateIsEnabled}"
|
IsEnabled="{Binding GenerateIsEnabled}"
|
||||||
Command="{Binding GenerateCommand}"/>
|
Command="{Binding GenerateCommand}"/>
|
||||||
|
|
||||||
</StackPanel>
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,7 +1,25 @@
|
|||||||
Public Class MachiningOptionPanelV
|
Public Class MachiningOptionPanelV
|
||||||
|
|
||||||
Private Sub Me_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
|
Sub New()
|
||||||
Dim x = ciao.MaxHeight
|
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
' Add any initialization after the InitializeComponent() call.
|
||||||
|
Map.SetRefMachiningOptionPanelV(Me)
|
||||||
|
|
||||||
|
If Not IsActivePlugin() Then
|
||||||
|
AddHandler MachiningGrid.Loaded,
|
||||||
|
Sub()
|
||||||
|
DynamicGridModule.RestoreMachiningGridLayout(MachiningGrid, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_MACHINING_PLUGIN, DynamicGridModule.PROJECT_MACHINING))
|
||||||
|
MachiningGrid.UpdateLayout()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
AddHandler MachiningGridSplitter.DragCompleted,
|
||||||
|
Sub()
|
||||||
|
DynamicGridModule.SaveMachiningGridLayout(MachiningGrid, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_MACHINING_PLUGIN, DynamicGridModule.PROJECT_MACHINING))
|
||||||
|
End Sub
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
Public Class MachiningOptionPanelVM
|
Public Class MachiningOptionPanelVM
|
||||||
Inherits ViewModelBase
|
Inherits ViewModelBase
|
||||||
@@ -132,6 +133,17 @@ Public Class MachiningOptionPanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_OperationsListRowIsExpanded As Boolean = True
|
||||||
|
Public ReadOnly Property OperationsListRowIsExpanded As Boolean
|
||||||
|
Get
|
||||||
|
Return m_OperationsListRowIsExpanded
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetOperationsListRowIsExpanded(value As Boolean)
|
||||||
|
m_OperationsListRowIsExpanded = value
|
||||||
|
OnPropertyChanged("OperationsListRowIsExpanded")
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
Public ReadOnly Property GenerateMsg As String
|
Public ReadOnly Property GenerateMsg As String
|
||||||
@@ -195,4 +207,67 @@ Public Class MachiningOptionPanelVM
|
|||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
#Region "DEPENCY PROPERTY"
|
||||||
|
|
||||||
|
Public Shared ReadOnly IsExpandedProperty As DependencyProperty =
|
||||||
|
DependencyProperty.RegisterAttached(
|
||||||
|
"IsExpanded",
|
||||||
|
GetType(Boolean),
|
||||||
|
GetType(MachiningOptionPanelVM),
|
||||||
|
New PropertyMetadata(True, AddressOf OnIsExpandedChanged)
|
||||||
|
)
|
||||||
|
|
||||||
|
Public Shared Sub SetIsExpanded(element As DependencyObject, value As Boolean)
|
||||||
|
element.SetValue(IsExpandedProperty, value)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Function GetIsExpanded(element As DependencyObject) As Boolean
|
||||||
|
Return CType(element.GetValue(IsExpandedProperty), Boolean)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetTargetSplitter(d As DependencyObject) As GridSplitter
|
||||||
|
Return CType(d.GetValue(TargetSplitterProperty), GridSplitter)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Sub SetTargetSplitter(d As DependencyObject, value As GridSplitter)
|
||||||
|
d.SetValue(TargetSplitterProperty, value)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared ReadOnly TargetSplitterProperty As DependencyProperty =
|
||||||
|
DependencyProperty.RegisterAttached(
|
||||||
|
"TargetSplitter",
|
||||||
|
GetType(GridSplitter),
|
||||||
|
GetType(MachiningOptionPanelVM),
|
||||||
|
New PropertyMetadata(Nothing)
|
||||||
|
)
|
||||||
|
|
||||||
|
Private Shared Sub OnIsExpandedChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
|
||||||
|
Dim row As RowDefinition = TryCast(d, RowDefinition)
|
||||||
|
If IsNothing(row) Then Return
|
||||||
|
|
||||||
|
Dim isExpanded As Boolean = CBool(e.NewValue)
|
||||||
|
|
||||||
|
Dim splitter = MachiningOptionPanelVM.GetTargetSplitter(row)
|
||||||
|
If Not IsNothing(splitter) Then
|
||||||
|
splitter.IsEnabled = isExpanded
|
||||||
|
splitter.Visibility = If(isExpanded, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not isExpanded Then
|
||||||
|
row.ClearValue(RowDefinition.HeightProperty)
|
||||||
|
|
||||||
|
row.Height = New GridLength(1, GridUnitType.Auto)
|
||||||
|
row.MinHeight = 0
|
||||||
|
Else
|
||||||
|
If File.Exists(Map.refMainWindowVM.DimensionDir) Then
|
||||||
|
DynamicGridModule.RestoreMachiningGridLayout(Map.refMachiningOptionPanelV.MachiningGrid, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_MACHINING_PLUGIN, DynamicGridModule.PROJECT_MACHINING))
|
||||||
|
Map.refMachiningOptionPanelV.MachiningGrid.UpdateLayout()
|
||||||
|
Else
|
||||||
|
row.Height = New GridLength(350)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Depency Property
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<EgtFloating:EgtFloatingPanel x:Class="OptionPanelV"
|
<EgtFloating:EgtFloatingPanel x:Class="OptionPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
TitleBarOrientation="Vertical"
|
TitleBarOrientation="Vertical"
|
||||||
Visibility="{Binding Panel_Visibility}">
|
Visibility="{Binding Panel_Visibility}">
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ Public Class OptionPanelVM
|
|||||||
Map.refSimulationExpanderVM.Simulation_IsExpanded = False
|
Map.refSimulationExpanderVM.Simulation_IsExpanded = False
|
||||||
Map.refEstimationsExpanderVM.Estimation_IsExpanded = False
|
Map.refEstimationsExpanderVM.Estimation_IsExpanded = False
|
||||||
End If
|
End If
|
||||||
|
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.SetManageLayerIsExpanded(True)
|
||||||
NotifyPropertyChanged("ModePanel")
|
NotifyPropertyChanged("ModePanel")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,10 @@ Friend Module OptionModule
|
|||||||
Friend m_GridColor As Color3d
|
Friend m_GridColor As Color3d
|
||||||
' Flag per visualizzazione spessa delle linee
|
' Flag per visualizzazione spessa delle linee
|
||||||
Friend m_bThickLine As Boolean
|
Friend m_bThickLine As Boolean
|
||||||
' Flag per visualizzazione smussata delle superfici
|
' Qualità di visualizzazione delle superfici
|
||||||
Friend m_bSmoothTriMesh As Boolean
|
Friend m_ShowSurfQuality As SceneSurfQualityOpt
|
||||||
|
' Tipo di visualizzazione delle Zmap
|
||||||
|
Friend m_nShowZmapType As Integer
|
||||||
|
|
||||||
' Colore di default in disegno
|
' Colore di default in disegno
|
||||||
Friend m_DefMaterialColor As Color3d
|
Friend m_DefMaterialColor As Color3d
|
||||||
@@ -23,7 +25,10 @@ Friend Module OptionModule
|
|||||||
' Parametri per import
|
' Parametri per import
|
||||||
Friend m_dDxfScaleFactor As Double
|
Friend m_dDxfScaleFactor As Double
|
||||||
Friend m_dStlScaleFactor As Double
|
Friend m_dStlScaleFactor As Double
|
||||||
|
Friend m_dOffScaleFactor As Double
|
||||||
|
Friend m_dPlyScaleFactor As Double
|
||||||
Friend m_dImgScaleFactor As Double
|
Friend m_dImgScaleFactor As Double
|
||||||
|
Friend m_dAdvImpTolerance As Double
|
||||||
|
|
||||||
' Parametri per export
|
' Parametri per export
|
||||||
Friend m_nExportDxfFlag As Integer
|
Friend m_nExportDxfFlag As Integer
|
||||||
@@ -53,7 +58,12 @@ Friend Module OptionModule
|
|||||||
Friend m_SelGeomGenMachining As SceneSelModeOpt
|
Friend m_SelGeomGenMachining As SceneSelModeOpt
|
||||||
Friend m_SelGeomChiseling As SceneSelModeOpt
|
Friend m_SelGeomChiseling As SceneSelModeOpt
|
||||||
Friend m_SelGeomSurfFinishing As SceneSelModeOpt
|
Friend m_SelGeomSurfFinishing As SceneSelModeOpt
|
||||||
|
Friend m_SelGeomSurfRoughing As SceneSelModeOpt
|
||||||
Friend m_SelGeomWaterJetting As SceneSelModeOpt
|
Friend m_SelGeomWaterJetting As SceneSelModeOpt
|
||||||
|
Friend m_SelGeomFiveAxMilling As SceneSelModeOpt
|
||||||
|
Friend m_SelGeomProbing As SceneSelModeOpt
|
||||||
|
' Qualità di calcolo del virtual milling
|
||||||
|
Friend m_VMillQuality As VMillSelTypeOpt
|
||||||
' Flag per aggiungere una nuova lavorazione alla fine della fase o subito dopo la lavorazione selezionata
|
' Flag per aggiungere una nuova lavorazione alla fine della fase o subito dopo la lavorazione selezionata
|
||||||
Friend m_bNewMachiningIsLastOne As Boolean
|
Friend m_bNewMachiningIsLastOne As Boolean
|
||||||
' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione
|
' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione
|
||||||
@@ -64,6 +74,9 @@ Friend Module OptionModule
|
|||||||
Friend m_bBeamOn As Boolean
|
Friend m_bBeamOn As Boolean
|
||||||
Friend m_bWallOn As Boolean
|
Friend m_bWallOn As Boolean
|
||||||
Friend m_bDoorsOn As Boolean
|
Friend m_bDoorsOn As Boolean
|
||||||
|
Friend m_bWindowOn As Boolean
|
||||||
|
Friend m_bTrimmingOn As Boolean
|
||||||
|
Friend m_bReversePostOn As Boolean
|
||||||
Friend m_bGunstockOn As Boolean
|
Friend m_bGunstockOn As Boolean
|
||||||
|
|
||||||
' inizializzazione lettura variabili ad inizio programma
|
' inizializzazione lettura variabili ad inizio programma
|
||||||
@@ -78,7 +91,7 @@ Friend Module OptionModule
|
|||||||
End While
|
End While
|
||||||
If nIndex = 1 Then
|
If nIndex = 1 Then
|
||||||
EgtOutLog("Error missing languages section in Config.ini")
|
EgtOutLog("Error missing languages section in Config.ini")
|
||||||
MessageBox.Show( "Error : missing languages informations", "EgtCAM5", MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show("Error : missing languages informations", "EgtCAM5", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
End
|
End
|
||||||
End If
|
End If
|
||||||
' Inizializzo la lingua corrente
|
' Inizializzo la lingua corrente
|
||||||
@@ -102,19 +115,33 @@ Friend Module OptionModule
|
|||||||
GetPrivateProfileColor(S_GRID, K_MINLNCOLOR, GridColor)
|
GetPrivateProfileColor(S_GRID, K_MINLNCOLOR, GridColor)
|
||||||
m_GridColor = GridColor
|
m_GridColor = GridColor
|
||||||
' Inizializzo flag linee ingrossate
|
' Inizializzo flag linee ingrossate
|
||||||
m_bThickLine = ( GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1)
|
m_bThickLine = (GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1)
|
||||||
' Inizializzo flag visualizzazione smussata delle superfici
|
' Inizializzo flag visualizzazione smussata delle superfici
|
||||||
m_bSmoothTriMesh = ( GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
|
Dim nSSQ As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWSURFQUALITY, 0)
|
||||||
|
m_ShowSurfQuality = DirectCast( Math.Min( Math.Max( nSSQ, -2), 2), SceneSurfQualityOpt)
|
||||||
|
' Inizializzo tipo di visualizzazione Zmap
|
||||||
|
m_nShowZmapType = GetPrivateProfileInt(S_SCENE, K_SHOWZMAP, 9)
|
||||||
' Inizio colore di default in disegno
|
' Inizio colore di default in disegno
|
||||||
Dim DefColor As New Color3d(0, 0, 0)
|
Dim DefColor As New Color3d(0, 0, 0)
|
||||||
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
||||||
m_DefMaterialColor = DefColor
|
m_DefMaterialColor = DefColor
|
||||||
' Inizializzo tolleranza geometrica
|
' Inizializzo tolleranza geometrica
|
||||||
m_dGeometryTolerance = GetPrivateProfileDouble(S_GEOMDB, K_SURFTMTOLER, 0.05)
|
m_dGeometryTolerance = GetPrivateProfileDouble(S_GEOMDB, K_SURFTMTOLER, 0.05)
|
||||||
|
' Inizializzo stile corrente delle quotature
|
||||||
|
m_dExtLineLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_EXTLINELEN, 5)
|
||||||
|
m_dArrowLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_ARROWLEN, 5)
|
||||||
|
m_dTextDist = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTDIST, 2)
|
||||||
|
m_nLenIsMM = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_LENISMM, 2)
|
||||||
|
m_nDecDigit = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_DECDIGIT, -2)
|
||||||
|
m_sFont = "" : GetPrivateProfileStringUtf8(S_DIMENSIONSTYLE, K_DIMFONT, "ModernPropS.Nfe", m_sFont)
|
||||||
|
m_dTextHeight = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTHEIGHT, 2)
|
||||||
' Inizializzo variabili per import
|
' Inizializzo variabili per import
|
||||||
m_dDxfScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1)
|
m_dDxfScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1)
|
||||||
m_dStlScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_STLSCALE, 1)
|
m_dStlScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_STLSCALE, 1)
|
||||||
|
m_dOffScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_OFFSCALE, 1)
|
||||||
|
m_dPlyScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_PLYSCALE, 1)
|
||||||
m_dImgScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_IMGSCALE, 1)
|
m_dImgScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_IMGSCALE, 1)
|
||||||
|
m_dAdvImpTolerance = GetPrivateProfileDouble(S_IMPORT, K_ADVTOLER, 0.05)
|
||||||
' Inizializzo variabili per export
|
' Inizializzo variabili per export
|
||||||
m_nExportDxfFlag = GetPrivateProfileInt(S_EXPORT, K_DXFFLAG, EEX_FL.COMP_LAYER)
|
m_nExportDxfFlag = GetPrivateProfileInt(S_EXPORT, K_DXFFLAG, EEX_FL.COMP_LAYER)
|
||||||
m_nImgWidth = GetPrivateProfileInt(S_EXPORT, K_IMGWIDTH, 400)
|
m_nImgWidth = GetPrivateProfileInt(S_EXPORT, K_IMGWIDTH, 400)
|
||||||
@@ -141,7 +168,16 @@ Friend Module OptionModule
|
|||||||
m_SelGeomChiseling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
m_SelGeomChiseling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
||||||
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMSURFFINISHING, -1)
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMSURFFINISHING, -1)
|
||||||
m_SelGeomSurfFinishing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
m_SelGeomSurfFinishing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
||||||
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMSURFROUGHING, -1)
|
||||||
|
m_SelGeomSurfRoughing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
||||||
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMFIVEAXMILLING, -1)
|
||||||
|
m_SelGeomFiveAxMilling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
||||||
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMPROBING, -1)
|
||||||
|
m_SelGeomProbing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
||||||
m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES
|
m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES
|
||||||
|
' Inizializzo qualità di virtual milling
|
||||||
|
Temp = GetPrivateProfileInt(S_MACH, K_VMILLQUALITY, 0)
|
||||||
|
m_VMillQuality = DirectCast(Math.Min( Math.Max( Temp, -2), 2), VMillSelTypeOpt)
|
||||||
' Inizializzo variabile che indica posizione nuova operazione di lavorazione
|
' Inizializzo variabile che indica posizione nuova operazione di lavorazione
|
||||||
m_bNewMachiningIsLastOne = (GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0)
|
m_bNewMachiningIsLastOne = (GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0)
|
||||||
' Inizializzo variabile che indica se usare script di disposizione
|
' Inizializzo variabile che indica se usare script di disposizione
|
||||||
@@ -151,9 +187,42 @@ Friend Module OptionModule
|
|||||||
m_bBeamOn = (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0)
|
m_bBeamOn = (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0)
|
||||||
m_bWallOn = (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
|
m_bWallOn = (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
|
||||||
m_bDoorsOn = (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
|
m_bDoorsOn = (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
|
||||||
|
m_bWindowOn = (GetPrivateProfileInt(S_WINDOW, K_WINDOWENABLE, 0) <> 0)
|
||||||
|
m_bTrimmingOn = (GetPrivateProfileInt(S_TRIMMING, K_TRIMMINGENABLE, 0) <> 0)
|
||||||
|
m_bReversePostOn = (GetPrivateProfileInt(S_REVERSEPOST, K_REVERSEPOSTENABLE, 0) <> 0)
|
||||||
m_bGunstockOn = (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
|
m_bGunstockOn = (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' restituisco spessore linee
|
||||||
|
Friend Function GetLineWidth() As Integer
|
||||||
|
Return If( m_bThickLine, 2, 1)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' imposto stato visualizzazione superfici
|
||||||
|
Friend Sub SetShowSurfQuality( bRedraw As Boolean)
|
||||||
|
Dim bSmoothTriMesh As Boolean = True
|
||||||
|
Dim dSrfBezShowTol As Double = 0.2
|
||||||
|
Select m_ShowSurfQuality
|
||||||
|
Case SceneSurfQualityOpt.LOWER
|
||||||
|
bSmoothTriMesh = False
|
||||||
|
dSrfBezShowTol = 4
|
||||||
|
Case SceneSurfQualityOpt.LOW
|
||||||
|
bSmoothTriMesh = False
|
||||||
|
dSrfBezShowTol = 1
|
||||||
|
Case SceneSurfQualityOpt.STANDARD
|
||||||
|
bSmoothTriMesh = True
|
||||||
|
dSrfBezShowTol = 0.2
|
||||||
|
Case SceneSurfQualityOpt.HIGH
|
||||||
|
bSmoothTriMesh = True
|
||||||
|
dSrfBezShowTol = 0.05
|
||||||
|
Case SceneSurfQualityOpt.HIGHER
|
||||||
|
bSmoothTriMesh = True
|
||||||
|
dSrfBezShowTol = 0.01
|
||||||
|
End Select
|
||||||
|
EgtSetShowTriaAdv(bSmoothTriMesh, false)
|
||||||
|
EgtSetShowSurfBezierTol(dSrfBezShowTol, bRedraw)
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|
||||||
' Classe che identifica una lingua del programma con nome e path del file dei messaggi
|
' Classe che identifica una lingua del programma con nome e path del file dei messaggi
|
||||||
|
|||||||
+294
-146
@@ -1,21 +1,23 @@
|
|||||||
<EgtWPFLib5:EgtCustomWindow x:Class="OptionWindowV"
|
<EgtWPFLib5:EgtCustomWindow x:Class="OptionWindowV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:EgtCAM5"
|
xmlns:local="clr-namespace:EgtCAM5"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
Title="{Binding Title}" Icon="/Resources/EgtCAM5.ico"
|
Title="{Binding Title}" Icon="/Resources/EgtCAM5.ico"
|
||||||
TitleBarBrush="{StaticResource EgaltechBlue1}"
|
TitleBarBrush="{StaticResource EgaltechBlue1}"
|
||||||
BorderBrush="{StaticResource EgaltechBlue1}"
|
BorderBrush="{StaticResource EgaltechBlue1}"
|
||||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||||
MinWidth="400" MinHeight="382"
|
MinWidth="400" MinHeight="382"
|
||||||
Width="400" Height="412"
|
Width="400" Height="600"
|
||||||
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
||||||
|
|
||||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||||
<local:GeomTypeConverter x:Key="GeomTypeConverter"/>
|
<local:GeomTypeConverter x:Key="GeomTypeConverter"/>
|
||||||
|
<local:SceneSurfQualityOptConverter x:Key="SceneSurfQualityOptConverter"/>
|
||||||
|
<local:VMillTypeConverter x:Key="VMillTypeConverter"/>
|
||||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||||
|
|
||||||
<TabControl Margin="5,5,5,5">
|
<TabControl Margin="5,5,5,5">
|
||||||
<TabItem Header="{Binding GenericMsg}">
|
<TabItem Header="{Binding GenericMsg}">
|
||||||
<StackPanel Margin="5,5,5,0">
|
<StackPanel Margin="5,5,5,0">
|
||||||
@@ -25,8 +27,9 @@
|
|||||||
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
|
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
|
||||||
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
|
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
|
||||||
Margin="0,0,0,5"/>
|
Margin="0,0,0,5"/>
|
||||||
<TextBlock Text="{Binding LanguageAdvertMsg}" TextWrapping="Wrap"
|
<TextBlock Text="{Binding LanguageAdvertMsg}"
|
||||||
TextAlignment="Center"/>
|
TextWrapping="Wrap"
|
||||||
|
TextAlignment="Center"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
<UniformGrid Columns="2"
|
<UniformGrid Columns="2"
|
||||||
@@ -63,19 +66,50 @@
|
|||||||
Grid.Row="0" Margin="0,5,0,5"/>
|
Grid.Row="0" Margin="0,5,0,5"/>
|
||||||
<CheckBox IsChecked="{Binding ThickLine}"
|
<CheckBox IsChecked="{Binding ThickLine}"
|
||||||
Grid.Column="1" Grid.Row="0" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
Grid.Column="1" Grid.Row="0" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
||||||
<TextBlock Text="{Binding SmoothTriMeshMsg}" VerticalAlignment="Center"
|
<TextBlock Text="{Binding SceneSurfQualityMsg}" VerticalAlignment="Center"
|
||||||
Grid.Row="1" Margin="0,5,0,5"/>
|
Grid.Row="1" Margin="0,5,0,5"/>
|
||||||
<CheckBox IsChecked="{Binding SmoothTriMesh}"
|
<ComboBox ItemsSource="{Binding SceneSurfQualityOptList, Mode=OneWay}"
|
||||||
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
SelectedItem="{Binding SelectedSceneSurfQualityOpt}"
|
||||||
|
Grid.Column="1" Grid.Row="1" Height="25" Margin="0,5,0,5">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource SceneSurfQualityOptConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
</Grid>
|
</Grid>
|
||||||
<UniformGrid Columns="2"
|
<UniformGrid Columns="2"
|
||||||
Margin="0,0,0,5">
|
Margin="0,0,0,5">
|
||||||
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
|
||||||
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
|
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
|
||||||
SelectedItem="{Binding SelectedTextFont}" Height="25"
|
SelectedItem="{Binding SelectedTextFont}" Height="25"
|
||||||
Margin="10,5,0,0"/>
|
Margin="10,5,0,0"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
<Grid Margin="5,5,5,5">
|
<GroupBox Header="ShowZmap"
|
||||||
|
Visibility="{Binding ShowZmapVisibility}"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<CheckBox IsChecked="{Binding ShowZmapSurf}"
|
||||||
|
Content="Surfaces" FlowDirection="RightToLeft"
|
||||||
|
Grid.Row="0" Grid.Column="0" Margin="5,5,10,5" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox IsChecked="{Binding ShowZmapLines}"
|
||||||
|
Content="Lines" FlowDirection="RightToLeft"
|
||||||
|
Grid.Row="0" Grid.Column="1" Margin="5,5,10,5" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox IsChecked="{Binding ShowZmapNormals}"
|
||||||
|
Content="Normals" FlowDirection="RightToLeft"
|
||||||
|
Grid.Row="0" Grid.Column="2" Margin="5,5,10,5" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox IsChecked="{Binding ShowZmapBiColor}"
|
||||||
|
Content="BiColor" FlowDirection="RightToLeft"
|
||||||
|
Grid.Row="0" Grid.Column="3" Margin="5,5,10,5" VerticalAlignment="Center"/>
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
<Grid Margin="5,100,5,5">
|
||||||
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
|
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -96,99 +130,132 @@
|
|||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Margin="10,0,0,0"/>
|
Margin="10,0,0,0"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
<GroupBox Grid.Column="1" Grid.RowSpan="2"
|
<GroupBox Grid.Column="1" Grid.RowSpan="2"
|
||||||
Header="{Binding DimensionMsg}"
|
Header="{Binding DimensionMsg}"
|
||||||
Margin="0,0,0,5">
|
Margin="0,0,0,5">
|
||||||
<UniformGrid Grid.ColumnSpan="2" Columns="2">
|
<UniformGrid Grid.ColumnSpan="2" Columns="2">
|
||||||
<TextBlock Text="{Binding ExtLineLenMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding ExtLineLenMsg}" VerticalAlignment="Center"/>
|
||||||
<TextBox Text="{Binding ExtLineLen}" Height="25"
|
<TextBox Text="{Binding ExtLineLen}" Height="25"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Margin="10,5,0,0"/>
|
Margin="10,5,0,0"/>
|
||||||
<TextBlock Text="{Binding ArrowLenMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding ArrowLenMsg}" VerticalAlignment="Center"/>
|
||||||
<TextBox Text="{Binding ArrowLen}" Height="25"
|
<TextBox Text="{Binding ArrowLen}" Height="25"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Margin="10,5,0,0"/>
|
Margin="10,5,0,0"/>
|
||||||
<TextBlock Text="{Binding TextDistMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding TextDistMsg}" VerticalAlignment="Center"/>
|
||||||
<TextBox Text="{Binding TextDist}" Height="25"
|
<TextBox Text="{Binding TextDist}" Height="25"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Margin="10,5,0,0"/>
|
Margin="10,5,0,0"/>
|
||||||
<TextBlock Text="{Binding LenIsMMMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding LenIsMMMsg}" VerticalAlignment="Center"/>
|
||||||
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
|
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
|
||||||
SelectedItem="{Binding SelectedUnitMeasure}" Height="25"
|
SelectedItem="{Binding SelectedUnitMeasure}" Height="25"
|
||||||
Margin="10,5,0,0"/>
|
Margin="10,5,0,0"/>
|
||||||
<TextBlock Text="{Binding DecDigitMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding DecDigitMsg}" VerticalAlignment="Center"/>
|
||||||
<TextBox Text="{Binding DecDigit}" Height="25"
|
<TextBox Text="{Binding DecDigit}" Height="25"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Margin="10,5,0,0"/>
|
Margin="10,5,0,0"/>
|
||||||
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
|
||||||
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
|
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
|
||||||
SelectedItem="{Binding SelectedFont}" Height="25"
|
SelectedItem="{Binding SelectedFont}" Height="25"
|
||||||
Margin="10,5,0,0"/>
|
Margin="10,5,0,0"/>
|
||||||
<TextBlock Text="{Binding TextHeightMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding TextHeightMsg}" VerticalAlignment="Center"/>
|
||||||
<TextBox Text="{Binding TextHeight}" Height="25"
|
<TextBox Text="{Binding TextHeight}" Height="25"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Margin="10,5,0,0"/>
|
Margin="10,5,0,0"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="{Binding ImportMsg}">
|
<TabItem Header="{Binding ImportMsg}">
|
||||||
<StackPanel Margin="5,5,5,0">
|
<StackPanel Margin="5,5,5,0">
|
||||||
<Grid Margin="0,5,0,0">
|
<GroupBox Grid.Column="1" Grid.RowSpan="2"
|
||||||
<Grid.ColumnDefinitions>
|
Header=""
|
||||||
<ColumnDefinition Width="1*"/>
|
Margin="0,0,0,5">
|
||||||
<ColumnDefinition Width="0.8*"/>
|
<Grid Margin="0,5,0,0">
|
||||||
<ColumnDefinition Width="1*"/>
|
<Grid.ColumnDefinitions>
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition Width="1*"/>
|
||||||
<Grid.RowDefinitions>
|
<ColumnDefinition Width="0.8*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
</Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="1*"/>
|
||||||
<TextBlock Grid.Row="0" Grid.Column="1"
|
<RowDefinition Height="1*"/>
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Center"
|
<RowDefinition Height="1*"/>
|
||||||
Text="{Binding UnitScaleMsg}" />
|
<RowDefinition Height="1*"/>
|
||||||
<TextBlock Grid.Row="0" Grid.Column="2"
|
<RowDefinition Height="1*"/>
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Center"
|
</Grid.RowDefinitions>
|
||||||
Text="{Binding FactorScaleMsg}"/>
|
<TextBlock Grid.Row="0" Grid.Column="1"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0"
|
Text="{Binding UnitScaleMsg}"/>
|
||||||
Text="{Binding DxfScaleFactorMsg}" VerticalAlignment="Center"/>
|
<TextBlock Grid.Row="0" Grid.Column="2"
|
||||||
<ComboBox Grid.Row="1" Grid.Column="1"
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||||
|
Text="{Binding FactorScaleMsg}"/>
|
||||||
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||||
|
Text="{Binding DxfScaleFactorMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox Grid.Row="1" Grid.Column="1"
|
||||||
ItemsSource="{Binding ScaleDXFList, Mode=OneWay}"
|
ItemsSource="{Binding ScaleDXFList, Mode=OneWay}"
|
||||||
SelectedItem="{Binding SelectedDXFScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
SelectedItem="{Binding SelectedDXFScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
||||||
Margin="10,0,0,5"/>
|
Margin="10,5,0,5"/>
|
||||||
<TextBox Grid.Row="1" Grid.Column="2"
|
<TextBox Grid.Row="1" Grid.Column="2"
|
||||||
Text="{Binding DxfScaleFactor}" Height="25"
|
Text="{Binding DxfScaleFactor}" Height="25"
|
||||||
IsEnabled="{Binding DXFScaleEnable, UpdateSourceTrigger=LostFocus}"
|
IsEnabled="{Binding DXFScaleEnable, UpdateSourceTrigger=LostFocus}"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Margin="10,0,0,5"/>
|
Margin="10,5,0,5"/>
|
||||||
<TextBlock Grid.Row="2" Grid.Column="0"
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
||||||
Text="{Binding StlScaleFactorMsg}" VerticalAlignment="Center"/>
|
Text="{Binding StlScaleFactorMsg}" VerticalAlignment="Center"/>
|
||||||
<ComboBox Grid.Row="2" Grid.Column="1"
|
<ComboBox Grid.Row="2" Grid.Column="1"
|
||||||
ItemsSource="{Binding ScaleSTLList, Mode=OneWay}"
|
ItemsSource="{Binding ScaleSTLList, Mode=OneWay}"
|
||||||
SelectedItem="{Binding SelectedSTLScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
SelectedItem="{Binding SelectedSTLScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
||||||
Margin="10,0,0,5"/>
|
Margin="10,0,0,5"/>
|
||||||
<TextBox Grid.Row="2" Grid.Column="2"
|
<TextBox Grid.Row="2" Grid.Column="2"
|
||||||
Text="{Binding StlScaleFactor}" Height="25"
|
Text="{Binding StlScaleFactor}" Height="25"
|
||||||
IsEnabled="{Binding STLScaleEnable, UpdateSourceTrigger=LostFocus}"
|
IsEnabled="{Binding STLScaleEnable, UpdateSourceTrigger=LostFocus}"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Margin="10,0,0,5"/>
|
Margin="10,0,0,5"/>
|
||||||
<TextBlock Grid.Row="3" Grid.Column="0"
|
<TextBlock Grid.Row="3" Grid.Column="0"
|
||||||
Text="{Binding ImageScaleFactorMsg}" VerticalAlignment="Center"/>
|
Text="{Binding OffScaleFactorMsg}" VerticalAlignment="Center"/>
|
||||||
<ComboBox Grid.Row="3" Grid.Column="1"
|
<ComboBox Grid.Row="3" Grid.Column="1"
|
||||||
ItemsSource="{Binding ScaleImageList, Mode=OneWay}"
|
ItemsSource="{Binding ScaleOffList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedOffScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBox Grid.Row="3" Grid.Column="2"
|
||||||
|
Text="{Binding OffScaleFactor}" Height="25"
|
||||||
|
IsEnabled="{Binding OffScaleEnable, UpdateSourceTrigger=LostFocus}"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBlock Grid.Row="4" Grid.Column="0"
|
||||||
|
Text="{Binding PlyScaleFactorMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox Grid.Row="4" Grid.Column="1"
|
||||||
|
ItemsSource="{Binding ScalePlyList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedPlyScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBox Grid.Row="4" Grid.Column="2"
|
||||||
|
Text="{Binding PlyScaleFactor}" Height="25"
|
||||||
|
IsEnabled="{Binding PlyScaleEnable, UpdateSourceTrigger=LostFocus}"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBlock Grid.Row="5" Grid.Column="0"
|
||||||
|
Text="{Binding ImageScaleFactorMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox Grid.Row="5" Grid.Column="1"
|
||||||
|
ItemsSource="{Binding ScaleImageList, Mode=OneWay}"
|
||||||
SelectedItem="{Binding SelectedImageScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
SelectedItem="{Binding SelectedImageScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
||||||
Margin="10,0,0,5"/>
|
Margin="10,0,0,5"/>
|
||||||
<TextBox Grid.Row="3" Grid.Column="2"
|
<TextBox Grid.Row="5" Grid.Column="2"
|
||||||
Text="{Binding ImageScaleFactor}" Height="25"
|
Text="{Binding ImageScaleFactor}" Height="25"
|
||||||
IsEnabled="{Binding ImageScaleEnable, UpdateSourceTrigger=LostFocus}"
|
IsEnabled="{Binding ImageScaleEnable, UpdateSourceTrigger=LostFocus}"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Margin="10,0,0,5"/>
|
Margin="10,0,0,5"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</GroupBox>
|
||||||
|
<UniformGrid Grid.ColumnSpan="2" Columns="2"
|
||||||
|
Margin="0,5,0,5">
|
||||||
|
<TextBlock Text="{Binding AdvImpToleranceMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding AdvImpTolerance}" Height="25"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,0"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</StackPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="{Binding ExportMsg}">
|
<TabItem Header="{Binding ExportMsg}">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
@@ -196,15 +263,15 @@
|
|||||||
Header="{Binding ImageMsg}"
|
Header="{Binding ImageMsg}"
|
||||||
Margin="5,5,5,0">
|
Margin="5,5,5,0">
|
||||||
<UniformGrid Grid.ColumnSpan="2" Columns="2">
|
<UniformGrid Grid.ColumnSpan="2" Columns="2">
|
||||||
<TextBlock Text="{Binding ImageWidthMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding ImageWidthMsg}" VerticalAlignment="Center"/>
|
||||||
<TextBox Text="{Binding ImageWidth}" Height="25"
|
<TextBox Text="{Binding ImageWidth}" Height="25"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Margin="10,0,0,5"/>
|
Margin="10,0,0,5"/>
|
||||||
<TextBlock Text="{Binding ImageHeightMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding ImageHeightMsg}" VerticalAlignment="Center"/>
|
||||||
<TextBox Text="{Binding ImageHeight}" Height="25"
|
<TextBox Text="{Binding ImageHeight}" Height="25"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Margin="10,0,0,5"/>
|
Margin="10,0,0,5"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
@@ -214,6 +281,15 @@
|
|||||||
Header="{Binding MachiningSelGeomMsg}"
|
Header="{Binding MachiningSelGeomMsg}"
|
||||||
Margin="5,5,5,0">
|
Margin="5,5,5,0">
|
||||||
<UniformGrid Columns="2">
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="{Binding GeomTypeProbingMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedProbingGeomType}" Height="25">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
<TextBlock Text="{Binding GeomTypeDrillingMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding GeomTypeDrillingMsg}" VerticalAlignment="Center"/>
|
||||||
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
SelectedItem="{Binding SelectedDrillingGeomType}" Height="25">
|
SelectedItem="{Binding SelectedDrillingGeomType}" Height="25">
|
||||||
@@ -260,6 +336,15 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
<TextBlock Text="{Binding GeomTypeGenMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedGenGeomType}" Height="25">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
<TextBlock Text="{Binding GeomTypeChiselingMsg}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding GeomTypeChiselingMsg}" VerticalAlignment="Center"/>
|
||||||
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
SelectedItem="{Binding SelectedChiselingGeomType}" Height="25">
|
SelectedItem="{Binding SelectedChiselingGeomType}" Height="25">
|
||||||
@@ -269,35 +354,80 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
<TextBlock Text="{Binding GeomTypeSurRoughMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedSurfRoughGeomType}" Height="25">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
<TextBlock Text="{Binding GeomTypeSurFinishMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedSurfFinishGeomType}" Height="25">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
<!--<TextBlock Text="{Binding GeomTypeWaterJetMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedWaterJetGeomType}" Height="25">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>-->
|
||||||
|
<TextBlock Text="{Binding GeomTypeFiveAxMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedFiveAxGeomType}" Height="25">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<Grid Margin="5,5,5,0">
|
<Grid Margin="10,5,10,0">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<UniformGrid Columns="2" Grid.ColumnSpan="2" Margin="0,5,0,0">
|
||||||
<RowDefinition Height="1*"/>
|
<TextBlock Text="{Binding VMillQualityMsg}" VerticalAlignment="Center"/>
|
||||||
<RowDefinition Height="1*"/>
|
<ComboBox ItemsSource="{Binding VMillTypeList, Mode=OneWay}"
|
||||||
</Grid.RowDefinitions>
|
SelectedItem="{Binding SelectedVMillQualityType}" Height="25">
|
||||||
<TextBlock Text="{Binding NewMachiningPosMsg}" VerticalAlignment="Center"
|
<ComboBox.ItemTemplate>
|
||||||
Grid.Row="0" Margin="0,0,0,5"/>
|
<DataTemplate>
|
||||||
<CheckBox IsChecked="{Binding NewMachiningIsLastOne}"
|
<TextBlock Text="{Binding Converter={StaticResource VMillTypeConverter}}"/>
|
||||||
Grid.Column="1" Grid.Row="0" Margin="4,0,0,0" VerticalAlignment="Center"/>
|
</DataTemplate>
|
||||||
<TextBlock Text="{Binding UseDispositionScriptMsg}" VerticalAlignment="Center"
|
</ComboBox.ItemTemplate>
|
||||||
Grid.Row="1" Margin="0,0,0,5"/>
|
</ComboBox>
|
||||||
<CheckBox IsChecked="{Binding UseDispositionScript}"
|
</UniformGrid>
|
||||||
Grid.Column="1" Grid.Row="1" Margin="4,0,0,0" VerticalAlignment="Center"/>
|
<TextBlock Grid.Row="1" Text="{Binding NewMachiningPosMsg}" VerticalAlignment="Center"
|
||||||
|
Margin="0,8,0,5"/>
|
||||||
|
<CheckBox Grid.Row="1" Grid.Column="1" IsChecked="{Binding NewMachiningIsLastOne}"
|
||||||
|
Margin="4,8,0,0" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Grid.Row="2" Text="{Binding UseDispositionScriptMsg}"
|
||||||
|
VerticalAlignment="Center" Margin="0,5,0,5"/>
|
||||||
|
<CheckBox Grid.Row="2" Grid.Column="1" IsChecked="{Binding UseDispositionScript}"
|
||||||
|
Margin="4,5,0,0" VerticalAlignment="Center"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Margin="5,5,5,0">
|
<UniformGrid Rows="2">
|
||||||
<Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,1"/>
|
<Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,10,100,5"/>
|
||||||
</Grid>
|
<Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/>
|
||||||
|
</UniformGrid>
|
||||||
<Grid Margin="5,5,5,0">
|
|
||||||
<Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/>
|
|
||||||
</Grid>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
@@ -305,9 +435,9 @@
|
|||||||
<StackPanel>
|
<StackPanel>
|
||||||
<Grid Margin="5,20,5,0">
|
<Grid Margin="5,20,5,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
@@ -315,37 +445,55 @@
|
|||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Text="{Binding SpecialMsg}"
|
|
||||||
Grid.Row="0" Margin="0,5,0,5"/>
|
|
||||||
<CheckBox IsChecked="{Binding SpecialOn}"
|
|
||||||
Grid.Row="0" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
|
||||||
<TextBlock Text="{Binding BeamMsg}"
|
<TextBlock Text="{Binding BeamMsg}"
|
||||||
Grid.Row="1" Grid.Column="0" Margin="0,5,0,5"/>
|
Grid.Row="0" Grid.Column="0" Margin="0,5,0,5"/>
|
||||||
<CheckBox IsChecked="{Binding BeamOn}" IsEnabled="{Binding BeamEnabled}"
|
<CheckBox IsChecked="{Binding BeamOn}" IsEnabled="{Binding BeamEnabled}"
|
||||||
Grid.Row="1" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
Grid.Row="0" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||||
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding BeamActive}"
|
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding BeamActive}"
|
||||||
Command="{Binding UpdateBeam_Command}"
|
Command="{Binding UpdateBeam_Command}"
|
||||||
Grid.Row="1" Grid.Column="2" Height="26"/>
|
Grid.Row="0" Grid.Column="2" Height="26"/>
|
||||||
<TextBlock Text="{Binding WallMsg}"
|
<TextBlock Text="{Binding WallMsg}"
|
||||||
Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/>
|
Grid.Row="1" Grid.Column="0" Margin="0,5,0,5"/>
|
||||||
<CheckBox IsChecked="{Binding WallOn}" IsEnabled="{Binding WallEnabled}"
|
<CheckBox IsChecked="{Binding WallOn}" IsEnabled="{Binding WallEnabled}"
|
||||||
Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
Grid.Row="1" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||||
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding WallActive}"
|
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding WallActive}"
|
||||||
Command="{Binding UpdateWall_Command}"
|
Command="{Binding UpdateWall_Command}"
|
||||||
Grid.Row="2" Grid.Column="2" Height="26"/>
|
Grid.Row="1" Grid.Column="2" Height="26"/>
|
||||||
<TextBlock Text="{Binding DoorsMsg}" VerticalAlignment="Center"
|
<TextBlock Text="{Binding DoorsMsg}" VerticalAlignment="Center"
|
||||||
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/>
|
Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/>
|
||||||
<CheckBox IsChecked="{Binding DoorsOn}" IsEnabled="{Binding DoorsEnabled}"
|
<CheckBox IsChecked="{Binding DoorsOn}" IsEnabled="{Binding DoorsEnabled}"
|
||||||
|
Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||||
|
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding DoorsActive}"
|
||||||
|
Command="{Binding UpdateDoors_Command}"
|
||||||
|
Grid.Row="2" Grid.Column="2" Height="26"/>
|
||||||
|
<TextBlock Text="{Binding WindowMsg}" VerticalAlignment="Center"
|
||||||
|
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/>
|
||||||
|
<CheckBox IsChecked="{Binding WindowOn}" IsEnabled="{Binding WindowEnabled}"
|
||||||
Grid.Row="3" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
Grid.Row="3" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||||
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
|
<TextBlock Text="{Binding TrimmingMsg}" VerticalAlignment="Center"
|
||||||
Grid.Row="4" Grid.Column="0" Margin="0,5,0,5"/>
|
Grid.Row="4" Grid.Column="0" Margin="0,5,0,5"/>
|
||||||
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
|
<CheckBox IsChecked="{Binding TrimmingOn}" IsEnabled="{Binding TrimmingEnabled}"
|
||||||
Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Text="{Binding ReversePostMsg}" VerticalAlignment="Center"
|
||||||
|
Grid.Row="5" Grid.Column="0" Margin="0,5,0,5"/>
|
||||||
|
<CheckBox IsChecked="{Binding ReversePostOn}" IsEnabled="{Binding ReversePostEnabled}"
|
||||||
|
Grid.Row="5" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
|
||||||
|
Grid.Row="6" Grid.Column="0" Margin="0,5,0,5"/>
|
||||||
|
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
|
||||||
|
Grid.Row="6" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Text="{Binding SpecialMsg}"
|
||||||
|
Grid.Row="7" Margin="0,5,0,5"/>
|
||||||
|
<CheckBox IsChecked="{Binding SpecialOn}"
|
||||||
|
Grid.Row="7" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|
||||||
</EgtWPFLib5:EgtCustomWindow>
|
</EgtWPFLib5:EgtCustomWindow>
|
||||||
|
|||||||
+715
-138
File diff suppressed because it is too large
Load Diff
@@ -1,24 +1,24 @@
|
|||||||
<UserControl x:Class="PopUpGridPanelV"
|
<UserControl x:Class="PopUpGridPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
<StackPanel Background="Transparent" Orientation="Horizontal">
|
<StackPanel Background="#93D5F4" Orientation="Horizontal">
|
||||||
<Button Command="{Binding CPlaneViewCommand}" ToolTip="{Binding CPlaneViewToolTip}" Style="{StaticResource GridViewPanelButton}">
|
<Button Command="{Binding CPlaneViewCommand}" ToolTip="{Binding CPlaneViewToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="3,3,1,3">
|
||||||
<Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding CPlaneInvertCommand}" ToolTip="{Binding CPlaneInvertToolTip}" Style="{StaticResource GridViewPanelButton}">
|
<Button Command="{Binding CPlaneInvertCommand}" ToolTip="{Binding CPlaneInvertToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
|
||||||
<Image Source="/Resources/GridViewPanel/CplaneInvert.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CplaneInvert.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding CPlaneRotateCommand}" ToolTip="{Binding CPlaneRotateToolTip}" Style="{StaticResource GridViewPanelButton}">
|
<Button Command="{Binding CPlaneRotateCommand}" ToolTip="{Binding CPlaneRotateToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
|
||||||
<Image Source="/Resources/GridViewPanel/CplaneROTATE.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CplaneROTATE.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding CPlane3PCommand}" ToolTip="{Binding CPlane3PointsToolTip}" Style="{StaticResource GridViewPanelButton}">
|
<Button Command="{Binding CPlane3PCommand}" ToolTip="{Binding CPlane3PointsToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
|
||||||
<Image Source="/Resources/GridViewPanel/Cplane3POINTS.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/Cplane3POINTS.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding CPlanePerpObjCommand}" ToolTip="{Binding CPlanePerpCurveToolTip}" Style="{StaticResource GridViewPanelButton}">
|
<Button Command="{Binding CPlanePerpObjCommand}" ToolTip="{Binding CPlanePerpCurveToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
|
||||||
<Image Source="/Resources/GridViewPanel/CplanePERPCURVE.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CplanePERPCURVE.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding CPlaneObjCommand}" ToolTip="{Binding CPlaneObjectToolTip}" Style="{StaticResource GridViewPanelButton}">
|
<Button Command="{Binding CPlaneObjCommand}" ToolTip="{Binding CPlaneObjectToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,3,3">
|
||||||
<Image Source="/Resources/GridViewPanel/CplaneOBJECT.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CplaneOBJECT.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
<UserControl x:Class="PopUpViewPanelV"
|
<UserControl x:Class="PopUpViewPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
<StackPanel Background="Transparent" Orientation="Horizontal">
|
<StackPanel Background="#93D5F4" Orientation="Horizontal">
|
||||||
<Button ToolTip="{Binding ZoomInToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomInCommand}">
|
<Button ToolTip="{Binding ZoomInToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomInCommand}" Margin="3,3,1,3">
|
||||||
<Image Source="/Resources/GridViewPanel/ZoomIn.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/ZoomIn.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button ToolTip="{Binding ZoomOutToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomOutCommand}">
|
<Button ToolTip="{Binding ZoomOutToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomOutCommand}" Margin="1,3,1,3">
|
||||||
<Image Source="/Resources/GridViewPanel/ZoomOut.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/ZoomOut.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button ToolTip="{Binding ZoomSelToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomSelCommand}">
|
<Button ToolTip="{Binding ZoomSelToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomSelCommand}" Margin="1,3,1,3">
|
||||||
<Image Source="/Resources/GridViewPanel/ZoomSel.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/ZoomSel.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button ToolTip="{Binding LookFromIso_NEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNECommand}">
|
<Button ToolTip="{Binding LookFromIso_NEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNECommand}" Margin="1,3,1,3">
|
||||||
<Image Source="/Resources/GridViewPanel/LookFromISO_NE.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/LookFromISO_NE.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button ToolTip="{Binding LookFromIso_NWToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNWCommand}">
|
<Button ToolTip="{Binding LookFromIso_NWToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNWCommand}" Margin="1,3,1,3">
|
||||||
<Image Source="/Resources/GridViewPanel/LookFromISO_NW.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/LookFromISO_NW.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button ToolTip="{Binding ViewToCPlaneToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ViewToCPlaneCommand}">
|
<Button ToolTip="{Binding ViewToCPlaneToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ViewToCPlaneCommand}" Margin="1,3,3,3">
|
||||||
<Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
<ItemsControl.ItemContainerStyle>
|
<ItemsControl.ItemContainerStyle>
|
||||||
<Style>
|
<Style>
|
||||||
<Setter Property="DockPanel.Dock" Value="{Binding}" />
|
<Setter Property="DockPanel.Dock" Value="{Binding}"/>
|
||||||
</Style>
|
</Style>
|
||||||
</ItemsControl.ItemContainerStyle>
|
</ItemsControl.ItemContainerStyle>
|
||||||
|
|
||||||
|
|||||||
@@ -11,13 +11,6 @@ Public Class ProjectV
|
|||||||
Private Sub UserControl_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub UserControl_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Creo riferimento a questa classe in Map
|
' Creo riferimento a questa classe in Map
|
||||||
Map.SetRefProjectV(Me)
|
Map.SetRefProjectV(Me)
|
||||||
'SpecialPanel.Visibility = Visibility.Collapsed
|
|
||||||
'BeamPanel.Visibility = Visibility.Collapsed
|
|
||||||
'WallPanel.Visibility = Visibility.Collapsed
|
|
||||||
'DoorsPanel.Visibility = Visibility.Collapsed
|
|
||||||
'GunStockPanel.Visibility = Visibility.Collapsed
|
|
||||||
'PrintingPanel.Visibility = Visibility.Collapsed
|
|
||||||
' Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
|
|||||||
+189
-60
@@ -1,10 +1,11 @@
|
|||||||
Imports System.Windows.Forms.Integration
|
Imports System.Globalization
|
||||||
Imports System.Windows.Interop
|
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Globalization
|
Imports System.Windows.Forms.Integration
|
||||||
|
Imports System.Windows.Interop
|
||||||
|
Imports System.Windows.Threading
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports EgtUILib.EgtInterface
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
Imports EgtWPFLib5.EgtFloating
|
|
||||||
|
|
||||||
Public Class ProjectVM
|
Public Class ProjectVM
|
||||||
Inherits TabViewModel
|
Inherits TabViewModel
|
||||||
@@ -58,11 +59,18 @@ Public Class ProjectVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_DynamicGrid As New Grid()
|
||||||
|
Public ReadOnly Property DynamicGrid As Grid
|
||||||
|
Get
|
||||||
|
Return m_DynamicGrid
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "EGTUILIB FIELDS"
|
#Region "EGTUILIB FIELDS"
|
||||||
|
|
||||||
Private m_bCPlaneTypePos As Boolean
|
Private m_bCPlaneTypePos As Boolean
|
||||||
|
|
||||||
' Variabile per implementazione eventi
|
' Variabile per implementazione eventi
|
||||||
Private m_InputText As String
|
Private m_InputText As String
|
||||||
@@ -79,6 +87,17 @@ Public Class ProjectVM
|
|||||||
TMDbParamVisibility.bFirst = True
|
TMDbParamVisibility.bFirst = True
|
||||||
' Inizializza i parametri della scena
|
' Inizializza i parametri della scena
|
||||||
'InitializeEgtProject()
|
'InitializeEgtProject()
|
||||||
|
|
||||||
|
Dim m_TopTrayV As New TopTrayV
|
||||||
|
Dim m_LeftTrayV As New LeftTrayV
|
||||||
|
Dim m_RightTrayV As New RightTrayV
|
||||||
|
Dim m_BottomTrayV As New BottomTrayV
|
||||||
|
Dim m_SceneContentControlV As New SceneContentControlV
|
||||||
|
|
||||||
|
DynamicGridModule.CreateDynamicGrid()
|
||||||
|
|
||||||
|
Dim gridSplitter As GridSplitter = DynamicGridModule.CreateGridSplitter()
|
||||||
|
|
||||||
' aggiungo componenti interfaccia
|
' aggiungo componenti interfaccia
|
||||||
Dim bPlugin As Boolean = False
|
Dim bPlugin As Boolean = False
|
||||||
Dim PluginDirNameList() As String = {}
|
Dim PluginDirNameList() As String = {}
|
||||||
@@ -105,12 +124,17 @@ Public Class ProjectVM
|
|||||||
Dim ConfigurationData As IPluginConfigData = Map.refMainWindowVM.GetConfigData(Of IPluginConfigData)(PluginName & ".ConfigurationData")
|
Dim ConfigurationData As IPluginConfigData = Map.refMainWindowVM.GetConfigData(Of IPluginConfigData)(PluginName & ".ConfigurationData")
|
||||||
If Not IsNothing(ConfigurationData) And ConfigurationData.ControlList.Count > 0 Then
|
If Not IsNothing(ConfigurationData) And ConfigurationData.ControlList.Count > 0 Then
|
||||||
For Each Element In ConfigurationData.ControlList
|
For Each Element In ConfigurationData.ControlList
|
||||||
|
PopolateGridWithPlugIn(m_TopTrayV, m_RightTrayV, m_BottomTrayV, m_SceneContentControlV, gridSplitter)
|
||||||
Select Case Element.Name
|
Select Case Element.Name
|
||||||
Case PLUGIN_RIGHT_TRAY
|
Case PLUGIN_RIGHT_TRAY
|
||||||
m_PanelList.Add(New RightTrayV)
|
'm_PanelList.Add(New RightTrayV)
|
||||||
|
'aggiungo RightTrayV alla griglia
|
||||||
|
m_DynamicGrid.Children.Add(m_RightTrayV)
|
||||||
Map.refOptionPanelVM.SetPanelViewState(Element.ViewPanelState)
|
Map.refOptionPanelVM.SetPanelViewState(Element.ViewPanelState)
|
||||||
Case PLUGIN_LEFT_TRAY
|
Case PLUGIN_LEFT_TRAY
|
||||||
m_PanelList.Add(New LeftTrayV)
|
'm_PanelList.Add(New LeftTrayV)
|
||||||
|
' aggiungo LeftTrayV alla griglia
|
||||||
|
m_DynamicGrid.Children.Add(m_LeftTrayV)
|
||||||
Case Else
|
Case Else
|
||||||
m_PanelList.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element))
|
m_PanelList.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element))
|
||||||
End Select
|
End Select
|
||||||
@@ -118,17 +142,43 @@ Public Class ProjectVM
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
m_PanelList.Add(New BottomTrayV)
|
'm_PanelList.Add(New BottomTrayV)
|
||||||
m_PanelList.Add(New TopTrayV)
|
'm_PanelList.Add(New TopTrayV)
|
||||||
|
' aggiungo gridSplitter alla griglia
|
||||||
|
m_DynamicGrid.Children.Add(gridSplitter)
|
||||||
|
' aggiungo BottomTrayV alla griglia
|
||||||
|
m_DynamicGrid.Children.Add(m_BottomTrayV)
|
||||||
|
' aggiungo TopTrayV alla griglia
|
||||||
|
m_DynamicGrid.Children.Add(m_TopTrayV)
|
||||||
' nascondo tasti gestione progetto se attivo plugin
|
' nascondo tasti gestione progetto se attivo plugin
|
||||||
Map.refTopCommandBarVM.SetProjectManagerVisibility(False)
|
Map.refTopCommandBarVM.SetProjectManagerVisibility(False)
|
||||||
Else
|
Else
|
||||||
m_PanelList.Add(New TopTrayV)
|
'm_PanelList.Add(New TopTrayV)
|
||||||
m_PanelList.Add(New LeftTrayV)
|
'm_PanelList.Add(New LeftTrayV)
|
||||||
m_PanelList.Add(New RightTrayV)
|
'm_PanelList.Add(New RightTrayV)
|
||||||
m_PanelList.Add(New BottomTrayV)
|
'm_PanelList.Add(New BottomTrayV)
|
||||||
|
DynamicGridModule.PopulateGrid(m_TopTrayV, m_LeftTrayV, m_RightTrayV, m_BottomTrayV, m_SceneContentControlV, gridSplitter)
|
||||||
|
' aggiungo TopTrayV alla griglia
|
||||||
|
m_DynamicGrid.Children.Add(m_TopTrayV)
|
||||||
|
' aggiungo LeftTrayV alla griglia
|
||||||
|
m_DynamicGrid.Children.Add(m_LeftTrayV)
|
||||||
|
' aggiungo gridSplitter alla griglia
|
||||||
|
m_DynamicGrid.Children.Add(gridSplitter)
|
||||||
|
' aggiungo RightTrayV alla griglia
|
||||||
|
m_DynamicGrid.Children.Add(m_RightTrayV)
|
||||||
|
' aggiungo BottomTrayV alla griglia
|
||||||
|
m_DynamicGrid.Children.Add(m_BottomTrayV)
|
||||||
End If
|
End If
|
||||||
m_PanelList.Add(New SceneContentControlV)
|
'm_PanelList.Add(New SceneContentControlV)
|
||||||
|
' aggiungo SceneContentControlV alla griglia
|
||||||
|
m_DynamicGrid.Children.Add(m_SceneContentControlV)
|
||||||
|
' Carico le dimensioni salvate su ini se presenti
|
||||||
|
AddHandler m_DynamicGrid.Loaded,
|
||||||
|
Sub()
|
||||||
|
DynamicGridModule.RestoreGridLayout(If(IsActivePlugin(), DynamicGridModule.PROJECT_EGTCAM5_PLUGIN, DynamicGridModule.PROJECT_EGTCAM5))
|
||||||
|
m_DynamicGrid.UpdateLayout()
|
||||||
|
End Sub
|
||||||
|
m_PanelList.Add(m_DynamicGrid)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -212,6 +262,27 @@ Public Class ProjectVM
|
|||||||
Dim sOut As String = "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
Dim sOut As String = "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
||||||
EgtOutLog(sOut)
|
EgtOutLog(sOut)
|
||||||
End If
|
End If
|
||||||
|
If IniFile.IsActiveWindow() Then
|
||||||
|
bExtensions = True
|
||||||
|
Dim sVersion As String = "---"
|
||||||
|
IniFile.GetSpecialLuaVersion(IniFile.m_sWindowDirPath, sVersion)
|
||||||
|
Dim sOut As String = "Window ver. " & sVersion & " " & IniFile.m_sWindowDirPath
|
||||||
|
EgtOutLog(sOut)
|
||||||
|
End If
|
||||||
|
If IniFile.IsActiveTrimming() Then
|
||||||
|
bExtensions = True
|
||||||
|
Dim sVersion As String = "---"
|
||||||
|
IniFile.GetSpecialLuaVersion(IniFile.m_sTrimmingDirPath, sVersion)
|
||||||
|
Dim sOut As String = "Trimming ver. " & sVersion & " " & IniFile.m_sTrimmingDirPath
|
||||||
|
EgtOutLog(sOut)
|
||||||
|
End If
|
||||||
|
If IniFile.IsActiveReversePost() Then
|
||||||
|
bExtensions = True
|
||||||
|
Dim sVersion As String = "---"
|
||||||
|
IniFile.GetSpecialLuaVersion(IniFile.m_sReversePostDirPath, sVersion)
|
||||||
|
Dim sOut As String = "ReversePost ver. " & sVersion & " " & IniFile.m_sReversePostDirPath
|
||||||
|
EgtOutLog(sOut)
|
||||||
|
End If
|
||||||
If IniFile.IsActiveGunStock() Then
|
If IniFile.IsActiveGunStock() Then
|
||||||
bExtensions = True
|
bExtensions = True
|
||||||
Dim sVersion As String = "---"
|
Dim sVersion As String = "---"
|
||||||
@@ -244,14 +315,14 @@ Public Class ProjectVM
|
|||||||
Dim sTitle As String = EgtMsg(10101)
|
Dim sTitle As String = EgtMsg(10101)
|
||||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
End If
|
End If
|
||||||
' Se altrimenti manca il collegamento con la chiave di rete
|
' Se altrimenti manca il collegamento con la chiave di rete
|
||||||
ElseIf IniFile.m_nKeyLevel = -9 Then
|
ElseIf IniFile.m_nKeyLevel = -9 Then
|
||||||
EgtOutLog("Missing Link with Net Dongle")
|
EgtOutLog("Missing Link with Net Dongle")
|
||||||
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
|
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
|
||||||
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
|
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
|
||||||
Dim sTitle As String = EgtMsg(10101)
|
Dim sTitle As String = EgtMsg(10101)
|
||||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
' Altrimenti manca la licenza
|
' Altrimenti manca la licenza
|
||||||
Else
|
Else
|
||||||
EgtOutLog("Problems with Licence")
|
EgtOutLog("Problems with Licence")
|
||||||
' Box di avviso licenza con problemi : sKeyInfo \n "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
' Box di avviso licenza con problemi : sKeyInfo \n "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
||||||
@@ -294,23 +365,16 @@ Public Class ProjectVM
|
|||||||
|
|
||||||
Private Sub PreInitializeScene()
|
Private Sub PreInitializeScene()
|
||||||
' imposto colore di default
|
' imposto colore di default
|
||||||
Dim DefColor As New Color3d(0, 0, 0)
|
m_ProjectScene.SetDefaultMaterial(OptionModule.m_DefMaterialColor)
|
||||||
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
|
||||||
m_ProjectScene.SetDefaultMaterial(DefColor)
|
|
||||||
' imposto colori sfondo
|
' imposto colori sfondo
|
||||||
Dim BackTopColor As New Color3d(192, 192, 192)
|
m_ProjectScene.SetViewBackground(OptionModule.m_TopSceneBackground, OptionModule.m_BotSceneBackground)
|
||||||
GetPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
|
' imposto colori di evidenziazione
|
||||||
Dim BackBotColor As New Color3d(BackTopColor)
|
|
||||||
GetPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
|
|
||||||
m_ProjectScene.SetViewBackground(BackTopColor, BackBotColor)
|
|
||||||
' imposto spessore linee
|
|
||||||
Dim nLineWidth As Integer = 1
|
|
||||||
nLineWidth = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, nLineWidth)
|
|
||||||
m_ProjectScene.SetLineWidth(nLineWidth)
|
|
||||||
' imposto colore di evidenziazione
|
|
||||||
Dim MarkColor As New Color3d(255, 255, 0)
|
Dim MarkColor As New Color3d(255, 255, 0)
|
||||||
GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
|
GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
|
||||||
m_ProjectScene.SetMarkMaterial(MarkColor)
|
m_ProjectScene.SetMarkMaterial(MarkColor)
|
||||||
|
Dim Mark2Color As New Color3d(255, 64, 64)
|
||||||
|
GetPrivateProfileColor(S_SCENE, K_MARK2, Mark2Color)
|
||||||
|
m_ProjectScene.SetMark2Material(Mark2Color)
|
||||||
' imposto colore per superfici selezionate
|
' imposto colore per superfici selezionate
|
||||||
Dim SelSurfColor As New Color3d(255, 255, 192)
|
Dim SelSurfColor As New Color3d(255, 255, 192)
|
||||||
GetPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor)
|
GetPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor)
|
||||||
@@ -345,6 +409,7 @@ Public Class ProjectVM
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
m_Controller.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
|
m_Controller.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
|
||||||
|
m_Controller.SetAdvImpTolerance(OptionModule.m_dAdvImpTolerance)
|
||||||
m_Controller.SetUseCustomColors(True, S_SCENE, K_CUSTOMCOLORS)
|
m_Controller.SetUseCustomColors(True, S_SCENE, K_CUSTOMCOLORS)
|
||||||
' imposto unità di misura per interfaccia utente
|
' imposto unità di misura per interfaccia utente
|
||||||
IniFile.m_bMmUnits = (GetPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
|
IniFile.m_bMmUnits = (GetPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
|
||||||
@@ -366,27 +431,21 @@ Public Class ProjectVM
|
|||||||
' modo di visualizzazione
|
' modo di visualizzazione
|
||||||
Dim nShowMode As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING)
|
Dim nShowMode As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING)
|
||||||
Map.refShowPanelVM.ShowModeState(nShowMode)
|
Map.refShowPanelVM.ShowModeState(nShowMode)
|
||||||
|
' imposto spessore curve
|
||||||
|
EgtSetLineAttribs(OptionModule.GetLineWidth())
|
||||||
' visualizzazione direzione curve
|
' visualizzazione direzione curve
|
||||||
Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0)
|
Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0)
|
||||||
Map.refShowPanelVM.ShowCurveDir(nShowCurveDir)
|
Map.refShowPanelVM.ShowCurveDir(nShowCurveDir)
|
||||||
' visualizzazione avanzata dei triangoli costituenti le superfici
|
' qualità di visualizzazione delle superfici
|
||||||
Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
|
OptionModule.SetShowSurfQuality(False)
|
||||||
EgtSetShowTriaAdv(bShowTriaAdv)
|
|
||||||
' tipo visualizzazione per Zmap
|
' tipo visualizzazione per Zmap
|
||||||
Dim nShowZmap As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWZMAP, 1)
|
EgtSetShowZmap(OptionModule.m_nShowZmapType, False)
|
||||||
EgtSetShowZmap(nShowZmap, False)
|
|
||||||
' dimensione lineare max in pixel delle textures
|
' dimensione lineare max in pixel delle textures
|
||||||
Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096)
|
Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096)
|
||||||
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
|
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
|
||||||
' stile corrente delle quotature
|
' stile corrente delle quotature
|
||||||
OptionModule.m_dExtLineLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_EXTLINELEN, 5)
|
EgtSetCurrDimensionStyle(OptionModule.m_dExtLineLen, OptionModule.m_dArrowLen, OptionModule.m_dTextDist,
|
||||||
OptionModule.m_dArrowLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_ARROWLEN, 5)
|
OptionModule.m_nLenIsMM, OptionModule.m_nDecDigit, OptionModule.m_sFont, OptionModule.m_dTextHeight)
|
||||||
OptionModule.m_dTextDist = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTDIST, 2)
|
|
||||||
OptionModule.m_nLenIsMM = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_LENISMM, 2)
|
|
||||||
OptionModule.m_nDecDigit = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_DECDIGIT, -2)
|
|
||||||
OptionModule.m_sFont = "" : GetPrivateProfileStringUtf8(S_DIMENSIONSTYLE, K_DIMFONT, "ModernPropS.Nfe", m_sFont)
|
|
||||||
OptionModule.m_dTextHeight = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTHEIGHT, 2)
|
|
||||||
EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
|
||||||
' lettura da ini della variabile che abilita i gruppi di lavorazione
|
' lettura da ini della variabile che abilita i gruppi di lavorazione
|
||||||
IniFile.m_bMachiningGroup = (GetPrivateProfileInt(S_MACH, K_MACHININGGROUP, 0) <> 0)
|
IniFile.m_bMachiningGroup = (GetPrivateProfileInt(S_MACH, K_MACHININGGROUP, 0) <> 0)
|
||||||
Map.refTopCommandBarVM.DrawMode_IsChecked()
|
Map.refTopCommandBarVM.DrawMode_IsChecked()
|
||||||
@@ -402,6 +461,8 @@ Public Class ProjectVM
|
|||||||
' Imposto default per import
|
' Imposto default per import
|
||||||
m_Controller.SetScaleForDxfImport(OptionModule.m_dDxfScaleFactor)
|
m_Controller.SetScaleForDxfImport(OptionModule.m_dDxfScaleFactor)
|
||||||
m_Controller.SetScaleForStlImport(OptionModule.m_dStlScaleFactor)
|
m_Controller.SetScaleForStlImport(OptionModule.m_dStlScaleFactor)
|
||||||
|
m_Controller.SetScaleForOffImport(OptionModule.m_dOffScaleFactor)
|
||||||
|
m_Controller.SetScaleForPlyImport(OptionModule.m_dPlyScaleFactor)
|
||||||
m_Controller.SetScaleForImageImport(OptionModule.m_dImgScaleFactor)
|
m_Controller.SetScaleForImageImport(OptionModule.m_dImgScaleFactor)
|
||||||
' Imposto default per export
|
' Imposto default per export
|
||||||
m_Controller.SetDefaultForDxfExport(OptionModule.m_nExportDxfFlag)
|
m_Controller.SetDefaultForDxfExport(OptionModule.m_nExportDxfFlag)
|
||||||
@@ -427,7 +488,7 @@ Public Class ProjectVM
|
|||||||
Dim nFlag As Integer = 1
|
Dim nFlag As Integer = 1
|
||||||
If Environment.GetCommandLineArgs.Count() > 4 Then Integer.TryParse(Environment.GetCommandLineArgs(4), nFlag)
|
If Environment.GetCommandLineArgs.Count() > 4 Then Integer.TryParse(Environment.GetCommandLineArgs(4), nFlag)
|
||||||
' Modalità cieco con valori 0, 3 e 4
|
' Modalità cieco con valori 0, 3 e 4
|
||||||
Return (nFlag <> 0 And nFlag <> 3 And nFlag <> 4)
|
Return (nFlag <> 0 And nFlag <> 3 And nFlag <> 4 And nFlag <> 8)
|
||||||
End If
|
End If
|
||||||
If sExt = ".ddf" And Environment.GetCommandLineArgs.Count() > 2 Then
|
If sExt = ".ddf" And Environment.GetCommandLineArgs.Count() > 2 Then
|
||||||
' Flag
|
' Flag
|
||||||
@@ -536,7 +597,13 @@ Public Class ProjectVM
|
|||||||
' Esecuzione
|
' Esecuzione
|
||||||
OpenDoorFile(sFile, bNcGen, bExit, nProbing)
|
OpenDoorFile(sFile, bNcGen, bExit, nProbing)
|
||||||
' Se richiesta uscita immediata
|
' Se richiesta uscita immediata
|
||||||
If bExit Then Map.refMainWindowVM.CloseApplicationCmd()
|
If bExit Then
|
||||||
|
Map.refMainWindowVM.CloseApplicationCmd()
|
||||||
|
End If
|
||||||
|
' Se applicate lavorazioni, vado in modalità Lavora
|
||||||
|
If EgtGetCurrMachGroup() <> GDB_ID.NULL Then
|
||||||
|
Map.refTopCommandBarVM.SetMachiningMode()
|
||||||
|
End If
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Se file tol, gestione aggiornamento dei dati degli utensili
|
' Se file tol, gestione aggiornamento dei dati degli utensili
|
||||||
@@ -585,7 +652,7 @@ Public Class ProjectVM
|
|||||||
bOk = ExecWall(sFile, sMachine, nFlag, False)
|
bOk = ExecWall(sFile, sMachine, nFlag, False)
|
||||||
End If
|
End If
|
||||||
' Se richiesta uscita immediata
|
' Se richiesta uscita immediata
|
||||||
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
|
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Or nFlag = 8 Then
|
||||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
Map.refMainWindowVM.CloseApplicationCmd()
|
Map.refMainWindowVM.CloseApplicationCmd()
|
||||||
' Altrimenti se errore
|
' Altrimenti se errore
|
||||||
@@ -604,7 +671,7 @@ Public Class ProjectVM
|
|||||||
Select Case nFileType
|
Select Case nFileType
|
||||||
Case FT.NGE, FT.NFE
|
Case FT.NGE, FT.NFE
|
||||||
Return m_Controller.OpenProject(sFile, False)
|
Return m_Controller.OpenProject(sFile, False)
|
||||||
Case FT.DXF, FT.STL, FT._3MF, FT._3DM, FT.OBJ, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
|
Case FT.DXF, FT.STL, FT._3MF, FT._3DM, FT.OFF, FT.PLY, FT.OBJ, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
|
||||||
Return m_Controller.ImportProject(sFile, False)
|
Return m_Controller.ImportProject(sFile, False)
|
||||||
Case FT.TSC, FT.LUA
|
Case FT.TSC, FT.LUA
|
||||||
Return m_Controller.Exec(sFile, False)
|
Return m_Controller.Exec(sFile, False)
|
||||||
@@ -617,7 +684,6 @@ Public Class ProjectVM
|
|||||||
' Formato descrizione porte
|
' Formato descrizione porte
|
||||||
If Path.GetExtension(sFile).ToLower() = ".ddf" Then
|
If Path.GetExtension(sFile).ToLower() = ".ddf" Then
|
||||||
nErr = ExecDoors(m_ProjectScene, sFile, bNcGen, bBatch, nProbing)
|
nErr = ExecDoors(m_ProjectScene, sFile, bNcGen, bBatch, nProbing)
|
||||||
'CreateDoors(sFile, bNcGen, bBatch, nProbing)
|
|
||||||
Map.refProjectVM.EmitTitle()
|
Map.refProjectVM.EmitTitle()
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
@@ -1099,8 +1165,8 @@ Public Class ProjectVM
|
|||||||
Select Case m_SceneSelType
|
Select Case m_SceneSelType
|
||||||
Case SceneSelTypeOpt.FIXTURE
|
Case SceneSelTypeOpt.FIXTURE
|
||||||
Dim nFixtureId As Integer = EgtGetParent(EgtGetParent(nId))
|
Dim nFixtureId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||||
Dim sName As String = ""
|
'Dim sName As String = ""
|
||||||
EgtGetName(EgtGetParent(nId), sName)
|
'EgtGetName(EgtGetParent(nId), sName)
|
||||||
If EgtVerifyFixture(nFixtureId) Then
|
If EgtVerifyFixture(nFixtureId) Then
|
||||||
m_SelType = DispositionUtility.SelType.FIXTURE
|
m_SelType = DispositionUtility.SelType.FIXTURE
|
||||||
' Se già selezionato
|
' Se già selezionato
|
||||||
@@ -1118,14 +1184,12 @@ Public Class ProjectVM
|
|||||||
EgtGetPlaneSnapPoint(e.Location, Vector3d.Z_AX, TableRef.z, ptCurr)
|
EgtGetPlaneSnapPoint(e.Location, Vector3d.Z_AX, TableRef.z, ptCurr)
|
||||||
DispositionUtility.VtHookFinder(nFixtureId, ptCurr)
|
DispositionUtility.VtHookFinder(nFixtureId, ptCurr)
|
||||||
Exit While
|
Exit While
|
||||||
ElseIf sName.Contains(DispositionUtility.MOBILE) Then
|
ElseIf DispositionUtility.VerifyTableAxis(nFixtureId) Then
|
||||||
Dim sInfo As String = ""
|
m_SelType = DispositionUtility.SelType.BARS
|
||||||
If EgtGetInfo(EgtGetParent(nId), "MDir", sInfo) Then
|
m_nIdToSel = nFixtureId
|
||||||
m_SelType = DispositionUtility.SelType.BARS
|
' Drag possibile
|
||||||
m_nIdToSel = EgtGetParent(nId)
|
m_bDrag = True
|
||||||
' Drag possibile
|
Exit While
|
||||||
m_bDrag = True
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Case SceneSelTypeOpt.RAWPART, SceneSelTypeOpt.RAWPARTWITHFIXTURE
|
Case SceneSelTypeOpt.RAWPART, SceneSelTypeOpt.RAWPARTWITHFIXTURE
|
||||||
Dim nRawPartId As Integer = EgtGetParent(nId)
|
Dim nRawPartId As Integer = EgtGetParent(nId)
|
||||||
@@ -1187,7 +1251,6 @@ Public Class ProjectVM
|
|||||||
vtMove.z = 0
|
vtMove.z = 0
|
||||||
' Muovo gli oggetti selezionati se consentito
|
' Muovo gli oggetti selezionati se consentito
|
||||||
DispositionUtility.MoveRawPartPartAndFixture(nMoveId, vtMove, m_SelType, ptCurr)
|
DispositionUtility.MoveRawPartPartAndFixture(nMoveId, vtMove, m_SelType, ptCurr)
|
||||||
'EgtSaveFile("c:\Temp\ProveMovimentoVentose\Prova1.nge", NGE.BIN)
|
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
' Aggiorno il punto precedente
|
' Aggiorno il punto precedente
|
||||||
m_ptPrev = ptCurr
|
m_ptPrev = ptCurr
|
||||||
@@ -1319,8 +1382,28 @@ Public Class ProjectVM
|
|||||||
(EgtGetType(nId) = GDB_TY.SRF_MESH Or EgtGetType(nId) = GDB_TY.SRF_FRGN) Then
|
(EgtGetType(nId) = GDB_TY.SRF_MESH Or EgtGetType(nId) = GDB_TY.SRF_FRGN) Then
|
||||||
If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast)
|
If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast)
|
||||||
Else
|
Else
|
||||||
m_Controller.MouseSelectedObj(nId, bLast)
|
m_Controller.MouseSelectedObj(nId, False)
|
||||||
|
If bLast Then
|
||||||
|
If EgtIsSelectedObj(nId) Then
|
||||||
|
' Selezione layer in albero
|
||||||
|
Map.refManageLayerExpanderVM.UpdateObjInObjTreeNoMark(nId)
|
||||||
|
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(nId)
|
||||||
|
Map.refManageLayerExpanderVM.UpdateObjTree()
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
' Carico se presenti le dimensioni della griglia
|
||||||
|
Application.Current.Dispatcher.BeginInvoke(
|
||||||
|
Sub()
|
||||||
|
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||||
|
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||||
|
End Sub,
|
||||||
|
DispatcherPriority.Render)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnMouseSelectedColor(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedColor
|
||||||
|
m_Controller.MouseSelectedColor(nId)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OnMouseSelectedPart(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedPart
|
Private Sub OnMouseSelectedPart(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedPart
|
||||||
@@ -1390,8 +1473,13 @@ Public Class ProjectVM
|
|||||||
If nFac <> -1 Then
|
If nFac <> -1 Then
|
||||||
' Visualizzo la normale e il contorno della faccia
|
' Visualizzo la normale e il contorno della faccia
|
||||||
Analyze.CreateAnalyzeGroup()
|
Analyze.CreateAnalyzeGroup()
|
||||||
Analyze.CreateNormal(nId, nFac)
|
Analyze.CreateFacetNormal(nId, nFac)
|
||||||
Analyze.CreateFacetLoops(nId, nFac)
|
Analyze.CreateFacetLoops(nId, nFac)
|
||||||
|
|
||||||
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||||
|
Analyze.CreateTriaLoop(nId, nSub)
|
||||||
|
End If
|
||||||
|
|
||||||
' Recupero i dati (in globale o griglia a seconda della impostazione)
|
' Recupero i dati (in globale o griglia a seconda della impostazione)
|
||||||
Dim ptC As Point3d
|
Dim ptC As Point3d
|
||||||
Dim vtN As Vector3d
|
Dim vtN As Vector3d
|
||||||
@@ -1403,8 +1491,47 @@ Public Class ProjectVM
|
|||||||
" : C(" + LenToString(ptC.x, 3) + "," + LenToString(ptC.y, 3) + "," + LenToString(ptC.z, 3) + ")" +
|
" : C(" + LenToString(ptC.x, 3) + "," + LenToString(ptC.y, 3) + "," + LenToString(ptC.z, 3) + ")" +
|
||||||
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
|
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
|
||||||
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
|
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
|
||||||
|
|
||||||
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||||
|
sOut &= ", Triangle " + nSub.ToString()
|
||||||
|
End If
|
||||||
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
||||||
End If
|
End If
|
||||||
|
' Se Regione, visualizzo dati parte toccata
|
||||||
|
ElseIf EgtGetType(nId) = GDB_TY.SRF_FRGN Then
|
||||||
|
Dim nChk As Integer = nSub
|
||||||
|
If nChk >= 0 AndAlso nChk < EgtSurfFrChunkCount(nId) Then
|
||||||
|
' Visualizzo la normale e il contorno della parte
|
||||||
|
Analyze.CreateAnalyzeGroup()
|
||||||
|
Analyze.CreateChunkNormal(nId, nChk)
|
||||||
|
Analyze.CreateChunkLoops(nId, nChk)
|
||||||
|
' Recupero i dati (in globale o griglia a seconda della impostazione)
|
||||||
|
Dim ptC As Point3d
|
||||||
|
Dim vtN As Vector3d
|
||||||
|
EgtSurfFrChunkCenter(nId, nChk, If(m_bCPlaneTypePos, GDB_ID.GRID, GDB_ID.ROOT), ptC, vtN)
|
||||||
|
Dim dLen, dPhi, dTheta As Double
|
||||||
|
vtN.ToSpherical(dLen, dTheta, dPhi)
|
||||||
|
' Emetto info sulla barra di stato
|
||||||
|
Dim sOut As String = "Chunk " + nChk.ToString() +
|
||||||
|
" : C(" + LenToString(ptC.x, 3) + "," + LenToString(ptC.y, 3) + "," + LenToString(ptC.z, 3) + ")" +
|
||||||
|
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
|
||||||
|
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
|
||||||
|
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
||||||
|
End If
|
||||||
|
ElseIf EgtGetType(nId) = GDB_TY.SRF_BEZ Then
|
||||||
|
' Visualizzo il punto selezionato, la normale e le tangenti nelle direzioni dei parametri
|
||||||
|
Analyze.CreateAnalyzeGroup()
|
||||||
|
Dim dU As Double
|
||||||
|
Dim dV As Double
|
||||||
|
If Analyze.CreateSBzPointNormalAndTangents(nId, ptSel, dU, dV) Then
|
||||||
|
Dim sOut As String = "U = " + dU.ToString("F3") +
|
||||||
|
"; V = " + dV.ToString("F3")
|
||||||
|
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
||||||
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||||
|
Analyze.CreateSBzIsoParam(nId, dU, dV)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
' Aggiorno la visualizzazione
|
' Aggiorno la visualizzazione
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -1526,6 +1653,8 @@ Public Class ProjectVM
|
|||||||
nFlag = GetPrivateProfileInt(S_IMPORT, K_CNCFLAG, EIC_FL.NONE)
|
nFlag = GetPrivateProfileInt(S_IMPORT, K_CNCFLAG, EIC_FL.NONE)
|
||||||
ElseIf nType = FT.BTL Or nType = FT.BTLX Then
|
ElseIf nType = FT.BTL Or nType = FT.BTLX Then
|
||||||
nFlag = GetPrivateProfileInt(S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
|
nFlag = GetPrivateProfileInt(S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
|
||||||
|
ElseIf nType = FT._3MF Then
|
||||||
|
nFlag = GetPrivateProfileInt(S_IMPORT, K_3MFFLAG, EI3_FL.NONE)
|
||||||
ElseIf nType = FT.OBJ Or nType = FT.IGES Or nType = FT.STEP_ Or nType = FT.ACIS Or
|
ElseIf nType = FT.OBJ Or nType = FT.IGES Or nType = FT.STEP_ Or nType = FT.ACIS Or
|
||||||
nType = FT.PARASOLID Or nType = FT.JT Or nType = FT.VRML Or nType = FT.C3D Then
|
nType = FT.PARASOLID Or nType = FT.JT Or nType = FT.VRML Or nType = FT.C3D Then
|
||||||
nFlag = GetPrivateProfileInt(S_IMPORT, K_ADVFLAG, 0)
|
nFlag = GetPrivateProfileInt(S_IMPORT, K_ADVFLAG, 0)
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 665 B |
Binary file not shown.
|
After Width: | Height: | Size: 809 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 683 B |
Binary file not shown.
|
After Width: | Height: | Size: 806 B |
Binary file not shown.
|
After Width: | Height: | Size: 774 B |
@@ -2,6 +2,7 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:EgtCAM5"
|
xmlns:local="clr-namespace:EgtCAM5"
|
||||||
DockPanel.Dock="Right">
|
DockPanel.Dock="Right"
|
||||||
|
Margin="1,0,0,0">
|
||||||
<local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/>
|
<local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
m_SetUpDbVM = SetUpDbVM
|
m_SetUpDbVM = SetUpDbVM
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.m_CloseWindow
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.OnCloseWindow
|
||||||
Me.DialogResult = bDialogResult
|
Me.DialogResult = bDialogResult
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Public Class SetUpDbVM
|
|||||||
|
|
||||||
Private Const SETUP_FILEEXTENSION As String = ".stu"
|
Private Const SETUP_FILEEXTENSION As String = ".stu"
|
||||||
|
|
||||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
Friend Event OnCloseWindow(bDialogResult As Boolean)
|
||||||
|
|
||||||
Private m_SetUpList As New ObservableCollection(Of String)
|
Private m_SetUpList As New ObservableCollection(Of String)
|
||||||
Public ReadOnly Property SetUpList As ObservableCollection(Of String)
|
Public ReadOnly Property SetUpList As ObservableCollection(Of String)
|
||||||
@@ -263,7 +263,7 @@ Public Class SetUpDbVM
|
|||||||
Return
|
Return
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
RaiseEvent m_CloseWindow(True)
|
RaiseEvent OnCloseWindow(True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Close
|
#End Region ' Close
|
||||||
|
|||||||
@@ -57,7 +57,13 @@ Module Beam
|
|||||||
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
|
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
|
||||||
If EgtGetCurrMachGroup() <> GDB_ID.NULL Then
|
If EgtGetCurrMachGroup() <> GDB_ID.NULL Then
|
||||||
Map.refTopCommandBarVM.SetMachiningMode()
|
Map.refTopCommandBarVM.SetMachiningMode()
|
||||||
|
' Se simulazione
|
||||||
If bOk And nFlag = 2 Then
|
If bOk And nFlag = 2 Then
|
||||||
|
' Se da TS3 e non pezzo da Vista, impedisco di fare altro
|
||||||
|
If bBtl AndAlso sFile.IndexOf( "Part_", StringComparison.InvariantCulture) = -1 Then
|
||||||
|
Map.refSimulationExpanderVM.bOnlySimulation = True
|
||||||
|
End If
|
||||||
|
' Vado in simulazione
|
||||||
Map.refSimulationExpanderVM.Simulation_IsExpanded = True
|
Map.refSimulationExpanderVM.Simulation_IsExpanded = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<EgtFloating:EgtFloatingPanel x:Class="BeamPanelV"
|
<EgtFloating:EgtFloatingPanel x:Class="BeamPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="clr-namespace:EgtCAM5"
|
||||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
Visibility="{Binding BeamPanel_Visibility}">
|
Visibility="{Binding BeamPanel_Visibility}">
|
||||||
|
|
||||||
@@ -10,13 +11,18 @@
|
|||||||
<StackPanel Orientation="Horizontal"/>
|
<StackPanel Orientation="Horizontal"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.Resources>
|
||||||
<DataTemplate>
|
<DataTemplate DataType="{x:Type local:ButtonItem}">
|
||||||
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
|
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
|
||||||
<Image Source="{Binding ImagePath}"/>
|
<Image Source="{Binding ImagePath}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
<DataTemplate DataType="{x:Type local:SeparatorItem}">
|
||||||
|
<Border Style="{StaticResource Trimming_Border}">
|
||||||
|
<Border Style="{StaticResource Separator_Border}"/>
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.Resources>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user