Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 429e82e349 | |||
| c1a0d1267e | |||
| efbc378b9e | |||
| 60323f2929 | |||
| da1e7b8104 | |||
| b8fdd83f88 | |||
| 5a3a36c02d | |||
| e65a5a7b4b | |||
| 4e80a94013 | |||
| 98f9a3917c | |||
| a737a9313d | |||
| 1f94bff09b | |||
| 849b5e6f45 | |||
| 0a77a8e32f | |||
| 084a71bf54 | |||
| bdc26a0bf6 | |||
| ca32de50f0 | |||
| a0d7687214 | |||
| 412c3c4b5d | |||
| 90b1fa9221 | |||
| 11704fa33d | |||
| 97442a5d65 | |||
| 4f1a9b8938 | |||
| c96c3ef581 | |||
| fdf33ef796 | |||
| a599fde07a | |||
| 7267b77522 | |||
| 1ebf4a3f54 | |||
| 4b85c118cd | |||
| 53a79186c9 | |||
| 4d37978789 | |||
| 12081cec28 | |||
| 109feeb6f7 | |||
| da0bcbac69 | |||
| 27a54b0034 | |||
| c1aee47e53 | |||
| e59d50923b | |||
| e5fca60809 | |||
| f7631e5201 | |||
| f45efb2310 |
@@ -18,12 +18,24 @@ Public Class AboutBoxV
|
||||
Dim sLeftDays As String = ""
|
||||
Dim nLeftDays As Integer
|
||||
If EgtGetKeyLeftDays(nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays = " (" & nLeftDays.ToString() & ")"
|
||||
Dim sAssStatus As String = " discontinued"
|
||||
Dim nAssLeftDays As Integer
|
||||
If EgtGetKeyAssLeftDays( nAssLeftDays) And nAssLeftDays >= 0 Then
|
||||
If nAssLeftDays > 30 then
|
||||
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
|
||||
Else If nAssLeftDays > 0 then
|
||||
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
|
||||
Else
|
||||
sAssStatus = "to be renewed by today"
|
||||
End If
|
||||
End If
|
||||
sInfo = If(EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
|
||||
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
|
||||
" Inst" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() &
|
||||
" Ulv" & Map.refMainWindowVM.MainWindowM.nUserLevel.ToString() &
|
||||
" Dbg" & Map.refMainWindowVM.MainWindowM.DebugLevel().ToString() & Environment.NewLine
|
||||
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
|
||||
sInfo &= "Maintenance plane " & sAssStatus & Environment.NewLine
|
||||
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
|
||||
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
|
||||
Dim sOpSys As String = String.Empty
|
||||
|
||||
@@ -66,8 +66,7 @@ Public Class ChooseMachineWndVM
|
||||
RaiseEvent m_CloseWindow(True)
|
||||
Else
|
||||
' se non seleziono nessuna macchina lo segnalo con un MessageBox
|
||||
' MessageBox.Show("No machine selected", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "No machine selected", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show("No machine selected", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
Public Const MAT_KW = "KW"
|
||||
Public Const MAT_KZ = "KZ"
|
||||
Public Const MAT_KN = "KN"
|
||||
Public Const MAT_TDRYER = "TDRYER"
|
||||
Public Const MAT_ORIG = "Orig"
|
||||
|
||||
' parametri Lavorazione
|
||||
@@ -111,11 +112,16 @@
|
||||
Public Const MAC_POSTFLOWDELAY = "PostFlowDelay"
|
||||
Public Const MAC_SCREWBACK = "ScrewBack"
|
||||
Public Const MAC_SLICINGHEIGHT = "SlicingHeight"
|
||||
Public Const MAC_MAXSLICESNUMBER = "MaxSlicesNumber"
|
||||
Public Const MAC_RIBSSTRANDWIDTH = "RibsStrandW"
|
||||
Public Const MAC_RIBSTYPE = "RibsType"
|
||||
Public Const MAC_RIBSOVERLAP = "RibsOverlap"
|
||||
Public Const MAC_RIBSSTRANDOVERLAP = "RibsStrandOverlap"
|
||||
Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount"
|
||||
Public Const MAC_RIBSLINK = "RibsLink"
|
||||
Public Const MAC_RIBSLINKFILLET = "RibsLinkFillet"
|
||||
Public Const MAC_RIBSMERGEWITHSHELL = "RibsMergeWithShell"
|
||||
Public Const MAC_RIBSINVERTMERGEDSHELLMAINLINK = "InvertRibsMergedShellMainLink"
|
||||
Public Const MAC_RIBSINVERTORDER = "RibsInvertOrder"
|
||||
Public Const MAC_RIBSINVERTDIRECTION = "RibsInvertDirection"
|
||||
Public Const MAC_RIBSINVERTSTRANDORDER = "RibsInvertStrandOrder"
|
||||
@@ -126,6 +132,7 @@
|
||||
Public Const MAC_RIBSLEADOUTCOASTING = "RibsLeadOutCoasting"
|
||||
Public Const MAC_RIBSLEADOUTWIPE = "RibsLeadOutWipe"
|
||||
Public Const MAC_RIBSLEADOUTWIPEDIR = "RibsLeadOutWipeDir"
|
||||
Public Const MAC_RIBSLEADFILLET = "RibsLeadFillet"
|
||||
Public Const MAC_RIBSLIMITUNBOUNDEDWITHSOLID = "LimitUnboundedRibsWithSolid"
|
||||
Public Const MAC_SHELLNBRDIFFERENCE = "ShellNbrDifference"
|
||||
Public Const MAC_SHELLNBRCOASTING = "ShellNbrCoasting"
|
||||
|
||||
@@ -53,6 +53,7 @@ Public Module ConstGen
|
||||
' Abilitazioni licenza
|
||||
Friend Enum KEY_OPT As UInteger
|
||||
BASE = 1 ' Prodotto Icarus
|
||||
MACHINE_EXPORT = 2 ' opzione per esportare file icrx per macchina
|
||||
End Enum
|
||||
|
||||
' File di log generale
|
||||
@@ -77,4 +78,7 @@ Public Module ConstGen
|
||||
' Nome file Lua con le funzioni di attrezzaggio
|
||||
Public Const SETUP_LUA As String = "SetUp.lua"
|
||||
|
||||
' Chiave di Info in gruppo di lavoro per attivazione Virtual Milling
|
||||
Public Const KEY_MCHGRP_VM As String = "Vm"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -29,6 +29,7 @@ Public Module ConstIni
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_LASTNGEDIR As String = "LastNgeDir"
|
||||
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
||||
Public Const K_MACHINEEXPORT As String = "MachineExport"
|
||||
'Public Const K_SUPPORT As String = "Support"
|
||||
|
||||
'Public Const S_LANGUAGES As String = "Languages"
|
||||
@@ -102,11 +103,14 @@ Public Module ConstIni
|
||||
Public Const K_DXFSCALE As String = "DxfScale"
|
||||
Public Const K_STLSCALE As String = "StlScale"
|
||||
Public Const K_CNCFLAG As String = "CncFlag"
|
||||
Public Const K_ADVFLAG As String = "AdvFlag"
|
||||
|
||||
'Public Const S_SIMUL As String = "Simul"
|
||||
'Public Const K_SLIDERX As String = "SliderX"
|
||||
'Public Const K_SLIDERVAL As String = "SliderVal"
|
||||
Public Const K_MACHVIEWMODE As String = "MachViewMode"
|
||||
Public Const K_VIRTUALADDITIVE As String = "VirtualAdditive"
|
||||
Public Const K_TRACEENABLE As String = "TraceEnable"
|
||||
|
||||
Public Const S_PRINTING3D As String = "3dPrinting"
|
||||
Public Const K_3PRNBASEDIR As String = "BaseDir"
|
||||
@@ -115,6 +119,9 @@ Public Module ConstIni
|
||||
Public Const K_VIEWSLIDER As String = "ViewSlider"
|
||||
Public Const K_IMPORTCURREXTENSION As String = "ImportCurrExtension"
|
||||
|
||||
Public Const S_SOLIDS As String = "Solids"
|
||||
Public Const K_SIMPLIFIEDSECTION As String = "SimplifiedSection"
|
||||
|
||||
Public Const S_COLORS As String = "Colors"
|
||||
Public Const K_CLR_PRINTPART As String = "PrintPart"
|
||||
Public Const K_CLR_RIBS As String = "Ribs"
|
||||
|
||||
@@ -14,4 +14,10 @@
|
||||
|
||||
Public Const S_MINMAX As String = "MinMax"
|
||||
|
||||
Public Const S_VMILL As String = "VMill"
|
||||
Public Const K_VM_ENABLE As String = "Enable"
|
||||
|
||||
Public Const S_TOOLTRACE As String = "ToolTrace"
|
||||
Public Const K_TT_ENABLE As String = "Enable"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -221,7 +221,8 @@ Public Class CurrMachiningCathegory
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.SCREWBACK, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nPartId, nIndex, bForceFromDb, Me)})
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.MAXSLICESNUMBER, nPartId, nIndex, bForceFromDb, Me)})
|
||||
Case Cathegories.LINK
|
||||
m_sName = "Shell"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.INNERSHELLWIDTH, nPartId, nIndex, bForceFromDb, Me),
|
||||
@@ -245,8 +246,12 @@ Public Class CurrMachiningCathegory
|
||||
New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLINK, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLINKFILLET, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSMERGEWITHSHELL, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTMERGEDSHELLMAINLINK, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
|
||||
@@ -256,7 +261,8 @@ Public Class CurrMachiningCathegory
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADFILLET, nPartId, nIndex, bForceFromDb, Me)})
|
||||
Case Cathegories.SHELL_NUMBER
|
||||
m_sName = "Reduce Shell Number"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb, Me),
|
||||
@@ -484,25 +490,34 @@ Public Class CurrNumericMachiningParam
|
||||
m_bIsLen = True
|
||||
Case Params.PREFLOWDELAY
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_PREFLOWDELAY, m_dValue)
|
||||
m_bIsLen = True
|
||||
m_bIsLen = False
|
||||
Case Params.POSTFLOWDELAY
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_POSTFLOWDELAY, m_dValue)
|
||||
m_bIsLen = True
|
||||
m_bIsLen = False
|
||||
Case Params.SCREWBACK
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SCREWBACK, m_dValue)
|
||||
m_bIsLen = True
|
||||
m_bIsLen = False
|
||||
Case Params.SLICINGHEIGHT
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGHEIGHT, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.MAXSLICESNUMBER
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_MAXSLICESNUMBER, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDWIDTH
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDWIDTH, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSOVERLAP
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSLINKFILLET
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINKFILLET, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSLEADINLEN
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADINLEN, m_dValue)
|
||||
m_bIsLen = True
|
||||
@@ -518,6 +533,9 @@ Public Class CurrNumericMachiningParam
|
||||
Case Params.RIBSLEADOUTWIPEDIR
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSLEADFILLET
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADFILLET, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.SHELLNBRDIFFERENCE
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, m_dValue)
|
||||
m_bIsLen = False
|
||||
@@ -614,15 +632,15 @@ Public Class CurrNumericMachiningParam
|
||||
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
||||
Select Case Type
|
||||
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE,
|
||||
Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK, Params.SLICINGHEIGHT
|
||||
Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK, Params.SLICINGHEIGHT, Params.MAXSLICESNUMBER
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.LINKPARAM, Params.INNERSHELLWIDTH, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
|
||||
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC,
|
||||
Params.WIPELEN, Params.WIPEFEED_PC ' Params.WIPEDIR
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.RIBSSTRANDWIDTH, Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
|
||||
Case Params.RIBSSTRANDWIDTH, Params.RIBSOVERLAP, Params.RIBSSTRANDOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSLINKFILLET, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
|
||||
Params.RIBSLEADININVERT, Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING,
|
||||
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR
|
||||
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR, Params.RIBSLEADFILLET
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.SHELLNBRDIFFERENCE, Params.SHELLNBRCOASTING, Params.SHELLNBRWIPE, Params.SHELLNBRWIPEDIR
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
@@ -711,12 +729,18 @@ Public Class CurrNumericMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_SCREWBACK, sWriteValue)
|
||||
Case Params.SLICINGHEIGHT
|
||||
EgtSetInfo(nPartId, MAC_SLICINGHEIGHT, sWriteValue)
|
||||
Case Params.MAXSLICESNUMBER
|
||||
EgtSetInfo(nPartId, MAC_MAXSLICESNUMBER, sWriteValue)
|
||||
Case Params.RIBSSTRANDWIDTH
|
||||
EgtSetInfo(nPartId, MAC_RIBSSTRANDWIDTH, sWriteValue)
|
||||
Case Params.RIBSOVERLAP
|
||||
EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue)
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
EgtSetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, sWriteValue)
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
EgtSetInfo(nPartId, MAC_RIBSSTRANDCOUNT, sWriteValue)
|
||||
Case Params.RIBSLINKFILLET
|
||||
EgtSetInfo(nPartId, MAC_RIBSLINKFILLET, sWriteValue)
|
||||
Case Params.RIBSLEADINLEN
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADINLEN, sWriteValue)
|
||||
Case Params.RIBSLEADOUTLEN
|
||||
@@ -727,6 +751,8 @@ Public Class CurrNumericMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPE, sWriteValue)
|
||||
Case Params.RIBSLEADOUTWIPEDIR
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, sWriteValue)
|
||||
Case Params.RIBSLEADFILLET
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADFILLET, sWriteValue)
|
||||
Case Params.SHELLNBRDIFFERENCE
|
||||
EgtSetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, sWriteValue)
|
||||
Case Params.SHELLNBRCOASTING
|
||||
@@ -1177,6 +1203,10 @@ Public Class CurrCheckMachiningParam
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SPIRALVASE, m_bValue)
|
||||
Case Params.RIBSLINK
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINK, m_bValue)
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, m_bValue)
|
||||
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTMERGEDSHELLMAINLINK, m_bValue)
|
||||
Case Params.RIBSINVERTORDER
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTORDER, m_bValue)
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
@@ -1200,7 +1230,7 @@ Public Class CurrCheckMachiningParam
|
||||
Select Case Type
|
||||
Case Params.SPIRALVASE
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||
Case Params.RIBSLINK, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.AUXSOLIDSINFILLLINK
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
@@ -1220,6 +1250,10 @@ Public Class CurrCheckMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_SPIRALVASE, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSLINK
|
||||
EgtSetInfo(nPartId, MAC_RIBSLINK, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
EgtSetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
||||
EgtSetInfo(nPartId, MAC_RIBSINVERTMERGEDSHELLMAINLINK, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSINVERTORDER
|
||||
EgtSetInfo(nPartId, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
|
||||
@@ -21,8 +21,8 @@ Public Class DispositionPanelVM
|
||||
Dim dNewXPos As Double = ptReference.x
|
||||
StringToLen(value, dNewXPos)
|
||||
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||
Dim dMin As Double = 0
|
||||
Dim dMax As Double = CurrentMachine.b3Tab.DimX
|
||||
Dim dMin As Double = Math.Min( 0, CurrentMachine.b3ExtrusionArea.Min.x)
|
||||
Dim dMax As Double = Math.Max( CurrentMachine.b3Tab.DimX, CurrentMachine.b3ExtrusionArea.Max.x)
|
||||
If b3Print.Max.x > ptReference.x Then
|
||||
dMax -= b3Print.Max.x - ptReference.x
|
||||
End If
|
||||
@@ -60,8 +60,8 @@ Public Class DispositionPanelVM
|
||||
Dim dNewYPos As Double = ptReference.y
|
||||
StringToLen(value, dNewYPos)
|
||||
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||
Dim dMin As Double = 0
|
||||
Dim dMax As Double = CurrentMachine.b3Tab.DimY
|
||||
Dim dMin As Double = Math.Min( 0, CurrentMachine.b3ExtrusionArea.Min.y)
|
||||
Dim dMax As Double = Math.Max( CurrentMachine.b3Tab.DimY, CurrentMachine.b3ExtrusionArea.Max.y)
|
||||
If b3Print.Max.y > ptReference.y Then
|
||||
dMax -= b3Print.Max.y - ptReference.y
|
||||
End If
|
||||
|
||||
@@ -1,265 +0,0 @@
|
||||
<EgtWPFLib5:EgtMainWindow x:Class="EgtColorPickerV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtHexagon="clr-namespace:Icarus"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Width="750" Height="450"
|
||||
Style="{StaticResource Dialog_Window}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl>
|
||||
<TabItem Header="{Binding BasicColor_Msg}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColors}"
|
||||
SelectedItem="{Binding SelColor}"
|
||||
HorizontalAlignment="Center"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding ColorPicker_Msg}">
|
||||
<TabItem.Resources>
|
||||
<Style TargetType="{x:Type EgtHexagon:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
|
||||
<Setter Property="BorderThickness" Value="1.5"/>
|
||||
<Setter Property="BorderBrush" Value="White"/>
|
||||
</Style>
|
||||
</TabItem.Resources>
|
||||
<EgtHexagon:EgtHexList ItemsSource="{Binding HexList}"
|
||||
SelectedItem="{Binding sHexSelColor}"
|
||||
Orientation="Vertical"
|
||||
Margin="2.5"
|
||||
RowCount="13"
|
||||
ColumnCount="13"
|
||||
Height="300"
|
||||
Width="350"
|
||||
Style="{StaticResource EgtHexList}">
|
||||
<EgtHexagon:EgtHexList.ItemTemplate>
|
||||
<DataTemplate/>
|
||||
</EgtHexagon:EgtHexList.ItemTemplate>
|
||||
<EgtHexagon:EgtHexList.ItemContainerStyle>
|
||||
<Style TargetType="EgtHexagon:EgtHexItem" BasedOn="{StaticResource EgtHexItem}">
|
||||
<Setter Property="Grid.Row" Value="{Binding nRow}"/>
|
||||
<Setter Property="Grid.Column" Value="{Binding nColumn}"/>
|
||||
<Setter Property="Background" Value="{Binding Background}"/>
|
||||
</Style>
|
||||
</EgtHexagon:EgtHexList.ItemContainerStyle>
|
||||
</EgtHexagon:EgtHexList>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding ColorPickerTheme_Msg}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColorsTheme}"
|
||||
SelectedItem="{Binding SelColorTheme}"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1"
|
||||
Margin="5,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding CustomColor_Msg}"
|
||||
Margin="5,18,5,10"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding CustomColors}"
|
||||
SelectedItem="{Binding SelCustomColor}"
|
||||
HorizontalAlignment="Center"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="0,20,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="0,10,5,0"
|
||||
HorizontalAlignment="Left">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle Width="100"
|
||||
Height="70"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding CurrColor}"/>
|
||||
<Button x:Name="SaveColor"
|
||||
Grid.Row="1"
|
||||
Margin="0,10,0,0"
|
||||
Content="{Binding AddCColor_Msg}"
|
||||
Command="{Binding SaveColor_Command}"
|
||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding Red_Msg}"
|
||||
Margin="0,10,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,10,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding Green_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding Blu_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="3"
|
||||
Text="{Binding Hexadecimal_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="3"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
Text="{Binding Hexadecimal}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<UniformGrid Grid.Row="2"
|
||||
Rows="1"
|
||||
Margin="10,10,10,0">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtMainWindow>
|
||||
@@ -1,67 +0,0 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class EgtColorPickerV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM
|
||||
|
||||
Private Shadows DialogResult As DialogResult
|
||||
|
||||
Public Property CustomColors As Integer()
|
||||
Get
|
||||
Return m_EgtColorPickerVM.GetCustomColors()
|
||||
End Get
|
||||
Set(value As Integer())
|
||||
m_EgtColorPickerVM.SetCustomColors(value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Color As System.Drawing.Color
|
||||
Get
|
||||
Return System.Drawing.Color.FromArgb(255, m_EgtColorPickerVM.Red, m_EgtColorPickerVM.Green, m_EgtColorPickerVM.Blue)
|
||||
End Get
|
||||
Set(value As System.Drawing.Color)
|
||||
m_EgtColorPickerVM.Red = value.R
|
||||
m_EgtColorPickerVM.Green = value.G
|
||||
m_EgtColorPickerVM.Blue = value.B
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Owner As Window, EtgColorPickerVM As EgtColorPickerVM)
|
||||
MyBase.New(Owner)
|
||||
InitializeComponent()
|
||||
Me.DataContext = EtgColorPickerVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtColorPickerVM = EtgColorPickerVM
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructors
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtColorPickerVM.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
''' <summary>
|
||||
''' Apre una finestra EgtColorPicker
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Overloads Function ShowDialog() As DialogResult
|
||||
MyBase.ShowDialog()
|
||||
Return Me.DialogResult
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -1,373 +0,0 @@
|
||||
Imports System.Globalization
|
||||
|
||||
Public Class EgtHexagon
|
||||
Inherits Panel
|
||||
|
||||
#Region "ORIENTATION"
|
||||
|
||||
Public Shared ReadOnly OrientationProperty As DependencyProperty = DependencyProperty.RegisterAttached("Orientation",
|
||||
GetType(Orientation),
|
||||
GetType(EgtHexagon),
|
||||
New FrameworkPropertyMetadata(Orientation.Horizontal, FrameworkPropertyMetadataOptions.AffectsMeasure Or FrameworkPropertyMetadataOptions.AffectsArrange Or FrameworkPropertyMetadataOptions.[Inherits]))
|
||||
|
||||
Public Shared Sub SetOrientation(element As DependencyObject, value As Orientation)
|
||||
element.SetValue(OrientationProperty, value)
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetOrientation(element As DependencyObject) As Orientation
|
||||
Return CType(element.GetValue(OrientationProperty), Orientation)
|
||||
End Function
|
||||
|
||||
Public Property Orientation As Orientation
|
||||
Get
|
||||
Return CType(GetValue(OrientationProperty), Orientation)
|
||||
End Get
|
||||
Set(value As Orientation)
|
||||
SetValue(OrientationProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Orientation
|
||||
|
||||
#Region "ROW"
|
||||
|
||||
Public Shared ReadOnly RowCountProperty As DependencyProperty = DependencyProperty.Register("RowCount", GetType(Integer),
|
||||
GetType(EgtHexagon),
|
||||
New FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsMeasure Or FrameworkPropertyMetadataOptions.AffectsArrange), AddressOf ValidateCountCallback)
|
||||
|
||||
Public Property RowCount As Integer
|
||||
Get
|
||||
Return CInt(GetValue(RowCountProperty))
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
SetValue(RowCountProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Row
|
||||
|
||||
#Region "COLUMN"
|
||||
|
||||
Public Shared ReadOnly ColumnCountProperty As DependencyProperty = DependencyProperty.Register("ColumnCount",
|
||||
GetType(Integer),
|
||||
GetType(EgtHexagon),
|
||||
New FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsMeasure Or FrameworkPropertyMetadataOptions.AffectsArrange), AddressOf ValidateCountCallback)
|
||||
|
||||
Public Property ColumnCount As Integer
|
||||
Get
|
||||
Return CInt(GetValue(ColumnCountProperty))
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
SetValue(ColumnCountProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region 'Column
|
||||
|
||||
#Region "VALIDATE"
|
||||
|
||||
Private Shared Function ValidateCountCallback(value As Object) As Boolean
|
||||
If TypeOf value Is Integer Then
|
||||
Dim count As Integer = CInt(value)
|
||||
Return count > 0
|
||||
End If
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function GetRow(e As UIElement) As Integer
|
||||
Dim row As Integer = CInt(e.GetValue(Grid.RowProperty))
|
||||
If row >= RowCount Then row = RowCount - 1
|
||||
Return row
|
||||
End Function
|
||||
|
||||
Private Function GetColumn(e As UIElement) As Integer
|
||||
Dim column As Integer = CInt(e.GetValue(Grid.ColumnProperty))
|
||||
If column >= ColumnCount Then column = ColumnCount - 1
|
||||
Return column
|
||||
End Function
|
||||
|
||||
Protected Overrides Function MeasureOverride(ByVal availableSize As Size) As Size
|
||||
Dim w As Double = availableSize.Width
|
||||
Dim h As Double = availableSize.Height
|
||||
|
||||
If Double.IsInfinity(w) OrElse Double.IsInfinity(h) Then
|
||||
h = 0
|
||||
w = 0
|
||||
|
||||
For Each e As UIElement In InternalChildren
|
||||
e.Measure(availableSize)
|
||||
Dim s = e.DesiredSize
|
||||
If s.Height > h Then h = s.Height
|
||||
If s.Width > w Then w = s.Width
|
||||
Next
|
||||
|
||||
If Orientation = Orientation.Horizontal Then Return New Size(w * (ColumnCount * 3 + 1) / 4, h * (RowCount * 2 + 1) / 2)
|
||||
Return New Size(w * (ColumnCount * 2 + 1) / 2, h * (RowCount * 3 + 1) / 4)
|
||||
End If
|
||||
|
||||
Return availableSize
|
||||
End Function
|
||||
|
||||
#End Region ' Validate
|
||||
|
||||
#Region "HASSHIFT"
|
||||
|
||||
Private Sub HasShift(first As Boolean, last As Boolean)
|
||||
If Orientation = Orientation.Horizontal Then
|
||||
HasRowShift(first, last)
|
||||
Else
|
||||
HasColumnShift(first, last)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub HasRowShift(firstRow As Boolean, lastRow As Boolean)
|
||||
lastRow = True
|
||||
firstRow = lastRow
|
||||
Dim elements As UIElementCollection = MyBase.InternalChildren
|
||||
Dim i As Integer = 0
|
||||
|
||||
While i < elements.Count AndAlso (firstRow OrElse lastRow)
|
||||
Dim e = elements(i)
|
||||
If e.Visibility = Visibility.Collapsed Then Continue While
|
||||
Dim row As Integer = GetRow(e)
|
||||
Dim column As Integer = GetColumn(e)
|
||||
Dim modify As Integer = column Mod 2
|
||||
If row = 0 AndAlso modify = 0 Then firstRow = False
|
||||
If row = RowCount - 1 AndAlso modify = 1 Then lastRow = False
|
||||
i += 1
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Sub HasColumnShift(firstColumn As Boolean, lastColumn As Boolean)
|
||||
lastColumn = True
|
||||
firstColumn = lastColumn
|
||||
Dim elements As UIElementCollection = MyBase.InternalChildren
|
||||
Dim i As Integer = 0
|
||||
|
||||
While i < elements.Count AndAlso (firstColumn OrElse lastColumn)
|
||||
Dim e = elements(i)
|
||||
If e.Visibility = Visibility.Collapsed Then Continue While
|
||||
Dim row As Integer = GetRow(e)
|
||||
Dim column As Integer = GetColumn(e)
|
||||
Dim modify As Integer = row Mod 2
|
||||
If column = 0 AndAlso modify = 0 Then firstColumn = False
|
||||
If column = ColumnCount - 1 AndAlso modify = 1 Then lastColumn = False
|
||||
i += 1
|
||||
End While
|
||||
End Sub
|
||||
|
||||
#End Region ' HasShift
|
||||
|
||||
#Region "GETHEXSIZE"
|
||||
|
||||
Private Function GetHexSize(gridSize As Size) As Size
|
||||
Dim minH As Double = 0
|
||||
Dim minW As Double = 0
|
||||
|
||||
For Each e As UIElement In InternalChildren
|
||||
Dim f = TryCast(e, FrameworkElement)
|
||||
|
||||
If f IsNot Nothing Then
|
||||
If f.MinHeight > minH Then minH = f.MinHeight
|
||||
If f.MinWidth > minW Then minW = f.MinWidth
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim first, last As Boolean
|
||||
HasShift(first, last)
|
||||
Dim possibleSize = GetPossibleSize(gridSize)
|
||||
Dim possibleW As Double = possibleSize.Width
|
||||
Dim possibleH As Double = possibleSize.Height
|
||||
Dim w = Math.Max(minW, possibleW)
|
||||
Dim h = Math.Max(minH, possibleH)
|
||||
|
||||
Return New Size(w, h)
|
||||
End Function
|
||||
|
||||
Private Function GetPossibleSize(gridSize As Size) As Size
|
||||
Dim first, last As Boolean
|
||||
HasShift(first, last)
|
||||
If Orientation = Orientation.Horizontal Then Return GetPossibleSizeHorizontal(gridSize, first, last)
|
||||
Return GetPossibleSizeVertical(gridSize, first, last)
|
||||
End Function
|
||||
|
||||
Private Function GetPossibleSizeVertical(gridSize As Size, first As Boolean, last As Boolean) As Size
|
||||
Dim columns As Integer = ((If(first, 0, 1)) + 2 * ColumnCount - (If(last, 1, 0)))
|
||||
Dim w As Double = 2 * (gridSize.Width / columns)
|
||||
Dim rows As Integer = 1 + 3 * RowCount
|
||||
Dim h As Double = 4 * (gridSize.Height / rows)
|
||||
Return New Size(w, h)
|
||||
End Function
|
||||
|
||||
Private Function GetPossibleSizeHorizontal(gridSize As Size, first As Boolean, last As Boolean) As Size
|
||||
Dim columns As Integer = 1 + 3 * ColumnCount
|
||||
Dim w As Double = 4 * (gridSize.Width / columns)
|
||||
Dim rows As Integer = (If(first, 0, 1)) + 2 * RowCount - (If(last, 1, 0))
|
||||
Dim h As Double = 2 * (gridSize.Height / rows)
|
||||
Return New Size(w, h)
|
||||
End Function
|
||||
|
||||
#End Region ' GetHexSize
|
||||
|
||||
#Region "ARRANGE"
|
||||
|
||||
Protected Overrides Function ArrangeOverride(finalSize As Size) As Size
|
||||
Dim first, last As Boolean
|
||||
HasShift(first, last)
|
||||
Dim hexSize As Size = GetHexSize(finalSize)
|
||||
Dim columnWidth, rowHeight As Double
|
||||
|
||||
If Orientation = Orientation.Horizontal Then
|
||||
rowHeight = 0.5 * hexSize.Height
|
||||
columnWidth = 0.25 * hexSize.Width
|
||||
Else
|
||||
rowHeight = 0.25 * hexSize.Height
|
||||
columnWidth = 0.5 * hexSize.Width
|
||||
End If
|
||||
|
||||
Dim elements As UIElementCollection = MyBase.InternalChildren
|
||||
|
||||
For i As Integer = 0 To elements.Count - 1
|
||||
If elements(i).Visibility = Visibility.Collapsed Then Continue For
|
||||
ArrangeElement(elements(i), hexSize, columnWidth, rowHeight, first)
|
||||
Next
|
||||
|
||||
Return finalSize
|
||||
End Function
|
||||
|
||||
Private Sub ArrangeElement(e As UIElement, hexSize As Size, columnWidth As Double, rowHeight As Double, shift As Boolean)
|
||||
Dim row As Integer = GetRow(e)
|
||||
Dim column As Integer = GetColumn(e)
|
||||
Dim x As Double
|
||||
Dim y As Double
|
||||
|
||||
If Orientation = Orientation.Horizontal Then
|
||||
x = 3 * columnWidth * column
|
||||
y = rowHeight * (2 * row + (If(column Mod 2 = 1, 1, 0)) + (If(shift, -1, 0)))
|
||||
Else
|
||||
x = columnWidth * (2 * column + (If(row Mod 2 = 1, 1, 0)) + (If(shift, -1, 0)))
|
||||
y = 3 * rowHeight * row
|
||||
End If
|
||||
|
||||
e.Arrange(New Rect(x, y, hexSize.Width, hexSize.Height))
|
||||
End Sub
|
||||
|
||||
#End Region ' Arrange
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EgtHexList
|
||||
Inherits ListBox
|
||||
|
||||
Shared Sub New()
|
||||
DefaultStyleKeyProperty.OverrideMetadata(GetType(EgtHexList),
|
||||
New FrameworkPropertyMetadata(GetType(EgtHexList)))
|
||||
End Sub
|
||||
|
||||
Public Shared ReadOnly OrientationProperty As DependencyProperty = EgtHexagon.OrientationProperty.AddOwner(GetType(EgtHexList))
|
||||
Public Shared ReadOnly RowCountProperty As DependencyProperty = EgtHexagon.RowCountProperty.AddOwner(GetType(EgtHexList))
|
||||
Public Shared ReadOnly ColumnCountProperty As DependencyProperty = EgtHexagon.ColumnCountProperty.AddOwner(GetType(EgtHexList))
|
||||
|
||||
Public Property Orientation As Orientation
|
||||
Get
|
||||
Return CType(GetValue(OrientationProperty), Orientation)
|
||||
End Get
|
||||
Set(value As Orientation)
|
||||
SetValue(OrientationProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property RowCount As Integer
|
||||
Get
|
||||
Return CInt(GetValue(RowCountProperty))
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
SetValue(RowCountProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ColumnCount As Integer
|
||||
Get
|
||||
Return CInt(GetValue(ColumnCountProperty))
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
SetValue(ColumnCountProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Overrides Function IsItemItsOwnContainerOverride(item As Object) As Boolean
|
||||
Return (TypeOf item Is EgtHexItem)
|
||||
End Function
|
||||
|
||||
Protected Overrides Function GetContainerForItemOverride() As DependencyObject
|
||||
Return New EgtHexItem()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EgtHexItem
|
||||
Inherits ListBoxItem
|
||||
|
||||
Shared Sub New()
|
||||
DefaultStyleKeyProperty.OverrideMetadata(GetType(EgtHexItem),
|
||||
New FrameworkPropertyMetadata(GetType(EgtHexItem)))
|
||||
End Sub
|
||||
|
||||
Public Shared ReadOnly OrientationProperty As DependencyProperty = EgtHexagon.OrientationProperty.AddOwner(GetType(EgtHexItem))
|
||||
|
||||
Public Property Orientation As Orientation
|
||||
Get
|
||||
Return CType(GetValue(OrientationProperty), Orientation)
|
||||
End Get
|
||||
Set(value As Orientation)
|
||||
SetValue(OrientationProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
Public Class HexClipConverter
|
||||
Implements IMultiValueConverter
|
||||
|
||||
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
|
||||
Dim width As Double = CDbl(values(0))
|
||||
Dim height As Double = CDbl(values(1))
|
||||
Dim orientation As Orientation = CType(values(2), Orientation)
|
||||
|
||||
If width <= 0 OrElse height <= 0 Then Return Nothing
|
||||
|
||||
Dim pathGeometry As New PathGeometry With {
|
||||
.Figures = New PathFigureCollection()
|
||||
}
|
||||
|
||||
Dim pathFigure As New PathFigure()
|
||||
|
||||
If orientation = Orientation.Horizontal Then
|
||||
pathFigure.StartPoint = New Point(0, height * 0.5)
|
||||
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.25, 0)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.75, 0)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width, height * 0.5)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.75, height)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.25, height)})
|
||||
Else
|
||||
pathFigure.StartPoint = New Point(width * 0.5, 0)
|
||||
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width, height * 0.25)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width, height * 0.75)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.5, height)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(0, height * 0.75)})
|
||||
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(0, height * 0.25)})
|
||||
End If
|
||||
|
||||
pathGeometry.Figures.Add(pathFigure)
|
||||
|
||||
Return pathGeometry
|
||||
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
End Class
|
||||
@@ -1,450 +0,0 @@
|
||||
<EgtWPFLib5:EgtMainWindow x:Class="EgtManageFileDialogV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:local="clr-namespace:Icarus"
|
||||
Title="{Binding sTitle}"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Style="{StaticResource Dialog_Window}">
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Command="{Binding GoBack_Command}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource RightPanel_Button}">
|
||||
<Image Source="\Resources\EgtDialog\Restore.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<TextBlock Grid.Column="1"
|
||||
Margin="5"
|
||||
Text="{Binding sUrl_Msg, Mode=TwoWay}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding VisualizationList}"
|
||||
SelectedItem="{Binding SelVisualization}"
|
||||
Width="200"
|
||||
Margin="2.5,0,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}">
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TreeView x:Name="FileTree"
|
||||
ItemsSource="{Binding RootList}"
|
||||
Height="300"
|
||||
Width="200"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type local:EgtFolder}"
|
||||
ItemsSource="{Binding FolderList}">
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</HierarchicalDataTemplate>
|
||||
<DataTemplate DataType="{x:Type local:EgtItem}">
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
</TreeView>
|
||||
<TabControl Grid.Column="1"
|
||||
BorderBrush="White"
|
||||
BorderThickness="0"
|
||||
Background="White"
|
||||
SelectedIndex="{Binding nSelectView}">
|
||||
<TabItem Visibility="{Binding ListBox_Visibility}">
|
||||
<Grid Grid.Column="1"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Name_Msg}"
|
||||
Visibility="{Binding UVision_Visibility}"
|
||||
Margin="5,5,5,5"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<ListBox x:Name="FileList"
|
||||
Grid.Row="1"
|
||||
Width="350"
|
||||
Height="250"
|
||||
Margin="5,5,5,5"
|
||||
BorderBrush="White"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding SelTreeItem.ItemSelected}">
|
||||
<ListBox.Resources>
|
||||
<DataTemplate x:Key="ScheduleTemplate"
|
||||
DataType="{x:Type local:EgtDirectory}" >
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="BoxingTemplate"
|
||||
DataType="{x:Type local:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="65"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="3"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sTypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ContentTemplateView"
|
||||
DataType="{x:Type local:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="60"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sTypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Column="2"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding dLastModifyDate}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.Resources>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type local:EgtDirectory}">
|
||||
<ContentControl Content="{Binding}">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="{x:Type ContentControl}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.nTaskStatus, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="0">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ScheduleTemplate}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nTaskStatus, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="1">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource BoxingTemplate}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nTaskStatus, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="2">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ContentTemplateView}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
|
||||
<!--<ListBox.ItemTemplate>
|
||||
<DataTemplate >
|
||||
<TextBlock Text="{Binding Name}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>-->
|
||||
|
||||
<!--<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="/Resources/ProjectManager/New.png"
|
||||
Height="65"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="3"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding Name}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding TypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding Dimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>-->
|
||||
|
||||
<!--<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="/Resources/ProjectManager/New.png"
|
||||
Height="60"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding Name}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding TypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Column="2"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding LastModifyDate}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding Dimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>-->
|
||||
<!--</DataTemplate>
|
||||
</ListBox.ItemTemplate>-->
|
||||
</ListBox>
|
||||
<UniformGrid Visibility="{Binding UVision_Visibility}"
|
||||
Grid.Column="1"
|
||||
Columns="3"
|
||||
HorizontalAlignment="Stretch">
|
||||
<TextBlock Margin="5,5,5,5"
|
||||
Text="{Binding LastModify_Msg}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock Margin="5,5,5,5"
|
||||
Text="{Binding Type_Msg}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock Margin="5,5,5,5"
|
||||
Text="{Binding Dimension_Msg}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Visibility="{Binding UVision_Visibility}"
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Columns="3"
|
||||
HorizontalAlignment="Stretch">
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Margin="5,5,5,5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
Text="{Binding SelectedItem.dLastModifyDate, ElementName=FileList}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Grid.Row="1"
|
||||
Margin="5,5,5,5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
Text="{Binding SelectedItem.sTypeItem, ElementName=FileList}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock Grid.Column="3"
|
||||
Grid.Row="1"
|
||||
Margin="5,5,5,5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
Text="{Binding SelectedItem.sDimension, ElementName=FileList}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Visibility="{Binding DataGrid_Visibility}">
|
||||
<DataGrid AutoGenerateColumns="False"
|
||||
Height="300"
|
||||
Margin="5,5,5,10"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding SelTreeItem.ItemSelected}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding sName}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding dLastModifyDate}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding sTypeItem}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding sDimension}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Right"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow"
|
||||
BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}">
|
||||
</Style>
|
||||
</DataGrid.CellStyle>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="5,5,5,5"
|
||||
Text="{Binding FileName_Msg}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<!--<ComboBox Grid.Column="1"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
IsEditable="True"
|
||||
ItemsSource="{Binding ListItemView}"
|
||||
SelectedItem="{Binding SelListItemView}"
|
||||
Width="400"
|
||||
Margin="2.5,0,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}">
|
||||
</ComboBox>-->
|
||||
<TextBox Grid.Column="1"
|
||||
Margin="2.5,2.5,2.5,5"
|
||||
Width="350"
|
||||
Height="30"
|
||||
TextAlignment="Left"
|
||||
Text="{Binding sSaveFileName}"
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding ListFilter}"
|
||||
SelectedItem="{Binding SelExstension}"
|
||||
DisplayMemberPath="sNameExstension"
|
||||
HorizontalAlignment="Right"
|
||||
Width="200"
|
||||
Margin="2.5,0,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}">
|
||||
</ComboBox>
|
||||
<UniformGrid Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Rows="1"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
Margin="15,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtMainWindow>
|
||||
@@ -1,88 +0,0 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class EgtManageFileDialogV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM
|
||||
|
||||
Private Shadows DialogResult As DialogResult
|
||||
|
||||
Public Overloads Property Title As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sTitle
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sTitle = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Filter As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sFilter
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sFilter = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property InitialDirectory As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sInitialDirectory
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sInitialDirectory = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FileName As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sFileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FilterIndex As Integer
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.nFilterIndex
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_EgtManageFileDialogVM.nFilterIndex = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Owner As Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
|
||||
MyBase.New(Owner)
|
||||
InitializeComponent()
|
||||
Me.DataContext = EgtManageFileDialogVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtManageFileDialogVM = EgtManageFileDialogVM
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtManageFileDialogVM.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overloads Function ShowDialog() As DialogResult
|
||||
MyBase.ShowDialog()
|
||||
Return Me.DialogResult
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -1,893 +0,0 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports System.Windows.Forms
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
|
||||
|
||||
Public Class EgtManageFileDialogVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Enum VisualizationContainerType As Integer
|
||||
LISTBOX = 0
|
||||
DATAGRID = 1
|
||||
End Enum
|
||||
|
||||
Public Enum VisualizationType As Integer
|
||||
SCHEDULETEMPLATE = 0
|
||||
DETAILSTEMPLATE = 1
|
||||
BOXINGTEMPLATE = 2
|
||||
CONTENTTEMPLATE = 3
|
||||
End Enum
|
||||
|
||||
Private m_sTitle As String
|
||||
Public Property sTitle As String
|
||||
Get
|
||||
Return m_sTitle
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sTitle = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sFilter As String
|
||||
Public Property sFilter As String
|
||||
Get
|
||||
Return m_sFilter
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sFilter = value
|
||||
If Not IsNothing(sFilter) Then
|
||||
Dim FilterListSplit As String() = sFilter.Split("|"c)
|
||||
For i As Integer = 0 To FilterListSplit.Count - 1
|
||||
If i Mod 2 = 0 Then
|
||||
Dim strExstension As New EgtExstension() With {.sNameExstension = FilterListSplit(i) & FilterListSplit(i + 1), .sExstension = FilterListSplit(i + 1)}
|
||||
m_ListFilter.Add(strExstension)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sInitialDirectory As String
|
||||
Public Property sInitialDirectory As String
|
||||
Get
|
||||
Return m_sInitialDirectory
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sInitialDirectory = value
|
||||
m_sSaveFileName = "New.icrs"
|
||||
m_sUrl_Msg = m_sInitialDirectory
|
||||
Dim DirectoryStart As String() = m_sInitialDirectory.Split("\"c)
|
||||
|
||||
For i As Integer = 0 To m_RootList.Count - 1
|
||||
If m_RootList(i).sName.Trim("\") = DirectoryStart(0) Then
|
||||
m_RootList(i).IsExpanded = True
|
||||
Dim CurrItem As EgtFolder = TryCast(m_RootList(i), EgtFolder)
|
||||
If Not IsNothing(CurrItem) Then
|
||||
For j As Integer = 0 To CurrItem.FolderList.Count - 1
|
||||
If CurrItem.FolderList(j).sName = DirectoryStart(1) Then
|
||||
CurrItem.FolderList(j).IsExpanded = True
|
||||
Dim ItemFolder As EgtFolder = TryCast(CurrItem.FolderList(j), EgtFolder)
|
||||
If Not IsNothing(ItemFolder) Then
|
||||
For y As Integer = 0 To ItemFolder.FolderList.Count - 1
|
||||
If ItemFolder.FolderList(y).sName = DirectoryStart(2) Then
|
||||
ItemFolder.FolderList(y).IsExpanded = True
|
||||
ItemFolder.FolderList(y).IsSelected = True
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sFileName As String
|
||||
Public Property sFileName As String
|
||||
Get
|
||||
Return m_sFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sFileName = value
|
||||
m_sSaveFileName = m_sFileName
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared m_sUrl_Msg As String
|
||||
Public Property sUrl_Msg As String
|
||||
Get
|
||||
Return m_sUrl_Msg
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sUrl_Msg = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private m_sSelListItemView As String
|
||||
'Public Property SelListItemView As String
|
||||
' Get
|
||||
' Return m_sSelListItemView
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_sSelListItemView = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private m_sSaveFileName As String
|
||||
Public Property sSaveFileName As String
|
||||
Get
|
||||
Return m_sSaveFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sSaveFileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nTaskStatus As Integer
|
||||
Public Property nTaskStatus As String
|
||||
Get
|
||||
Return m_nTaskStatus
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_nTaskStatus = value
|
||||
NotifyPropertyChanged(NameOf(nTaskStatus))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nFilterIndex As Integer
|
||||
Public Property nFilterIndex As Integer
|
||||
Get
|
||||
Return m_nFilterIndex
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nFilterIndex = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nSelectView As Integer
|
||||
Public Property nSelectView As Integer
|
||||
Get
|
||||
Return m_nSelectView
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nSelectView = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ListFilter As ObservableCollection(Of EgtExstension)
|
||||
Public Property ListFilter As ObservableCollection(Of EgtExstension)
|
||||
Get
|
||||
Return m_ListFilter
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of EgtExstension))
|
||||
m_ListFilter = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Public Shared m_ListItemView As ObservableCollection(Of String)
|
||||
'Public Property ListItemView As ObservableCollection(Of String)
|
||||
' Get
|
||||
' Return m_ListItemView
|
||||
' End Get
|
||||
' Set(value As ObservableCollection(Of String))
|
||||
' m_ListItemView = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private m_RootList As New ObservableCollection(Of EgtDirectory)
|
||||
Public Property RootList As ObservableCollection(Of EgtDirectory)
|
||||
Get
|
||||
Return m_RootList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of EgtDirectory))
|
||||
m_RootList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_VisualizationList As ObservableCollection(Of IdNameStruct)
|
||||
Public Property VisualizationList As ObservableCollection(Of IdNameStruct)
|
||||
Get
|
||||
Return m_VisualizationList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of IdNameStruct))
|
||||
m_VisualizationList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SelVisualization As IdNameStruct
|
||||
Public Property SelVisualization As IdNameStruct
|
||||
Get
|
||||
Return m_SelVisualization
|
||||
End Get
|
||||
Set(value As IdNameStruct)
|
||||
m_SelVisualization = value
|
||||
Select Case m_SelVisualization.Id
|
||||
Case VisualizationType.SCHEDULETEMPLATE
|
||||
m_nSelectView = VisualizationContainerType.LISTBOX
|
||||
nTaskStatus = 0
|
||||
m_UVision_Visibility = Visibility.Visible
|
||||
m_ListBox_Visibility = Visibility.Visible
|
||||
m_DataGrid_Visibility = Visibility.Collapsed
|
||||
Case VisualizationType.DETAILSTEMPLATE
|
||||
m_nSelectView = VisualizationContainerType.DATAGRID
|
||||
m_UVision_Visibility = Visibility.Collapsed
|
||||
m_ListBox_Visibility = Visibility.Collapsed
|
||||
m_DataGrid_Visibility = Visibility.Visible
|
||||
Case VisualizationType.BOXINGTEMPLATE
|
||||
m_nSelectView = VisualizationContainerType.LISTBOX
|
||||
nTaskStatus = 1
|
||||
m_UVision_Visibility = Visibility.Collapsed
|
||||
m_ListBox_Visibility = Visibility.Visible
|
||||
m_DataGrid_Visibility = Visibility.Collapsed
|
||||
Case VisualizationType.CONTENTTEMPLATE
|
||||
m_nSelectView = VisualizationContainerType.LISTBOX
|
||||
nTaskStatus = 2
|
||||
m_UVision_Visibility = Visibility.Collapsed
|
||||
m_ListBox_Visibility = Visibility.Visible
|
||||
m_DataGrid_Visibility = Visibility.Collapsed
|
||||
End Select
|
||||
NotifyPropertyChanged(NameOf(nSelectView))
|
||||
NotifyPropertyChanged(NameOf(UVision_Visibility))
|
||||
NotifyPropertyChanged(NameOf(DataGrid_Visibility))
|
||||
NotifyPropertyChanged(NameOf(ListBox_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_DataGrid_Visibility As Visibility
|
||||
Public Property DataGrid_Visibility As Visibility
|
||||
Get
|
||||
Return m_DataGrid_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_DataGrid_Visibility = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ListBox_Visibility As Visibility
|
||||
Public Property ListBox_Visibility As Visibility
|
||||
Get
|
||||
Return m_ListBox_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_ListBox_Visibility = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_UVision_Visibility As Visibility
|
||||
Public Property UVision_Visibility As Visibility
|
||||
Get
|
||||
Return m_UVision_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_UVision_Visibility = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared m_SelExstension As EgtExstension
|
||||
Public Property SelExstension As EgtExstension
|
||||
Get
|
||||
Return m_SelExstension
|
||||
End Get
|
||||
Set(value As EgtExstension)
|
||||
m_SelExstension = value
|
||||
Dim CurrItem As EgtFolder = TryCast(m_SelTreeItem, EgtFolder)
|
||||
If Not IsNothing(CurrItem) Then
|
||||
CollectionViewSource.GetDefaultView(CurrItem.FolderList).Refresh()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared m_SelTreeItem As EgtDirectory
|
||||
Public Property SelTreeItem As EgtDirectory
|
||||
Get
|
||||
Return m_SelTreeItem
|
||||
End Get
|
||||
Set(value As EgtDirectory)
|
||||
m_SelTreeItem = value
|
||||
NotifyPropertyChanged(NameOf(SelTreeItem))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Sub UpdateSelRoot(Item As EgtDirectory)
|
||||
m_SelTreeItem = Item
|
||||
NotifyPropertyChanged(NameOf(SelTreeItem))
|
||||
End Sub
|
||||
|
||||
'Comandi
|
||||
Private m_cmdCancel As ICommand
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdGoBack As ICommand
|
||||
Friend Event m_CloseWindow(bDialogResult As MessageBoxResult)
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New()
|
||||
m_RootList.Clear()
|
||||
EgtDirectory.refUpdateSelRoot = AddressOf UpdateSelRoot
|
||||
Dim drives As DriveInfo() = DriveInfo.GetDrives().Where(Function(d) d.IsReady).ToArray()
|
||||
|
||||
m_ListFilter = New ObservableCollection(Of EgtExstension)
|
||||
|
||||
For i As Integer = 0 To drives.Count() - 1
|
||||
Dim directory As New EgtFolder(drives(i).RootDirectory, Nothing)
|
||||
'AddHandler directory.PropertyChanged, AddressOf Directory_PropertyChanged
|
||||
m_RootList.Add(directory)
|
||||
Next
|
||||
|
||||
SetVisualizzationList()
|
||||
|
||||
m_SelVisualization.Id = VisualizationType.SCHEDULETEMPLATE
|
||||
m_nSelectView = VisualizationContainerType.LISTBOX
|
||||
nTaskStatus = 0
|
||||
m_UVision_Visibility = Visibility.Visible
|
||||
m_ListBox_Visibility = Visibility.Visible
|
||||
m_DataGrid_Visibility = Visibility.Collapsed
|
||||
|
||||
NotifyPropertyChanged(NameOf(RootList))
|
||||
NotifyPropertyChanged(NameOf(ListFilter))
|
||||
NotifyPropertyChanged(NameOf(VisualizationList))
|
||||
End Sub
|
||||
|
||||
#End Region ' CONTRUCTORS
|
||||
|
||||
#Region "Messages"
|
||||
Public ReadOnly Property Name_Msg As String
|
||||
Get
|
||||
Return EgtMsg(15060)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LastModify_Msg As String
|
||||
Get
|
||||
Return EgtMsg(15061)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Type_Msg As String
|
||||
Get
|
||||
Return EgtMsg(15062)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Dimension_Msg As String
|
||||
Get
|
||||
Return EgtMsg(15063)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property Folder_Msg As String
|
||||
Get
|
||||
Return EgtMsg(15064)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property FileName_Msg As String
|
||||
Get
|
||||
Return EgtMsg(15065)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property Schedule_Msg As String
|
||||
Get
|
||||
Return EgtMsg(15067)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property Details_Msg As String
|
||||
Get
|
||||
Return EgtMsg(15068)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property Boxing_Msg As String
|
||||
Get
|
||||
Return EgtMsg(15069)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property Content_Msg As String
|
||||
Get
|
||||
Return EgtMsg(15070)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property DataFolder_Msg As String
|
||||
Get
|
||||
Return EgtMsg(15071)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
''' <summary>
|
||||
''' Inizializza la ComboBox per la scelta dei template
|
||||
''' </summary>
|
||||
Private Sub SetVisualizzationList()
|
||||
m_VisualizationList = New ObservableCollection(Of IdNameStruct)
|
||||
Dim ItemVisualization As New IdNameStruct With {
|
||||
.Id = 0,
|
||||
.Name = Schedule_Msg
|
||||
}
|
||||
m_VisualizationList.Add(ItemVisualization)
|
||||
ItemVisualization.Id = 1
|
||||
ItemVisualization.Name = Details_Msg
|
||||
m_VisualizationList.Add(ItemVisualization)
|
||||
ItemVisualization.Id = 2
|
||||
ItemVisualization.Name = Boxing_Msg
|
||||
m_VisualizationList.Add(ItemVisualization)
|
||||
ItemVisualization.Id = 3
|
||||
ItemVisualization.Name = Content_Msg
|
||||
m_VisualizationList.Add(ItemVisualization)
|
||||
End Sub
|
||||
|
||||
Private Sub Directory_PropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||
If e.PropertyName = "IsSelected" Then
|
||||
'UpdateSelRoot()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Command Ok"
|
||||
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()
|
||||
Dim CurrItem As EgtItem = TryCast(EgtFolder.m_ItemSelected, EgtItem)
|
||||
If Not IsNothing(CurrItem) Then
|
||||
m_sFileName = m_SelTreeItem.InfoDir.FullName & "\" & CurrItem.sName
|
||||
Else
|
||||
m_sFileName = m_SelTreeItem.InfoDir.FullName & "\" & m_sSaveFileName
|
||||
End If
|
||||
RaiseEvent m_CloseWindow(DialogResult.OK)
|
||||
End Sub
|
||||
#End Region 'Command Ok
|
||||
|
||||
#Region "Command GoBack"
|
||||
Public ReadOnly Property GoBack_Command As ICommand
|
||||
Get
|
||||
If m_cmdGoBack Is Nothing Then
|
||||
m_cmdGoBack = New Command(AddressOf GoBack)
|
||||
End If
|
||||
Return m_cmdGoBack
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub GoBack()
|
||||
m_SelTreeItem = EgtFolder.m_ParentFolder
|
||||
m_SelTreeItem.IsSelected = True
|
||||
m_sUrl_Msg = ""
|
||||
m_sUrl_Msg = m_SelTreeItem.InfoDir.FullName
|
||||
EgtDirectory.m_sIconSource = "\Resources\EgtDialog\Folder.png"
|
||||
NotifyPropertyChanged(NameOf(sUrl_Msg))
|
||||
End Sub
|
||||
#End Region 'Command GoBack
|
||||
|
||||
#Region "Command Cancel"
|
||||
Public ReadOnly Property Cancel_Command As ICommand
|
||||
Get
|
||||
If m_cmdCancel Is Nothing Then
|
||||
m_cmdCancel = New Command(AddressOf Cancel)
|
||||
End If
|
||||
Return m_cmdCancel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Cancel()
|
||||
RaiseEvent m_CloseWindow(DialogResult.Cancel)
|
||||
End Sub
|
||||
#End Region 'Command Cancel
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EgtExstension
|
||||
Inherits VMBase
|
||||
|
||||
Public m_sNameExstension As String
|
||||
Public Property sNameExstension As String
|
||||
Get
|
||||
Return m_sNameExstension
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sNameExstension = value
|
||||
NotifyPropertyChanged(NameOf(sNameExstension))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_sExstension As String
|
||||
Public Property sExstension As String
|
||||
Get
|
||||
Return m_sExstension
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sExstension = value
|
||||
NotifyPropertyChanged(NameOf(sExstension))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EgtDirectory
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Friend Shared refUpdateSelRoot As Action(Of EgtDirectory)
|
||||
|
||||
Private m_bIsSelected As Boolean
|
||||
Public Overridable Property IsSelected As Boolean
|
||||
Get
|
||||
Return m_bIsSelected
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsSelected = value
|
||||
refUpdateSelRoot(Me)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bIsExpanded As Boolean
|
||||
Public Overridable Property IsExpanded As Boolean
|
||||
Get
|
||||
Return m_bIsExpanded
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsExpanded = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_InfoDir As DirectoryInfo
|
||||
Public Property InfoDir As DirectoryInfo
|
||||
Get
|
||||
Return m_InfoDir
|
||||
End Get
|
||||
Set(value As DirectoryInfo)
|
||||
m_InfoDir = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sName As String
|
||||
Get
|
||||
Try
|
||||
Return If(Not IsNothing(m_InfoDir), m_InfoDir.Name, "")
|
||||
Catch ex As Exception
|
||||
Return ""
|
||||
End Try
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared m_sIconSource As String
|
||||
Public Property sIconSource As String
|
||||
Get
|
||||
Return m_sIconSource
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sIconSource = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sTypeItem As String
|
||||
Get
|
||||
Try
|
||||
Return If(Not IsNothing(m_InfoDir), m_InfoDir.Extension, "")
|
||||
Catch ex As Exception
|
||||
Return ""
|
||||
End Try
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dLastModifyDate As Date
|
||||
Get
|
||||
Try
|
||||
Return If(Not IsNothing(m_InfoDir), m_InfoDir.LastAccessTime.ToString("dd/MM/yyyy HH:mm:ss"), Date.UtcNow.ToString("dd/MM/yyyy HH:mm:ss"))
|
||||
Catch ex As Exception
|
||||
Return Date.UtcNow.ToString("dd/MM/yyyy HH:mm:ss")
|
||||
End Try
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sDimension As Integer
|
||||
Get
|
||||
Try
|
||||
Return If(Not IsNothing(m_InfoDir), m_InfoDir.EnumerateDirectories().Count, 0)
|
||||
Catch ex As Exception
|
||||
Return 0
|
||||
End Try
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EgtFolder
|
||||
Inherits EgtDirectory
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Shared m_ItemList_View As CollectionView = Nothing
|
||||
|
||||
Private m_FolderList As New ObservableCollection(Of EgtDirectory)
|
||||
Public Property FolderList As ObservableCollection(Of EgtDirectory)
|
||||
Get
|
||||
Return m_FolderList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of EgtDirectory))
|
||||
m_FolderList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared m_ItemSelected As EgtDirectory
|
||||
Public Property ItemSelected As EgtDirectory
|
||||
Get
|
||||
Return m_ItemSelected
|
||||
End Get
|
||||
Set(value As EgtDirectory)
|
||||
m_ItemSelected = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sName As String
|
||||
Public Overloads Property sName As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sTypeItem As String
|
||||
Public Overloads Property sTypeItem As String
|
||||
Get
|
||||
Return m_sTypeItem
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sTypeItem = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_dLastModifyDate As Date
|
||||
Public Overloads Property dLastModifyDate As String
|
||||
Get
|
||||
Return m_dLastModifyDate
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_dLastModifyDate = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared m_ParentFolder As EgtFolder
|
||||
Public Property ParentFolder As EgtFolder
|
||||
Get
|
||||
Return m_ParentFolder
|
||||
End Get
|
||||
Set(value As EgtFolder)
|
||||
m_ParentFolder = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bIsExpanded As Boolean
|
||||
Public Overrides Property IsExpanded As Boolean
|
||||
Get
|
||||
Return m_bIsExpanded
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsExpanded = value
|
||||
NotifyPropertyChanged(NameOf(IsExpanded))
|
||||
Dim DirectoryList() As DirectoryInfo
|
||||
Dim FileList() As FileInfo
|
||||
Try
|
||||
DirectoryList = m_InfoDir.GetDirectories().Where(Function(file) (file.Attributes And FileAttributes.Hidden And file.Name <> EgtManageFileDialogVM.DataFolder_Msg) = 0).ToArray()
|
||||
FileList = m_InfoDir.GetFiles().Where(Function(file) (file.Attributes And FileAttributes.Hidden) = 0).ToArray()
|
||||
Catch ex As Exception
|
||||
DirectoryList = Nothing
|
||||
FileList = Nothing
|
||||
End Try
|
||||
m_FolderList.Clear()
|
||||
If Not IsNothing(DirectoryList) Then
|
||||
For Each subDir As DirectoryInfo In DirectoryList
|
||||
Dim directory As New EgtFolder(subDir, Me)
|
||||
m_FolderList.Add(directory)
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing(FileList) Then
|
||||
For Each files As FileInfo In FileList
|
||||
Dim file As New EgtItem(files)
|
||||
m_FolderList.Add(file)
|
||||
Next
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bIsSelected As Boolean
|
||||
Public Overrides Property IsSelected As Boolean
|
||||
Get
|
||||
Return m_bIsSelected
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsSelected = value
|
||||
refUpdateSelRoot(Me)
|
||||
Dim DirectoryList() As DirectoryInfo
|
||||
Dim FileList() As FileInfo
|
||||
Try
|
||||
DirectoryList = m_InfoDir.GetDirectories().Where(Function(file) (file.Attributes And FileAttributes.Hidden And file.Name <> EgtManageFileDialogVM.DataFolder_Msg) = 0).ToArray()
|
||||
FileList = m_InfoDir.GetFiles().Where(Function(file) (file.Attributes And FileAttributes.Hidden) = 0).ToArray()
|
||||
Catch ex As Exception
|
||||
DirectoryList = Nothing
|
||||
FileList = Nothing
|
||||
End Try
|
||||
m_FolderList.Clear()
|
||||
If Not IsNothing(DirectoryList) Then
|
||||
For Each subDir As DirectoryInfo In DirectoryList
|
||||
Dim directory As New EgtFolder(subDir, Me)
|
||||
m_FolderList.Add(directory)
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing(FileList) Then
|
||||
For Each files As FileInfo In FileList
|
||||
Dim file As New EgtItem(files)
|
||||
m_FolderList.Add(file)
|
||||
Next
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(InfoDir As DirectoryInfo, Folder As EgtFolder)
|
||||
|
||||
m_InfoDir = InfoDir
|
||||
m_sName = InfoDir.Name
|
||||
m_dLastModifyDate = InfoDir.LastWriteTime.ToString("dd/MM/yyyy HH:mm:ss")
|
||||
If InfoDir.Extension <> "" Then
|
||||
m_sTypeItem = "File " & InfoDir.Extension.ToUpper()
|
||||
m_sIconSource = "\Resources\EgtDialog\New.png"
|
||||
Else
|
||||
m_sTypeItem = EgtManageFileDialogVM.Folder_Msg
|
||||
m_sIconSource = "\Resources\EgtDialog\Folder.png"
|
||||
End If
|
||||
m_FolderList.Add(New EgtDirectory())
|
||||
EgtManageFileDialogVM.m_SelExstension = New EgtExstension()
|
||||
m_ParentFolder = Folder
|
||||
m_ItemSelected = New EgtDirectory()
|
||||
|
||||
|
||||
m_ItemList_View = CollectionViewSource.GetDefaultView(m_FolderList)
|
||||
m_ItemList_View.Filter = AddressOf ItemFilter
|
||||
|
||||
NotifyPropertyChanged(NameOf(sName))
|
||||
NotifyPropertyChanged(NameOf(dLastModifyDate))
|
||||
NotifyPropertyChanged(NameOf(sTypeItem))
|
||||
NotifyPropertyChanged(NameOf(sIconSource))
|
||||
NotifyPropertyChanged(NameOf(FolderList))
|
||||
End Sub
|
||||
|
||||
#End Region ' CONTRUCTORS
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Function ItemFilter(Item As Object) As Boolean
|
||||
Dim CurrItem As EgtItem = TryCast(Item, EgtItem)
|
||||
|
||||
If Not IsNothing(CurrItem) AndAlso Not IsNothing(EgtManageFileDialogVM.m_SelExstension.m_sExstension) Then
|
||||
'Return CurrItem.TypeItem = EgtOpenDialogVM.m_SelExstension.s_Exstension.TrimStart("*")
|
||||
If CurrItem.sTypeItem.Substring(5).ToLower() = EgtManageFileDialogVM.m_SelExstension.m_sExstension.TrimStart("*") Then
|
||||
'EgtManageFileDialogVM.m_ListItemView.Add(m_InfoDir.FullName & "\" & CurrItem.sName)
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EgtItem
|
||||
Inherits EgtDirectory
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private m_sName As String
|
||||
Public Overloads Property sName As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sTypeItem As String
|
||||
Public Overloads Property sTypeItem As String
|
||||
Get
|
||||
Return m_sTypeItem
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sTypeItem = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sDimension As String
|
||||
Public Overloads Property sDimension As String
|
||||
Get
|
||||
Return m_sDimension
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sDimension = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_dLastModifyDate As Date
|
||||
Public Overloads Property dLastModifyDate As String
|
||||
Get
|
||||
Return m_dLastModifyDate
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_dLastModifyDate = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bIsSelected As Boolean
|
||||
Public Overrides Property IsSelected As Boolean
|
||||
Get
|
||||
Return m_bIsSelected
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsSelected = value
|
||||
'm_sIconSource = "\Resources\EgtDialog\New.png"
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(InfoDir As FileInfo)
|
||||
|
||||
m_sName = InfoDir.Name
|
||||
m_sDimension = String.Format("{0:#,##0.00}", InfoDir.Length / 1024) & " Kb"
|
||||
m_dLastModifyDate = InfoDir.LastWriteTime.ToString("dd/MM/yyyy HH:mm:ss")
|
||||
If InfoDir.Extension <> "" Then
|
||||
m_sTypeItem = "File " & InfoDir.Extension.ToUpper()
|
||||
m_sIconSource = "\Resources\EgtDialog\New.png"
|
||||
Else
|
||||
m_sTypeItem = ""
|
||||
End If
|
||||
|
||||
NotifyPropertyChanged(NameOf(sName))
|
||||
NotifyPropertyChanged(NameOf(sDimension))
|
||||
NotifyPropertyChanged(NameOf(dLastModifyDate))
|
||||
NotifyPropertyChanged(NameOf(sTypeItem))
|
||||
NotifyPropertyChanged(NameOf(sIconSource))
|
||||
End Sub
|
||||
|
||||
#End Region ' CONTRUCTORS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
<EgtWPFLib5:EgtMainWindow x:Class="EgtMessageBoxV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Title="{Binding sTitle}"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Style="{StaticResource Dialog_Window}">
|
||||
<Grid Margin="2.5,2.5,2.5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="20,20,20,20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Margin="0,0,0,0"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sMessage}"
|
||||
Margin="5,0,5,0"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</Grid>
|
||||
<ItemsControl Grid.Row="1"
|
||||
ItemsSource="{Binding ButtonList}"
|
||||
HorizontalAlignment="Center">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button IsDefault="{Binding bIsDefault}"
|
||||
Content="{Binding sMessage}"
|
||||
Command="{Binding Command_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
|
||||
</ItemsControl>
|
||||
<!--<UniformGrid Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Rows="1">
|
||||
<Button IsCancel="True"
|
||||
Content="Ok"
|
||||
Command="{Binding Ok_Command}"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>-->
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtMainWindow>
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
Public Class EgtMessageBoxV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtMessageBoxVM As EgtMessageBoxVM
|
||||
|
||||
Private Shadows DialogResult As MessageBoxResult
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = EgtMessageBoxVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtMessageBoxVM = EgtMessageBoxVM
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
|
||||
''' <param name="DefaultResult">Valore che specifica il bottone di default</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon, DefaultResult))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -1,234 +0,0 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EgtMessageBoxVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Friend Event m_CloseWindow(DialogResult As MessageBoxResult)
|
||||
|
||||
Private m_sTitle As String = ""
|
||||
Public ReadOnly Property sTitle As String
|
||||
Get
|
||||
Return m_sTitle
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sMessage As String = ""
|
||||
Public ReadOnly Property sMessage As String
|
||||
Get
|
||||
Return m_sMessage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Button As MessageBoxButton
|
||||
Private m_Icon As MessageBoxImage
|
||||
Public ReadOnly Property sIconSource As String
|
||||
Get
|
||||
Select Case m_Icon
|
||||
Case MessageBoxImage.Hand
|
||||
Return "\Resources\EgtMessageBox\Error.png"
|
||||
Case MessageBoxImage.Question
|
||||
Return "\Resources\EgtMessageBox\Question.png"
|
||||
Case MessageBoxImage.Exclamation
|
||||
Return "\Resources\EgtMessageBox\Warning.png"
|
||||
Case MessageBoxImage.Asterisk
|
||||
Return "\Resources\EgtMessageBox\Information.png"
|
||||
Case MessageBoxImage.Stop
|
||||
Return "\Resources\EgtMessageBox\Error.png"
|
||||
Case MessageBoxImage.Error
|
||||
Return "\Resources\EgtMessageBox\Error.png"
|
||||
Case MessageBoxImage.Warning
|
||||
Return "\Resources\EgtMessageBox\Warning.png"
|
||||
Case MessageBoxImage.Information
|
||||
Return "\Resources\EgtMessageBox\Information.png"
|
||||
Case Else ' MessageBoxImage.None
|
||||
Return ""
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ButtonList As New List(Of EgtMsgBoxButton)
|
||||
Public Property ButtonList As List(Of EgtMsgBoxButton)
|
||||
Get
|
||||
Return m_ButtonList
|
||||
End Get
|
||||
Set(value As List(Of EgtMsgBoxButton))
|
||||
m_ButtonList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(sMessageBoxText As String)
|
||||
EgtMsgBoxButton.SetOwner(Me)
|
||||
m_sMessage = sMessageBoxText
|
||||
m_Button = MessageBoxButton.OK
|
||||
m_Icon = MessageBoxImage.None
|
||||
NotifyPropertyChanged(NameOf(ButtonList))
|
||||
NotifyPropertyChanged(NameOf(sIconSource))
|
||||
End Sub
|
||||
|
||||
Sub New(sMessageBoxText As String, sCaption As String)
|
||||
MyClass.New(sMessageBoxText)
|
||||
m_sTitle = sCaption
|
||||
End Sub
|
||||
|
||||
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton)
|
||||
MyClass.New(sMessageBoxText, sCaption)
|
||||
m_Button = Button
|
||||
Select Case m_Button
|
||||
Case MessageBoxButton.OK
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.OK))
|
||||
Case MessageBoxButton.OKCancel
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.OK))
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.CANCEL))
|
||||
Case MessageBoxButton.YesNoCancel
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.YES))
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.NO))
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.CANCEL))
|
||||
Case MessageBoxButton.YesNo
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.YES))
|
||||
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.NO))
|
||||
End Select
|
||||
NotifyPropertyChanged(NameOf(ButtonList))
|
||||
End Sub
|
||||
|
||||
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage)
|
||||
MyClass.New(sMessageBoxText, sCaption, Button)
|
||||
m_Icon = Icon
|
||||
NotifyPropertyChanged(NameOf(sIconSource))
|
||||
End Sub
|
||||
|
||||
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult)
|
||||
MyClass.New(sMessageBoxText, sCaption, Button, Icon)
|
||||
Dim DefaultBtn As EgtMsgBoxButton = m_ButtonList.FirstOrDefault(Function(x) (x.Type = EgtMsgBoxButton.Types.OK AndAlso DefaultResult = MessageBoxResult.OK) OrElse
|
||||
(x.Type = EgtMsgBoxButton.Types.CANCEL AndAlso DefaultResult = MessageBoxResult.Cancel) OrElse
|
||||
(x.Type = EgtMsgBoxButton.Types.YES AndAlso DefaultResult = MessageBoxResult.Yes) OrElse
|
||||
(x.Type = EgtMsgBoxButton.Types.NO AndAlso DefaultResult = MessageBoxResult.No))
|
||||
If Not IsNothing(DefaultBtn) Then
|
||||
DefaultBtn.SetIsDefault(True)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(ButtonList))
|
||||
End Sub
|
||||
|
||||
#End Region ' CONTRUCTORS
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Sub CloseWindow(DialogResult As MessageBoxResult)
|
||||
RaiseEvent m_CloseWindow(DialogResult)
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EgtMsgBoxButton
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Enum Types As Integer
|
||||
OK = 1
|
||||
CANCEL = 2
|
||||
YES = 3
|
||||
NO = 4
|
||||
End Enum
|
||||
|
||||
Private Shared Owner As EgtMessageBoxVM
|
||||
|
||||
Private m_Type As Types
|
||||
Public ReadOnly Property Type As Types
|
||||
Get
|
||||
Return m_Type
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sMessage As String
|
||||
Public ReadOnly Property sMessage As String
|
||||
Get
|
||||
Return m_sMessage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bIsDefault As Boolean = False
|
||||
Public ReadOnly Property bIsDefault As Boolean
|
||||
Get
|
||||
Return m_bIsDefault
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetIsDefault(bValue As Boolean)
|
||||
m_bIsDefault = bValue
|
||||
End Sub
|
||||
' Definizione comandi
|
||||
Private m_cmdCommand As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Type As Types)
|
||||
m_Type = Type
|
||||
Select Case m_Type
|
||||
Case Types.OK
|
||||
m_sMessage = EgtMsg(35001)
|
||||
Case Types.CANCEL
|
||||
m_sMessage = EgtMsg(35002)
|
||||
Case Types.YES
|
||||
m_sMessage = EgtMsg(35003)
|
||||
Case Types.NO
|
||||
m_sMessage = EgtMsg(35004)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Sub New(Type As Types, bIsDefault As Boolean)
|
||||
MyClass.New(Type)
|
||||
m_bIsDefault = bIsDefault
|
||||
End Sub
|
||||
|
||||
#End Region ' CONTRUCTORS
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Shared Sub SetOwner(value As EgtMessageBoxVM)
|
||||
Owner = value
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Command"
|
||||
|
||||
Public ReadOnly Property Command_Command As ICommand
|
||||
Get
|
||||
If m_cmdCommand Is Nothing Then
|
||||
m_cmdCommand = New Command(AddressOf Command)
|
||||
End If
|
||||
Return m_cmdCommand
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Command()
|
||||
Select Case m_Type
|
||||
Case Types.OK
|
||||
Owner.CloseWindow(MessageBoxResult.OK)
|
||||
Case Types.CANCEL
|
||||
Owner.CloseWindow(MessageBoxResult.Cancel)
|
||||
Case Types.YES
|
||||
Owner.CloseWindow(MessageBoxResult.Yes)
|
||||
Case Types.NO
|
||||
Owner.CloseWindow(MessageBoxResult.No)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
#End Region ' Ok
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
@@ -595,6 +595,7 @@ Public Class FilledSolidPanelVM
|
||||
Friend Sub Dispose()
|
||||
' ripristino frame originale
|
||||
EgtSetGridFrame(m_OriginalGridFrame)
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
' se in modifica parametri
|
||||
If m_bMachParam_IsChecked Then
|
||||
' ripristino modalita' standard
|
||||
@@ -1075,6 +1076,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneTop(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1100,6 +1102,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneFront(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1125,6 +1128,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneRight(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1150,6 +1154,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBack(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1175,6 +1180,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneLeft(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1200,6 +1206,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBottom(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1226,6 +1233,7 @@ Public Class FilledSolidPanelVM
|
||||
Public Sub CPlaneElevation(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
|
||||
End Sub
|
||||
|
||||
@@ -1251,87 +1259,12 @@ Public Class FilledSolidPanelVM
|
||||
Public Sub CPlaneOrigin(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneOrigin
|
||||
|
||||
#Region "CPlaneRotate"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneRotate.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CPlaneRotate_Command As ICommand
|
||||
Get
|
||||
If m_cmdCPlaneRotate Is Nothing Then
|
||||
m_cmdCPlaneRotate = New Command(AddressOf CPlaneRotate)
|
||||
End If
|
||||
Return m_cmdCPlaneRotate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneRotate(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
|
||||
Else
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE3D)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneRotate
|
||||
|
||||
#Region "CPlane3P"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlane3P.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CPlane3P_Command As ICommand
|
||||
Get
|
||||
If m_cmdCPlane3P Is Nothing Then
|
||||
m_cmdCPlane3P = New Command(AddressOf CPlane3P)
|
||||
End If
|
||||
Return m_cmdCPlane3P
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlane3P(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlane3P
|
||||
|
||||
#Region "CPlanePerpObj"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlanePerpObj.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CPlanePerpObj_Command As ICommand
|
||||
Get
|
||||
If m_cmdCPlanePerpObj Is Nothing Then
|
||||
m_cmdCPlanePerpObj = New Command(AddressOf CPlanePerpObj)
|
||||
End If
|
||||
Return m_cmdCPlanePerpObj
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlanePerpObj(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlanePerpObj
|
||||
|
||||
#Region "CPlaneObj"
|
||||
|
||||
Private m_bCPlaneObj_IsActive As Boolean = False
|
||||
|
||||
@@ -76,6 +76,9 @@
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DotNetZip">
|
||||
<HintPath>..\..\..\EgtProg\Icarus\DotNetZip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtUILib, Version=2.4.7.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||
@@ -84,8 +87,8 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationFramework.Aero2" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -150,19 +153,6 @@
|
||||
<DependentUpon>DispositionPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DispositionPanel\DispositionPanelVM.vb" />
|
||||
<Compile Include="EgtColorPicker\EgtHexagon.vb" />
|
||||
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
|
||||
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtMessageBox\EgtMessageBoxVM.vb" />
|
||||
<Compile Include="EgtColorPicker\EgtColorPickerV.xaml.vb">
|
||||
<DependentUpon>EgtColorPickerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtColorPicker\EgtColorPickerVM.vb" />
|
||||
<Compile Include="EgtManageFileDialog\EgtManageFileDialogV.xaml.vb">
|
||||
<DependentUpon>EgtManageFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtManageFileDialog\EgtManageFileDialogVM.vb" />
|
||||
<Compile Include="FilledSolidPanel\FilledSolidPanelV.xaml.vb">
|
||||
<DependentUpon>FilledSolidPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -333,6 +323,7 @@
|
||||
<Compile Include="Utility\DisableModifiedMgr.vb" />
|
||||
<Compile Include="Utility\EgwCrypto.vb" />
|
||||
<Compile Include="Utility\GeomEntityColors.vb" />
|
||||
<Compile Include="Utility\JsonUtility.vb" />
|
||||
<Compile Include="Utility\LuaExec.vb" />
|
||||
<Compile Include="Utility\Map.vb" />
|
||||
<Compile Include="Utility\MyMachine.vb" />
|
||||
@@ -375,18 +366,6 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="EgtMessageBox\EgtMessageBoxV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtColorPicker\EgtColorPickerV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtManageFileDialog\EgtManageFileDialogV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="FilledSolidPanel\FilledSolidPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -629,7 +608,6 @@
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<Resource Include="Resources\EgtMessageBox\Error.png" />
|
||||
<Resource Include="Resources\Fonts\Roboto-Regular.ttf" />
|
||||
<Resource Include="Resources\Fonts\Roboto-Light.ttf" />
|
||||
</ItemGroup>
|
||||
@@ -881,20 +859,6 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\RibParamPanel\CopyFrom.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtMessageBox\Information.png" />
|
||||
<Resource Include="Resources\EgtMessageBox\Question.png" />
|
||||
<Resource Include="Resources\EgtMessageBox\Warning.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\Restore.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\New.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\Folder.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe
|
||||
|
||||
@@ -157,8 +157,7 @@ Public Class ImportExportMachiningPanelVM
|
||||
nIndex += 1
|
||||
End While
|
||||
If bIsOriginal AndAlso bIsCustom Then
|
||||
'MessageBox.Show("Corrupted file! Impossible to import it!")
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Corrupted file! Impossible to import it!")
|
||||
MessageBox.Show("Corrupted file! Impossible to import it!")
|
||||
ElseIf bIsOriginal Then
|
||||
LoadOriginalMaterial()
|
||||
End If
|
||||
@@ -302,12 +301,9 @@ Public Class ImportExportMachiningPanelVM
|
||||
sDuplicatedMaterialList &= " - " & m_MachiningList(Index).sName & Environment.NewLine
|
||||
End If
|
||||
Next
|
||||
'MessageBox.Show("Impossible to import the package because materials named:" & Environment.NewLine &
|
||||
' sDuplicatedMaterialList & Environment.NewLine &
|
||||
' "Please modify the names of these machining and then retry to import the materials.")
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible to import the package because materials named:" & Environment.NewLine &
|
||||
sDuplicatedMaterialList & Environment.NewLine &
|
||||
"Please modify the names of these machining and then retry to import the materials.")
|
||||
MessageBox.Show("Impossible to import the package because materials named:" & Environment.NewLine &
|
||||
sDuplicatedMaterialList & Environment.NewLine &
|
||||
"Please modify the names of these machining and then retry to import the materials.")
|
||||
Return
|
||||
End If
|
||||
' aggiorno/aggiungo materiali
|
||||
@@ -357,12 +353,9 @@ Public Class ImportExportMachiningPanelVM
|
||||
For Index = 0 To ImportedMaterialList.Count - 1
|
||||
sMaterialList &= " - " & m_MachiningList(Index).sName & " (" & If(ImportedMaterialList(Index) = MaterialState.NOTFOUND, "New", "Updated") & ")" & Environment.NewLine
|
||||
Next
|
||||
'MessageBox.Show("List of the materials:" & Environment.NewLine &
|
||||
' sMaterialList & Environment.NewLine &
|
||||
' "Import successfully completed.")
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "List of the materials:" & Environment.NewLine &
|
||||
sMaterialList & Environment.NewLine &
|
||||
"Import successfully completed.")
|
||||
MessageBox.Show("List of the materials:" & Environment.NewLine &
|
||||
sMaterialList & Environment.NewLine &
|
||||
"Import successfully completed.")
|
||||
Return
|
||||
End Sub
|
||||
|
||||
@@ -478,7 +471,7 @@ Public Class ImportExportMachiningPanelVM
|
||||
End Select
|
||||
Case WindowModeEnum.EXPORT, WindowModeEnum.EXPORT_ORIG
|
||||
' chiedo il nome con cui salvare il file
|
||||
Dim sExtension As String = ""
|
||||
Dim sExtension As String =""
|
||||
If m_WindowType = WindowTypeEnum.MATERIAL Then
|
||||
If m_WindowMode = WindowModeEnum.EXPORT_ORIG Then
|
||||
sExtension = OriginalMaterialDataExtension
|
||||
@@ -587,8 +580,7 @@ Public Class ImpExpMachiningItem
|
||||
If m_AlreadyExist Then
|
||||
Select Case m_WindowType
|
||||
Case WindowTypeEnum.MATERIAL
|
||||
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
|
||||
'System.Windows.MessageBox.Show("Material already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
|
||||
Select Case System.Windows.MessageBox.Show("Material already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
|
||||
Case MessageBoxResult.Yes
|
||||
m_ChangeName = False
|
||||
m_Active = True
|
||||
@@ -602,8 +594,7 @@ Public Class ImpExpMachiningItem
|
||||
End While
|
||||
End If
|
||||
m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "")
|
||||
'System.Windows.MessageBox.Show("Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
|
||||
System.Windows.MessageBox.Show("Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
|
||||
NotifyPropertyChanged(NameOf(sName))
|
||||
m_ChangeName = True
|
||||
m_Active = True
|
||||
@@ -611,8 +602,7 @@ Public Class ImpExpMachiningItem
|
||||
m_Active = False
|
||||
End Select
|
||||
Case WindowTypeEnum.MACHINING
|
||||
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
|
||||
'System.Windows.MessageBox.Show("Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
|
||||
Select Case System.Windows.MessageBox.Show("Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
|
||||
Case MessageBoxResult.Yes
|
||||
m_ChangeName = False
|
||||
m_Active = True
|
||||
@@ -626,8 +616,7 @@ Public Class ImpExpMachiningItem
|
||||
End While
|
||||
End If
|
||||
m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "")
|
||||
'System.Windows.MessageBox.Show("Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
|
||||
System.Windows.MessageBox.Show("Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
|
||||
NotifyPropertyChanged(NameOf(sName))
|
||||
m_ChangeName = True
|
||||
m_Active = True
|
||||
|
||||
@@ -96,9 +96,8 @@ Public Class MyInstrumentPanelVM
|
||||
EgtDraw()
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
'MessageBox.Show(sResult)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sResult)
|
||||
Else
|
||||
MessageBox.Show(sResult)
|
||||
Else
|
||||
' Disabilito segnalazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
' cancello tutti i gruppi con i chunk
|
||||
|
||||
@@ -48,8 +48,7 @@ Public Class MachSaveInDbWndVM
|
||||
|
||||
Public Sub Ok()
|
||||
If Map.refTopPanelVM.MachiningList.Any(Function(x As MachiningIndex) x.sName = m_sName) Then
|
||||
'MessageBox.Show("Name already used in Db! Please insert a different name.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Name already used in Db! Please insert a different name.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
MessageBox.Show("Name already used in Db! Please insert a different name.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Return
|
||||
End If
|
||||
RaiseEvent m_CloseWindow(True)
|
||||
|
||||
@@ -343,7 +343,8 @@ Public Class MachiningCathegory
|
||||
New NumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.SCREWBACK, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nIndex, Me)})
|
||||
New NumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.MAXSLICESNUMBER, nIndex, Me)})
|
||||
Case Cathegories.LINK
|
||||
m_sName = "Shell"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.INNERSHELLWIDTH, nIndex, Me),
|
||||
@@ -367,8 +368,12 @@ Public Class MachiningCathegory
|
||||
New ComboMachiningParam(MachiningParam.Params.RIBSTYPE, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDOVERLAP, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSLINK, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLINKFILLET, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSMERGEWITHSHELL, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTMERGEDSHELLMAINLINK, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nIndex, Me),
|
||||
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nIndex, Me),
|
||||
@@ -378,7 +383,8 @@ Public Class MachiningCathegory
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nIndex, Me)})
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nIndex, Me),
|
||||
New NumericMachiningParam(MachiningParam.Params.RIBSLEADFILLET, nIndex, Me)})
|
||||
Case Cathegories.SHELL_NUMBER
|
||||
m_sName = "Reduce Shell Number"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nIndex, Me),
|
||||
@@ -519,6 +525,7 @@ Public MustInherit Class MachiningParam
|
||||
POSTFLOWDELAY = 20
|
||||
SCREWBACK = 21
|
||||
SLICINGHEIGHT = 22
|
||||
MAXSLICESNUMBER = 23
|
||||
LINKTYPE = 51
|
||||
LINKPARAM = 52
|
||||
LEADIN = 53
|
||||
@@ -538,18 +545,23 @@ Public MustInherit Class MachiningParam
|
||||
RIBSOVERLAP = 102
|
||||
RIBSSTRANDCOUNT = 103
|
||||
RIBSLINK = 104
|
||||
RIBSINVERTORDER = 105
|
||||
RIBSINVERTDIRECTION = 106
|
||||
RIBSINVERTSTRANDORDER = 107
|
||||
RIBSLEADININVERT = 108
|
||||
RIBSLEADINLEN = 109
|
||||
RIBSLEADOUTINVERT = 110
|
||||
RIBSLEADOUTLEN = 111
|
||||
RIBSLEADOUTCOASTING = 112
|
||||
RIBSLEADOUTWIPE = 113
|
||||
RIBSLEADOUTWIPEDIR = 114
|
||||
RIBSLIMITUNBOUNDEDWITHSOLID = 115
|
||||
RIBSSTRANDWIDTH = 116
|
||||
RIBSMERGEWITHSHELL = 105
|
||||
RIBSINVERTMERGEDSHELLMAINLINK = 106
|
||||
RIBSINVERTORDER = 107
|
||||
RIBSINVERTDIRECTION = 108
|
||||
RIBSINVERTSTRANDORDER = 109
|
||||
RIBSLEADININVERT = 110
|
||||
RIBSLEADINLEN = 111
|
||||
RIBSLEADOUTINVERT = 112
|
||||
RIBSLEADOUTLEN = 113
|
||||
RIBSLEADOUTCOASTING = 114
|
||||
RIBSLEADOUTWIPE = 115
|
||||
RIBSLEADOUTWIPEDIR = 116
|
||||
RIBSLIMITUNBOUNDEDWITHSOLID = 117
|
||||
RIBSSTRANDWIDTH = 118
|
||||
RIBSLINKFILLET = 119
|
||||
RIBSLEADFILLET = 120
|
||||
RIBSSTRANDOVERLAP = 121
|
||||
SHELLNBRDIFFERENCE = 151
|
||||
SHELLNBRCOASTING = 152
|
||||
SHELLNBRWIPE = 153
|
||||
@@ -697,16 +709,26 @@ Public MustInherit Class MachiningParam
|
||||
m_sName = "Screw Back"
|
||||
Case Params.SLICINGHEIGHT
|
||||
m_sName = "Slicing Height"
|
||||
Case Params.MAXSLICESNUMBER
|
||||
m_sName = "Max Slices Number"
|
||||
Case Params.RIBSSTRANDWIDTH
|
||||
m_sName = "Custom Strand Width"
|
||||
Case Params.RIBSTYPE
|
||||
m_sName = "Type"
|
||||
Case Params.RIBSOVERLAP
|
||||
m_sName = "Overlap [%]"
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
m_sName = "Strand Overlap [%]"
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
m_sName = "Strand Count"
|
||||
Case Params.RIBSLINK
|
||||
m_sName = "Link"
|
||||
Case Params.RIBSLINKFILLET
|
||||
m_sName = "Link Fillet"
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
m_sName = "Merge With Shell"
|
||||
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
||||
m_sName = "Invert Merged Shell Main Link"
|
||||
Case Params.RIBSINVERTORDER
|
||||
m_sName = "Invert Order"
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
@@ -727,6 +749,8 @@ Public MustInherit Class MachiningParam
|
||||
m_sName = "Lead Out Wipe"
|
||||
Case Params.RIBSLEADOUTWIPEDIR
|
||||
m_sName = "Lead Out Wipe Dir [deg]"
|
||||
Case Params.RIBSLEADFILLET
|
||||
m_sName = "Lead Fillet"
|
||||
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||
m_sName = "Limit Unbounded With Solid"
|
||||
Case Params.SHELLNBRDIFFERENCE
|
||||
@@ -956,6 +980,7 @@ Public Class NumericMachiningParam
|
||||
If Type = Params.SLICINGHEIGHT Then
|
||||
m_dMinValue = 0
|
||||
m_dMaxValue = CurrentMachine.dSlicingMaxHeight
|
||||
m_MinMaxType = MinMaxTypes.ABSOLUT
|
||||
m_bIsActiveMinMax = True
|
||||
End If
|
||||
' leggo parametri da Db
|
||||
@@ -1045,15 +1070,24 @@ Public Class NumericMachiningParam
|
||||
Case Params.SLICINGHEIGHT
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SLICINGHEIGHT, CurrentMachine.dSlicingMaxHeight)
|
||||
m_bIsLen = False
|
||||
Case Params.MAXSLICESNUMBER
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_MAXSLICESNUMBER, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDWIDTH
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSSTRANDWIDTH, 0)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSOVERLAP
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSOVERLAP, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSSTRANDOVERLAP, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSSTRANDCOUNT, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSLINKFILLET
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLINKFILLET, 0)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSLEADINLEN
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADINLEN, 0)
|
||||
m_bIsLen = True
|
||||
@@ -1069,6 +1103,9 @@ Public Class NumericMachiningParam
|
||||
Case Params.RIBSLEADOUTWIPEDIR
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADOUTWIPEDIR, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSLEADFILLET
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADFILLET, 0)
|
||||
m_bIsLen = True
|
||||
Case Params.SHELLNBRDIFFERENCE
|
||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SHELLNBRDIFFERENCE, 0)
|
||||
m_bIsLen = False
|
||||
@@ -1250,12 +1287,18 @@ Public Class NumericMachiningParam
|
||||
WriteMachiningParam(nIndex, MAC_SCREWBACK, sWriteValue, sFilePath)
|
||||
Case Params.SLICINGHEIGHT
|
||||
WriteMachiningParam(nIndex, MAC_SLICINGHEIGHT, sWriteValue, sFilePath)
|
||||
Case Params.MAXSLICESNUMBER
|
||||
WriteMachiningParam(nIndex, MAC_MAXSLICESNUMBER, sWriteValue, sFilePath)
|
||||
Case Params.RIBSSTRANDWIDTH
|
||||
WriteMachiningParam(nIndex, MAC_RIBSSTRANDWIDTH, sWriteValue, sFilePath)
|
||||
Case Params.RIBSOVERLAP
|
||||
WriteMachiningParam(nIndex, MAC_RIBSOVERLAP, sWriteValue, sFilePath)
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
WriteMachiningParam(nIndex, MAC_RIBSSTRANDOVERLAP, sWriteValue, sFilePath)
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
WriteMachiningParam(nIndex, MAC_RIBSSTRANDCOUNT, sWriteValue, sFilePath)
|
||||
Case Params.RIBSLINKFILLET
|
||||
WriteMachiningParam(nIndex, MAC_RIBSLINKFILLET, sWriteValue, sFilePath)
|
||||
Case Params.RIBSLEADINLEN
|
||||
WriteMachiningParam(nIndex, MAC_RIBSLEADINLEN, sWriteValue, sFilePath)
|
||||
Case Params.RIBSLEADOUTLEN
|
||||
@@ -1266,6 +1309,8 @@ Public Class NumericMachiningParam
|
||||
WriteMachiningParam(nIndex, MAC_RIBSLEADOUTWIPE, sWriteValue, sFilePath)
|
||||
Case Params.RIBSLEADOUTWIPEDIR
|
||||
WriteMachiningParam(nIndex, MAC_RIBSLEADOUTWIPEDIR, sWriteValue, sFilePath)
|
||||
Case Params.RIBSLEADFILLET
|
||||
WriteMachiningParam(nIndex, MAC_RIBSLEADFILLET, sWriteValue, sFilePath)
|
||||
Case Params.SHELLNBRDIFFERENCE
|
||||
WriteMachiningParam(nIndex, MAC_SHELLNBRDIFFERENCE, sWriteValue, sFilePath)
|
||||
Case Params.SHELLNBRCOASTING
|
||||
@@ -1696,6 +1741,10 @@ Public Class CheckMachiningParam
|
||||
m_bValue = ReadMachiningParamDouble(nIndex, MAC_SPIRALVASE, 0)
|
||||
Case Params.RIBSLINK
|
||||
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLINK, 0)
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSMERGEWITHSHELL, 0)
|
||||
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
||||
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSINVERTMERGEDSHELLMAINLINK, 0)
|
||||
Case Params.RIBSINVERTORDER
|
||||
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSINVERTORDER, 0)
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
@@ -1723,6 +1772,10 @@ Public Class CheckMachiningParam
|
||||
WriteMachiningParam(nIndex, MAC_SPIRALVASE, If(m_bValue, 1, 0), sFilePath)
|
||||
Case Params.RIBSLINK
|
||||
WriteMachiningParam(nIndex, MAC_RIBSLINK, If(m_bValue, 1, 0), sFilePath)
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
WriteMachiningParam(nIndex, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0), sFilePath)
|
||||
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
||||
WriteMachiningParam(nIndex, MAC_RIBSINVERTMERGEDSHELLMAINLINK, If(m_bValue, 1, 0), sFilePath)
|
||||
Case Params.RIBSINVERTORDER
|
||||
WriteMachiningParam(nIndex, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0), sFilePath)
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
|
||||
@@ -26,8 +26,7 @@ Public Class MachiningDbVM
|
||||
' verifico se modificato
|
||||
If m_SelMachining.bIsModified Then
|
||||
' chiedo se salvare
|
||||
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
|
||||
'MessageBox.Show("Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
|
||||
Select Case MessageBox.Show("Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
|
||||
Case MessageBoxResult.Yes
|
||||
m_SelMachining.Save()
|
||||
Case MessageBoxResult.No
|
||||
@@ -199,8 +198,7 @@ Public Class MachiningDbVM
|
||||
Public Sub Ok()
|
||||
If Not IsNothing(m_SelMachining) AndAlso m_SelMachining.bIsModified Then
|
||||
' chiedo se salvare
|
||||
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save modified parameters?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
|
||||
'MessageBox.Show("Do you want to save modified parameters?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
|
||||
Select Case MessageBox.Show("Do you want to save modified parameters?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
|
||||
Case MessageBoxResult.Yes
|
||||
m_SelMachining.Save()
|
||||
Case MessageBoxResult.No
|
||||
@@ -311,8 +309,7 @@ Public Class MachiningDbVM
|
||||
Public Sub Delete()
|
||||
If IsNothing(m_SelMachining) Then Return
|
||||
' chiedo conferma
|
||||
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
||||
'MessageBox.Show("Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
||||
Select Case MessageBox.Show("Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
||||
Case MessageBoxResult.Yes
|
||||
m_MachiningList.Remove(m_SelMachining)
|
||||
SetIsModified(True)
|
||||
|
||||
@@ -191,8 +191,8 @@ Public Class MainWindowM
|
||||
EgtSetLockId( sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2510, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5583, 2510, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2709, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5583, 2709, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
|
||||
@@ -61,6 +61,8 @@ Class MainWindowV
|
||||
Me.Activate()
|
||||
' Recupero l'array di stringhe con i nomi del file
|
||||
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
|
||||
' Apro il primo
|
||||
Map.refSecondaryWindowVM.OpenStdFile(sFiles(0))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -226,8 +226,7 @@ Public Class MainWindowVM
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Sub CloseApplication(ByVal param As Object)
|
||||
If Map.refSliceManagerVM.bCalculating Then
|
||||
'MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End If
|
||||
CloseApplication()
|
||||
|
||||
@@ -286,8 +286,7 @@ Public Class ManagePartPanelVM
|
||||
Next
|
||||
Next
|
||||
If sErr.Count > 0 Then
|
||||
'MessageBox.Show(String.Concat(sErr), "Error")
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, String.Concat(sErr), "Error")
|
||||
MessageBox.Show(String.Concat(sErr), "Error")
|
||||
Return
|
||||
Else
|
||||
' Creo pezzi e layer necessari
|
||||
@@ -472,14 +471,6 @@ Public Class ManagePartPanelVM
|
||||
Map.refSliceManagerVM.UpdateDimensions()
|
||||
Next
|
||||
End If
|
||||
'EgtAddMachGroup("3dPrint")
|
||||
'EgtSetTable("Tab")
|
||||
|
||||
'Dim nRawId As Integer = EgtAddRawPart(b3PrintSolid.Min, b3PrintSolid.DimX, b3PrintSolid.DimY, b3PrintSolid.DimZ, New Color3d(128, 128, 128, 30))
|
||||
'EgtAddPartToRawPart(nPartId, b3PrintSolid.Min, nRawId)
|
||||
'EgtMoveToCornerRawPart(nRawId, New Point3d(dPosX, dPosY, 0), MCH_CR.BL)
|
||||
|
||||
'EgtResetCurrMachGroup()
|
||||
|
||||
' seleziono ultimo pezzo aggiunto
|
||||
Map.refTopPanelVM.SelLastPart()
|
||||
|
||||
@@ -629,8 +629,7 @@ Public Class GeomEntity_MenuItem
|
||||
Map.refManagePartPanelVM.SetIsEnabled(True)
|
||||
Return
|
||||
ElseIf m_Type = ManagePart_Layer.LayerType.DELETE Then
|
||||
'If MessageBox.Show("Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
If MessageBox.Show("Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
EgtErase(m_OrigEntity.nId)
|
||||
' se l'entita' e' gia' in lista pezzi
|
||||
If Not IsNothing(m_OrigEntity.OrigLayer) Then
|
||||
@@ -1038,8 +1037,7 @@ Public Class ManagerLayer_MenuItem
|
||||
Case Else ' PartMenuCmd.IMPORTPRINT
|
||||
Dim bDeleteOldPrint As Boolean = False
|
||||
If m_OrigLayer.EntityList.Count > 0 Then
|
||||
'If MessageBox.Show("Importing a new print solid the current one will be deleted. Are you sure you want to proced?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
|
||||
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Importing a new print solid the current one will be deleted. Are you sure you want to proced?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
|
||||
If MessageBox.Show("Importing a new print solid the current one will be deleted. Are you sure you want to proced?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
|
||||
Return
|
||||
Else
|
||||
bDeleteOldPrint = True
|
||||
|
||||
@@ -285,6 +285,8 @@ Public Class MaterialIndex
|
||||
sParamKey = MAT_KZ
|
||||
Case MaterialParam.Params.KN
|
||||
sParamKey = MAT_KN
|
||||
Case MaterialParam.Params.TDRYER
|
||||
sParamKey = MAT_TDRYER
|
||||
End Select
|
||||
Return ReadMaterialParamDouble(m_nIndex, sParamKey, dDefault)
|
||||
End Function
|
||||
@@ -346,6 +348,7 @@ Public Class MaterialCathegory
|
||||
m_MaterialParamList = New List(Of MaterialParam)({New NumericMaterialParam(MaterialParam.Params.K_EXTRUSION, nIndex),
|
||||
New NumericMaterialParam(MaterialParam.Params.K_LAY_TIME, nIndex),
|
||||
New NumericMaterialParam(MaterialParam.Params.DENSITY, nIndex),
|
||||
New NumericMaterialParam(MaterialParam.Params.TDRYER, nIndex),
|
||||
New StringMaterialParam(MaterialParam.Params.ORIG, nIndex)})
|
||||
m_Cathegory_Visibility = Visibility.Visible
|
||||
Case Cathegories.TEMPERATURES
|
||||
@@ -419,6 +422,7 @@ Public MustInherit Class MaterialParam
|
||||
KZ = 20
|
||||
KN = 21
|
||||
ORIG = 22
|
||||
TDRYER = 23
|
||||
End Enum
|
||||
|
||||
Private m_Type As Params
|
||||
@@ -478,6 +482,8 @@ Public MustInherit Class MaterialParam
|
||||
m_sName = "KZ"
|
||||
Case Params.KN
|
||||
m_sName = "KN"
|
||||
Case Params.TDRYER
|
||||
m_sName = "Dryer Temperature"
|
||||
Case Params.ORIG
|
||||
m_sName = "Original"
|
||||
End Select
|
||||
@@ -583,6 +589,9 @@ Public Class NumericMaterialParam
|
||||
Case Params.KN
|
||||
m_dValue = ReadMaterialParamDouble(nIndex, MAT_KN, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.TDRYER
|
||||
m_dValue = ReadMaterialParamDouble(nIndex, MAT_TDRYER, 0)
|
||||
m_bIsLen = False
|
||||
End Select
|
||||
m_dOrigValue = m_dValue
|
||||
End Sub
|
||||
@@ -633,6 +642,8 @@ Public Class NumericMaterialParam
|
||||
WriteMaterialParam(nIndex, MAT_KZ, sWriteValue, sFilePath)
|
||||
Case Params.KN
|
||||
WriteMaterialParam(nIndex, MAT_KN, sWriteValue, sFilePath)
|
||||
Case Params.TDRYER
|
||||
WriteMaterialParam(nIndex, MAT_TDRYER, sWriteValue, sFilePath)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -769,8 +780,7 @@ Public Class StringMaterialParam
|
||||
End Property
|
||||
|
||||
Public Sub Original()
|
||||
'If MessageBox.Show("Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
If MessageBox.Show("Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
m_sGUID = ORIG_MATERIAL
|
||||
m_sValue = ORIG_MATERIAL
|
||||
NotifyPropertyChanged(NameOf(sValue))
|
||||
|
||||
@@ -24,8 +24,7 @@ Public Class MaterialDbVM
|
||||
' verifico se modificato
|
||||
If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then
|
||||
' chiedo se salvare
|
||||
'Select Case MessageBox.Show("Do you want to save material modification?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
|
||||
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save material modification?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
|
||||
Select Case MessageBox.Show("Do you want to save material modification?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
|
||||
Case MessageBoxResult.Yes
|
||||
m_SelMaterial.Save()
|
||||
Case MessageBoxResult.No
|
||||
@@ -237,8 +236,7 @@ Public Class MaterialDbVM
|
||||
Public Sub Ok()
|
||||
If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then
|
||||
' chiedo se salvare
|
||||
'Select Case MessageBox.Show("Do you want to save material modification?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
|
||||
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save material modification?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
|
||||
Select Case MessageBox.Show("Do you want to save material modification?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
|
||||
Case MessageBoxResult.Yes
|
||||
m_SelMaterial.Save()
|
||||
Case MessageBoxResult.No
|
||||
@@ -367,20 +365,17 @@ Public Class MaterialDbVM
|
||||
' se materiale originale, esco
|
||||
If SelMaterialIsOriginal() Then
|
||||
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then
|
||||
'If MessageBox.Show("Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
|
||||
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
|
||||
If MessageBox.Show("Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
|
||||
Return
|
||||
End If
|
||||
sCheckMessage = "Trying to delete an Original Material! Are you ABSOLUTELY sure you want to delete it?"
|
||||
Else
|
||||
'MessageBox.Show("Original material impossible to delete!")
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Original material impossible to delete!")
|
||||
MessageBox.Show("Original material impossible to delete!")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' chiedo conferma
|
||||
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
||||
'MessageBox.Show(sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
||||
Select Case MessageBox.Show(sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
||||
Case MessageBoxResult.Yes
|
||||
m_MaterialList.Remove(m_SelMaterial)
|
||||
SetIsModified(True)
|
||||
|
||||
@@ -30,7 +30,7 @@ Imports System.Windows
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("Icarus")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2022-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2022-2025 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.10.1")>
|
||||
<Assembly: AssemblyFileVersion("2.5.10.1")>
|
||||
<Assembly: AssemblyVersion("2.7.9.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.9.1")>
|
||||
|
||||
@@ -15,6 +15,8 @@ Friend Module OptionModule
|
||||
Friend m_bThickLine As Boolean
|
||||
' Flag per visualizzazione smussata delle superfici
|
||||
Friend m_bSmoothTriMesh As Boolean
|
||||
' Flag per visualizzazione semplificate sezione strand
|
||||
Friend m_bUseSimplifiedSection As Boolean
|
||||
|
||||
' Colore di default in disegno
|
||||
Friend m_DefMaterialColor As Color3d
|
||||
@@ -43,6 +45,14 @@ Friend Module OptionModule
|
||||
Friend m_sFont As String
|
||||
Friend m_dTextHeight As Double
|
||||
|
||||
' Parametri per la griglia
|
||||
Friend m_bGridVisibility As Boolean
|
||||
Friend m_dSnapStepMm As Double
|
||||
Friend m_dSnapStepInch As Double
|
||||
Friend m_nMinLineSStep As Integer
|
||||
Friend m_nMajLineSStep As Integer
|
||||
Friend m_nExtSStep As Integer
|
||||
|
||||
' Variabili che indicano per ogni tipo di lavorazione quale geometria è selezionabile
|
||||
'Friend m_SelGeomSawing As SceneSelModeOpt
|
||||
'Friend m_SelGeomDrilling As SceneSelModeOpt
|
||||
@@ -99,6 +109,8 @@ Friend Module OptionModule
|
||||
m_bThickLine = GetMainPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1
|
||||
' Inizializzo flag visualizzazione smussata delle superfici
|
||||
m_bSmoothTriMesh = GetMainPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0
|
||||
' Inizializzo flag visualizzazione sezione strand semplificata
|
||||
m_bUseSimplifiedSection = GetMainPrivateProfileInt(S_SOLIDS, K_SIMPLIFIEDSECTION, 0) <> 0
|
||||
' Inizio colore di default in disegno
|
||||
Dim DefColor As New Color3d(0, 0, 0)
|
||||
GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
||||
@@ -108,6 +120,13 @@ Friend Module OptionModule
|
||||
' Inizializzo variabili per import
|
||||
m_dDxfScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1)
|
||||
m_dStlScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_STLSCALE, 1)
|
||||
' Inizializzo parametri griglia
|
||||
m_bGridVisibility = (GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0)
|
||||
m_dSnapStepMm = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10)
|
||||
m_dSnapStepInch = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 12.7)
|
||||
m_nMinLineSStep = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1)
|
||||
m_nMajLineSStep = GetMainPrivateProfileInt(S_GRID, K_MAJLINESSTEP, 10)
|
||||
m_nExtSStep = GetMainPrivateProfileInt(S_GRID, K_EXTSSTEP, 100)
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
@@ -61,6 +61,7 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding ThickLineMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="0" Margin="0,5,0,5"/>
|
||||
@@ -70,6 +71,10 @@
|
||||
Grid.Row="1" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding SmoothTriMesh}"
|
||||
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding UseSimplifiedSectionMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="2" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding UseSimplifiedSection}"
|
||||
Grid.Column="1" Grid.Row="2" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<!--<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
|
||||
@@ -147,6 +147,7 @@ Public Class OptionWindowVM
|
||||
If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
OptionModule.m_dGeometryTolerance = dVal
|
||||
Map.refSceneHostVM.MainController.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
|
||||
Map.refSceneHostVM.MainController.SetAdvImpTolerance(OptionModule.m_dGeometryTolerance)
|
||||
WriteMainPrivateProfileString(S_GEOMDB, K_SURFTMTOLER, DoubleToString(OptionModule.m_dGeometryTolerance, 5))
|
||||
End If
|
||||
End Set
|
||||
@@ -214,6 +215,16 @@ Public Class OptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property UseSimplifiedSection As Boolean
|
||||
Get
|
||||
Return OptionModule.m_bUseSimplifiedSection
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
OptionModule.m_bUseSimplifiedSection = value
|
||||
WriteMainPrivateProfileString(S_SOLIDS, K_SIMPLIFIEDSECTION, If(value, "1", "0"))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Public Property SelectedTextFont As String
|
||||
' Get
|
||||
' Return m_FontList(m_FontList.IndexOf(OptionModule.m_sFontText))
|
||||
@@ -571,6 +582,12 @@ Public Class OptionWindowVM
|
||||
Return EgtMsg(6518) ' Superfici smussate
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property UseSimplifiedSectionMsg As String
|
||||
Get
|
||||
Return "Use simplified strand section"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property UpdateLicenceMsg As String
|
||||
Get
|
||||
Return EgtMsg(6553) ' Aggiorna licenza
|
||||
@@ -759,19 +776,15 @@ Public Class OptionWindowVM
|
||||
End If
|
||||
Next
|
||||
' Creo dialogo colori
|
||||
'Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
||||
'ColorDlg.FullOpen = True
|
||||
'ColorDlg.CustomColors = nCustomColors.ToArray()
|
||||
'ColorDlg.Color = Col.ToColor()
|
||||
Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
|
||||
.CustomColors = nCustomColors.ToArray(),
|
||||
.Color = Col.ToColor()
|
||||
}
|
||||
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
||||
ColorDlg.FullOpen = True
|
||||
ColorDlg.CustomColors = nCustomColors.ToArray()
|
||||
ColorDlg.Color = Col.ToColor()
|
||||
' Visualizzo dialogo
|
||||
If ColorDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return False
|
||||
'Recupero colore scelto
|
||||
' Recupero colore scelto
|
||||
NewCol.FromColor(ColorDlg.Color)
|
||||
''Salvo eventuali modifiche ai colori custom
|
||||
' Salvo eventuali modifiche ai colori custom
|
||||
sCustomColors = ""
|
||||
For Each Color In ColorDlg.CustomColors
|
||||
sCustomColors &= Color.ToString() & ","
|
||||
@@ -970,8 +983,7 @@ Public Class OptionWindowVM
|
||||
Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".mlde")) Then
|
||||
' Il file {0} non contiene una macchina - Avviso
|
||||
Dim sOut As String = String.Format(EgtMsg(6529), sMachZip)
|
||||
'MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' Rimuovo il direttorio temporaneo ed esco
|
||||
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
Return
|
||||
@@ -1010,8 +1022,7 @@ Public Class OptionWindowVM
|
||||
' L'aggiornamento della macchina "{0}" non è riuscito.
|
||||
Dim sKo As String = String.Format(EgtMsg(6535), sMachName)
|
||||
EgtOutLog(sKo)
|
||||
'MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||
Return
|
||||
End Try
|
||||
End If
|
||||
@@ -1054,8 +1065,7 @@ Public Class OptionWindowVM
|
||||
'La macchina "{0}" è stata aggiornata con successo.
|
||||
Dim sOk As String = String.Format(EgtMsg(6530), sMachName)
|
||||
EgtOutLog(sOk)
|
||||
'MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
|
||||
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
|
||||
' Rimuovo il direttorio temporaneo
|
||||
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
' Aggiorno la lista delle macchina
|
||||
@@ -1100,6 +1110,8 @@ Public Class OptionWindowVM
|
||||
End If
|
||||
Try
|
||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||
' aggiungo i file della Macchina
|
||||
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName
|
||||
If Directory.Exists(sMachineDir) Then
|
||||
@@ -1113,14 +1125,12 @@ Public Class OptionWindowVM
|
||||
' L'esportazione della macchina "{0}" non è riuscita.
|
||||
Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName)
|
||||
EgtOutLog(sKo)
|
||||
'MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||
End Try
|
||||
'La macchina "{0}" è stata esportata con successo.
|
||||
Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName)
|
||||
EgtOutLog(sOk)
|
||||
'MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
|
||||
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
|
||||
End Sub
|
||||
|
||||
#End Region ' ExportMachine
|
||||
@@ -1227,15 +1237,10 @@ Public Class LayerColor
|
||||
End If
|
||||
Next
|
||||
' Creo dialogo colori
|
||||
'Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
||||
'ColorDlg.FullOpen = True
|
||||
'ColorDlg.CustomColors = nCustomColors.ToArray()
|
||||
'ColorDlg.Color = Col.ToColor()
|
||||
' Visualizzo dialogo
|
||||
Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
|
||||
.CustomColors = nCustomColors.ToArray(),
|
||||
.Color = Col.ToColor()
|
||||
}
|
||||
Dim ColorDlg As New System.Windows.Forms.ColorDialog
|
||||
ColorDlg.FullOpen = True
|
||||
ColorDlg.CustomColors = nCustomColors.ToArray()
|
||||
ColorDlg.Color = Col.ToColor()
|
||||
' Visualizzo dialogo
|
||||
If ColorDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return False
|
||||
' Recupero colore scelto
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Imports System.IO
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class ProjManagerVM
|
||||
Inherits VMBase
|
||||
@@ -150,27 +151,6 @@ Public Class ProjManagerVM
|
||||
''' </summary>
|
||||
Public Sub NewProjectCmd()
|
||||
NewProject(True)
|
||||
'Dim x As New OpenFileDialog()
|
||||
'x.ShowDialog()
|
||||
|
||||
Dim sDir As String = "C:\EgtData\Test3dPrinting"
|
||||
Dim od As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
|
||||
.Title = "Open",
|
||||
.Filter = "Icarus project(*.icrs)|*.icrs" &
|
||||
"|New geometry EgalTech(*.nge)|*.nge",
|
||||
.FileName = "New.icrs",
|
||||
.FilterIndex = 1,
|
||||
.InitialDirectory = sDir}
|
||||
od.ShowDialog()
|
||||
Dim sFilePath As String = od.FileName
|
||||
|
||||
'Dim save As New EgtSaveDialogV(Application.Current.MainWindow, New EgtSaveDialogVM()) With {
|
||||
' .Title = "Save",
|
||||
' .Filter = "Icarus project(*.icrs)|*.icrs",
|
||||
' .FileName = "New.icrs",
|
||||
' .InitialDirectory = sDir}
|
||||
'save.ShowDialog()
|
||||
'Dim sFilePath As String = save.FileName
|
||||
End Sub
|
||||
|
||||
Friend Sub NewProject(bDialog As Boolean)
|
||||
@@ -391,8 +371,7 @@ Public Class ProjManagerVM
|
||||
GetMainPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress)
|
||||
' se vuoto do messaggio di errore ed esco
|
||||
If String.IsNullOrWhiteSpace(sSupportAddress) Then
|
||||
'MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End If
|
||||
' Recupero numero chiave
|
||||
@@ -403,28 +382,18 @@ Public Class ProjManagerVM
|
||||
EgtGetCurrFilePath(sCurrProject)
|
||||
' se nome file vuoto o con estensione non valida, chiedo se si vuole salvare
|
||||
If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then
|
||||
'If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
Map.refSceneHostVM.SaveProject()
|
||||
End If
|
||||
EgtGetCurrFilePath(sCurrProject)
|
||||
' se modificato, chiedo se si vuole salvare
|
||||
Else
|
||||
If EgtGetModified() Then
|
||||
'If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
Map.refSceneHostVM.SaveProject()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' Verifico se il progetto corrente è una porta
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
If nPartId = GDB_ID.NULL Then
|
||||
nPartId = EgtGetFirstPartInRawPart(EgtGetFirstRawPart())
|
||||
End If
|
||||
Dim sPartName As String = String.Empty
|
||||
EgtGetName(nPartId, sPartName)
|
||||
Dim bPrjIsDoor As Boolean = (String.Compare(sPartName, "DOOR") = 0)
|
||||
' Recupero macchine dei gruppi di lavoro del progetto
|
||||
Dim Machines As New List(Of String)
|
||||
Dim nMchGrpId As Integer = EgtGetFirstMachGroup()
|
||||
@@ -441,9 +410,12 @@ Public Class ProjManagerVM
|
||||
If Not String.IsNullOrWhiteSpace(sCurrProject) Then
|
||||
Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject)
|
||||
If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then
|
||||
Dim sCurrProjName As String = Path.GetFileNameWithoutExtension(sCurrProject).ToUpper()
|
||||
Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
|
||||
For FileIndex = 0 To TempFiles.Count - 1
|
||||
If Path.GetFileNameWithoutExtension(TempFiles(FileIndex)).Contains(Path.GetFileNameWithoutExtension(sCurrProject)) AndAlso TempFiles(FileIndex) <> sCurrProject Then
|
||||
If TempFiles(FileIndex) = sCurrProject Then Continue For
|
||||
Dim sCurrFileName As String = Path.GetFileNameWithoutExtension( TempFiles(FileIndex)).ToUpper()
|
||||
If String.Compare(sCurrFileName, sCurrProjName) = 0 Then
|
||||
OtherFiles.Add(TempFiles(FileIndex))
|
||||
End If
|
||||
Next
|
||||
@@ -456,11 +428,13 @@ Public Class ProjManagerVM
|
||||
End If
|
||||
Try
|
||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||
' aggiungo file macchine
|
||||
For Each sMachineName As String In Machines
|
||||
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sMachineName
|
||||
If Directory.Exists(sMachineDir) Then
|
||||
zip.AddItem(sMachineDir, sMachineName)
|
||||
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sMachineName, True)
|
||||
End If
|
||||
Next
|
||||
' aggiungo progetto corrente
|
||||
@@ -499,8 +473,7 @@ Public Class ProjManagerVM
|
||||
bEx = True
|
||||
End Try
|
||||
If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then
|
||||
'MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
Else
|
||||
Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(MSG_TOPCOMMANDBAR + 14), 5)
|
||||
End If
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 254 B |
|
Before Width: | Height: | Size: 266 B |
|
Before Width: | Height: | Size: 311 B |
|
Before Width: | Height: | Size: 311 B |
|
Before Width: | Height: | Size: 311 B |
@@ -620,6 +620,7 @@ Public Class RibPanelVM
|
||||
Friend Sub Dispose()
|
||||
' ripristino frame originale
|
||||
EgtSetGridFrame(m_OriginalGridFrame)
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
' se in modifica parametri
|
||||
If m_bMachParam_IsChecked Then
|
||||
' ripristino modalita' standard
|
||||
@@ -1096,6 +1097,7 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneTop(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1121,6 +1123,7 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneFront(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1146,6 +1149,7 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneRight(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1171,6 +1175,7 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBack(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1196,6 +1201,7 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneLeft(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1221,6 +1227,7 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBottom(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1247,6 +1254,7 @@ Public Class RibPanelVM
|
||||
Public Sub CPlaneElevation(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
|
||||
End Sub
|
||||
|
||||
@@ -1272,87 +1280,12 @@ Public Class RibPanelVM
|
||||
Public Sub CPlaneOrigin(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneOrigin
|
||||
|
||||
#Region "CPlaneRotate"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneRotate.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CPlaneRotate_Command As ICommand
|
||||
Get
|
||||
If m_cmdCPlaneRotate Is Nothing Then
|
||||
m_cmdCPlaneRotate = New Command(AddressOf CPlaneRotate)
|
||||
End If
|
||||
Return m_cmdCPlaneRotate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneRotate(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
|
||||
Else
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE3D)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneRotate
|
||||
|
||||
#Region "CPlane3P"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlane3P.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CPlane3P_Command As ICommand
|
||||
Get
|
||||
If m_cmdCPlane3P Is Nothing Then
|
||||
m_cmdCPlane3P = New Command(AddressOf CPlane3P)
|
||||
End If
|
||||
Return m_cmdCPlane3P
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlane3P(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlane3P
|
||||
|
||||
#Region "CPlanePerpObj"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlanePerpObj.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CPlanePerpObj_Command As ICommand
|
||||
Get
|
||||
If m_cmdCPlanePerpObj Is Nothing Then
|
||||
m_cmdCPlanePerpObj = New Command(AddressOf CPlanePerpObj)
|
||||
End If
|
||||
Return m_cmdCPlanePerpObj
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlanePerpObj(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlanePerpObj
|
||||
|
||||
#Region "CPlaneObj"
|
||||
|
||||
Private m_bCPlaneObj_IsActive As Boolean = False
|
||||
|
||||
@@ -51,16 +51,18 @@ Public Class CopyFromWndVM
|
||||
|
||||
Public Sub Ok()
|
||||
If IsNothing(m_SelRib) Then
|
||||
'MessageBox.Show("Please select the rib from which to copy the parameters!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Please select the rib from which to copy the parameters!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
MessageBox.Show("Please select the rib from which to copy the parameters!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Return
|
||||
End If
|
||||
' copio i parametri nella rib corrente
|
||||
Dim ParamList As New List(Of MachiningParam.Params)({MachiningParam.Params.RIBSSTRANDWIDTH,
|
||||
MachiningParam.Params.RIBSTYPE,
|
||||
MachiningParam.Params.RIBSOVERLAP,
|
||||
MachiningParam.Params.RIBSSTRANDOVERLAP,
|
||||
MachiningParam.Params.RIBSSTRANDCOUNT,
|
||||
MachiningParam.Params.RIBSLINK,
|
||||
MachiningParam.Params.RIBSLINKFILLET,
|
||||
MachiningParam.Params.RIBSMERGEWITHSHELL,
|
||||
MachiningParam.Params.RIBSINVERTDIRECTION,
|
||||
MachiningParam.Params.RIBSINVERTSTRANDORDER,
|
||||
MachiningParam.Params.RIBSLEADININVERT,
|
||||
@@ -69,7 +71,8 @@ Public Class CopyFromWndVM
|
||||
MachiningParam.Params.RIBSLEADOUTLEN,
|
||||
MachiningParam.Params.RIBSLEADOUTCOASTING,
|
||||
MachiningParam.Params.RIBSLEADOUTWIPE,
|
||||
MachiningParam.Params.RIBSLEADOUTWIPEDIR})
|
||||
MachiningParam.Params.RIBSLEADOUTWIPEDIR,
|
||||
MachiningParam.Params.RIBSLEADFILLET})
|
||||
For Each Param In ParamList
|
||||
Select Case Map.refRibPanelVM.SelRib.Type
|
||||
Case RibEntity.RibTypes.FROMDRAW
|
||||
@@ -100,8 +103,8 @@ Public Class CopyFromWndVM
|
||||
Else
|
||||
RibTypeParam.SelValue = RibTypeParam.PartSelValue
|
||||
End If
|
||||
Case MachiningParam.Params.RIBSSTRANDWIDTH, MachiningParam.Params.RIBSOVERLAP, MachiningParam.Params.RIBSSTRANDCOUNT, MachiningParam.Params.RIBSLEADINLEN, MachiningParam.Params.RIBSLEADOUTLEN,
|
||||
MachiningParam.Params.RIBSLEADOUTCOASTING, MachiningParam.Params.RIBSLEADOUTWIPE, MachiningParam.Params.RIBSLEADOUTWIPEDIR
|
||||
Case MachiningParam.Params.RIBSSTRANDWIDTH, MachiningParam.Params.RIBSOVERLAP, MachiningParam.Params.RIBSSTRANDOVERLAP, MachiningParam.Params.RIBSSTRANDCOUNT, MachiningParam.Params.RIBSLINKFILLET, MachiningParam.Params.RIBSLEADINLEN, MachiningParam.Params.RIBSLEADOUTLEN,
|
||||
MachiningParam.Params.RIBSLEADOUTCOASTING, MachiningParam.Params.RIBSLEADOUTWIPE, MachiningParam.Params.RIBSLEADOUTWIPEDIR, MachiningParam.Params.RIBSLEADFILLET
|
||||
Dim RibTypeParam As RibNumericMachiningParam = Nothing
|
||||
Dim dRibParam As Double = 0
|
||||
Select Case Type
|
||||
@@ -111,9 +114,15 @@ Public Class CopyFromWndVM
|
||||
Case MachiningParam.Params.RIBSOVERLAP
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSOVERLAP)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSOVERLAP, dRibParam)
|
||||
Case MachiningParam.Params.RIBSSTRANDOVERLAP
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSSTRANDOVERLAP)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSSTRANDOVERLAP, dRibParam)
|
||||
Case MachiningParam.Params.RIBSSTRANDCOUNT
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSSTRANDCOUNT)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSSTRANDCOUNT, dRibParam)
|
||||
Case MachiningParam.Params.RIBSLINKFILLET
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLINKFILLET)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSLINKFILLET, dRibParam)
|
||||
Case MachiningParam.Params.RIBSLEADINLEN
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADINLEN)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSLEADINLEN, dRibParam)
|
||||
@@ -129,19 +138,25 @@ Public Class CopyFromWndVM
|
||||
Case MachiningParam.Params.RIBSLEADOUTWIPEDIR
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADOUTWIPEDIR)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSLEADOUTWIPEDIR, dRibParam)
|
||||
Case MachiningParam.Params.RIBSLEADFILLET
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADFILLET)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSLEADFILLET, dRibParam)
|
||||
End Select
|
||||
If Not IsNothing(RibTypeParam) AndAlso bRead Then
|
||||
RibTypeParam.SetValue(dRibParam)
|
||||
Else
|
||||
RibTypeParam.SetValue(RibTypeParam.dPartValue)
|
||||
End If
|
||||
Case MachiningParam.Params.RIBSLINK, MachiningParam.Params.RIBSINVERTDIRECTION, MachiningParam.Params.RIBSINVERTSTRANDORDER, MachiningParam.Params.RIBSLEADININVERT, MachiningParam.Params.RIBSLEADOUTINVERT
|
||||
Case MachiningParam.Params.RIBSLINK, MachiningParam.Params.RIBSMERGEWITHSHELL, MachiningParam.Params.RIBSINVERTDIRECTION, MachiningParam.Params.RIBSINVERTSTRANDORDER, MachiningParam.Params.RIBSLEADININVERT, MachiningParam.Params.RIBSLEADOUTINVERT
|
||||
Dim RibTypeParam As RibCheckMachiningParam = Nothing
|
||||
Dim bRibParam As Boolean = False
|
||||
Select Case Type
|
||||
Case MachiningParam.Params.RIBSLINK
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLINK)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSLINK, bRibParam)
|
||||
Case MachiningParam.Params.RIBSMERGEWITHSHELL
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSMERGEWITHSHELL)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSMERGEWITHSHELL, bRibParam)
|
||||
Case MachiningParam.Params.RIBSINVERTDIRECTION
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSINVERTDIRECTION)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSINVERTDIRECTION, bRibParam)
|
||||
|
||||
@@ -45,8 +45,11 @@ Public Class RibParamPanelVM
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDWIDTH, nRibId, nPartId, Me),
|
||||
New RibComboMachiningParam(MachiningParam.Params.RIBSTYPE, nRibId, nPartId, Me),
|
||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nRibId, nPartId, Me),
|
||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDOVERLAP, nRibId, nPartId, Me),
|
||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nRibId, nPartId, Me),
|
||||
New RibCheckMachiningParam(MachiningParam.Params.RIBSLINK, nRibId, nPartId, Me),
|
||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLINKFILLET, nRibId, nPartId, Me),
|
||||
New RibCheckMachiningParam(MachiningParam.Params.RIBSMERGEWITHSHELL, nRibId, nPartId, Me),
|
||||
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nRibId, nPartId, Me),
|
||||
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nRibId, nPartId, Me),
|
||||
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nRibId, nPartId, Me),
|
||||
@@ -55,7 +58,8 @@ Public Class RibParamPanelVM
|
||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nRibId, nPartId, Me),
|
||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nRibId, nPartId, Me),
|
||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nRibId, nPartId, Me),
|
||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nRibId, nPartId, Me)})
|
||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nRibId, nPartId, Me),
|
||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADFILLET, nRibId, nPartId, Me)})
|
||||
NotifyPropertyChanged(NameOf(MachiningParamList))
|
||||
NotifyPropertyChanged(NameOf(sName))
|
||||
End Sub
|
||||
@@ -239,10 +243,18 @@ Public Class RibNumericMachiningParam
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSOVERLAP, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dPartValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDOVERLAP, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, m_dPartValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDCOUNT, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dPartValue)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSLINKFILLET
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLINKFILLET, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSLINKFILLET, m_dPartValue)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSINVERTDIRECTION, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_dPartValue)
|
||||
@@ -279,6 +291,10 @@ Public Class RibNumericMachiningParam
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLEADOUTWIPEDIR, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dPartValue)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSLEADFILLET
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLEADFILLET, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSLEADFILLET, m_dPartValue)
|
||||
m_bIsLen = True
|
||||
End Select
|
||||
m_dOrigValue = m_dValue
|
||||
If Not bReadFromPart Then
|
||||
@@ -307,12 +323,24 @@ Public Class RibNumericMachiningParam
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSOVERLAP)
|
||||
End If
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSSTRANDOVERLAP, sWriteValue)
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSSTRANDOVERLAP)
|
||||
End If
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSSTRANDCOUNT, sWriteValue)
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSSTRANDCOUNT)
|
||||
End If
|
||||
Case Params.RIBSLINKFILLET
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSLINKFILLET, sWriteValue)
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSLINKFILLET)
|
||||
End If
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSINVERTDIRECTION, sWriteValue)
|
||||
@@ -367,6 +395,12 @@ Public Class RibNumericMachiningParam
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSLEADOUTWIPEDIR)
|
||||
End If
|
||||
Case Params.RIBSLEADFILLET
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSLEADFILLET, sWriteValue)
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSLEADFILLET)
|
||||
End If
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -545,6 +579,9 @@ Public Class RibCheckMachiningParam
|
||||
Case Params.RIBSLINK
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLINK, m_bValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSLINK, m_bPartValue)
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSMERGEWITHSHELL, m_bValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, m_bPartValue)
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSINVERTDIRECTION, m_bValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_bPartValue)
|
||||
@@ -573,6 +610,12 @@ Public Class RibCheckMachiningParam
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSLINK)
|
||||
End If
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0))
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSMERGEWITHSHELL)
|
||||
End If
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSINVERTDIRECTION, If(m_bValue, 1, 0))
|
||||
|
||||
@@ -49,9 +49,8 @@ Public Class MySceneHostVM
|
||||
AddHandler MainController.OnOpenProject, AddressOf OnOpenProject
|
||||
AddHandler MainController.OnSavingProject, AddressOf OnSavingProject
|
||||
AddHandler MainController.OnSavedProject, AddressOf OnSavedProject
|
||||
AddHandler MainController.OnInsertingProject, AddressOf OnInsertingProject
|
||||
AddHandler MainController.OnInsertedProject, AddressOf OnInsertedProject
|
||||
AddHandler MainController.OnImportingProject, AddressOf OnImportingProject
|
||||
AddHandler MainController.OnImportedProject, AddressOf OnImportedProject
|
||||
AddHandler MainController.PrepareInputBox, AddressOf PrepareInputBox
|
||||
AddHandler MainController.SetInputBoxText, AddressOf SetInputBoxText
|
||||
AddHandler MainController.SetInputBoxCheck, AddressOf SetInputBoxCheck
|
||||
@@ -71,6 +70,8 @@ Public Class MySceneHostVM
|
||||
' Se tutto bene
|
||||
If MainScene.Init() And Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.BASE) Then
|
||||
PostInitializeScene()
|
||||
' Non imposto automaticamente il focus sulla scena muovendo il mouse sopra di essa (necessario click)
|
||||
MainScene.SetFocusOnMove( True, 0.3, 0.3, 0.1, 0.2)
|
||||
' Imposto stato gestione mouse diretto della scena a nessuno
|
||||
MainScene.SetStatusNull()
|
||||
EgtSetCurrentContext(MainScene.GetCtx())
|
||||
@@ -81,27 +82,40 @@ Public Class MySceneHostVM
|
||||
' Problemi
|
||||
' Se manca la chiave
|
||||
If Map.refMainWindowVM.MainWindowM.nKeyLevel = -1 Or Map.refMainWindowVM.MainWindowM.nKeyLevel = -2 Then
|
||||
EgtOutLog("Missing Dongle")
|
||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
|
||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
||||
'MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Altrimenti manca la licenza
|
||||
If Not EgtGetNetHwKey() Then
|
||||
EgtOutLog("Missing Dongle")
|
||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Else
|
||||
EgtOutLog("NetDongle is full")
|
||||
' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore"
|
||||
Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
' Se altrimenti manca il collegamento con la chiave di rete
|
||||
ElseIf Map.refMainWindowVM.MainWindowM.nKeyLevel = -9 Then
|
||||
EgtOutLog("Missing Link with Net Dongle")
|
||||
' 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 sTitle As String = EgtMsg(10101)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Altrimenti manca la licenza
|
||||
Else
|
||||
EgtOutLog("Problems with Licence")
|
||||
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6)
|
||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
||||
'If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
||||
If EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
||||
Dim sText As String = EgtMsg(10105) & vbCrLf & EgtMsg(10106)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
||||
' Apro dialogo per richiesta file licenza
|
||||
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.DefaultExt = ".lic",
|
||||
.Filter = "Licences (.lic)|*.lic",
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True
|
||||
}
|
||||
.DefaultExt = ".lic",
|
||||
.Filter = "Licences (.lic)|*.lic",
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True
|
||||
}
|
||||
If LicDlg.ShowDialog() = True Then
|
||||
' Recupero il direttorio del file
|
||||
Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName)
|
||||
@@ -188,33 +202,24 @@ Public Class MySceneHostVM
|
||||
Private Sub PostInitializeScene()
|
||||
' Impostazioni Controller
|
||||
MainController.SetScene(MainScene)
|
||||
MainController.SetSurfTmTolerance(0.05)
|
||||
MainController.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
|
||||
MainController.SetAdvImpTolerance(OptionModule.m_dGeometryTolerance)
|
||||
MainController.SetUseCustomColors(True, S_SCENE, K_CUSTOMCOLORS)
|
||||
' imposto unità di misura per interfaccia utente
|
||||
Dim bMmUnits As Boolean = GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0
|
||||
EgtSetUiUnits(bMmUnits)
|
||||
'Map.refMyStatusBarVM.SetMeasureUnit(nMeasureUnit <> 0)
|
||||
' imposto visualizzazione riferimento globale
|
||||
EgtSetGlobFrameShow(True)
|
||||
' imposto i dati della griglia
|
||||
Dim bGridVisibility As Boolean = (GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0)
|
||||
Dim dSnapStepMm As Double = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10)
|
||||
Dim dSnapStepInch As Double = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 10)
|
||||
Dim nMinLineSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1)
|
||||
Dim nMajLineSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_MAJLINESSTEP, 10)
|
||||
Dim nExtSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_EXTSSTEP, 50)
|
||||
Dim MinLnColor As Color3d = New Color3d(160, 160, 160)
|
||||
GetMainPrivateProfileColor(S_GRID, K_MINLNCOLOR, MinLnColor)
|
||||
Dim MajLnColor As Color3d = New Color3d(160, 160, 160)
|
||||
GetMainPrivateProfileColor(S_GRID, K_MAJLNCOLOR, MajLnColor)
|
||||
EgtSetGridFrame(Frame3d.GLOB)
|
||||
If bMmUnits Then
|
||||
EgtSetGridGeo(dSnapStepMm, nMinLineSStep, nMajLineSStep, nExtSStep)
|
||||
Else
|
||||
EgtSetGridGeo(dSnapStepInch, nMinLineSStep, nMajLineSStep, nExtSStep)
|
||||
End If
|
||||
EgtSetGridGeo( If( bMmUnits, OptionModule.m_dSnapStepMm, OptionModule.m_dSnapStepInch),
|
||||
OptionModule.m_nMinLineSStep, OptionModule.m_nMajLineSStep, OptionModule.m_nExtSStep)
|
||||
EgtSetGridColor(MinLnColor, MajLnColor)
|
||||
EgtSetGridShow(bGridVisibility, bGridVisibility)
|
||||
EgtSetGridShow(OptionModule.m_bGridVisibility, OptionModule.m_bGridVisibility)
|
||||
' imposto tipo coordinate
|
||||
MainScene.SetGridCursorPos(True)
|
||||
' visualizzazione avanzata dei triangoli costituenti le superfici
|
||||
@@ -263,14 +268,7 @@ Public Class MySceneHostVM
|
||||
If Not String.IsNullOrWhiteSpace(sDir) Then
|
||||
sDir = Path.GetDirectoryName(sDir)
|
||||
End If
|
||||
'Dim OpenFileDialog As New Windows.Forms.OpenFileDialog With {
|
||||
' .Title = "Open",
|
||||
' .Filter = "Icarus project(*.icrs)|*.icrs" &
|
||||
' "|New geometry EgalTech(*.nge)|*.nge",
|
||||
' .FilterIndex = 1,
|
||||
' .InitialDirectory = sDir
|
||||
'}
|
||||
Dim OpenFileDialog As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
|
||||
Dim OpenFileDialog As New Windows.Forms.OpenFileDialog With {
|
||||
.Title = "Open",
|
||||
.Filter = "Icarus project(*.icrs)|*.icrs" &
|
||||
"|New geometry EgalTech(*.nge)|*.nge",
|
||||
@@ -320,25 +318,12 @@ Public Class MySceneHostVM
|
||||
If String.IsNullOrWhiteSpace(sFile) Then sFile = "New.icrs"
|
||||
' Eventuale sistemazione estensione
|
||||
sFile = IO.Path.ChangeExtension(sFile, "icrs")
|
||||
Dim sDir As String = MainController.GetCurrFile()
|
||||
If String.IsNullOrWhiteSpace(sDir) Then
|
||||
GetMainPrivateProfileString(S_MRUFILES, K_FILE & 1, "", sDir)
|
||||
End If
|
||||
If Not String.IsNullOrWhiteSpace(sDir) Then
|
||||
sDir = Path.GetDirectoryName(sDir)
|
||||
End If
|
||||
' Assegnazione nome file con dialogo
|
||||
'Dim SaveFileDialog As New Windows.Forms.SaveFileDialog With {
|
||||
' .Title = "Save",
|
||||
' .Filter = "Icarus Project(*.icrs)|*.icrs",
|
||||
' .FileName = sFile,
|
||||
' .InitialDirectory = IO.Path.GetDirectoryName(sFile)
|
||||
'}
|
||||
Dim SaveFileDialog As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
|
||||
Dim SaveFileDialog As New Windows.Forms.SaveFileDialog With {
|
||||
.Title = "Save",
|
||||
.Filter = "Icarus project(*.icrs)|*.icrs",
|
||||
.Filter = "Icarus Project(*.icrs)|*.icrs",
|
||||
.FileName = sFile,
|
||||
.InitialDirectory = sDir
|
||||
.InitialDirectory = IO.Path.GetDirectoryName(sFile)
|
||||
}
|
||||
If SaveFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
|
||||
Dim sFileName As String = SaveFileDialog.FileName
|
||||
@@ -369,6 +354,7 @@ Public Class MySceneHostVM
|
||||
"|Step files (*.stp;*.step)|*.stp;*.step" &
|
||||
"|3D Manufacturing format (*.3mf)|*.3mf" &
|
||||
"|New geometry EgalTech(*.nge)|*.nge" &
|
||||
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
|
||||
"|All Files (*.*)|*.*",
|
||||
.FilterIndex = ExtIndex,
|
||||
.InitialDirectory = sDir}
|
||||
@@ -376,8 +362,7 @@ Public Class MySceneHostVM
|
||||
Return False
|
||||
End If
|
||||
WriteMainPrivateProfileString(S_PRINTING3D, K_IMPORTCURREXTENSION, OpenFileDialog.FilterIndex)
|
||||
Dim sFile As String = String.Empty
|
||||
sFile = OpenFileDialog.FileName
|
||||
Dim sFile As String = OpenFileDialog.FileName
|
||||
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
|
||||
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
|
||||
@@ -432,8 +417,9 @@ Public Class MySceneHostVM
|
||||
"|Step files (*.stp;*.step)|*.stp;*.step" &
|
||||
"|3D Manufacturing format (*.3mf)|*.3mf" &
|
||||
"|New geometry EgalTech(*.nge)|*.nge" &
|
||||
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
|
||||
"|All Files (*.*)|*.*",
|
||||
.FilterIndex = 1,
|
||||
.FilterIndex = 6,
|
||||
.InitialDirectory = sDir}
|
||||
If Not OpenFileDialog.ShowDialog Then
|
||||
Return False
|
||||
@@ -446,29 +432,35 @@ Public Class MySceneHostVM
|
||||
' sposto le nuove geometrie nel layer rib del pezzo
|
||||
Dim nNewPartId As Integer = EgtGetLastPart()
|
||||
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
|
||||
Dim frLayer As New Frame3d
|
||||
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
|
||||
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
|
||||
While nNewEntityId <> GDB_ID.NULL
|
||||
Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
|
||||
Select Case EntityType
|
||||
Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
|
||||
Dim nNewRib = nNewEntityId
|
||||
Dim nNewRib As Integer = GDB_ID.NULL
|
||||
If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
|
||||
nNewRib = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
|
||||
nNewRib = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False)
|
||||
EgtRelocate( nNewRib, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
|
||||
Else
|
||||
' lo copio nel layer dei rib
|
||||
nNewRib = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
|
||||
End If
|
||||
EgtSetName(nNewRib, RIB_CURVE)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewRib, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo aggiungo alla lista
|
||||
Dim NewEntity As RibEntity = New RibEntity(RibEntity.RibTypes.FROMIMPORT, nNewRib)
|
||||
Map.refRibPanelVM.RibList.Add(NewEntity)
|
||||
Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
|
||||
Dim nNewRib = nNewEntityId
|
||||
' lo copio nel layer dei rib
|
||||
nNewRib = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
|
||||
Dim nNewRib As Integer = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
|
||||
EgtSetName(nNewRib, RIB_EXTRUSION)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewRib, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo aggiungo alla lista
|
||||
@@ -503,29 +495,32 @@ Public Class MySceneHostVM
|
||||
"|Step files (*.stp;*.step)|*.stp;*.step" &
|
||||
"|3D Manufacturing format (*.3mf)|*.3mf" &
|
||||
"|New geometry EgalTech(*.nge)|*.nge" &
|
||||
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
|
||||
"|All Files (*.*)|*.*",
|
||||
.FilterIndex = 1,
|
||||
.FilterIndex = 6,
|
||||
.InitialDirectory = sDir}
|
||||
If Not OpenFileDialog.ShowDialog Then
|
||||
Return False
|
||||
End If
|
||||
Dim sFile As String = String.Empty
|
||||
sFile = OpenFileDialog.FileName
|
||||
Dim sFile As String = OpenFileDialog.FileName
|
||||
' importo la nuova geometria
|
||||
Dim bOk As Boolean = MainController.InsertProject(sFile, False)
|
||||
If bOk Then
|
||||
' sposto le nuove geometrie nel layer rib del pezzo
|
||||
Dim nNewPartId As Integer = EgtGetLastPart()
|
||||
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
|
||||
Dim frLayer As New Frame3d
|
||||
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
|
||||
' verifico che ci sia una sola entita'
|
||||
If EgtGetGroupObjs(nNewLayerId) <> 1 Then
|
||||
'MessageBox.Show("Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show("Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Else
|
||||
' elimino eventuale entita' vecchia
|
||||
If MenuItem.OrigLayer.EntityList.Count > 0 AndAlso MenuItem.OrigLayer.EntityList(0).nId <> GDB_ID.NULL Then EgtErase(MenuItem.OrigLayer.EntityList(0).nId)
|
||||
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
|
||||
EgtRelocate(nNewEntityId, MenuItem.OrigLayer.nLayerId, GDB_POS.LAST_SON)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewEntityId, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' aggiorno riferimento pezzo
|
||||
@@ -562,8 +557,9 @@ Public Class MySceneHostVM
|
||||
"|Step files (*.stp;*.step)|*.stp;*.step" &
|
||||
"|3D Manufacturing format (*.3mf)|*.3mf" &
|
||||
"|New geometry EgalTech(*.nge)|*.nge" &
|
||||
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
|
||||
"|All Files (*.*)|*.*",
|
||||
.FilterIndex = 1,
|
||||
.FilterIndex = 6,
|
||||
.InitialDirectory = sDir}
|
||||
If Not OpenFileDialog.ShowDialog Then
|
||||
Return False
|
||||
@@ -576,29 +572,35 @@ Public Class MySceneHostVM
|
||||
' sposto le nuove geometrie nel layer ShellNumber del pezzo
|
||||
Dim nNewPartId As Integer = EgtGetLastPart()
|
||||
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
|
||||
Dim frLayer As New Frame3d
|
||||
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
|
||||
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
|
||||
While nNewEntityId <> GDB_ID.NULL
|
||||
Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
|
||||
Select Case EntityType
|
||||
Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
|
||||
Dim nNewShellNumberId As Integer = nNewEntityId
|
||||
Dim nNewShellNumberId As Integer = GDB_ID.NULL
|
||||
If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
|
||||
nNewShellNumberId = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
|
||||
nNewShellNumberId = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False)
|
||||
EgtRelocate( nNewShellNumberId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
|
||||
Else
|
||||
' lo copio nel layer dei shellnumber
|
||||
nNewShellNumberId = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
|
||||
End If
|
||||
EgtSetName(nNewShellNumberId, RIB_CURVE)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewShellNumberId, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo aggiungo alla lista
|
||||
Dim NewEntity As ShellNumberEntity = New ShellNumberEntity(ShellNumberEntity.ShellNumberTypes.FROMIMPORT, nNewShellNumberId)
|
||||
Map.refShellNumberPanelVM.ShellNumberList.Add(NewEntity)
|
||||
Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
|
||||
Dim nNewShellNumberId = nNewEntityId
|
||||
' lo copio nel layer dei rib
|
||||
nNewShellNumberId = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
|
||||
' lo copio nel layer dei shellnumber
|
||||
Dim nNewShellNumberId As Integer = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
|
||||
EgtSetName(nNewShellNumberId, RIB_EXTRUSION)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewShellNumberId, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo aggiungo alla lista
|
||||
@@ -608,7 +610,7 @@ Public Class MySceneHostVM
|
||||
nNewEntityId = EgtGetNext(nNewEntityId)
|
||||
End While
|
||||
EgtErase(nNewPartId)
|
||||
' seleziono ultima rib
|
||||
' seleziono ultima ShellNumber
|
||||
Map.refShellNumberPanelVM.SelLastShellNumber()
|
||||
EgtDraw()
|
||||
' Imposto flag di ricalcolo slice
|
||||
@@ -633,8 +635,9 @@ Public Class MySceneHostVM
|
||||
"|Step files (*.stp;*.step)|*.stp;*.step" &
|
||||
"|3D Manufacturing format (*.3mf)|*.3mf" &
|
||||
"|New geometry EgalTech(*.nge)|*.nge" &
|
||||
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
|
||||
"|All Files (*.*)|*.*",
|
||||
.FilterIndex = 1,
|
||||
.FilterIndex = 6,
|
||||
.InitialDirectory = sDir}
|
||||
If Not OpenFileDialog.ShowDialog Then
|
||||
Return False
|
||||
@@ -647,29 +650,35 @@ Public Class MySceneHostVM
|
||||
' sposto le nuove geometrie nel layer ShellNumber del pezzo
|
||||
Dim nNewPartId As Integer = EgtGetLastPart()
|
||||
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
|
||||
Dim frLayer As New Frame3d
|
||||
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
|
||||
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
|
||||
While nNewEntityId <> GDB_ID.NULL
|
||||
Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
|
||||
Select Case EntityType
|
||||
Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
|
||||
Dim nNewFilledSolidId As Integer = nNewEntityId
|
||||
Dim nNewFilledSolidId As Integer = GDB_ID.NULL
|
||||
If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
|
||||
nNewFilledSolidId = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
|
||||
nNewFilledSolidId = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False)
|
||||
EgtRelocate( nNewFilledSolidId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
|
||||
Else
|
||||
' lo copio nel layer dei shellnumber
|
||||
' lo copio nel layer dei FilledSolid
|
||||
nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
|
||||
End If
|
||||
EgtSetName(nNewFilledSolidId, RIB_CURVE)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewFilledSolidId, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo aggiungo alla lista
|
||||
Dim NewEntity As FilledSolidEntity = New FilledSolidEntity(FilledSolidEntity.FilledSolidTypes.FROMIMPORT, nNewFilledSolidId)
|
||||
Map.refFilledSolidPanelVM.FilledSolidList.Add(NewEntity)
|
||||
Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
|
||||
Dim nNewFilledSolidId = nNewEntityId
|
||||
' lo copio nel layer dei rib
|
||||
nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
|
||||
' lo copio nel layer dei FilledSolid
|
||||
Dim nNewFilledSolidId As Integer = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
|
||||
EgtSetName(nNewFilledSolidId, RIB_EXTRUSION)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewFilledSolidId, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo aggiungo alla lista
|
||||
@@ -679,7 +688,7 @@ Public Class MySceneHostVM
|
||||
nNewEntityId = EgtGetNext(nNewEntityId)
|
||||
End While
|
||||
EgtErase(nNewPartId)
|
||||
' seleziono ultima rib
|
||||
' seleziono ultima FilledSolid
|
||||
Map.refFilledSolidPanelVM.SelLastFilledSolid()
|
||||
EgtDraw()
|
||||
' Imposto flag di ricalcolo slice
|
||||
@@ -705,6 +714,26 @@ Public Class MySceneHostVM
|
||||
Return MainController.ExportProject(SaveFileDialog.FileName, False)
|
||||
End Function
|
||||
|
||||
Public Function ExportProjectForMachine(sFilePath As String) As Boolean
|
||||
' Reset controller e scena
|
||||
MainController.ResetStatus()
|
||||
MainController.SetDefaultFilterForExport(EEX_FLT.MODE_HIDDEN + EEX_FLT.MODE_STD + EEX_FLT.STAT_ON + EEX_FLT.STAT_OFF + EEX_FLT.LEV_TEMP)
|
||||
Return MainController.ExportGeomId(Map.refTopPanelVM.SelPart.nPartId, sFilePath, False)
|
||||
End Function
|
||||
Public Function ExportProjectForMachine(sDirPath As String, b3dm As Boolean, ByRef sFilePath As String) As Boolean
|
||||
sFilePath = sDirPath & "\ProjectSlice" & If(b3dm, ".3dm", ".3mf")
|
||||
' Reset controller e scena
|
||||
MainController.ResetStatus()
|
||||
MainController.SetDefaultFilterForExport(EEX_FLT.MODE_HIDDEN + EEX_FLT.MODE_STD + EEX_FLT.STAT_ON + EEX_FLT.STAT_OFF + EEX_FLT.LEV_TEMP)
|
||||
Dim nExportGeomId As Integer = 0
|
||||
If b3dm Then
|
||||
If Not ExecPrepare3dmExport(nExportGeomId) Then Return False
|
||||
Else
|
||||
nExportGeomId = Map.refTopPanelVM.SelPart.nPartId
|
||||
End If
|
||||
Return MainController.ExportGeomId(nExportGeomId, sFilePath, False)
|
||||
End Function
|
||||
|
||||
Public Overrides Function ExecScript(sFilePath As String) As Boolean
|
||||
Dim bOk As Boolean = False
|
||||
If String.IsNullOrEmpty(sFilePath) Then
|
||||
@@ -1044,8 +1073,7 @@ Public Class MySceneHostVM
|
||||
EgtErase(EgtGetFirstPart())
|
||||
CurrentMachine.CreateMachineTable()
|
||||
If Not bOk Then
|
||||
'MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
|
||||
End If
|
||||
|
||||
Map.refTopPanelVM.PartList.Clear()
|
||||
@@ -1074,8 +1102,7 @@ Public Class MySceneHostVM
|
||||
Else
|
||||
sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file
|
||||
End If
|
||||
'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
||||
End If
|
||||
' leggo materiale e macchina
|
||||
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
||||
@@ -1087,8 +1114,7 @@ Public Class MySceneHostVM
|
||||
' imposto la macchina
|
||||
Map.refMachinePanelVM.SelectedMachine = ProjectMachine
|
||||
Else
|
||||
'MessageBox.Show("Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show("Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Map.refProjManagerVM.NewProject(False)
|
||||
Return
|
||||
End If
|
||||
@@ -1111,9 +1137,7 @@ Public Class MySceneHostVM
|
||||
Else
|
||||
Dim sMaterialName As String = ""
|
||||
EgtGetInfo(nTabPartId, KEY_MATERIAL_NAME, sMaterialName)
|
||||
'MessageBox.Show("Project material (Guid:" & sMaterialGuid & " Name:""" & sMaterialName & """) not found!" & Environment.NewLine &
|
||||
' "Please select another material!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Project material (Guid:" & sMaterialGuid & " Name:""" & sMaterialName & """) not found!" & Environment.NewLine &
|
||||
MessageBox.Show("Project material (Guid:" & sMaterialGuid & " Name:""" & sMaterialName & """) not found!" & Environment.NewLine &
|
||||
"Please select another material!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
End If
|
||||
End If
|
||||
@@ -1197,8 +1221,16 @@ Public Class MySceneHostVM
|
||||
Else
|
||||
Map.refProjManagerVM.MruFiles.Remove(sFile)
|
||||
Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file
|
||||
'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnInsertingProject(sender As Object, nType As Integer, ByRef nFlag As Integer)
|
||||
If 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
|
||||
nFlag = GetMainPrivateProfileInt(S_IMPORT, K_ADVFLAG, 0)
|
||||
Else
|
||||
nFlag = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1206,8 +1238,7 @@ Public Class MySceneHostVM
|
||||
' Segnalo eventuale errore
|
||||
If Not bOk Then
|
||||
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
|
||||
'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
End If
|
||||
Map.refProjManagerVM.MruImportFiles.Add(sFile)
|
||||
EgtSetInfo(EgtGetLastPart(), FILE_PATH, sFile)
|
||||
@@ -1215,39 +1246,6 @@ Public Class MySceneHostVM
|
||||
MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
Private Sub OnImportingProject(sender As Object, nType As Integer, ByRef nFlag As Integer)
|
||||
If nType <> FT.NULL Then
|
||||
If nType = FT.CNC Then
|
||||
nFlag = GetMainPrivateProfileInt(S_IMPORT, K_CNCFLAG, EIC_FL.NONE)
|
||||
Else
|
||||
nFlag = 0
|
||||
End If
|
||||
' Abilito progress e bottone stop
|
||||
Map.refMyStatusBarVM.StartLoading("", True)
|
||||
Else
|
||||
'MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnImportedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean)
|
||||
EgtZoom(ZM.ALL)
|
||||
' Disabilito progress e bottone stop
|
||||
Map.refMyStatusBarVM.EndLoading("")
|
||||
' Salvo path
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, Path.GetDirectoryName(sFile))
|
||||
' Segnalo eventuale errore
|
||||
If Not bOk Then
|
||||
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
|
||||
'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
ElseIf Path.GetExtension(sFile) <> ".cnc" Then
|
||||
' creo oggetto pezzo in lista
|
||||
'Map.refProjectVM.
|
||||
End If
|
||||
MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
Private Sub PrepareInputBox(ByVal sTitle As String, ByVal sLabel As String, ByVal sCheckLabel As String,
|
||||
ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean)
|
||||
Map.refControllerInputPanelVM.PrepareInputBox(sTitle, sLabel, sCheckLabel, bShowCombo, bShowBtn)
|
||||
@@ -1520,6 +1518,8 @@ Public Class MySceneHostVM
|
||||
' eseguo comando
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||
Map.refStartMachPanelVM.ResetCPlaneObjIsActive()
|
||||
' imposto dimensioni griglia standard (non tavola)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
' ripristino selezioni precedenti
|
||||
For Each Id In Map.refStartMachPanelVM.PrevSelObjs
|
||||
EgtSelectObj(Id)
|
||||
@@ -1604,6 +1604,8 @@ Public Class MySceneHostVM
|
||||
' eseguo comando
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||
Map.refRibPanelVM.ResetCPlaneObjIsActive()
|
||||
' imposto dimensioni griglia standard (non tavola)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
' ripristino selezioni precedenti
|
||||
For Each Id In Map.refRibPanelVM.PrevSelObjs
|
||||
EgtSelectObj(Id)
|
||||
@@ -1689,6 +1691,8 @@ Public Class MySceneHostVM
|
||||
' eseguo comando
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||
Map.refShellNumberPanelVM.ResetCPlaneObjIsActive()
|
||||
' imposto dimensioni griglia standard (non tavola)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
' ripristino selezioni precedenti
|
||||
For Each Id In Map.refShellNumberPanelVM.PrevSelObjs
|
||||
EgtSelectObj(Id)
|
||||
@@ -1774,6 +1778,8 @@ Public Class MySceneHostVM
|
||||
' eseguo comando
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||
Map.refFilledSolidPanelVM.ResetCPlaneObjIsActive()
|
||||
' imposto dimensioni griglia standard (non tavola)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
' ripristino selezioni precedenti
|
||||
For Each Id In Map.refFilledSolidPanelVM.PrevSelObjs
|
||||
EgtSelectObj(Id)
|
||||
|
||||
@@ -183,8 +183,7 @@ Public Class SecondaryWindowVM
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Sub CloseApplication(ByVal param As Object)
|
||||
If Map.refSliceManagerVM.bCalculating Then
|
||||
'MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End If
|
||||
Map.refMainWindowVM.CloseApplication()
|
||||
|
||||
@@ -600,6 +600,7 @@ Public Class ShellNumberPanelVM
|
||||
Friend Sub Dispose()
|
||||
' ripristino frame originale
|
||||
EgtSetGridFrame(m_OriginalGridFrame)
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
' se in modifica parametri
|
||||
If m_bMachParam_IsChecked Then
|
||||
' ripristino modalita' standard
|
||||
@@ -1081,6 +1082,7 @@ Public Class ShellNumberPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneTop(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1106,6 +1108,7 @@ Public Class ShellNumberPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneFront(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1131,6 +1134,7 @@ Public Class ShellNumberPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneRight(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1156,6 +1160,7 @@ Public Class ShellNumberPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBack(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1181,6 +1186,7 @@ Public Class ShellNumberPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneLeft(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1206,6 +1212,7 @@ Public Class ShellNumberPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBottom(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1232,6 +1239,7 @@ Public Class ShellNumberPanelVM
|
||||
Public Sub CPlaneElevation(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
|
||||
End Sub
|
||||
|
||||
@@ -1257,87 +1265,12 @@ Public Class ShellNumberPanelVM
|
||||
Public Sub CPlaneOrigin(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneOrigin
|
||||
|
||||
#Region "CPlaneRotate"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneRotate.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CPlaneRotate_Command As ICommand
|
||||
Get
|
||||
If m_cmdCPlaneRotate Is Nothing Then
|
||||
m_cmdCPlaneRotate = New Command(AddressOf CPlaneRotate)
|
||||
End If
|
||||
Return m_cmdCPlaneRotate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneRotate(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
|
||||
Else
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE3D)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneRotate
|
||||
|
||||
#Region "CPlane3P"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlane3P.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CPlane3P_Command As ICommand
|
||||
Get
|
||||
If m_cmdCPlane3P Is Nothing Then
|
||||
m_cmdCPlane3P = New Command(AddressOf CPlane3P)
|
||||
End If
|
||||
Return m_cmdCPlane3P
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlane3P(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlane3P
|
||||
|
||||
#Region "CPlanePerpObj"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlanePerpObj.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CPlanePerpObj_Command As ICommand
|
||||
Get
|
||||
If m_cmdCPlanePerpObj Is Nothing Then
|
||||
m_cmdCPlanePerpObj = New Command(AddressOf CPlanePerpObj)
|
||||
End If
|
||||
Return m_cmdCPlanePerpObj
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlanePerpObj(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlanePerpObj
|
||||
|
||||
#Region "CPlaneObj"
|
||||
|
||||
Private m_bCPlaneObj_IsActive As Boolean = False
|
||||
|
||||
@@ -23,6 +23,16 @@ Public Class MySimulation
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property VMillAdditiveMsg As String
|
||||
Get
|
||||
Return "Virtual Additive"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
@@ -57,12 +67,13 @@ Public Class MySimulation
|
||||
SetShowPlay(True)
|
||||
NotifyPropertyChanged("PlayPauseImage")
|
||||
End If
|
||||
' Se movimento non riuscito
|
||||
' Se movimento non riuscito
|
||||
Else
|
||||
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
|
||||
' Aggiornamenti per bottone Play/Pause
|
||||
SetShowPlay(True)
|
||||
NotifyPropertyChanged("PlayPauseImage")
|
||||
' Eventuale messaggio
|
||||
Select Case nMove
|
||||
Case MCH_SIM.END_
|
||||
StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 1) 'Simulazione completata
|
||||
@@ -71,14 +82,11 @@ Public Class MySimulation
|
||||
Case MCH_SIM.OUTSTROKE
|
||||
Dim sInfo As String = String.Empty
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
'MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ...
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ...
|
||||
Case MCH_SIM.DIR_ERR
|
||||
'MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile
|
||||
Case Else
|
||||
'MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Errore
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Errore
|
||||
End Select
|
||||
End If
|
||||
' Aggiorno stato visualizzazione macchina (dipende anche da utensile)
|
||||
@@ -107,6 +115,15 @@ Public Class MySimulation
|
||||
MachineAxisList(Index).IsReadOnlyAxesValue = True
|
||||
Next
|
||||
End If
|
||||
EgtSimSetUiStatus(GetStatus())
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VMillActiveInfoTitle(VMillActive As Boolean)
|
||||
If VMillActive Then
|
||||
EgtSetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, VMillActive)
|
||||
Else
|
||||
EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
@@ -67,6 +67,40 @@
|
||||
</Button>
|
||||
|
||||
</UniformGrid>
|
||||
<Grid DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:SimulationPanelV}}}"
|
||||
IsEnabled="{Binding MySimul.VMill_IsEnabled}"
|
||||
Margin="2.5"
|
||||
HorizontalAlignment="Center"
|
||||
Visibility="{Binding MySimul.VMill_Visibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox IsChecked="{Binding MySimul.VMillActive}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="2.5"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding MySimul.VMillAdditiveMsg}"
|
||||
Margin="2.5"
|
||||
Style="{StaticResource Simulation_TextBlock}"/>
|
||||
</Grid>
|
||||
<Grid DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:SimulationPanelV}}}"
|
||||
IsEnabled="{Binding MySimul.Trace_IsEnabled}"
|
||||
Margin="2.5"
|
||||
HorizontalAlignment="Center"
|
||||
Visibility="{Binding MySimul.Trace_Visibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox IsChecked="{Binding MySimul.TraceActive}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="2.5"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding MySimul.TraceMsg}"
|
||||
Margin="2.5"
|
||||
Style="{StaticResource Simulation_TextBlock}"/>
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding StatusMsg}"
|
||||
TextAlignment="Center"
|
||||
Margin="2.5"
|
||||
|
||||
@@ -20,6 +20,15 @@ Public Class SimulationPanelVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property VirtualAdditive_Msg As String
|
||||
Get
|
||||
Return "Virtual Additive"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
@@ -88,12 +97,10 @@ Public Class SimulationPanelVM
|
||||
If Not EgtSimInit() OrElse Not EgtSimStart() Then
|
||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||
'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
'MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
End If
|
||||
' Imposto stato corrente
|
||||
MySimul.SetSimulationStatus(MCH_SIM_ST.UI_STOP)
|
||||
@@ -103,6 +110,32 @@ Public Class SimulationPanelVM
|
||||
MySimul.SliderValue = SliderVal
|
||||
MySimul.ShowCncData()
|
||||
MySimul.StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 14) ' Home
|
||||
' Gestione check VMill
|
||||
If GetMainPrivateProfileInt(S_SIMUL, K_VIRTUALADDITIVE, 0) > 0 AndAlso
|
||||
EgtUILib.GetPrivateProfileInt( S_VMILL, K_VM_ENABLE, 0, CurrentMachine.sMachIniFile) > 0 Then
|
||||
MySimul.VMill_Visibility = Visibility.Visible
|
||||
MySimul.VMill_IsEnabled = True
|
||||
Dim bVal As Boolean
|
||||
MySimul.SetVMillActive( EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, bVal) AndAlso bVal)
|
||||
Else
|
||||
' Disabilito Vmill, ma inibisco dichiarazione progetto modificato
|
||||
MySimul.VMill_Visibility = Visibility.Collapsed
|
||||
MySimul.VMill_IsEnabled = False
|
||||
MySimul.VMillActive = False
|
||||
EgtDisableModified()
|
||||
EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM)
|
||||
EgtEnableModified()
|
||||
End If
|
||||
' Gestione check Trace
|
||||
If GetMainPrivateProfileInt(S_SIMUL, K_TRACEENABLE, 0) > 0 And
|
||||
EgtUILib.GetPrivateProfileInt(S_TOOLTRACE, K_TT_ENABLE, 0, CurrentMachine.sMachIniFile) > 0 Then
|
||||
MySimul.Trace_Visibility = Visibility.Visible
|
||||
MySimul.Trace_IsEnabled = True
|
||||
If MySimul.TraceActive Then MySimul.TraceActive = True
|
||||
Else
|
||||
MySimul.Trace_Visibility = Visibility.Collapsed
|
||||
MySimul.Trace_IsEnabled = False
|
||||
End If
|
||||
' nascondo slider strati e layer da visualizzare
|
||||
Map.refSliderManagerVM.SetSliderVisibility(False)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerVisibility(False)
|
||||
@@ -149,7 +182,7 @@ Public Class SimulationPanelVM
|
||||
' Abilito impostazione modificato
|
||||
EgtEnableModified()
|
||||
' Ripristino vista griglia
|
||||
EgtSetGridShow(True, True)
|
||||
EgtSetGridShow(OptionModule.m_bGridVisibility, OptionModule.m_bGridVisibility)
|
||||
' Cambio la vista della scena
|
||||
EgtSetGenericView(m_dPrevAngVertDegView, m_dPrevAngHorizDegView, False)
|
||||
EgtZoom(ZM.ALL)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Imports EgtUILib
|
||||
Imports Microsoft.Win32
|
||||
Imports System.IO
|
||||
Imports Ionic.Zip
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class SliceManagerVM
|
||||
Inherits VMBase
|
||||
@@ -322,8 +324,7 @@ Public Class SliceManagerVM
|
||||
End If
|
||||
EgtGetCurrFilePath(sCurrProject)
|
||||
If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then
|
||||
'MessageBox.Show("Save project before calculating slices!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Save project before calculating slices!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show("Save project before calculating slices!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return False
|
||||
End If
|
||||
' mostro barre di caricamento
|
||||
@@ -397,8 +398,7 @@ Public Class SliceManagerVM
|
||||
Map.refTopPanelVM.SelPart.RefreshPrintLayers()
|
||||
' in caso di errore, segnalazione
|
||||
If Not bOk Then
|
||||
'MessageBox.Show("Error in slicing! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Error in slicing! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show("Error in slicing! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
If bOk And m_bGenerate Then
|
||||
' verifico esistenza e correttezza machgroup
|
||||
@@ -426,8 +426,7 @@ Public Class SliceManagerVM
|
||||
Else
|
||||
sOut &= sMsg
|
||||
End If
|
||||
'MessageBox.Show(sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show(sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
End If
|
||||
' aggiorno tempo e massa
|
||||
@@ -457,6 +456,7 @@ Public Class SliceManagerVM
|
||||
' Definisco e posiziono il grezzo sulla tavola
|
||||
EgtAddMachGroup("3dPrint")
|
||||
EgtSetTable("Tab")
|
||||
EgtSetTableAreaOffset( 500, 500, 500, 500)
|
||||
For Each CurrPart In Map.refTopPanelVM.PartList
|
||||
Dim b3Part As New BBox3d
|
||||
Dim b3PrintSolid As New BBox3d
|
||||
@@ -484,8 +484,7 @@ Public Class SliceManagerVM
|
||||
EgtLuaCreateGlobTable("MACH")
|
||||
If Not EgtLuaExecFile(sInitMachScriptPath) Then
|
||||
EgtOutLog("Error executing Machining init script " & sInitMachScriptPath)
|
||||
'MessageBox.Show(EgtMsg(5463) & " " & sInitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5463) & " " & sInitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show(EgtMsg(5463) & " " & sInitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return False
|
||||
End If
|
||||
Dim nErr As Integer = 999
|
||||
@@ -504,8 +503,7 @@ Public Class SliceManagerVM
|
||||
EgtLuaCreateGlobTable("MACH")
|
||||
If Not EgtLuaExecFile(sExitMachScriptPath) Then
|
||||
EgtOutLog("Error executing Machining exit script " & sExitMachScriptPath)
|
||||
'MessageBox.Show(EgtMsg(5464) & " " & sExitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5464) & " " & sExitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show(EgtMsg(5464) & " " & sExitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return False
|
||||
End If
|
||||
Dim nErr As Integer = 999
|
||||
@@ -541,27 +539,23 @@ Public Class SliceManagerVM
|
||||
If m_bCalculating Then Return
|
||||
m_bCalculating = True
|
||||
If IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||
'MessageBox.Show("No parts to slice!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "No parts to slice!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show("No parts to slice!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
m_bCalculating = False
|
||||
Return
|
||||
End If
|
||||
If IsNothing(Map.refTopPanelVM.SelMaterial) Then
|
||||
'MessageBox.Show("No print material set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "No print material set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show("No print material set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
m_bCalculating = False
|
||||
Return
|
||||
End If
|
||||
If IsNothing(Map.refTopPanelVM.SelMachining) OrElse IsNothing(Map.refTopPanelVM.CurrMachining) OrElse Map.refTopPanelVM.CurrMachining.dCurrStrandH <= 0 Then
|
||||
'MessageBox.Show("No print parameters set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "No print parameters set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show("No print parameters set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
m_bCalculating = False
|
||||
Return
|
||||
End If
|
||||
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||
If Not String.IsNullOrWhiteSpace(CurrentMachine.sMachDataIniFile) AndAlso Not CurrentMachine.b3ExtrusionArea.EnclosesXY(b3Print) Then
|
||||
'MessageBox.Show("Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show("Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
m_bCalculating = False
|
||||
Return
|
||||
End If
|
||||
@@ -714,18 +708,34 @@ Public Class SliceManagerVM
|
||||
End If
|
||||
End If
|
||||
' eseguo calcoli
|
||||
CalcSlice(True, True)
|
||||
Dim bOk As Boolean = CalcSlice(True, True)
|
||||
' se non ho interrotto calcoli
|
||||
If Not m_bStopScriptToManage Then
|
||||
If bShiftPressed Then
|
||||
' Se esiste ne lancio l'editing
|
||||
If File.Exists(sIsoFilePath) Then
|
||||
If bOk AndAlso Not m_bStopScriptToManage Then
|
||||
' Se esiste l'iso
|
||||
If File.Exists(sIsoFilePath) Then
|
||||
If bShiftPressed Then
|
||||
' Se esiste ne lancio l'editing
|
||||
Process.Start("Notepad.exe", sIsoFilePath)
|
||||
' altrimenti lo segnalo
|
||||
Else
|
||||
'MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
|
||||
End If
|
||||
' verifico se creare pacchetto
|
||||
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.MACHINE_EXPORT) AndAlso
|
||||
GetMainPrivateProfileInt(S_GENERAL, K_MACHINEEXPORT, 1) > 0 Then
|
||||
If Not CreateProjectForMachine(sIsoFilePath) Then
|
||||
MessageBox.Show("Icrx file generation failed!!", "Error!", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
' riabilito ProjManager, TopPanel e uscita dal programma
|
||||
Map.refProjManagerVM.SetProjCmdIsEnabled(True)
|
||||
Map.refTopPanelVM.SetTopPanelIsEnabled(True)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(True)
|
||||
Map.refTFSEditorVM.SetTFSEditorIsEnabled(True)
|
||||
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
|
||||
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
|
||||
SetButtonsIsEnabled(True)
|
||||
End If
|
||||
Else
|
||||
' altrimenti lo segnalo
|
||||
MessageBox.Show("Part program generation failed!!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(Time_Visibility))
|
||||
NotifyPropertyChanged(NameOf(Mass_Visibility))
|
||||
@@ -735,6 +745,142 @@ Public Class SliceManagerVM
|
||||
m_bCalculating = False
|
||||
End Sub
|
||||
|
||||
Private Function CreateProjectForMachine(sIsoFilePath As String) As Boolean
|
||||
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
|
||||
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(False)
|
||||
Map.refTFSEditorVM.SetTFSEditorIsEnabled(False)
|
||||
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
|
||||
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
|
||||
SetButtonsIsEnabled(False)
|
||||
' creo cartella file da esportare in Temp
|
||||
Dim sExportTempFolderPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\MachineExport"
|
||||
If Directory.Exists(sExportTempFolderPath) Then
|
||||
Try
|
||||
Directory.Delete(sExportTempFolderPath, True)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error! Impossible deleting folder " & sExportTempFolderPath & "!")
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
Try
|
||||
Directory.CreateDirectory(sExportTempFolderPath)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error! Impossible creating folder " & sExportTempFolderPath & "!")
|
||||
Return False
|
||||
End Try
|
||||
' mostro solido per eportazione
|
||||
Dim SolidCheck As ViewLayer = Map.refViewLayerManagerVM.LayerList.FirstOrDefault(Function(x) x.Type = ViewLayer.ViewLayerType.SOLID_SLICE)
|
||||
Dim CurrSolidCheckValue As Boolean? = SolidCheck.bIsVisible
|
||||
If IsNothing(SolidCheck.bIsVisible) OrElse Not SolidCheck.bIsVisible Then
|
||||
SolidCheck.bIsVisible = True
|
||||
End If
|
||||
' esporto file progetto
|
||||
Dim sFileExtension As String
|
||||
If True Then
|
||||
sFileExtension = ".3dm"
|
||||
Else
|
||||
sFileExtension = ".3mf"
|
||||
End If
|
||||
Dim s3dFilePath As String = ""
|
||||
If Not Map.refSceneHostVM.ExportProjectForMachine(sExportTempFolderPath, True, s3dFilePath) Then
|
||||
EgtOutLog("Error! Impossible exporting 3mf file!")
|
||||
Return False
|
||||
End If
|
||||
'' esporto file 3mf
|
||||
'Dim s3mfPath As String = sExportTempFolderPath & "\ProjectSlice.3mf"
|
||||
'If Not Map.refSceneHostVM.ExportProjectForMachine(s3mfPath) Then
|
||||
' EgtOutLog("Error! Impossible exporting 3mf file!")
|
||||
' Return False
|
||||
'End If
|
||||
' creo file json
|
||||
Dim sProjName As String = ""
|
||||
EgtGetCurrFilePath(sProjName)
|
||||
Dim sJsonPath As String = sExportTempFolderPath & "\ProjectSlice.json"
|
||||
CreateJson(sJsonPath)
|
||||
' creo immagine preview
|
||||
Dim sPreviewImagePath As String = sExportTempFolderPath & "\ProjectSlice.png"
|
||||
CreatePreviewImage(sPreviewImagePath)
|
||||
' nascondo solido
|
||||
If IsNothing(CurrSolidCheckValue) OrElse Not CurrSolidCheckValue Then
|
||||
SolidCheck.bIsVisible = CurrSolidCheckValue
|
||||
End If
|
||||
' creo path dello zip
|
||||
Dim sZipPath As String = Path.ChangeExtension(sProjName, ".icrx")
|
||||
' se esiste gia' lo cancello
|
||||
If File.Exists(sZipPath) Then
|
||||
Try
|
||||
File.Delete(sZipPath)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error! Impossible deleting old icrx file!")
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
Try
|
||||
Using zip As New Ionic.Zip.ZipFile(sZipPath, Console.Out)
|
||||
zip.AlternateEncodingUsage = ZipOption.Always
|
||||
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||
zip.CompressionMethod = CompressionMethod.None
|
||||
' aggiungo file Iso
|
||||
zip.AddItem(sIsoFilePath, "").FileName = "ProjectSlice" & Path.GetExtension(sIsoFilePath)
|
||||
' aggiungo file 3mf
|
||||
zip.AddItem(s3dFilePath, "")
|
||||
' aggiungo json
|
||||
zip.AddItem(sJsonPath, "")
|
||||
' aggiungo immagine preview
|
||||
zip.AddItem(sPreviewImagePath, "")
|
||||
' salvo lo zip
|
||||
zip.Save()
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error! Icrx file generation failed!!")
|
||||
Return False
|
||||
End Try
|
||||
' elimino tutti i file temporanei creati
|
||||
If Directory.Exists(sExportTempFolderPath) Then
|
||||
Directory.Delete(sExportTempFolderPath, True)
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function CreateJson(sJsonPath As String) As Boolean
|
||||
' creo json
|
||||
Dim JsonMain As New JsonMain(m_dTime, m_dMass)
|
||||
Dim json As String = JsonConvert.SerializeObject(JsonMain, Formatting.Indented)
|
||||
If File.Exists(sJsonPath) Then
|
||||
Try
|
||||
File.Delete(sJsonPath)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error! Impossible deleting file " & sJsonPath & "!")
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
Try
|
||||
File.AppendAllText(sJsonPath, json)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error! Impossible writing json file " & sJsonPath & "!")
|
||||
Return False
|
||||
End Try
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function CreatePreviewImage(sPreviewImagePath As String) As Boolean
|
||||
' recupero posizione vista corrente
|
||||
Dim nCurrAngVertDeg As Integer = 0
|
||||
Dim nCurrAngHorizDeg As Integer = 0
|
||||
EgtGetGenericView(nCurrAngVertDeg, nCurrAngHorizDeg)
|
||||
EgtSetView(VT.ISO_SW, False)
|
||||
SetTableVisibility(False)
|
||||
EgtZoom(ZM.ALL, False)
|
||||
'EgtExportSvg(GDB_ID.ROOT, sPreviewImagePath)
|
||||
EgtGetImage(SM.SHADING, New Color3d(255, 255, 255, 255), New Color3d(255, 255, 255, 255), 3000, 3000, sPreviewImagePath)
|
||||
EgtSetGenericView(nCurrAngVertDeg, nCurrAngHorizDeg, False)
|
||||
SetTableVisibility(True)
|
||||
EgtZoom(ZM.ALL, True)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' Generate
|
||||
|
||||
#Region "Simulate"
|
||||
|
||||
@@ -484,6 +484,7 @@ Public Class StartMachPanelVM
|
||||
Friend Sub Dispose()
|
||||
' ripristino frame originale
|
||||
EgtSetGridFrame(m_OriginalGridFrame)
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
EgtDeselectAll()
|
||||
EgtDraw()
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
@@ -779,6 +780,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneTop(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -804,6 +806,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneFront(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -829,6 +832,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneRight(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -854,6 +858,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBack(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -879,6 +884,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneLeft(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -904,6 +910,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBottom(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -930,6 +937,7 @@ Public Class StartMachPanelVM
|
||||
Public Sub CPlaneElevation(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
|
||||
End Sub
|
||||
|
||||
@@ -955,6 +963,7 @@ Public Class StartMachPanelVM
|
||||
Public Sub CPlaneOrigin(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -25,11 +25,13 @@ Public Class MyStatusBarVM
|
||||
Set(value As Boolean)
|
||||
If Map.refRibPanelVM.bGrid_IsChecked Or Map.refStartMachPanelVM.bGrid_IsChecked Or Map.refShellNumberPanelVM.bGrid_IsChecked Then Return
|
||||
m_bGridVisibility = value
|
||||
OptionModule.m_bGridVisibility = m_bGridVisibility
|
||||
EgtSetGridShow(value, value)
|
||||
EgtDraw()
|
||||
Map.refRibPanelVM.NotifyPropertyChanged(NameOf(Map.refRibPanelVM.bGrid_IsEnabled))
|
||||
Map.refStartMachPanelVM.NotifyPropertyChanged(NameOf(Map.refStartMachPanelVM.bGrid_IsEnabled))
|
||||
Map.refRibPanelVM.NotifyPropertyChanged(NameOf(Map.refRibPanelVM.bGrid_IsEnabled))
|
||||
Map.refShellNumberPanelVM.NotifyPropertyChanged(NameOf(Map.refShellNumberPanelVM.bGrid_IsEnabled))
|
||||
Map.refFilledSolidPanelVM.NotifyPropertyChanged(NameOf(Map.refFilledSolidPanelVM.bGrid_IsEnabled))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -117,7 +119,7 @@ Public Class MyStatusBarVM
|
||||
' Installo funzione output testo su status per lua
|
||||
EgtSetOutText(m_OutTextCallback)
|
||||
' imposto stato di visualizzazione della griglia
|
||||
m_bGridVisibility = GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0
|
||||
m_bGridVisibility = OptionModule.m_bGridVisibility
|
||||
NotifyPropertyChanged(NameOf(bGridVisibility))
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -962,4 +962,8 @@ Public Class TFSLayer
|
||||
Return If(dHours > 0, dHours.ToString("00") & ":", "") & If(dHours > 0, dMinutes.ToString("00"), dMinutes.ToString()) & ":" & dSeconds.ToString("00")
|
||||
End Function
|
||||
|
||||
End Class
|
||||
Friend Function ConvertToJsonLayer() As JsonLayer
|
||||
Return New JsonLayer(nIndex, dLength, dTMin, m_dTTrg, dTMax, dTCurr, m_dTWait, dFCurr, m_dFTrg, m_dFMax, m_dFCurr, dSpeed)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -626,15 +626,6 @@ Public Class TopPanelVM
|
||||
' rinomino pezzo e layer
|
||||
Dim nPartId As Integer = EgtGetLastPart()
|
||||
EgtSetName(nPartId, PART)
|
||||
'Dim nLayerId As Integer = EgtGetFirstInGroup(nPartId)
|
||||
'EgtSetName(nLayerId, ORIGINAL_SOLID)
|
||||
|
||||
'' Recupero o creo layer ausiliario
|
||||
'Dim nAuxId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_AUX)
|
||||
'If Not nAuxId Then
|
||||
' nAuxId = EgtCreateGroup(nPartId)
|
||||
' EgtSetName(nAuxId, LAY_AUX)
|
||||
'End If
|
||||
|
||||
' Richiedo posizione origine e offset pezzo
|
||||
Dim b3Part As New BBox3d
|
||||
@@ -643,24 +634,6 @@ Public Class TopPanelVM
|
||||
Dim nRefY As Integer = 1
|
||||
Dim dPosX As Double = CurrentMachine.b3Tab.DimX / 2 - b3Part.DimX / 2
|
||||
Dim dPosY As Double = CurrentMachine.b3Tab.DimY / 2 - b3Part.DimY / 2
|
||||
' Dim Positions = EgtDialogBox( 'Part position on table:', { 'Reference', 'CB:Left,Center,Right'},
|
||||
' { '', 'CB:Bottom,Middle,Top'},
|
||||
' { 'X', EgtNumToString( EgtToUiUnits( dPosX), 1)},
|
||||
' { 'Y', EgtNumToString( EgtToUiUnits( dPosY), 1)})
|
||||
|
||||
'Dim ChooseReferenceWndVM As New ChooseReferenceWndVM
|
||||
'Dim ChooseReferenceWndV As New ChooseReferenceWndV(Application.Current.MainWindow, ChooseReferenceWndVM)
|
||||
'If Not ChooseReferenceWndV.ShowDialog() Then Return
|
||||
|
||||
'Dim gg = ChooseReferenceWndVM.SelReference
|
||||
'' Aggiungo il box del solido
|
||||
'Dim nBoxId As Integer = EgtSurftmb(nAuxId, b3Solid, False, GDB_RT.GLOB)
|
||||
|
||||
'' posiziono il pezzo al centro
|
||||
'Dim b3Part As New BBox3d
|
||||
'EgtGetBBoxGlob(nPartId, GDB_BB.EXACT, b3Part)
|
||||
'Dim dPosX As Double = (CurrentMachine.b3Tab.DimX() / 2) - (b3Part.DimX() / 2)
|
||||
'Dim dPosY As Double = (CurrentMachine.b3Tab.DimY() / 2) - (b3Part.DimY() / 2)
|
||||
|
||||
' Posiziono il pezzo e aggiorno il suo box
|
||||
Dim vtMove As Vector3d = New Point3d(dPosX, dPosY, 0) - b3Part.Min()
|
||||
@@ -677,6 +650,7 @@ Public Class TopPanelVM
|
||||
|
||||
EgtAddMachGroup("3dPrint")
|
||||
EgtSetTable("Tab")
|
||||
EgtSetTableAreaOffset( 500, 500, 500, 500)
|
||||
|
||||
Dim nRawId As Integer = EgtAddRawPart(b3Part.Min, b3Part.DimX, b3Part.DimY, b3Part.DimZ, New Color3d(128, 128, 128, 30))
|
||||
EgtAddPartToRawPart(nPartId, b3Part.Min, nRawId)
|
||||
@@ -772,8 +746,7 @@ Public Class TopPanelVM
|
||||
Public Sub Machining()
|
||||
If IsNothing(m_SelPart) OrElse IsNothing(CurrMachining) Then Return
|
||||
If IsNothing(m_SelMachining) Then
|
||||
'MessageBox.Show("Select current Db Machining first!", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Select current Db Machining first!", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
MessageBox.Show("Select current Db Machining first!", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Return
|
||||
End If
|
||||
SelPage = Pages.CURRMACHINING
|
||||
|
||||
@@ -131,7 +131,7 @@ Public Module CurrentMachine
|
||||
Public Sub CreateMachineTable()
|
||||
' Disabilito segnalazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
Dim dTabX = b3Tab.DimX
|
||||
Dim dTabX = b3Tab.DimX()
|
||||
Dim dTabY = b3Tab.DimY()
|
||||
' Disegno tavola
|
||||
Dim nTabPartId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||
@@ -150,12 +150,19 @@ Public Module CurrentMachine
|
||||
EgtSetInfo(nTabPartId, KEY_MATERIAL_GUID, Map.refTopPanelVM.SelMaterial.sGUID)
|
||||
EgtSetInfo(nTabPartId, KEY_MATERIAL_NAME, Map.refTopPanelVM.SelMaterial.sName)
|
||||
End If
|
||||
'' creo area di estrusione
|
||||
' creo area di estrusione
|
||||
UpdateExtrusionArea()
|
||||
' imposto dati griglia (primi tre parametri -1 indica tieni i correnti)
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, dTabX, 0, dTabY)
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
End Sub
|
||||
|
||||
Public Sub SetTableVisibility(IsVisible As Boolean)
|
||||
Dim nTableLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
||||
EgtSetStatus(nTableLayerId, If(IsVisible, GDB_ST.ON_, GDB_ST.OFF))
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateExtrusionArea()
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
' recupero eventuale vecchia area di estrusione
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
xmlns:PrintApp="clr-namespace:Icarus"
|
||||
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtWPFLib48="clr-namespace:EgtWPFLib48;assembly=EgtWPFLib48"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
>
|
||||
@@ -931,15 +932,7 @@
|
||||
|
||||
<Style x:Key="ParameterList_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource BaseTextBox}">
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ColorPicker_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource BaseTextBox}">
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="Width" Value="65"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ParameterList_TextBox2" TargetType="{x:Type EgtWPFLib5:EgtTextBox2}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox2}}">
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="ExplicitUpdateSource" Value="EnterKeyPressOrLostFocus"/>
|
||||
@@ -4417,8 +4410,7 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock x:Name="PART_MoveRectangle"
|
||||
Text="{TemplateBinding Title}"
|
||||
<TextBlock Text="{TemplateBinding Title}"
|
||||
Grid.Column="1"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
HorizontalAlignment="Stretch"
|
||||
@@ -4451,92 +4443,6 @@
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--EgtHexagon-->
|
||||
|
||||
<PrintApp:HexClipConverter x:Key="ClipConverter"/>
|
||||
|
||||
<Style TargetType="{x:Type PrintApp:EgtHexItem}" x:Key="EgtHexItem">
|
||||
<Setter Property="Background" Value="CornflowerBlue"/>
|
||||
<Setter Property="BorderBrush" Value="Black"/>
|
||||
<Setter Property="BorderThickness" Value="1.5"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="PrintApp:EgtHexItem">
|
||||
<Grid Name="hexBorder" Background="{TemplateBinding BorderBrush}">
|
||||
<Grid.Clip>
|
||||
<MultiBinding Converter="{StaticResource ClipConverter}">
|
||||
<Binding Path="ActualWidth" ElementName="hexBorder"/>
|
||||
<Binding Path="ActualHeight" ElementName="hexBorder"/>
|
||||
<Binding Path="Orientation" RelativeSource="{RelativeSource TemplatedParent}"/>
|
||||
</MultiBinding>
|
||||
</Grid.Clip>
|
||||
|
||||
<Grid Name="hexContent"
|
||||
Background="{TemplateBinding Background}"
|
||||
Margin="{TemplateBinding BorderThickness}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<Grid.Clip>
|
||||
<MultiBinding Converter="{StaticResource ClipConverter}">
|
||||
<Binding Path="ActualWidth" ElementName="hexContent"/>
|
||||
<Binding Path="ActualHeight" ElementName="hexContent"/>
|
||||
<Binding Path="Orientation" RelativeSource="{RelativeSource TemplatedParent}"/>
|
||||
</MultiBinding>
|
||||
</Grid.Clip>
|
||||
|
||||
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
ClipToBounds="True"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="BorderBrush" Value="Gold"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--HexList-->
|
||||
<Style TargetType="{x:Type PrintApp:EgtHexList}" x:Key="EgtHexList">
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<PrintApp:EgtHexagon ColumnCount="{Binding Path=ColumnCount, RelativeSource={RelativeSource AncestorType=ListBox}}"
|
||||
RowCount="{Binding Path=RowCount, RelativeSource={RelativeSource AncestorType=ListBox}}"
|
||||
Background="{Binding Path=Background, RelativeSource={RelativeSource AncestorType=ListBox}}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type PrintApp:EgtHexList}">
|
||||
<Grid>
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}"
|
||||
Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
||||
<ScrollViewer Focusable="False"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--EgtMainWindow-->
|
||||
<!--
|
||||
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
Imports EgtUILib.EgtInterface
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class JsonMain
|
||||
|
||||
Private m_StrandW As Double
|
||||
Public ReadOnly Property StrandW As Double
|
||||
Get
|
||||
Return m_StrandW
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_StrandH As Double
|
||||
Public ReadOnly Property StrandH As Double
|
||||
Get
|
||||
Return m_StrandH
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_BoxX As Double
|
||||
Public ReadOnly Property BoxX As Double
|
||||
Get
|
||||
Return m_BoxX
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_BoxY As Double
|
||||
Public ReadOnly Property BoxY As Double
|
||||
Get
|
||||
Return m_BoxY
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_BoxZ As Double
|
||||
Public ReadOnly Property BoxZ As Double
|
||||
Get
|
||||
Return m_BoxZ
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dTime As Double
|
||||
Public ReadOnly Property dTime As Double
|
||||
Get
|
||||
Return m_dTime
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dMass As Double = 0
|
||||
Public ReadOnly Property dMass As Double
|
||||
Get
|
||||
Return m_dMass
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_LayerQty As Double
|
||||
Public ReadOnly Property LayerQty As Double
|
||||
Get
|
||||
Return m_LayerQty
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_MaterialName As String
|
||||
Public ReadOnly Property MaterialName As String
|
||||
Get
|
||||
Return m_MaterialName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_JsonLayerList As New List(Of JsonLayer)
|
||||
Public ReadOnly Property JsonLayerList As List(Of JsonLayer)
|
||||
Get
|
||||
Return m_JsonLayerList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(dTime As Double, dMass As Double)
|
||||
For Each Layer In Map.refTFSEditorVM.LayerList
|
||||
m_JsonLayerList.Add(Layer.ConvertToJsonLayer())
|
||||
Next
|
||||
m_MaterialName = Map.refTopPanelVM.SelMaterial.sName
|
||||
Dim GeneralCathegory As MachiningCathegory = Map.refCurrMachiningPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
|
||||
If Not IsNothing(GeneralCathegory) Then
|
||||
Dim StrandW As CurrNumericMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDW)
|
||||
Dim StrandH As CurrNumericMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDH)
|
||||
If Not IsNothing(StrandW) Then
|
||||
m_StrandW = StrandW.dValue
|
||||
End If
|
||||
If Not IsNothing(StrandH) Then
|
||||
m_StrandH = StrandH.dValue
|
||||
End If
|
||||
End If
|
||||
m_dTime = dTime
|
||||
m_dMass = dMass
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||
m_BoxX = b3Print.DimX
|
||||
m_BoxY = b3Print.DimY
|
||||
m_BoxZ = b3Print.DimZ
|
||||
End If
|
||||
m_LayerQty = Map.refSliderManagerVM.nLayerIndex_Maximum
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class JsonLayer
|
||||
Private m_nIndex As Integer
|
||||
Public ReadOnly Property Index As Integer
|
||||
Get
|
||||
Return m_nIndex
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dLength As Double
|
||||
Public ReadOnly Property Length As Double
|
||||
Get
|
||||
Return m_dLength
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dTMin As Double
|
||||
Public ReadOnly Property TMin As Double
|
||||
Get
|
||||
Return m_dTMin
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dTTrg As Double
|
||||
Public ReadOnly Property TTrg As Double
|
||||
Get
|
||||
Return m_dTTrg
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dTMax As Double
|
||||
Public ReadOnly Property TMax As Double
|
||||
Get
|
||||
Return m_dTMax
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dTCurr As Double
|
||||
Public ReadOnly Property TCurr As Double
|
||||
Get
|
||||
Return m_dTCurr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dTWait As Double
|
||||
Public ReadOnly Property TWait As Double
|
||||
Get
|
||||
Return m_dTWait
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dFMin As Double
|
||||
Public ReadOnly Property FMin As Double
|
||||
Get
|
||||
Return m_dFMin
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dFTrg As Double
|
||||
Public ReadOnly Property FTrg As Double
|
||||
Get
|
||||
Return m_dFTrg
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dFMax As Double
|
||||
Public ReadOnly Property FMax As Double
|
||||
Get
|
||||
Return m_dFMax
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dFCurr As Double
|
||||
Public ReadOnly Property FCurr As Double
|
||||
Get
|
||||
Return m_dFCurr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dSpeed As Double
|
||||
Public ReadOnly Property Speed As Double
|
||||
Get
|
||||
Return m_dSpeed
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(nIndex As Integer, dLength As Double, dTMin As Double, dTTrg As Double, dTMax As Double, dTCurr As Double, dTWait As Double, dFMin As Double, dFTrg As Double, dFMax As Double, dFCurr As Double, dSpeed As Double)
|
||||
m_nIndex = nIndex
|
||||
m_dLength = dLength
|
||||
m_dTMin = dTMin
|
||||
m_dTTrg = dTTrg
|
||||
m_dTMax = dTMax
|
||||
m_dTCurr = dTCurr
|
||||
m_dTWait = dTWait
|
||||
m_dFMin = dFMin
|
||||
m_dFTrg = dFTrg
|
||||
m_dFMax = dFMax
|
||||
m_dFCurr = dFCurr
|
||||
m_dSpeed = dSpeed
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -115,4 +115,18 @@ Module LuaExec
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ExecPrepare3dmExport(ByRef nExportGeomId As Integer) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
EgtLuaCreateGlobTable("PRINT")
|
||||
EgtLuaSetGlobStringVar("PRINT.BASEDIR", Map.refMainWindowVM.MainWindowM.s3dPrintingDir)
|
||||
bOk = EgtLuaExecFile(Map.refMainWindowVM.MainWindowM.s3dPrintingDir & "\PrepareExport.lua")
|
||||
If bOk Then
|
||||
EgtLuaGetGlobIntVar("PRINT.EXPORTLAYER", nExportGeomId)
|
||||
End If
|
||||
' Cancello tavola globale
|
||||
EgtLuaResetGlobVar("PRINT")
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
|
||||
End Module
|
||||
|
||||
@@ -35,7 +35,7 @@ Public Class ViewLayerManagerVM
|
||||
End Sub
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in EgtCAM5Map
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefViewLayerManagerVM(Me)
|
||||
m_LayerList = New ObservableCollection(Of ViewLayer)({New ViewLayer(ViewLayer.ViewLayerType.PRINT_SOLID, "Print", True),
|
||||
New ViewLayer(ViewLayer.ViewLayerType.REFERENCE, "Origin Point", True),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Ionic.Zip" version="1.9.1.8" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
|
||||
</packages>
|
||||