311 lines
9.5 KiB
VB.net
311 lines
9.5 KiB
VB.net
Imports EgtWPFLib5
|
|
Imports EgtPHOTOLib
|
|
Imports EgtUILib
|
|
|
|
Module OmagOFFICEMap
|
|
|
|
Friend StopWatch As Stopwatch
|
|
|
|
Friend Sub TimeSpanInit()
|
|
StopWatch = New Stopwatch
|
|
StopWatch.Start()
|
|
End Sub
|
|
|
|
Friend Function TimeSpanEnd() As String
|
|
Dim sTime As String = ""
|
|
If Not IsNothing(StopWatch) Then
|
|
StopWatch.Stop()
|
|
Dim ts As TimeSpan = StopWatch.Elapsed
|
|
sTime = String.Format("{0:00}:{1:00}:{2:00}.{3:000}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds)
|
|
End If
|
|
Return sTime
|
|
End Function
|
|
|
|
Private m_refMainWindowVM As MainWindowVM
|
|
Private m_refTopCommandBarVM As TopCommandBarVM
|
|
Private m_refProjectVM As ProjectVM
|
|
Private m_refVeinMatchPanelVM As VeinMatchPanelVM
|
|
Private m_refMachinePanelVM As MyMachinePanelVM
|
|
Private m_refOptionPanelVM As OptionPanelVM
|
|
Private m_refRawPartTabVM As RawPartTabVM
|
|
Private m_refNestingTabVM As NestingTabVM
|
|
Private m_refMachiningTabVM As MachiningTabVM
|
|
Private m_refSplitModeVM As SplitModeVM
|
|
Private m_refMoveRawModeVM As MoveRawModeVM
|
|
Private m_refSimulTabVM As SimulTabVM
|
|
|
|
Private m_refSceneHostVM As SceneHostVM
|
|
|
|
#Region "Get"
|
|
|
|
Public ReadOnly Property refMainWindowVM As MainWindowVM
|
|
Get
|
|
Return m_refMainWindowVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refStatusBarVM As StatusBarVM
|
|
Get
|
|
Return LibMap.refStatusBarVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refTopCommandBarVM As TopCommandBarVM
|
|
Get
|
|
Return m_refTopCommandBarVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refProjectVM As ProjectVM
|
|
Get
|
|
Return m_refProjectVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refSceneHostVM As SceneHostVM
|
|
Get
|
|
' bisogna usare la nuova funzione dell'EgtWPFLib5 che gestisce le liste di scene
|
|
If IsNothing(m_refSceneHostVM) Then
|
|
m_refSceneHostVM = LibMap.refSceneHostVM
|
|
End If
|
|
Return m_refSceneHostVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refShowPanelVM As ShowPanelVM
|
|
Get
|
|
Return LibMap.refShowPanelVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refVeinMatchPanelVM As VeinMatchPanelVM
|
|
Get
|
|
Return m_refVeinMatchPanelVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refMachinePanelVM As MyMachinePanelVM
|
|
Get
|
|
Return m_refMachinePanelVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refMachGroupPanelVM As MyMachGroupPanelVM
|
|
Get
|
|
Return DirectCast(LibMap.refMachGroupPanelVM, MyMachGroupPanelVM)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refOptionPanelVM As OptionPanelVM
|
|
Get
|
|
Return m_refOptionPanelVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refRawPartTabVM As RawPartTabVM
|
|
Get
|
|
Return m_refRawPartTabVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refNestingTabVM As NestingTabVM
|
|
Get
|
|
Return m_refNestingTabVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refMachiningTabVM As MachiningTabVM
|
|
Get
|
|
Return m_refMachiningTabVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refSplitModeVM As SplitModeVM
|
|
Get
|
|
Return m_refSplitModeVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refMoveRawModeVM As MoveRawModeVM
|
|
Get
|
|
Return m_refMoveRawModeVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refSimulTabVM As SimulTabVM
|
|
Get
|
|
Return m_refSimulTabVM
|
|
End Get
|
|
End Property
|
|
|
|
'Public ReadOnly Property refProjectVM As ProjectLibVM
|
|
' Get
|
|
' Return PhotoMap.refProjectVM
|
|
' End Get
|
|
'End Property
|
|
|
|
'Public ReadOnly Property refOptionPanelVM As OptionPanelLibVM
|
|
' Get
|
|
' Return PhotoMap.refOptionPanelVM
|
|
' End Get
|
|
'End Property
|
|
|
|
Public ReadOnly Property refListPageVM As ListPageSlabVM
|
|
Get
|
|
Return PhotoMap.refListPageVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refDetailPageVM As DetailPageSlabVM
|
|
Get
|
|
Return PhotoMap.refDetailPageVM
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property refSearchPanelVM As SearchPanelSlabVM
|
|
Get
|
|
Return PhotoMap.refSearchPanelVM
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' Get
|
|
|
|
#Region "Set"
|
|
|
|
Friend Function SetRefStatusBarVM(StatusBarVM As StatusBarVM) As Boolean
|
|
LibMap.SetRefStatusBarVM(StatusBarVM)
|
|
Return Not IsNothing(LibMap.refStatusBarVM)
|
|
End Function
|
|
|
|
Friend Function SetRefTopCommandBarVM(TopCommandBarVM As TopCommandBarVM) As Boolean
|
|
m_refTopCommandBarVM = TopCommandBarVM
|
|
Return Not IsNothing(m_refTopCommandBarVM)
|
|
End Function
|
|
|
|
Friend Function SetRefProjectVM(ProjectVM As ProjectVM) As Boolean
|
|
m_refProjectVM = ProjectVM
|
|
Return Not IsNothing(m_refProjectVM)
|
|
End Function
|
|
|
|
Friend Function SetRefSceneHostVM(SceneHostVM As SceneHostVM) As Boolean
|
|
LibMap.SetRefSceneHostVM(SceneHostVM)
|
|
Return Not IsNothing(LibMap.refSceneHostVM)
|
|
End Function
|
|
|
|
Friend Function SetRefShowPanelVM(ShowPanelVM As ShowPanelVM) As Boolean
|
|
LibMap.SetRefShowPanelVM(ShowPanelVM)
|
|
Return Not IsNothing(LibMap.refShowPanelVM)
|
|
End Function
|
|
|
|
Friend Function SetRefVeinMatchPanelVM(VeinMatchPanelVM As VeinMatchPanelVM) As Boolean
|
|
m_refVeinMatchPanelVM = VeinMatchPanelVM
|
|
Return Not IsNothing(m_refVeinMatchPanelVM)
|
|
End Function
|
|
|
|
Friend Function SetRefMachinePanelVM(MachinePanelVM As MyMachinePanelVM) As Boolean
|
|
m_refMachinePanelVM = MachinePanelVM
|
|
Return Not IsNothing(m_refMachinePanelVM)
|
|
End Function
|
|
|
|
Friend Function SetRefMachGroupPanelVM(MachGroupPanelVM As MyMachGroupPanelVM) As Boolean
|
|
LibMap.setrefMachGroupPanelVM(MachGroupPanelVM)
|
|
Return Not IsNothing(LibMap.refMachGroupPanelVM)
|
|
End Function
|
|
|
|
Friend Function SetRefOptionPanelVM(OptionPanelVM As OptionPanelVM) As Boolean
|
|
m_refOptionPanelVM = OptionPanelVM
|
|
Return Not IsNothing(m_refOptionPanelVM)
|
|
End Function
|
|
|
|
Friend Function SetRefRawPartTabVM(RawPartTabVM As RawPartTabVM) As Boolean
|
|
m_refRawPartTabVM = RawPartTabVM
|
|
Return Not IsNothing(m_refRawPartTabVM)
|
|
End Function
|
|
|
|
Friend Function SetRefNestingTabVM(NestingTabVM As NestingTabVM) As Boolean
|
|
m_refNestingTabVM = NestingTabVM
|
|
Return Not IsNothing(m_refNestingTabVM)
|
|
End Function
|
|
|
|
Friend Function SetRefMachiningTabVM(MachiningTabVM As MachiningTabVM) As Boolean
|
|
m_refMachiningTabVM = MachiningTabVM
|
|
Return Not IsNothing(m_refMachiningTabVM)
|
|
End Function
|
|
|
|
Friend Function SetRefSplitModeVM(SplitModeVM As SplitModeVM) As Boolean
|
|
m_refSplitModeVM = SplitModeVM
|
|
Return Not IsNothing(m_refSplitModeVM)
|
|
End Function
|
|
|
|
Friend Function SetRefMoveRawModeVM(MoveRawModeVM As MoveRawModeVM) As Boolean
|
|
m_refMoveRawModeVM = MoveRawModeVM
|
|
Return Not IsNothing(m_refMoveRawModeVM)
|
|
End Function
|
|
|
|
Friend Function SetRefSimulTabVM(SimulTabVM As SimulTabVM) As Boolean
|
|
m_refSimulTabVM = SimulTabVM
|
|
Return Not IsNothing(m_refSimulTabVM)
|
|
End Function
|
|
|
|
|
|
Private m_refProjectV As ProjectV
|
|
Friend Sub SetRefProjectV(ProjectV As ProjectV)
|
|
m_refProjectV = ProjectV
|
|
End Sub
|
|
|
|
Private m_WidthProjectV As Integer = 2000
|
|
Friend Sub SetWidthDimProjectV(Width As Integer)
|
|
m_WidthProjectV = Width
|
|
End Sub
|
|
Friend Function GetWidthDimProjectV() As Integer
|
|
If Not IsNothing(m_refProjectV) Then
|
|
Try
|
|
m_WidthProjectV = CInt(m_refProjectV.ActualWidth)
|
|
Catch ex As Exception
|
|
EgtOutLog(ex.Message)
|
|
End Try
|
|
End If
|
|
Return m_WidthProjectV
|
|
End Function
|
|
|
|
Private m_HeightProjectV As Integer = 1000
|
|
Friend Sub SetHeightDimProjectV(Eight As Integer)
|
|
m_HeightProjectV = Eight
|
|
End Sub
|
|
|
|
Friend Function GetHeightDimProjectV() As Integer
|
|
If Not IsNothing(m_refProjectV) Then
|
|
Try
|
|
m_HeightProjectV = CInt(m_refProjectV.ActualHeight)
|
|
Catch ex As Exception
|
|
EgtOutLog(ex.Message)
|
|
End Try
|
|
End If
|
|
Return m_HeightProjectV
|
|
End Function
|
|
|
|
#End Region ' Set
|
|
|
|
#Region "Init"
|
|
|
|
Friend Function BeginInit(MainWindowVM As MainWindowVM) As Boolean
|
|
m_refMainWindowVM = MainWindowVM
|
|
Return Not IsNothing(m_refMainWindowVM)
|
|
End Function
|
|
Friend Function EndInit() As Boolean
|
|
' Verifico se tutti i pezzi necessari sono stati caricati
|
|
Return Not IsNothing(m_refMainWindowVM) AndAlso Not IsNothing(m_refProjectVM) AndAlso
|
|
Not IsNothing(LibMap.refStatusBarVM) AndAlso Not IsNothing(m_refTopCommandBarVM) AndAlso
|
|
Not IsNothing(LibMap.refSceneHostVM) AndAlso Not IsNothing(LibMap.refShowPanelVM) AndAlso
|
|
Not IsNothing(m_refVeinMatchPanelVM) AndAlso
|
|
Not IsNothing(m_refMachinePanelVM) AndAlso Not IsNothing(LibMap.refMachGroupPanelVM) AndAlso
|
|
Not IsNothing(m_refOptionPanelVM) AndAlso Not IsNothing(m_refRawPartTabVM) AndAlso
|
|
Not IsNothing(m_refNestingTabVM) AndAlso Not IsNothing(m_refSimulTabVM) AndAlso
|
|
Not IsNothing(m_refMachiningTabVM) AndAlso
|
|
LibMap.EndInit() AndAlso PhotoMap.ContinueApplication
|
|
End Function
|
|
|
|
#End Region ' Init
|
|
|
|
End Module
|