Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b272f1f2bb | |||
| a1c3a9fb30 | |||
| 799c0530be | |||
| 6cea8cbcf8 | |||
| 85827e5d29 | |||
| 96432122a2 | |||
| 6e55664281 | |||
| b348229691 | |||
| 8d20b2f190 |
@@ -5,6 +5,14 @@
|
|||||||
Protected Overrides Sub OnStartup(e As StartupEventArgs)
|
Protected Overrides Sub OnStartup(e As StartupEventArgs)
|
||||||
MyBase.OnStartup(e)
|
MyBase.OnStartup(e)
|
||||||
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
||||||
|
If e.Args.Count = 0 Then
|
||||||
|
' creo finestra SplashScreen
|
||||||
|
Dim SplashScreen As New SplashScreen
|
||||||
|
Me.MainWindow = SplashScreen
|
||||||
|
Me.MainWindow.Show()
|
||||||
|
Map.SetRefSplashScreen(SplashScreen)
|
||||||
|
End If
|
||||||
|
|
||||||
' Creo la View principale
|
' Creo la View principale
|
||||||
Me.MainWindow = New MainWindowV
|
Me.MainWindow = New MainWindowV
|
||||||
' Mostro la View principale
|
' Mostro la View principale
|
||||||
|
|||||||
+13
-1
@@ -240,6 +240,9 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Special-3dPrinting\Printing3DPanelVM.vb" />
|
<Compile Include="Special-3dPrinting\Printing3DPanelVM.vb" />
|
||||||
<Compile Include="Special-3dPrinting\Printing3DUtility.vb" />
|
<Compile Include="Special-3dPrinting\Printing3DUtility.vb" />
|
||||||
|
<Compile Include="SplashScreen\SplashScreen.xaml.vb">
|
||||||
|
<DependentUpon>SplashScreen.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="StartMachPanel\StartMachPanelV.xaml.vb">
|
<Compile Include="StartMachPanel\StartMachPanelV.xaml.vb">
|
||||||
<DependentUpon>StartMachPanelV.xaml</DependentUpon>
|
<DependentUpon>StartMachPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -429,6 +432,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="SplashScreen\SplashScreen.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="StartMachPanel\StartMachPanelV.xaml">
|
<Page Include="StartMachPanel\StartMachPanelV.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -633,7 +640,12 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\TopPanel\Edit.png" />
|
<Resource Include="Resources\TopPanel\Edit.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SplashScreen\GoldSplashscreen.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SplashScreen\LogoEgalware.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR64.exe
|
<PostBuildEvent>IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR64.exe
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ Public Class ProjManagerVM
|
|||||||
OpenProject(Nothing)
|
OpenProject(Nothing)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub OpenProject(sFilePath As String)
|
Friend Function OpenProject(sFilePath As String) As Boolean
|
||||||
If String.IsNullOrEmpty(sFilePath) Then
|
If String.IsNullOrEmpty(sFilePath) Then
|
||||||
' Recupero cartella dell'ultimo progetto aperto
|
' Recupero cartella dell'ultimo progetto aperto
|
||||||
Dim sDir As String = Map.refSceneHostVM.MainController.GetCurrFile()
|
Dim sDir As String = Map.refSceneHostVM.MainController.GetCurrFile()
|
||||||
@@ -212,11 +212,11 @@ Public Class ProjManagerVM
|
|||||||
If Not String.IsNullOrWhiteSpace(sDir) Then
|
If Not String.IsNullOrWhiteSpace(sDir) Then
|
||||||
sDir = Path.GetDirectoryName(sDir)
|
sDir = Path.GetDirectoryName(sDir)
|
||||||
End If
|
End If
|
||||||
Map.refSceneHostVM.MainController.OpenProject(sDir)
|
Return Map.refSceneHostVM.MainController.OpenProject(sDir)
|
||||||
Else
|
Else
|
||||||
Map.refSceneHostVM.MainController.OpenProject(sFilePath, False)
|
Return Map.refSceneHostVM.MainController.OpenProject(sFilePath, False)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Function
|
||||||
|
|
||||||
#End Region ' OpenCommand
|
#End Region ' OpenCommand
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 312 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
@@ -1,9 +1,13 @@
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports System.Windows.Threading
|
||||||
|
|
||||||
Public Class SecondaryWindowVM
|
Public Class SecondaryWindowVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_SplashScreen_Timer As New DispatcherTimer
|
||||||
|
Private m_WaitAfterRender As Integer = 0
|
||||||
|
|
||||||
' Titolo
|
' Titolo
|
||||||
Private m_sTitle As String
|
Private m_sTitle As String
|
||||||
Public Property sTitle As String
|
Public Property sTitle As String
|
||||||
@@ -47,6 +51,12 @@ Public Class SecondaryWindowVM
|
|||||||
Sub New()
|
Sub New()
|
||||||
' Creo riferimento a questa classe in Map
|
' Creo riferimento a questa classe in Map
|
||||||
Map.SetRefSecondaryWindowVM(Me)
|
Map.SetRefSecondaryWindowVM(Me)
|
||||||
|
' imposto e avvio contatore SplashScreen
|
||||||
|
m_SplashScreen_Timer.Interval = New TimeSpan(0, 0, 0, 0, 500)
|
||||||
|
AddHandler m_SplashScreen_Timer.Tick, AddressOf SplashScreenTimer_Tick
|
||||||
|
If Not IsNothing(Map.refSplashScreen) Then
|
||||||
|
m_SplashScreen_Timer.Start()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
@@ -59,14 +69,49 @@ Public Class SecondaryWindowVM
|
|||||||
Map.refMyStatusBarVM.SetSnapPointType(Map.refSceneHostVM.SnapType)
|
Map.refMyStatusBarVM.SetSnapPointType(Map.refSceneHostVM.SnapType)
|
||||||
Map.refMyStatusBarVM.SetMeasureUnit(EgtUiUnitsAreMM)
|
Map.refMyStatusBarVM.SetMeasureUnit(EgtUiUnitsAreMM)
|
||||||
EgtSetView(VT.ISO_SW, False)
|
EgtSetView(VT.ISO_SW, False)
|
||||||
' creo nuovo progetto di partenza
|
' provo a caricare progetto da linea di comando
|
||||||
Map.refProjManagerVM.NewProject(False)
|
If Not ProcessCommandLine() Then
|
||||||
|
' altrimenti creo nuovo progetto di partenza
|
||||||
|
Map.refProjManagerVM.NewProject(False)
|
||||||
|
End If
|
||||||
' leggo stati visualizzazione layer
|
' leggo stati visualizzazione layer
|
||||||
Map.refViewLayerManagerVM.UpdateIsVisibleFromIni()
|
Map.refViewLayerManagerVM.UpdateIsVisibleFromIni()
|
||||||
' resetto segnalazione modifiche
|
' resetto segnalazione modifiche
|
||||||
EgtResetModified()
|
EgtResetModified()
|
||||||
|
' segno su contatore splashscreen render finito
|
||||||
|
m_WaitAfterRender = 1
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SplashScreenTimer_Tick()
|
||||||
|
If m_WaitAfterRender > 4 Then
|
||||||
|
' chiudo SplashScreen
|
||||||
|
Map.refSplashScreen.Close()
|
||||||
|
ElseIf m_WaitAfterRender >= 1 Then
|
||||||
|
m_WaitAfterRender += 1
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function ProcessCommandLine() As Boolean
|
||||||
|
' Se non ci sono veri parametri su linea di comando, esco (il primo è sempre il nome del programma)
|
||||||
|
If Environment.GetCommandLineArgs.Count() <= 1 Then Return False
|
||||||
|
' Recupero il primo vero parametro che dovrebbe essere il nome con estensione di un file
|
||||||
|
Dim sFile As String = Environment.GetCommandLineArgs(1)
|
||||||
|
Dim sExt As String = IO.Path.GetExtension(sFile).ToLower()
|
||||||
|
If String.IsNullOrWhiteSpace(sFile) OrElse String.IsNullOrWhiteSpace(sExt) Then Return False
|
||||||
|
Return OpenStdFile(sFile)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function OpenStdFile(sFile As String) As Boolean
|
||||||
|
Dim nFileType As Integer = EgtGetFileType(sFile)
|
||||||
|
Select Case nFileType
|
||||||
|
Case FT.NGE
|
||||||
|
Return Map.refProjManagerVM.OpenProject(sFile)
|
||||||
|
'Case FT.DXF, FT.STL, FT._3MF, FT.OBJ, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
|
||||||
|
' Return m_Controller.ImportProject(sFile, False)
|
||||||
|
End Select
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "AboutBoxCommand"
|
#Region "AboutBoxCommand"
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<Window x:Class="SplashScreen"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
WindowStartupLocation="CenterScreen"
|
||||||
|
WindowStyle="None"
|
||||||
|
AllowsTransparency="True"
|
||||||
|
Background="Transparent"
|
||||||
|
Topmost="True"
|
||||||
|
ShowInTaskbar="False"
|
||||||
|
Height="600"
|
||||||
|
Width="1000">
|
||||||
|
<Grid>
|
||||||
|
<Image Source="/Resources/SplashScreen/GoldSplashscreen.png"
|
||||||
|
Stretch="UniformToFill"/>
|
||||||
|
<TextBlock Text="ICARUS"
|
||||||
|
Foreground="#b9984c"
|
||||||
|
FontSize="47"
|
||||||
|
FontFamily="/Resources/Fonts/#Roboto"
|
||||||
|
FontWeight="Light"
|
||||||
|
Margin="463,125,0,0"/>
|
||||||
|
<TextBlock x:Name="VersionTxBl"
|
||||||
|
FontSize="14"
|
||||||
|
FontFamily="/Resources/Fonts/#Roboto"
|
||||||
|
Margin="500,175,0,0"/>
|
||||||
|
<Grid Height="180"
|
||||||
|
Width="92"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
Margin="620,0,0,0">
|
||||||
|
<Image Source="/Resources/SplashScreen/LogoEgalware.png"
|
||||||
|
Height="180"
|
||||||
|
Width="92"
|
||||||
|
Stretch="UniformToFill"/>
|
||||||
|
<TextBlock Text="2022"
|
||||||
|
FontSize="12"
|
||||||
|
FontFamily="/Resources/Fonts/#Roboto"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Margin="0,140,0,0"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
Public Class SplashScreen
|
||||||
|
|
||||||
|
Private Sub SplashScreen_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
VersionTxBl.Text = "Version " & My.Application.Info.Version.Major.ToString() &
|
||||||
|
"." & My.Application.Info.Version.Minor.ToString() &
|
||||||
|
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||||
|
My.Application.Info.Version.Revision.ToString()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -60,6 +60,7 @@ Module Map
|
|||||||
Private m_refViewLayerManagerVM As ViewLayerManagerVM
|
Private m_refViewLayerManagerVM As ViewLayerManagerVM
|
||||||
Private m_refShellNumberPanelVM As ShellNumberPanelVM
|
Private m_refShellNumberPanelVM As ShellNumberPanelVM
|
||||||
Private m_refShellNumberParamPanelVM As ShellNumberParamPanelVM
|
Private m_refShellNumberParamPanelVM As ShellNumberParamPanelVM
|
||||||
|
Private m_refSplashScreen As SplashScreen
|
||||||
Private m_refModifyPartPanelVM As ModifyPartPanelVM
|
Private m_refModifyPartPanelVM As ModifyPartPanelVM
|
||||||
|
|
||||||
#Region "Get"
|
#Region "Get"
|
||||||
@@ -423,6 +424,12 @@ Module Map
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property refSplashScreen As SplashScreen
|
||||||
|
Get
|
||||||
|
Return m_refSplashScreen
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property refModifyPartPanelVM As ModifyPartPanelVM
|
Public ReadOnly Property refModifyPartPanelVM As ModifyPartPanelVM
|
||||||
Get
|
Get
|
||||||
Return m_refModifyPartPanelVM
|
Return m_refModifyPartPanelVM
|
||||||
@@ -732,6 +739,11 @@ Module Map
|
|||||||
Return Not IsNothing(m_refShellNumberParamPanelVM)
|
Return Not IsNothing(m_refShellNumberParamPanelVM)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function SetRefSplashScreen(SplashScreen As SplashScreen) As Boolean
|
||||||
|
m_refSplashScreen = SplashScreen
|
||||||
|
Return Not IsNothing(m_refSplashScreen)
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function SetRefModifyPartPanelVM(ModifyPartPanelVM As ModifyPartPanelVM) As Boolean
|
Friend Function SetRefModifyPartPanelVM(ModifyPartPanelVM As ModifyPartPanelVM) As Boolean
|
||||||
m_refModifyPartPanelVM = ModifyPartPanelVM
|
m_refModifyPartPanelVM = ModifyPartPanelVM
|
||||||
Return Not IsNothing(m_refModifyPartPanelVM)
|
Return Not IsNothing(m_refModifyPartPanelVM)
|
||||||
|
|||||||
Reference in New Issue
Block a user