Aggiunta AboutBox

Spostamento macchina e Db Ut e Lav in pagina Config
Correzioni varie
This commit is contained in:
Emmanuele Sassi
2021-05-15 17:15:06 +02:00
parent 084220230c
commit d99d34af7f
17 changed files with 261 additions and 25 deletions
@@ -0,0 +1,52 @@
<Window x:Class="AboutBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
<Border BorderThickness="2" BorderBrush="LightBlue">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="2.5*"/>
<RowDefinition Height="0.35*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.35*"/>
</Grid.RowDefinitions>
<Grid Grid.Column="1" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Name="LogoBrd" Grid.Column="1" Background="White">
<Image Source="/Resources/AboutBoxImage.png" Stretch="Uniform"/>
</Border>
</Grid>
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18" />
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="12" />
<TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/>
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True"
Margin="100,0"/>
</Grid>
</Border>
</Window>
@@ -0,0 +1,37 @@
Imports EgtUILib
Public Class AboutBoxV
Private Sub AboutBoxWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
Me.Owner = Application.Current.MainWindow
DescriptionLbl.Text = My.Application.Info.Description.ToString()
VersionLbl.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()
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
Dim sInfo As String = String.Empty
Dim sKey As String = String.Empty
EgtGetKeyInfo(sKey)
Dim sKlev As String = Map.refMainWindowVM.MainWindowM.nKeyLevel.ToString()
Dim sOpts As String = Map.refMainWindowVM.MainWindowM.nKeyOptions.ToString()
Dim sLeftDays As String = ""
Dim nLeftDays As Integer
if EgtGetKeyLeftDays( nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays= " (" & nLeftDays.ToString() & ")"
sInfo = If( EgtIsDebug(), "Debug Libraries" & Environment.NewLine, "")
sInfo = sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
" (" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() & ")" & Environment.NewLine
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
Dim sCPU As String = String.Empty
EgtGetCpuInfo( sCPU)
sInfo &= sCPU & Environment.NewLine
Dim sScene As String = String.Empty
EgtGetSceneInfo(sScene)
sInfo &= sScene
InfoLbl.Text = sInfo
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
End Sub
End Class
@@ -211,6 +211,9 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="AboutBoxWindow\AboutBoxV.xaml.vb">
<DependentUpon>AboutBoxV.xaml</DependentUpon>
</Compile>
<Compile Include="BTLParam\BTLFeatureVM.vb" />
<Compile Include="Comms\TPAComm.vb" />
<Compile Include="Constants\ConstBeam.vb" />
@@ -281,6 +284,10 @@
<DependentUpon>ViewPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="ZebraPrinter\LabelPrinter.vb" />
<Page Include="AboutBoxWindow\AboutBoxV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="LeftPanel\LeftPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -436,6 +443,9 @@
<Resource Include="Resources\ViewPanel\ZoomIn.png" />
<Resource Include="Resources\ViewPanel\ZoomOut.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\AboutBoxImage.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@@ -7,6 +7,7 @@
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
Title="{Binding Title}" Icon="/Resources/EgtBEAMWALL.ico"
MinHeight="600" MinWidth="800"
AboutBoxCommand="{Binding AboutBox_Command}"
CloseCommand="{Binding CloseApplication_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<Grid>
@@ -20,6 +20,7 @@ Public Class MainWindowVM
End Property
' Definizione comandi
Private m_cmdAboutBox As ICommand
Private m_cmdCloseApplication As ICommand
#Region "CONSTRUCTOR"
@@ -79,6 +80,27 @@ Public Class MainWindowVM
#Region "COMMANDS"
#Region "AboutBoxCommand"
' Returns a command that manage the MainWindow_Unloaded command
Public ReadOnly Property AboutBox_Command As ICommand
Get
If m_cmdAboutBox Is Nothing Then
m_cmdAboutBox = New Command(AddressOf AboutBox)
End If
Return m_cmdAboutBox
End Get
End Property
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub AboutBox(ByVal param As Object)
Dim AboutBoxWindow As New AboutBoxV
AboutBoxWindow.Owner = Application.Current.MainWindow
AboutBoxWindow.ShowDialog()
End Sub
#End Region ' AboutBoxCommand
#Region "CloseApplication"
''' <summary>
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

@@ -0,0 +1,52 @@
<Window x:Class="AboutBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
<Border BorderThickness="2" BorderBrush="LightBlue">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="2.5*"/>
<RowDefinition Height="0.35*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.35*"/>
</Grid.RowDefinitions>
<Grid Grid.Column="1" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Name="LogoBrd" Grid.Column="1" Background="White">
<Image Source="/Resources/AboutBoxImage.png" Stretch="Uniform"/>
</Border>
</Grid>
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18" />
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="12" />
<TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/>
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True"
Margin="100,0"/>
</Grid>
</Border>
</Window>
@@ -0,0 +1,37 @@
Imports EgtUILib
Public Class AboutBoxV
Private Sub AboutBoxWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
Me.Owner = Application.Current.MainWindow
DescriptionLbl.Text = My.Application.Info.Description.ToString()
VersionLbl.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()
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
Dim sInfo As String = String.Empty
Dim sKey As String = String.Empty
EgtGetKeyInfo(sKey)
Dim sKlev As String = Map.refMainWindowVM.MainWindowM.nKeyLevel.ToString()
Dim sOpts As String = Map.refMainWindowVM.MainWindowM.nKeyOptions.ToString()
Dim sLeftDays As String = ""
Dim nLeftDays As Integer
if EgtGetKeyLeftDays( nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays= " (" & nLeftDays.ToString() & ")"
sInfo = If( EgtIsDebug(), "Debug Libraries" & Environment.NewLine, "")
sInfo = sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
" (" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() & ")" & Environment.NewLine
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
Dim sCPU As String = String.Empty
EgtGetCpuInfo( sCPU)
sInfo &= sCPU & Environment.NewLine
Dim sScene As String = String.Empty
EgtGetSceneInfo(sScene)
sInfo &= sScene
InfoLbl.Text = sInfo
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
End Sub
End Class
@@ -1,12 +1,15 @@
<UserControl x:Class="ConfigurationPageV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:local="clr-namespace:EgtBEAMWALL.ViewerOptimizer"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<DockPanel x:Class="ConfigurationPageV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.ViewerOptimizer">
<!--<EgtFloating:EgtFloatingTray DockPanel.Dock="Top">-->
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
<EgtBEAMWALL:MachinePanelV DataContext="{Binding MachinePanelVM}"/>
</StackPanel>
<!--</EgtFloating:EgtFloatingTray>-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
@@ -89,7 +92,7 @@
Width="200"
Style="{StaticResource FeatureComboBox}"/>
</Grid>
<local:QParamListV DataContext="{Binding}"
<EgtBEAMWALL:QParamListV DataContext="{Binding}"
ItemsSource="{Binding QBTLParamVMList}"
SelectedItem="{Binding SelQParam}"
Grid.Row="1"
@@ -109,4 +112,4 @@
</Button>
</Grid>
</UserControl>
</DockPanel>
@@ -13,6 +13,12 @@ Public Class ConfigurationPageVM
' Definizione comandi
Private m_cmdSave As ICommand
Public ReadOnly Property MachinePanelVM As MachinePanelVM
Get
Return Map.refMachinePanelVM
End Get
End Property
Private m_ConfigMachTableList As New ObservableCollection(Of MachTable)
Public Property ConfigMachTableList As ObservableCollection(Of MachTable)
Get
@@ -143,6 +143,9 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="AboutBoxWindow\AboutBoxV.xaml.vb">
<DependentUpon>AboutBoxV.xaml</DependentUpon>
</Compile>
<Compile Include="AddSectionXMaterialWnd\AddSectionXMaterialWndV.xaml.vb">
<DependentUpon>AddSectionXMaterialWndV.xaml</DependentUpon>
</Compile>
@@ -270,6 +273,10 @@
<Compile Include="ViewPanel\ViewPanelV.xaml.vb">
<DependentUpon>ViewPanelV.xaml</DependentUpon>
</Compile>
<Page Include="AboutBoxWindow\AboutBoxV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="AddFeatureWnd\AddFeatureWndV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -575,6 +582,9 @@
<Folder Include="Behavior\" />
<Folder Include="FreeContourMgr\" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\AboutBoxImage.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\ViewerOptimizer\EgtBEAMWALL.ViewerOptimizerR32.exe
@@ -11,14 +11,14 @@
<Image Source="/Resources/InstrumentPanel/GetDist.png" Stretch="Uniform"/>
</ToggleButton>
<Button Content="D"
<!--<Button Content="D"
FontSize="20"
FontWeight="Light"
ToolTip="{Binding GetDistToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding Data_Command}">
<!--<Image Source="/Resources/InstrumentPanel/Analyze.png" Stretch="Uniform"/>-->
</Button>
--><!--<Image Source="/Resources/InstrumentPanel/Analyze.png" Stretch="Uniform"/>--><!--
</Button>-->
<Button Content="C"
FontSize="20"
@@ -33,15 +33,14 @@ Public Class MachinePanelVM
'EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
'EgtResetCurrMachGroup()
' se sono in modalità disegno
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
If Map.refMainMenuVM.SelPage = Pages.CONFIG Then
If EgtSetCurrMachine(value.Name) Then
m_SelectedMachine = value
Else
NotifyPropertyChanged("SelectedMachine")
End If
Else
m_SelectedMachine = value
End If
NotifyPropertyChanged(NameOf(SelectedMachine))
' inizializzo la macchina selezionata come macchina corrente
SectionXMaterial.SetType(DirectCast(m_SelectedMachine, MyMachine).nType)
InitCurrentMachine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, value.Name)
@@ -38,6 +38,13 @@ Public Class MainWindowVM
End Set
End Property
Private m_MachinePanelVM As MachinePanelVM
Public ReadOnly Property MachinePanelVM As MachinePanelVM
Get
Return m_MachinePanelVM
End Get
End Property
' definizione comandi
Private m_cmdAboutBox As ICommand
Private m_cmdCloseApplication As ICommand
@@ -49,6 +56,8 @@ Public Class MainWindowVM
Map.BeginInit(Me)
' Creo Model della MainWindow
m_MainWindowM = New MainWindowM
' inizializzo machine panel
m_MachinePanelVM = New MachinePanelVM
End Sub
#End Region ' CONSTRUCTOR
@@ -129,9 +138,9 @@ Public Class MainWindowVM
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub AboutBox(ByVal param As Object)
'Dim AboutBoxWindow As New AboutBoxV
'AboutBoxWindow.Owner = Application.Current.MainWindow
'AboutBoxWindow.ShowDialog()
Dim AboutBoxWindow As New AboutBoxV
AboutBoxWindow.Owner = Application.Current.MainWindow
AboutBoxWindow.ShowDialog()
End Sub
#End Region ' AboutBoxCommand
@@ -42,11 +42,10 @@
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/Send.png" Height="22" Margin="3,0,3,0" />
</Button>-->
<Button Command="{Binding UpdateBTL_Command}"
<Button Content="M"
Command="{Binding UpdateBTL_Command}"
ToolTip="{Binding UpdateBTLToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/Import.png" Stretch="Uniform"/>
</Button>
Style="{StaticResource ToolBar_Button}"/>
<Button Content=">"
Command="{Binding GoToProd_Command}"
ToolTip="{Binding GoToProd_ToolTip}"
@@ -9,7 +9,6 @@
Visibility="{Binding DataContext.ProjManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
<EgtBEAMWALL:ProdManagerV DataContext="{StaticResource ProdManagerVM}"
Visibility="{Binding DataContext.ProdManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
<EgtBEAMWALL:MachinePanelV DataContext="{StaticResource MachinePanelVM}"/>
<EgtBEAMWALL:OptimizePanelV DataContext="{StaticResource OptimizePanelVM}"
Visibility="{Binding DataContext.ProdManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
</EgtFloating:EgtFloatingTray>
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB