-aggiunto splasscreen
This commit is contained in:
@@ -5,6 +5,13 @@
|
||||
Protected Overrides Sub OnStartup(e As StartupEventArgs)
|
||||
MyBase.OnStartup(e)
|
||||
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
||||
If e.Args.Count = 0 Then
|
||||
' creo finestra SplashScreen
|
||||
Dim SplashScreen As New SplashScreenV
|
||||
Me.MainWindow = SplashScreen
|
||||
Me.MainWindow.Show()
|
||||
MapV.SetRefSplashScreenV(SplashScreen)
|
||||
End If
|
||||
' Creo la View principale
|
||||
Me.MainWindow = New OnlyProdMainWindowV
|
||||
' Mostro la View principale
|
||||
|
||||
@@ -214,6 +214,9 @@
|
||||
<DependentUpon>OnlyProdSpecialPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SpecialPanel\SpecialPanelVM.vb" />
|
||||
<Compile Include="SplashScreen\SplashScreenV.xaml.vb">
|
||||
<DependentUpon>SplashScreenV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="StatisticsTimePanel\OnlyProdStatisticsTimePanelV.xaml.vb">
|
||||
<DependentUpon>OnlyProdStatisticsTimePanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -703,6 +706,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SplashScreen\SplashScreenV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="StatisticsTimePanel\OnlyProdStatisticsTimePanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -71,7 +71,6 @@
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/LeftPanel/AddPart.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<Expander.Content>
|
||||
|
||||
@@ -238,11 +238,15 @@ Public Class MainMenuVM
|
||||
For Each col In Map.refPartListVM.PartColumns
|
||||
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
Next
|
||||
If Not IsNothing(Map.refStatisticsVM) Then
|
||||
For Each col In Map.refStatisticsVM.StatisticsColumns
|
||||
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
Next
|
||||
End If
|
||||
For Each col In Map.refRawPartListVM.RawPartColumns
|
||||
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
Next
|
||||
For Each col In Map.refRawPartListVM.PartInRawPartColumns
|
||||
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
Next
|
||||
For Each col In Map.refFeatureInPartInRawPartListVM.FeatureInPartInRawPartColumns
|
||||
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
Next
|
||||
|
||||
DimensionsIniFile.ReadGridDimensions(ConstDims.PROJECT_ONLYPROD, Map.refProjectVM.GridDims)
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ Public Class MainWindowVM
|
||||
Private m_SupervisorCommThread As Thread
|
||||
Private m_Supervisor_Timer As New DispatcherTimer
|
||||
|
||||
Private m_SplashScreen_Timer As New DispatcherTimer
|
||||
Private m_WaitAfterRender As Integer = 0
|
||||
|
||||
' Riferimento al Model della MainWindow
|
||||
Private m_MainWindowM As MainWindowM
|
||||
Friend ReadOnly Property MainWindowM As MainWindowM
|
||||
@@ -74,6 +77,12 @@ Public Class MainWindowVM
|
||||
m_Supervisor_Timer.Interval = TimeSpan.FromMilliseconds(500)
|
||||
AddHandler m_Supervisor_Timer.Tick, AddressOf SupervisorTimer_Tick
|
||||
m_Supervisor_Timer.Start()
|
||||
' 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(MapV.refSplashScreenV) Then
|
||||
m_SplashScreen_Timer.Start()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
@@ -123,11 +132,7 @@ Public Class MainWindowVM
|
||||
Dim nCommandType As Integer = 0
|
||||
Dim nPage As Pages = Nothing
|
||||
Dim nProdId As Integer = 0
|
||||
If Map.refMainWindowVM.MainWindowM.bOnlyProd Then
|
||||
nPage = Pages.ONLYPRODPAGE
|
||||
Else
|
||||
nPage = Pages.VIEW
|
||||
End If
|
||||
nPage = Pages.ONLYPRODPAGE
|
||||
If ProcessCommandLine(nCommandType, nPage, nProdId) Then
|
||||
Select Case nCommandType
|
||||
Case 1
|
||||
@@ -214,7 +219,18 @@ Public Class MainWindowVM
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' segno su contatore splashscreen render finito
|
||||
m_WaitAfterRender = 1
|
||||
End Sub
|
||||
|
||||
Private Sub SplashScreenTimer_Tick()
|
||||
If m_WaitAfterRender > 1 Then
|
||||
' chiudo SplashScreen
|
||||
MapV.refSplashScreenV.Close()
|
||||
m_SplashScreen_Timer.Stop()
|
||||
ElseIf m_WaitAfterRender > 0 Then
|
||||
m_WaitAfterRender += 1
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Function ProcessCommandLine(ByRef nCommandType As Integer, ByRef nPage As Pages, ByRef nProdId As Integer) As Boolean
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.Windows.Automation.Peers
|
||||
|
||||
Public Class OnlyProdMainWindowV
|
||||
|
||||
|
||||
@@ -750,7 +750,6 @@ Public Class OnlyProdManagerVM
|
||||
''' Execute the ImportBTL. This method is invoked by the ImportBTLCommand.
|
||||
''' </summary>
|
||||
Public Sub ImportBTL(Optional sFile As String = "", Optional bWithDlg As Boolean = True)
|
||||
Dim x As Integer = EgtGetCurrentContext()
|
||||
If ProdFileVM.VerifyProjectModification(CurrProd) = MessageBoxResult.Cancel Then Return
|
||||
Dim sDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, "", sDir)
|
||||
@@ -839,11 +838,9 @@ Public Class OnlyProdManagerVM
|
||||
EgtOutLog("Impossibile copiare il file")
|
||||
bOk = False
|
||||
End Try
|
||||
x = EgtGetCurrentContext()
|
||||
' disattivo temporaneamente bottone assemblato per non prendere il riferimento sbagliato durante importazione
|
||||
Dim bAssembly As Boolean = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
Map.refShowBeamPanelVM.ShowBuilding_IsChecked = False
|
||||
x = EgtGetCurrentContext()
|
||||
' importo file
|
||||
If bOk Then
|
||||
bOk = Map.refSceneHostVM.MainController.ImportProject(sBtlCopyPath, False)
|
||||
@@ -886,13 +883,10 @@ Public Class OnlyProdManagerVM
|
||||
'Map.refPartManagerVM.LockVisibilityUpdate()
|
||||
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 3, EgtMsg(63006), 70, 100) ' Loading graphics
|
||||
Map.refShowBeamPanelVM.ShowBuilding_IsChecked = bAssembly
|
||||
x = EgtGetCurrentContext()
|
||||
' mostro tutti i pezzi
|
||||
Map.refShowBeamPanelVM.ShowAll(True)
|
||||
x = EgtGetCurrentContext()
|
||||
Else
|
||||
Map.refShowBeamPanelVM.ShowBuilding_IsChecked = bAssembly
|
||||
x = EgtGetCurrentContext()
|
||||
' elimino da Db
|
||||
' CheckMe impostata come cancellazione FISICA dal DB...
|
||||
DbControllers.m_ProjController.DeleteProj(nProjId, False)
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
Grid.Column="2"
|
||||
BorderThickness="0"
|
||||
Margin="0,-3.8,0,-2"
|
||||
SelectedIndex="{Binding SelManagerTab}">
|
||||
SelectedIndex="{Binding SelManagerTab}"
|
||||
Visibility="{Binding DataContext.ManagerTabVisibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}">
|
||||
<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
@@ -156,13 +157,14 @@
|
||||
<EgtBEAMWALL:ForcedStrategyPanelV DataContext="{StaticResource ForcedStrategyPanelVM}"/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<TabItem Header="SCENESHOWBULDING">
|
||||
<TabItem.Content>
|
||||
<EgtBEAMWALL:SceneShowBuldingV Margin="4,4,0,4"/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
<EgtBEAMWALL:SceneShowBuldingV Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Grid.RowSpan="4"
|
||||
Margin="4,0,4,0"
|
||||
Visibility="{Binding DataContext.SceneShowBuldingVisibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}"/>
|
||||
|
||||
<GridSplitter Grid.Row="2"
|
||||
Grid.ColumnSpan="3" Height="10"
|
||||
Style="{StaticResource Height_GridSplitter}"/>
|
||||
@@ -175,7 +177,6 @@
|
||||
<TabControl BorderThickness="0"
|
||||
Margin="0,-3.8,0,-2"
|
||||
SelectedIndex="{Binding SelFeatureManagerTab}"
|
||||
Background="White"
|
||||
Style="{StaticResource OnlyProd_TabControl}">
|
||||
<TabItem Header="FEATURERAWPARTMANAGER"
|
||||
Visibility="{Binding DataContext.RawPartManagerVisibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}"
|
||||
|
||||
@@ -210,7 +210,6 @@ Public Class ProjectVM
|
||||
RAWPARTMANAGER = 0
|
||||
FEATUREMANAGER = 1
|
||||
STRATEGYMANAGER = 2
|
||||
SCENESHOWBULDING = 3
|
||||
End Enum
|
||||
|
||||
Private m_SelManagerTab As StrategyManagerTab
|
||||
@@ -281,6 +280,28 @@ Public Class ProjectVM
|
||||
NotifyPropertyChanged(NameOf(StrategyManagerVisibility))
|
||||
End Sub
|
||||
|
||||
Private m_SceneShowBuldingVisibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property SceneShowBuldingVisibility As Visibility
|
||||
Get
|
||||
Return m_SceneShowBuldingVisibility
|
||||
End Get
|
||||
End Property
|
||||
Sub SetSceneShowBuldingVisibility(bVisible As Visibility)
|
||||
m_SceneShowBuldingVisibility = bVisible
|
||||
NotifyPropertyChanged(NameOf(SceneShowBuldingVisibility))
|
||||
End Sub
|
||||
|
||||
Private m_ManagerTabVisibility As Visibility = Visibility.Visible
|
||||
Public ReadOnly Property ManagerTabVisibility As Visibility
|
||||
Get
|
||||
Return m_ManagerTabVisibility
|
||||
End Get
|
||||
End Property
|
||||
Sub SetManagerTabVisibility(bVisible As Visibility)
|
||||
m_ManagerTabVisibility = bVisible
|
||||
NotifyPropertyChanged(NameOf(ManagerTabVisibility))
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property Statistics_Msg As String
|
||||
|
||||
@@ -52,12 +52,14 @@ Public Class ShowBeamPanelVM
|
||||
Set(value As Boolean)
|
||||
m_bShowBuilding = value
|
||||
If m_bShowBuilding Then
|
||||
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.SCENESHOWBULDING)
|
||||
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Visible)
|
||||
Map.refProjectVM.SetManagerTabVisibility(Visibility.Collapsed)
|
||||
EgtSetCurrentContext(MapV.refSceneShowBuldingV.SceneShowBulding.GetCtx())
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then Map.refProjectVM.BTLStructureVM.ShowBuilding(m_bShowBuilding)
|
||||
Else
|
||||
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
|
||||
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
|
||||
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(ShowBuilding_IsChecked))
|
||||
End Set
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<Window x:Class="SplashScreenV"
|
||||
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/NewPage/LogoProvaStrategy.png"
|
||||
Stretch="UniformToFill"/>
|
||||
<TextBlock x:Name="VersionTxBl"
|
||||
Style="{StaticResource SplashScreenV_TxBl}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,14 @@
|
||||
Public Class SplashScreenV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
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 Region ' Fields & Properties
|
||||
|
||||
End Class
|
||||
@@ -4,7 +4,6 @@
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
MapV.SetRefStrategyProductionV(Me)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -593,6 +593,16 @@
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SplashScreenV_TxBl" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>
|
||||
<Setter Property="Margin" Value="591,140,0,0"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion TextBlock-->
|
||||
|
||||
<!--#region ScrollBar-->
|
||||
@@ -2181,7 +2191,7 @@
|
||||
</Style>
|
||||
|
||||
<!--#endregion Tab Item-->
|
||||
|
||||
|
||||
<!--#endregion GRAFICA GENERALE-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
Module MapV
|
||||
|
||||
Private m_refStrategyProductionV As StrategyProductionV
|
||||
Private m_refSceneShowBuldingV As SceneShowBuldingV
|
||||
Private m_refSplashScreenV As SplashScreenV
|
||||
|
||||
#Region "Get"
|
||||
|
||||
Public ReadOnly Property refStrategyProductionV As StrategyProductionV
|
||||
Get
|
||||
Return m_refStrategyProductionV
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refSceneShowBuldingV As SceneShowBuldingV
|
||||
Get
|
||||
Return m_refSceneShowBuldingV
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refSplashScreenV As SplashScreenV
|
||||
Get
|
||||
Return m_refSplashScreenV
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Get
|
||||
|
||||
#Region "Set"
|
||||
|
||||
Friend Function SetRefStrategyProductionV(StrategyProductionV As StrategyProductionV) As Boolean
|
||||
m_refStrategyProductionV = StrategyProductionV
|
||||
Return Not IsNothing(m_refStrategyProductionV)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefSceneShowBuldingV(SceneShowBuldingV As SceneShowBuldingV) As Boolean
|
||||
m_refSceneShowBuldingV = SceneShowBuldingV
|
||||
Return Not IsNothing(m_refSceneShowBuldingV)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefSplashScreenV(SplashScreenV As SplashScreenV) As Boolean
|
||||
m_refSplashScreenV = SplashScreenV
|
||||
Return Not IsNothing(m_refSplashScreenV)
|
||||
End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
End Module
|
||||
|
||||
Reference in New Issue
Block a user