OmagCUT :
- Aggiunti nuovi Dictionary per migliorare grafica programma. - Miglioramenti vari.
This commit is contained in:
+7
-5
@@ -1,7 +1,9 @@
|
||||
<Application x:Class="Application"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
|
||||
<Application.Resources>
|
||||
<ResourceDictionary Source="OmagCUTDictionary.xaml"/>
|
||||
</Application.Resources>
|
||||
|
||||
</Application>
|
||||
|
||||
+4
-3
@@ -122,7 +122,7 @@ Public Class CNCommunication
|
||||
|
||||
Private Sub InitCn()
|
||||
|
||||
m_MachineStatus.MachineStatusGrid.Background = Brushes.Gold
|
||||
m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||
|
||||
' istanzio l'oggetto CN e lo inizializzo
|
||||
Try
|
||||
@@ -160,14 +160,15 @@ Public Class CNCommunication
|
||||
|
||||
Select Case m_nNCType
|
||||
Case 0 'Debug
|
||||
m_MachineStatus.MachineStatusGrid.Background = Brushes.Gold
|
||||
Case 1, 2 'Axium, Flexium
|
||||
If IsNothing(m_CN) OrElse m_CN.n_state < 2 Then
|
||||
' Per evitare crash con azioni verso il controllo, avvio quello di debug
|
||||
Me.m_CN = New CN_Debug
|
||||
m_MachineStatus.MachineStatusGrid.Background = Brushes.Red
|
||||
m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_Red")
|
||||
Else
|
||||
m_CN.b_axis_events_enable = True
|
||||
m_MachineStatus.MachineStatusGrid.Background = Brushes.Gray
|
||||
m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_DarkGray")
|
||||
End If
|
||||
End Select
|
||||
|
||||
|
||||
+20
-20
@@ -34,25 +34,20 @@
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PhotoBtn" Grid.Column="0" >
|
||||
<Image Source="Resources/Photo.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/Photo.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" >
|
||||
<Image Source="Resources/RawPart.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/RawPart.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="DrawBtn" Grid.Column="2" >
|
||||
<Image Source="Resources/Draw.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<Button Name="DrawBtn" Grid.Column="2" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/Draw.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ImportBtn" Grid.Column="3" >
|
||||
<Image Source="Resources/Import.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<Button Name="ImportBtn" Grid.Column="3" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/Import.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="SplitBtn" Grid.Column="4" >
|
||||
<Image Name="SplitImage" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<Button Name="SplitBtn" Grid.Column="4" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Name="SplitImage" Width="65" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
@@ -69,11 +64,16 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="NewBtn" Grid.Column="0" Content="New" FontSize="22" />
|
||||
<Button Name="LoadBtn" Grid.Column="1" Content="Load" FontSize="22" />
|
||||
<Button Name="SaveBtn" Grid.Column="2" Content="Save" FontSize="22" />
|
||||
<Button Name="SimulateBtn" Grid.Column="4" FontSize="22" />
|
||||
<Button Name="WorkBtn" Grid.Column="5" FontSize="22" />
|
||||
|
||||
<Button Name="NewBtn" Grid.Column="0" Content="New"
|
||||
Style="{StaticResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="LoadBtn" Grid.Column="1" Content="Load"
|
||||
Style="{StaticResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="SaveBtn" Grid.Column="2" Content="Save"
|
||||
Style="{StaticResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
|
||||
<Button Name="SimulateBtn" Grid.Column="4" Style="{StaticResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="WorkBtn" Grid.Column="5" Style="{StaticResource OmagCut_GradientBlueTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
+66
-74
@@ -4,91 +4,83 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="CurrentProjectPage_Initialized" Loaded="CurrentProjectPage_Loaded">
|
||||
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280"
|
||||
Initialized="CurrentProjectPage_Initialized" Loaded="CurrentProjectPage_Loaded">
|
||||
|
||||
<!-- Chiamata al Dictionary -->
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
|
||||
<!-- Definizione della CurrentProjectPage -->
|
||||
<Border Style="{StaticResource CustomBorder}" >
|
||||
|
||||
<Grid Name="CurrentProjectPageGrid" >
|
||||
<Grid Name="CurrentProjectPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid con le caratteristiche del progetto -->
|
||||
|
||||
<Border Name="CurrProjGrid" Style="{StaticResource CustomBorder}" Grid.Row="0" >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Name="MaterialLbl" Grid.Row="0" FontSize="22" HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center" Grid.ColumnSpan="2" Margin="8,0,0,0" Content="Materiale" />
|
||||
<TextBox Name="MaterialTxBx" Grid.Column="1" Grid.Row="0" FontSize="22" Width="100"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" IsReadOnly="True"
|
||||
Background="LightGray" BorderBrush="Gray" TextAlignment="Center" />
|
||||
<Label Name="HeightLbl" Grid.Row="1" FontSize="22" HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center" Grid.ColumnSpan="2" Margin="8,0,0,0" Content="Spessore" />
|
||||
<TextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="1" FontSize="22" Width="100"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" IsReadOnly="True"
|
||||
Background="LightGray" BorderBrush="Gray" TextAlignment="Right" />
|
||||
<Label Name="ToolLbl" Grid.Row="2" FontSize="22" HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center" Grid.ColumnSpan="2" Margin="8,0,0,0" Content="Utensile" />
|
||||
<TextBox Name="ToolTxBx" Grid.Column="1" Grid.Row="2" FontSize="22" Width="100"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" IsReadOnly="True"
|
||||
Background="LightGray" BorderBrush="Gray" TextAlignment="Center" />
|
||||
<Label Name="MachiningLbl" Grid.Row="3" FontSize="22" HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center" Grid.ColumnSpan="2" Margin="8,0,0,0" Content="Lavorazione" />
|
||||
<TextBox Name="MachiningTxBx" Grid.Column="1" Grid.Row="3" FontSize="22" Width="100"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" IsReadOnly="True"
|
||||
Background="LightGray" BorderBrush="Gray" TextAlignment="Center" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<TextBlock Name="OutMessageTxBl" Grid.Row="2" Width="240" Height="60" FontSize="22" TextAlignment="Center" TextWrapping="Wrap" />
|
||||
<!-- Definizione della Grid con le caratteristiche del progetto -->
|
||||
<Border Name="CurrProjGrid" Style="{StaticResource OmagCut_Border}" Grid.Row="0" >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="MaterialTxBl" Grid.Row="0" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
Text="Materiale"/>
|
||||
<TextBox Name="MaterialTxBx" Grid.Column="1" Grid.Row="0" Width="100"
|
||||
Style="{StaticResource OmagCut_FixedTextBox}"/>
|
||||
<TextBlock Name="HeightTxBl" Grid.Row="1" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
Text="Spessore"/>
|
||||
<TextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="1" Width="100"
|
||||
Style="{StaticResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||
<TextBlock Name="ToolTxBl" Grid.Row="2" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
Text="Utensile"/>
|
||||
<TextBox Name="ToolTxBx" Grid.Column="1" Grid.Row="2" Width="100"
|
||||
Style="{StaticResource OmagCut_FixedTextBox}"/>
|
||||
<TextBlock Name="MachiningTxBl" Grid.Row="3" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
Text="Lavorazione"/>
|
||||
<TextBox Name="MachiningTxBx" Grid.Column="1" Grid.Row="3" Width="100"
|
||||
Style="{StaticResource OmagCut_FixedTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<TextBlock Name="OutMessageTxBl" Grid.Row="2" Width="240" TextAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -56,10 +56,10 @@ Public Class CurrentProjectPageUC
|
||||
Me.CurrentProjectPageGrid.Children.Add(CurrentProjectSceneHost)
|
||||
|
||||
'Imposto i messaggi letti dal file dei messaggi
|
||||
MaterialLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 9) 'Material - Materiale
|
||||
HeightLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 5) 'Height - Spessore
|
||||
ToolLbl.Content = EgtMsg(MSG_CADCUTPAGEUC + 11) 'Tool - Utensile
|
||||
MachiningLbl.Content = EgtMsg(MSG_CADCUTPAGEUC + 12) 'Machining - Lavorazione
|
||||
MaterialTxBl.Text = EgtMsg(MSG_RAWPARTPAGEUC + 9) 'Material - Materiale
|
||||
HeightTxBl.Text = EgtMsg(MSG_RAWPARTPAGEUC + 5) 'Height - Spessore
|
||||
ToolTxBl.Text = EgtMsg(MSG_CADCUTPAGEUC + 11) 'Tool - Utensile
|
||||
MachiningTxBl.Text = EgtMsg(MSG_CADCUTPAGEUC + 12) 'Machining - Lavorazione
|
||||
|
||||
'Recupero altezza eventuale tavola aggiuntiva
|
||||
m_dAddTable = GetPrivateProfileDouble(S_TABLE, K_ADDITIONALTABLE, 0, m_MainWindow.GetMachIniFile())
|
||||
@@ -74,9 +74,9 @@ Public Class CurrentProjectPageUC
|
||||
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor, m_MainWindow.GetIniFile())
|
||||
CurrentProjectScene.SetDefaultMaterial(DefColor)
|
||||
' imposto colori sfondo
|
||||
Dim BackTopColor As New Color3d(192, 192, 192)
|
||||
Dim BackTopColor As New Color3d(211, 211, 211)
|
||||
GetPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor, m_MainWindow.GetIniFile())
|
||||
Dim BackBotColor As New Color3d(BackTopColor)
|
||||
Dim BackBotColor As New Color3d(211, 211, 211)
|
||||
GetPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor, m_MainWindow.GetIniFile())
|
||||
CurrentProjectScene.SetViewBackground(BackTopColor, BackBotColor)
|
||||
' imposto colore di evidenziazione
|
||||
|
||||
@@ -35,10 +35,15 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="SingleCutBtn" Grid.Row="0" FontSize="22" Content="Taglio singolo"/>
|
||||
<Button Name="Cut2PBtn" Grid.Row="1" FontSize="22" Content="Taglio per due punti"/>
|
||||
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0" Content="Movimento manuale"
|
||||
Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="SingleCutBtn" Grid.Row="1" Content="Taglio singolo"
|
||||
Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="Cut2PBtn" Grid.Row="2" Content="Taglio per due punti"
|
||||
Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -49,7 +54,6 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton Name="ManualBtn" Grid.Column="2" Grid.Row="6" FontSize="22" Content="Manual"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -42,11 +42,7 @@ Public Class DirectCutPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub ManualBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualBtn.Click
|
||||
If ManualBtn.IsChecked Then
|
||||
LeftButtonGrid.Children.Add(m_ManualAxesMove)
|
||||
Else
|
||||
LeftButtonGrid.Children.Remove(m_ManualAxesMove)
|
||||
End If
|
||||
LeftButtonGrid.Children.Add(m_ManualAxesMove)
|
||||
End Sub
|
||||
|
||||
Private Sub SingleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleCutBtn.Click
|
||||
@@ -56,10 +52,10 @@ Public Class DirectCutPageUC
|
||||
|
||||
Private Sub DirectCutPage_Unloaded(sender As Object, e As RoutedEventArgs)
|
||||
Select Case m_ActiveDirectCutPage
|
||||
Case DirectCutPages.DirectCut
|
||||
' Non è necessario fare alcunché
|
||||
Case DirectCutPages.SingleCut
|
||||
LeftButtonGrid.Children.Remove(m_SingleCut)
|
||||
Case DirectCutPages.DirectCut
|
||||
' Non è necessario fare alcunché
|
||||
Case DirectCutPages.SingleCut
|
||||
LeftButtonGrid.Children.Remove(m_SingleCut)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -0,0 +1,434 @@
|
||||
<ResourceDictionary
|
||||
x:Class="EgtDictionary"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Project="clr-namespace:OmagCUT"
|
||||
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions">
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="Button_DataTemplate_Wrap">
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding}" />
|
||||
</DataTemplate>
|
||||
|
||||
<!--ButtonBase-->
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="FocusVisualStyle">
|
||||
<Setter.Value>
|
||||
<Style>
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="2" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Background" Value="#FFDDDDDD"/>
|
||||
<Setter Property="BorderBrush" Value="#FF707070"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}" >
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Project:ButtonExtensions.CornerRadius)}"
|
||||
Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsDefaulted" Value="True">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" TargetName="border" Value="#FFBEE6FD"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF3C7FB1"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" TargetName="border" Value="#FFC4E5F6"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF2C628B"/>
|
||||
</Trigger>
|
||||
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||
<Setter Property="Background" TargetName="border" Value="#FFBCDDEE"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF245A83"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background" TargetName="border" Value="#FFF4F4F4"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FFADB2B5"/>
|
||||
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#FF838383"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="CheckBox_DataTemplate_Wrap">
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding}" />
|
||||
</DataTemplate>
|
||||
|
||||
<!--Riferimento al Converter che permette di ridimensionare la spunta-->
|
||||
<ControlExtensions:CheckboxConverter x:Key="converter"></ControlExtensions:CheckboxConverter>
|
||||
|
||||
<!--CheckBoxBase-->
|
||||
<Style TargetType="{x:Type CheckBox}">
|
||||
<Setter Property="FocusVisualStyle">
|
||||
<Setter.Value>
|
||||
<Style>
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="2" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Background" Value="White"/>
|
||||
<Setter Property="BorderBrush" Value="#FF707070"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type CheckBox}">
|
||||
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="checkBoxBorder" Height="{Binding Path=ActualHeight, ElementName=templateRoot}" Width="{Binding Path=ActualHeight, ElementName=templateRoot}" BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||
<Grid x:Name="markGrid">
|
||||
<Path x:Name="optionMark" Data="F1M9.97498,1.22334L4.6983,9.09834 4.52164,9.09834 0,5.19331 1.27664,3.52165 4.255,6.08833 8.33331,1.52588E-05 9.97498,1.22334z" Fill="#FF212121" Margin="1" Opacity="0" Stretch="None"
|
||||
RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Path.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform>
|
||||
<ScaleTransform.ScaleX>
|
||||
<MultiBinding Converter="{StaticResource converter}">
|
||||
<Binding ElementName="templateRoot" Path="ActualHeight"/>
|
||||
<Binding ElementName="optionMark" Path="ActualHeight"/>
|
||||
</MultiBinding>
|
||||
</ScaleTransform.ScaleX>
|
||||
<ScaleTransform.ScaleY>
|
||||
<MultiBinding Converter="{StaticResource converter}">
|
||||
<Binding ElementName="templateRoot" Path="ActualHeight"/>
|
||||
|
||||
<Binding ElementName="optionMark" Path="ActualHeight"/>
|
||||
</MultiBinding>
|
||||
</ScaleTransform.ScaleY>
|
||||
</ScaleTransform>
|
||||
</TransformGroup>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
<Rectangle x:Name="indeterminateMark" Fill="#FF212121" Margin="2" Opacity="0"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="HasContent" Value="True">
|
||||
<Setter Property="FocusVisualStyle">
|
||||
<Setter.Value>
|
||||
<Style>
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="14,0,0,0" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Padding" Value="4,-1,0,0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" TargetName="checkBoxBorder" Value="#FFF3F9FF"/>
|
||||
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="#FF5593FF"/>
|
||||
<Setter Property="Fill" TargetName="optionMark" Value="#FF212121"/>
|
||||
<Setter Property="Fill" TargetName="indeterminateMark" Value="#FF212121"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background" TargetName="checkBoxBorder" Value="#FFE6E6E6"/>
|
||||
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="#FFBCBCBC"/>
|
||||
<Setter Property="Fill" TargetName="optionMark" Value="#FF707070"/>
|
||||
<Setter Property="Fill" TargetName="indeterminateMark" Value="#FF707070"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" TargetName="checkBoxBorder" Value="#FFD9ECFF"/>
|
||||
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="#FF3C77DD"/>
|
||||
<Setter Property="Fill" TargetName="optionMark" Value="#FF212121"/>
|
||||
<Setter Property="Fill" TargetName="indeterminateMark" Value="#FF212121"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="Opacity" TargetName="optionMark" Value="1"/>
|
||||
<Setter Property="Opacity" TargetName="indeterminateMark" Value="0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="{x:Null}">
|
||||
<Setter Property="Opacity" TargetName="optionMark" Value="0"/>
|
||||
<Setter Property="Opacity" TargetName="indeterminateMark" Value="1"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--Riferimento al Converter che permette di massimizzare l'area libera interna al GroupBox-->
|
||||
<ControlExtensions:GroupBoxConverter x:Key="GroupBoxConverter"></ControlExtensions:GroupBoxConverter>
|
||||
<ControlExtensions:BorderGapMaskConverter x:Key="BorderGapMaskConverter"></ControlExtensions:BorderGapMaskConverter>
|
||||
|
||||
<!--GroupBoxBase-->
|
||||
<Style TargetType="{x:Type GroupBox}">
|
||||
<Setter Property="BorderBrush" Value="Black"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="ControlExtensions:GroupBoxExtensions.FirstColumn" Value="6" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupBox}">
|
||||
<Grid SnapsToDevicePixels="True">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition x:Name="FirstColumn" Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(ControlExtensions:GroupBoxExtensions.FirstColumn)}"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="6"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="6"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="4" CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(ControlExtensions:GroupBoxExtensions.CornerRadius)}" Grid.Row="1" Grid.RowSpan="3" >
|
||||
<Border.OpacityMask>
|
||||
<MultiBinding Converter="{StaticResource BorderGapMaskConverter}" UpdateSourceTrigger="Default">
|
||||
<Binding ElementName="Header" Path="ActualWidth"/>
|
||||
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}"/>
|
||||
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}"/>
|
||||
<Binding ElementName="FirstColumn" Path="Width"/>
|
||||
</MultiBinding>
|
||||
</Border.OpacityMask>
|
||||
</Border>
|
||||
<Border x:Name="Header" Grid.Column="1" Padding="3,1,3,0" Grid.Row="0" Grid.RowSpan="2">
|
||||
<ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
<ContentPresenter Grid.ColumnSpan="2" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" ContentStringFormat="{TemplateBinding ContentStringFormat}" Grid.Row="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
||||
<ContentPresenter.Margin>
|
||||
<MultiBinding Converter="{StaticResource GroupBoxConverter}">
|
||||
<Binding ElementName="Border" Path="BorderThickness"/>
|
||||
<Binding ElementName="Border" Path="CornerRadius"/>
|
||||
<Binding ElementName="FirstColumn" Path="Width"/>
|
||||
</MultiBinding>
|
||||
</ContentPresenter.Margin>
|
||||
</ContentPresenter>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--TextBlock-->
|
||||
|
||||
<!--<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="TextWrapping" Value="NoWrap"/>
|
||||
<Setter Property="TextTrimming" Value="None"/>
|
||||
</Style>-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--TextBox-->
|
||||
|
||||
<!--<LinearGradientBrush x:Key="TextBoxBorder" EndPoint="0,20" MappingMode="Absolute" StartPoint="0,0">
|
||||
<GradientStop Color="#ABADB3" Offset="0.05"/>
|
||||
<GradientStop Color="#E2E3EA" Offset="0.07"/>
|
||||
<GradientStop Color="#E3E9EF" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<Style BasedOn="{x:Null}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="AllowDrop" Value="true"/>
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<ScrollViewer x:Name="PART_ContentHost" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" TargetName="border" Value="0.56"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsKeyboardFocused" Value="True">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>-->
|
||||
|
||||
<ControlTemplate x:Key="FixedTextBoxTemplate" TargetType="{x:Type TextBox}">
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<ScrollViewer x:Name="PART_ContentHost" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<!--<Setter Property="Opacity" TargetName="border" Value="0.56"/>-->
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsKeyboardFocused" Value="True">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="ToggleButton_DataTemplate_Wrap">
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding}" />
|
||||
</DataTemplate>
|
||||
|
||||
<!--ToggleButtonBase-->
|
||||
<Style TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="FocusVisualStyle">
|
||||
<Setter.Value>
|
||||
<Style>
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="2" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Background" Value="#FFDDDDDD"/>
|
||||
<Setter Property="BorderBrush" Value="#FF707070"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(ControlExtensions:ToggleButtonExtensions.CornerRadius)}"
|
||||
Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Button.IsDefaulted" Value="True">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
</Trigger>
|
||||
<!--Commentato per per evitare che cambi colore quando ci si passa sopra con il mouse-->
|
||||
<!--<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" TargetName="border" Value="#FFBEE6FD"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF3C7FB1"/>
|
||||
</Trigger>-->
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" TargetName="border" Value="#FFC4E5F6"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF2C628B"/>
|
||||
</Trigger>
|
||||
<!--Commentato per poter gestire il colore di evidenziazione direttamente nello Style del ToggleButton-->
|
||||
<!--<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||
<Setter Property="Background" TargetName="border" Value="#FFBCDDEE"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF245A83"/>
|
||||
</Trigger>-->
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background" TargetName="border" Value="#FFF4F4F4"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FFADB2B5"/>
|
||||
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#FF838383"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--TreeViewBase-->
|
||||
<!--Style e colori della freccia di espansione, necessari per modificare il ContainerItemStyle perchè contiene riferimenti ad essi-->
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Checked.Fill" Color="#FF595959"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Checked.Stroke" Color="#FF262626"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Stroke" Color="#FF1BBBFA"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Fill" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Checked.Stroke" Color="#FF262626"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Checked.Fill" Color="#FF595959"/>
|
||||
<PathGeometry x:Key="TreeArrow" Figures="M0,0 L0,6 L6,0 z"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Fill" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Stroke" Color="#FF989898"/>
|
||||
|
||||
<Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="Width" Value="16"/>
|
||||
<Setter Property="Height" Value="16"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Border Background="Transparent" Height="16" Padding="5,5,5,5" Width="16">
|
||||
<Path x:Name="ExpandPath" Data="{StaticResource TreeArrow}" Fill="{StaticResource TreeViewItem.TreeArrow.Static.Fill}" Stroke="{StaticResource TreeViewItem.TreeArrow.Static.Stroke}">
|
||||
<Path.RenderTransform>
|
||||
<RotateTransform Angle="135" CenterY="3" CenterX="3"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="RenderTransform" TargetName="ExpandPath">
|
||||
<Setter.Value>
|
||||
<RotateTransform Angle="180" CenterY="3" CenterX="3"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Fill" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.Static.Checked.Fill}"/>
|
||||
<Setter Property="Stroke" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.Static.Checked.Stroke}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Stroke" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.MouseOver.Stroke}"/>
|
||||
<Setter Property="Fill" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.MouseOver.Fill}"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsMouseOver" Value="True"/>
|
||||
<Condition Property="IsChecked" Value="True"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Stroke" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.MouseOver.Checked.Stroke}"/>
|
||||
<Setter Property="Fill" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.MouseOver.Checked.Fill}"/>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,373 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.ComponentModel
|
||||
Imports System.Globalization
|
||||
|
||||
Public Class EgtDictionary
|
||||
Inherits ResourceDictionary
|
||||
|
||||
End Class
|
||||
|
||||
#Region "<!--ButtonBase-->"
|
||||
|
||||
Public Class ButtonExtensions
|
||||
|
||||
Public Shared ReadOnly CornerRadiusProperty As DependencyProperty = DependencyProperty.RegisterAttached("CornerRadius", GetType(Double), GetType(ButtonExtensions), New PropertyMetadata(0.0))
|
||||
|
||||
Public Shared Function GetCornerRadius(element As UIElement) As Double
|
||||
Return CDbl(element.GetValue(CornerRadiusProperty))
|
||||
End Function
|
||||
|
||||
Public Shared Sub SetCornerRadius(element As UIElement, value As Double)
|
||||
element.SetValue(CornerRadiusProperty, value)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
|
||||
Namespace ControlExtensions
|
||||
|
||||
#Region "<!--CheckBoxBase-->"
|
||||
|
||||
'Converter che permette di ridimensionare la spunta
|
||||
Public Class CheckboxConverter
|
||||
Implements IMultiValueConverter
|
||||
|
||||
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IMultiValueConverter.Convert
|
||||
If values.Length <> 2 Then
|
||||
Throw New ArgumentException("There should be three values.")
|
||||
End If
|
||||
|
||||
If String.IsNullOrEmpty(values(0).ToString) Then
|
||||
values(0) = "0"
|
||||
End If
|
||||
|
||||
If String.IsNullOrEmpty(values(1).ToString()) Then
|
||||
values(2) = "0"
|
||||
End If
|
||||
|
||||
Dim x As Double
|
||||
If Not Double.TryParse(values(0).ToString(), x) Then
|
||||
Throw New ArgumentException("values[0] must parse to double")
|
||||
End If
|
||||
|
||||
Dim y As Double
|
||||
If Not Double.TryParse(values(1).ToString(), y) Then
|
||||
Throw New ArgumentException("values[0] must parse to double")
|
||||
End If
|
||||
|
||||
Return (x / y) - 1
|
||||
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As Globalization.CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
|
||||
Return New Object() {Binding.DoNothing}
|
||||
End Function
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "<!--GroupBoxBase-->"
|
||||
|
||||
Public Class GroupBoxExtensions
|
||||
|
||||
Public Shared ReadOnly CornerRadiusProperty As DependencyProperty = DependencyProperty.RegisterAttached("CornerRadius", GetType(Double), GetType(GroupBoxExtensions), New PropertyMetadata(0.0))
|
||||
|
||||
Public Shared Function GetCornerRadius(element As UIElement) As Double
|
||||
Return CDbl(element.GetValue(CornerRadiusProperty))
|
||||
End Function
|
||||
|
||||
Public Shared Sub SetCornerRadius(element As UIElement, value As Double)
|
||||
element.SetValue(CornerRadiusProperty, value)
|
||||
End Sub
|
||||
|
||||
Public Shared ReadOnly FirstColumnProperty As DependencyProperty = DependencyProperty.RegisterAttached("FirstColumn", GetType(Double), GetType(GroupBoxExtensions), New PropertyMetadata(0.0))
|
||||
|
||||
Public Shared Function GetFirstColumn(element As UIElement) As Double
|
||||
Return CDbl(element.GetValue(CornerRadiusProperty))
|
||||
End Function
|
||||
|
||||
Public Shared Sub SetFirstColumn(element As UIElement, value As Double)
|
||||
element.SetValue(CornerRadiusProperty, value)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
'Converter che permette di massimizzare l'area interna del GroupBox
|
||||
|
||||
Public Class GroupBoxConverter
|
||||
Implements IMultiValueConverter
|
||||
|
||||
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IMultiValueConverter.Convert
|
||||
|
||||
' Parameter Validation
|
||||
Dim doubleType As Type = GetType(Double)
|
||||
|
||||
If values Is Nothing OrElse values.Length <> 3 OrElse values(0) Is Nothing OrElse values(1) Is Nothing OrElse values(2) Is Nothing Then
|
||||
Return DependencyProperty.UnsetValue
|
||||
End If
|
||||
|
||||
' Conversion
|
||||
Dim dBorderThickness As Double = 0
|
||||
Dim dCornerRadius As Double = 0
|
||||
Dim sItems(3) As String
|
||||
Dim Val1 As Double
|
||||
Dim Val2 As Double
|
||||
|
||||
sItems = values(0).ToString.Split(",".ToCharArray)
|
||||
Double.TryParse(sItems(2), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture.NumberFormat, Val1)
|
||||
Double.TryParse(sItems(3), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture.NumberFormat, Val2)
|
||||
dBorderThickness = Math.Max(Val1, Val2)
|
||||
sItems = values(1).ToString.Split(",".ToCharArray)
|
||||
Double.TryParse(sItems(2), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture.NumberFormat, Val1)
|
||||
Double.TryParse(sItems(3), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture.NumberFormat, Val2)
|
||||
dCornerRadius = Math.Max(Val1, Val2)
|
||||
|
||||
' Width of the line to the left of the header
|
||||
' to be used to set the width of the first column of the Grid
|
||||
Dim GridLengthConverter As New GridLengthConverter
|
||||
Dim lineWidth As Double = CDbl(GridLengthConverter.ConvertToString(values(2)))
|
||||
|
||||
' Calcolo il Margin sottraendo alla larghezza della colonna (6) il massimo tra BorderThickness e CornerRadius
|
||||
Dim dRightMargin = -6 + Math.Max(dBorderThickness, dCornerRadius)
|
||||
Dim dLeftMargin = -lineWidth + Math.Max(dBorderThickness, dCornerRadius) - Math.Sqrt(2) / 2 * (dCornerRadius - dBorderThickness - 2)
|
||||
' Calcolo il minimo tra il valore ottenuto e 0 perchè BorderThickness non può spingere il Margin oltre lo 0
|
||||
dRightMargin = Math.Min(0, dRightMargin)
|
||||
dLeftMargin = Math.Min(0, dLeftMargin)
|
||||
' Creo Thickness con il valore ottenuto da ritornare
|
||||
Dim ReturnValue As Thickness
|
||||
ReturnValue.Top = 0
|
||||
ReturnValue.Bottom = dRightMargin
|
||||
ReturnValue.Left = dLeftMargin
|
||||
ReturnValue.Right = dRightMargin
|
||||
Return ReturnValue
|
||||
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As Globalization.CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
|
||||
Return New Object() {Binding.DoNothing}
|
||||
End Function
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' BorderGapMaskConverter class
|
||||
''' </summary>
|
||||
Public Class BorderGapMaskConverter
|
||||
Implements IMultiValueConverter
|
||||
|
||||
''' <summary>
|
||||
''' Convert a value.
|
||||
''' </summary>
|
||||
''' <param name="values">values as produced by source binding</param>
|
||||
''' <param name="targetType">target type</param>
|
||||
''' <param name="parameter">converter parameter</param>
|
||||
''' <param name="culture">culture information</param>
|
||||
''' <returns>
|
||||
''' Converted value.
|
||||
''' Visual Brush that is used as the opacity mask for the Border
|
||||
''' in the style for GroupBox.
|
||||
''' </returns>
|
||||
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IMultiValueConverter.Convert
|
||||
|
||||
' Parameter Validation
|
||||
Dim doubleType As Type = GetType(Double)
|
||||
|
||||
If values Is Nothing OrElse values.Length <> 4 OrElse values(0) Is Nothing OrElse values(1) Is Nothing OrElse values(2) Is Nothing OrElse values(3) Is Nothing OrElse Not doubleType.IsAssignableFrom(values(0).[GetType]()) OrElse Not doubleType.IsAssignableFrom(values(1).[GetType]()) OrElse Not doubleType.IsAssignableFrom(values(2).[GetType]()) Then
|
||||
Return DependencyProperty.UnsetValue
|
||||
End If
|
||||
|
||||
' Conversion
|
||||
Dim headerWidth As Double = CDbl(values(0))
|
||||
Dim borderWidth As Double = CDbl(values(1))
|
||||
Dim borderHeight As Double = CDbl(values(2))
|
||||
|
||||
' Width of the line to the left of the header
|
||||
' to be used to set the width of the first column of the Grid
|
||||
Dim GridLengthConverter As New GridLengthConverter
|
||||
Dim lineWidth As Double = CDbl(GridLengthConverter.ConvertToString(values(3)))
|
||||
|
||||
' Doesn't make sense to have a Grid
|
||||
' with 0 as width or height
|
||||
If borderWidth = 0 OrElse borderHeight = 0 Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Dim grid__1 As New Grid()
|
||||
grid__1.Width = borderWidth
|
||||
grid__1.Height = borderHeight
|
||||
Dim colDef1 As New ColumnDefinition()
|
||||
Dim colDef2 As New ColumnDefinition()
|
||||
Dim colDef3 As New ColumnDefinition()
|
||||
colDef1.Width = New GridLength(lineWidth)
|
||||
colDef2.Width = New GridLength(headerWidth)
|
||||
colDef3.Width = New GridLength(1, GridUnitType.Star)
|
||||
grid__1.ColumnDefinitions.Add(colDef1)
|
||||
grid__1.ColumnDefinitions.Add(colDef2)
|
||||
grid__1.ColumnDefinitions.Add(colDef3)
|
||||
Dim rowDef1 As New RowDefinition()
|
||||
Dim rowDef2 As New RowDefinition()
|
||||
rowDef1.Height = New GridLength(borderHeight / 2)
|
||||
rowDef2.Height = New GridLength(1, GridUnitType.Star)
|
||||
grid__1.RowDefinitions.Add(rowDef1)
|
||||
grid__1.RowDefinitions.Add(rowDef2)
|
||||
|
||||
Dim rectColumn1 As New Rectangle()
|
||||
Dim rectColumn2 As New Rectangle()
|
||||
Dim rectColumn3 As New Rectangle()
|
||||
rectColumn1.Fill = Brushes.Black
|
||||
rectColumn2.Fill = Brushes.Black
|
||||
rectColumn3.Fill = Brushes.Black
|
||||
|
||||
Grid.SetRowSpan(rectColumn1, 2)
|
||||
Grid.SetRow(rectColumn1, 0)
|
||||
Grid.SetColumn(rectColumn1, 0)
|
||||
|
||||
Grid.SetRow(rectColumn2, 1)
|
||||
Grid.SetColumn(rectColumn2, 1)
|
||||
|
||||
Grid.SetRowSpan(rectColumn3, 2)
|
||||
Grid.SetRow(rectColumn3, 0)
|
||||
Grid.SetColumn(rectColumn3, 2)
|
||||
|
||||
grid__1.Children.Add(rectColumn1)
|
||||
grid__1.Children.Add(rectColumn2)
|
||||
grid__1.Children.Add(rectColumn3)
|
||||
|
||||
Return (New VisualBrush(grid__1))
|
||||
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Not Supported
|
||||
''' </summary>
|
||||
''' <param name="value">value, as produced by target</param>
|
||||
''' <param name="targetTypes">target types</param>
|
||||
''' <param name="parameter">converter parameter</param>
|
||||
''' <param name="culture">culture information</param>
|
||||
''' <returns>Nothing</returns>
|
||||
Public Function ConvertBack(value As Object, targetTypes As Type(), parameter As Object, culture As Globalization.CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
|
||||
Return New Object() {Binding.DoNothing}
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "<!--HierarchicalTreeView-->"
|
||||
|
||||
Public Class CathegoryItem
|
||||
Inherits TreeViewItemBase
|
||||
|
||||
Private m_sTitle As String
|
||||
Private m_sPictureString As String
|
||||
Private m_Items As ObservableCollection(Of CustomItem)
|
||||
|
||||
Sub New(Title As String)
|
||||
Me.Title = Title
|
||||
Me.Items = New ObservableCollection(Of CustomItem)
|
||||
End Sub
|
||||
|
||||
Public Property Title As String
|
||||
Get
|
||||
Return m_sTitle
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sTitle = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property PictureString As String
|
||||
Get
|
||||
Return "/Resources/ToolsTreeviewImages/Lama.png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property Items As ObservableCollection(Of CustomItem)
|
||||
Get
|
||||
Return m_Items
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of CustomItem))
|
||||
m_Items = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
Public Class CustomItem
|
||||
Inherits TreeViewItemBase
|
||||
|
||||
Private m_sTitle As String
|
||||
|
||||
Sub New(Title As String)
|
||||
Me.Title = Title
|
||||
End Sub
|
||||
|
||||
Public Property Title As String
|
||||
Get
|
||||
Return m_sTitle
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sTitle = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
Public Class TreeViewItemBase
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Private m_isSelected As Boolean
|
||||
Public Property IsSelected As Boolean
|
||||
Get
|
||||
Return m_isSelected
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If (value <> m_isSelected) Then
|
||||
m_isSelected = value
|
||||
NotifyPropertyChanged("IsSelected")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_isExpanded As Boolean
|
||||
Public Property IsExpanded As Boolean
|
||||
Get
|
||||
Return m_isExpanded
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If (value <> m_isExpanded) Then
|
||||
m_isExpanded = value
|
||||
NotifyPropertyChanged("IsExpanded")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Public Sub NotifyPropertyChanged(propName As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
|
||||
Public Class ToggleButtonExtensions
|
||||
|
||||
Public Shared ReadOnly CornerRadiusProperty As DependencyProperty = DependencyProperty.RegisterAttached("CornerRadius", GetType(Double), GetType(ToggleButtonExtensions), New PropertyMetadata(0.0))
|
||||
|
||||
Public Shared Function GetCornerRadius(element As UIElement) As Double
|
||||
Return CDbl(element.GetValue(CornerRadiusProperty))
|
||||
End Function
|
||||
|
||||
Public Shared Sub SetCornerRadius(element As UIElement, value As Double)
|
||||
element.SetValue(CornerRadiusProperty, value)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
+191
-173
@@ -1,198 +1,216 @@
|
||||
<UserControl x:Class="MachineStatusUC"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="85.3" d:DesignWidth="1280" Initialized="MachineStatus_Initialized" PreviewMouseDown="MachineStatus_PreviewMouseDown" Loaded="MachineStatus_Loaded">
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="85.3" d:DesignWidth="1280" Initialized="MachineStatus_Initialized" PreviewMouseDown="MachineStatus_PreviewMouseDown" Loaded="MachineStatus_Loaded">
|
||||
|
||||
<!-- Chiamata al Dictionary -->
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary Source="OmagCUTDictionary.xaml" />
|
||||
</UserControl.Resources>
|
||||
|
||||
<!-- ** Definizione della MachineStatusBar ** -->
|
||||
<Grid Name="MachineStatusGrid" Background="DarkGray">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- ** Definizione della MachineStatusBar ** -->
|
||||
<Grid Name="MachineStatusGrid" Background="{StaticResource OmagCut_DarkGray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.75*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Image Name="MachineStatusImage" Grid.RowSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<Border Grid.ColumnSpan="17" Background="{StaticResource OmagCut_White}" />
|
||||
|
||||
<Border Grid.Column="1" Grid.RowSpan="2" Background="Gold" />
|
||||
<Image Name="MachineStatusImage" Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
|
||||
<Grid Grid.Column="2" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" Background="{StaticResource OmagCut_White}" />
|
||||
|
||||
<Label Name="Axis1NameLbl" Grid.Column="0" Content="X" FontSize="35" VerticalAlignment="Bottom" Margin="0,-8,0,0" />
|
||||
<Label Name="Axis1Lbl" Grid.Column="1" Content="-1874.765" FontSize="27" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,-4.5" VerticalAlignment="Bottom"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Label Name="DeltaAxis1Lbl" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="1" Grid.RowSpan="1"
|
||||
Content="-1126.235" FontSize="18" VerticalAlignment="Top" HorizontalAlignment="Right"/>
|
||||
|
||||
<Border Grid.Column="3" Grid.RowSpan="2" Background="Gold" />
|
||||
|
||||
<Grid Grid.Column="4" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Name="Axis2NameLbl" Grid.Column="0" Content="Y" FontSize="35" VerticalAlignment="Bottom" Margin="0,-8,0,0" />
|
||||
<Label Name="Axis2Lbl" Grid.Column="1" Content="-539.427" FontSize="27" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,-4.5" VerticalAlignment="Bottom"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Label Name="DeltaAxis2Lbl" Grid.Column="4" Grid.Row="1" Grid.ColumnSpan="1" Grid.RowSpan="1"
|
||||
Content="-460.573" FontSize="18" VerticalAlignment="Top" HorizontalAlignment="Right"/>
|
||||
|
||||
<Border Grid.Column="5" Grid.RowSpan="2" Background="Gold" />
|
||||
|
||||
<Grid Grid.Column="6" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Name="Axis3NameLbl" Grid.Column="0" Content="Z" FontSize="35" VerticalAlignment="Bottom" Margin="0,-8,0,0" />
|
||||
<Label Name="Axis3Lbl" Grid.Column="1" Content="-55.000" FontSize="27" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,-4.5" VerticalAlignment="Bottom"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Label Name="DeltaAxis3Lbl" Grid.Column="6" Grid.Row="1" Grid.ColumnSpan="1" Grid.RowSpan="1"
|
||||
Content="-10.000" FontSize="18" VerticalAlignment="Top" HorizontalAlignment="Right"/>
|
||||
|
||||
<Border Grid.Column="7" Grid.RowSpan="2" Background="Gold" />
|
||||
|
||||
<Grid Grid.Column="8" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Name="Axis4NameLbl" Grid.Column="0" Content="C" FontSize="35" VerticalAlignment="Bottom" Margin="0,-8,0,0" />
|
||||
<Label Name="Axis4Lbl" Grid.Column="1" Content="135.000" FontSize="27" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,-4.5" VerticalAlignment="Bottom"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Label Name="DeltaAxis4Lbl" Grid.Column="8" Grid.Row="1" Grid.ColumnSpan="1" Grid.RowSpan="1"
|
||||
Content="0.000" FontSize="18" VerticalAlignment="Top" HorizontalAlignment="Right"/>
|
||||
|
||||
<Border Grid.Column="9" Grid.RowSpan="2" Background="Gold" />
|
||||
|
||||
<Grid Grid.Column="10" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Name="Axis5NameLbl" Grid.Column="0" Content="B" FontSize="35" VerticalAlignment="Bottom" Margin="0,-8,0,0" />
|
||||
<Label Name="Axis5Lbl" Grid.Column="1" Content="90.000" FontSize="27" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,-4.5" VerticalAlignment="Bottom"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Label Name="DeltaAxis5Lbl" Grid.Column="10" Grid.Row="1" Grid.ColumnSpan="1" Grid.RowSpan="1"
|
||||
Content="0.000" FontSize="18" VerticalAlignment="Top" HorizontalAlignment="Right"/>
|
||||
|
||||
<Border Grid.Column="11" Grid.RowSpan="2" Background="Gold" />
|
||||
|
||||
<Grid Grid.Column="12" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Content="F" FontSize="35" VerticalAlignment="Bottom" Margin="0,-8,0,0" />
|
||||
<Label Grid.Column="1" Name="FeedLbl" Content="1000" FontSize="27" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,-4.5" VerticalAlignment="Bottom" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="12" Grid.Row="1" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Content="VVV" FontSize="35" VerticalAlignment="Bottom" Margin="0,-8,0,0" />
|
||||
<Label Grid.Column="1" Name="FeedOverrideLbl" Content="100%" FontSize="27" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,-4.5" VerticalAlignment="Bottom" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<Border Grid.Column="13" Grid.RowSpan="2" Background="Gold" />
|
||||
|
||||
<Grid Grid.Column="14" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Name="SpeedNameLbl" Grid.Column="0" Content="S" FontSize="35" VerticalAlignment="Bottom" Margin="0,-8,0,0" />
|
||||
<Label Name="SpeedLbl" Grid.Column="1" Content="700" FontSize="27" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,-4.5" VerticalAlignment="Bottom"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="14" Grid.Row="1" >
|
||||
<Grid Grid.Column="2" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Content="VVV" FontSize="35" VerticalAlignment="Bottom" Margin="0,-8,0,0" />
|
||||
<Label Grid.Column="1" Name="SpeedOverrideLbl" Content="85%" FontSize="27" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,-4.5" VerticalAlignment="Bottom" />
|
||||
<TextBlock Name="Axis1NameTxBx" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
||||
<TextBlock Name="Axis1TxBx" Grid.Column="1" Text="-1874.765"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="DeltaAxis1TxBx" Grid.Column="2" Grid.Row="2" Text="-1126.235"
|
||||
Style="{StaticResource OmagCut_LowerBarOverrideTextBlock}"/>
|
||||
|
||||
<Border Grid.Column="3" Grid.Row="1" Grid.RowSpan="2" Background="{StaticResource OmagCut_White}" />
|
||||
|
||||
<Grid Grid.Column="4" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="Axis2NameTxBx" Grid.Column="0" Text="Y"
|
||||
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
||||
<TextBlock Name="Axis2TxBx" Grid.Column="1" Text="-539.427"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Border Grid.Column="15" Grid.RowSpan="2" Background="Gold" />
|
||||
<TextBlock Name="DeltaAxis2TxBx" Grid.Column="4" Grid.Row="2" Text="-460.573"
|
||||
Style="{StaticResource OmagCut_LowerBarOverrideTextBlock}"/>
|
||||
|
||||
<Grid Grid.Column="16" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Column="5" Grid.Row="1" Grid.RowSpan="2" Background="{StaticResource OmagCut_White}" />
|
||||
|
||||
<Label Grid.Column="0" Content="A" FontSize="35" VerticalAlignment="Bottom" Margin="0,-8,0,0" />
|
||||
<Label Grid.Column="1" Name="ConsumptionLbl" Content="25" FontSize="27" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,-4.5" VerticalAlignment="Bottom" />
|
||||
<Grid Grid.Column="6" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="Axis3NameTxBx" Grid.Column="0" Text="Z"
|
||||
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
||||
<TextBlock Name="Axis3TxBx" Grid.Column="1" Text="-55.000"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="DeltaAxis3TxBx" Grid.Column="6" Grid.Row="2" Text="-10.000"
|
||||
Style="{StaticResource OmagCut_LowerBarOverrideTextBlock}"/>
|
||||
|
||||
<Border Grid.Column="7" Grid.Row="1" Grid.RowSpan="2" Background="{StaticResource OmagCut_White}" />
|
||||
|
||||
<Grid Grid.Column="8" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="Axis4NameTxBx" Grid.Column="0" Text="C"
|
||||
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
||||
<TextBlock Name="Axis4TxBx" Grid.Column="1" Text="135.000"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="DeltaAxis4TxBx" Grid.Column="8" Grid.Row="2" Text="0.000"
|
||||
Style="{StaticResource OmagCut_LowerBarOverrideTextBlock}"/>
|
||||
|
||||
<Border Grid.Column="9" Grid.Row="1" Grid.RowSpan="2" Background="{StaticResource OmagCut_White}" />
|
||||
|
||||
<Grid Grid.Column="10" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="Axis5NameTxBx" Grid.Column="0" Text="B"
|
||||
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
||||
<TextBlock Name="Axis5TxBx" Grid.Column="1" Text="90.000"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="DeltaAxis5TxBx" Grid.Column="10" Grid.Row="2" Text="0.000"
|
||||
Style="{StaticResource OmagCut_LowerBarOverrideTextBlock}"/>
|
||||
|
||||
<Border Grid.Column="11" Grid.Row="1" Grid.RowSpan="2" Background="{StaticResource OmagCut_White}" />
|
||||
|
||||
<Grid Grid.Column="12" Grid.Row="1" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Column="0" Name="FeedNameTxBx" Text="F" Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
||||
<TextBlock Grid.Column="1" Name="FeedTxBx" Text="1000"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="12" Grid.Row="2" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Column="0" Name="FeedOverrideNameTxBx" Text="VVV"
|
||||
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
||||
<TextBlock Grid.Column="1" Name="FeedOverrideTxBx" Text="100%"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Border Grid.Column="13" Grid.Row="1" Grid.RowSpan="2" Background="{StaticResource OmagCut_White}" />
|
||||
|
||||
<Grid Grid.Column="14" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="SpeedNameTxBx" Grid.Column="0" Text="S"
|
||||
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
||||
<TextBlock Name="SpeedTxBx" Grid.Column="1" Text="700"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="16" Grid.Row="1" >
|
||||
<Grid Grid.Column="14" Grid.Row="2" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Column="0" Name="SpeedOverrideNameTxBx" Text="VVV"
|
||||
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
||||
<TextBlock Grid.Column="1" Name="SpeedOverrideTxBx" Text="85%"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Border Grid.Column="15" Grid.Row="1" Grid.RowSpan="2" Background="{StaticResource OmagCut_White}" />
|
||||
|
||||
<Grid Grid.Column="16" Grid.Row="1" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Column="0" Name="ConsumptionNameTxBx" Text="A"
|
||||
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
||||
<TextBlock Grid.Column="1" Name="ConsumptionTxBx" Text="25"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="16" Grid.Row="2" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="1" Name="AOverrideLbl" Content="15%" FontSize="27" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,-4.5" VerticalAlignment="Bottom" />
|
||||
<TextBlock Grid.Column="1" Name="AOverrideTxBx" Text="15%"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
+20
-20
@@ -100,42 +100,42 @@ Public Class MachineStatusUC
|
||||
End Sub
|
||||
|
||||
Sub DisplayPositionName(sL1 As String, sL2 As String, sL3 As String, sR1 As String, sR2 As String)
|
||||
Axis1NameLbl.Content = sL1
|
||||
Axis2NameLbl.Content = sL2
|
||||
Axis3NameLbl.Content = sL3
|
||||
Axis4NameLbl.Content = sR1
|
||||
Axis5NameLbl.Content = sR2
|
||||
Axis1NameTxBx.Text = sL1
|
||||
Axis2NameTxBx.Text = sL2
|
||||
Axis3NameTxBx.Text = sL3
|
||||
Axis4NameTxBx.Text = sR1
|
||||
Axis5NameTxBx.Text = sR2
|
||||
End Sub
|
||||
|
||||
Sub DisplayPosition(nL1 As Integer, nL2 As Integer, nL3 As Integer, nR1 As Integer, nR2 As Integer)
|
||||
Axis1Lbl.Content = DoubleToString(m_CN.d_axis_position(nL1), -3)
|
||||
Axis2Lbl.Content = DoubleToString(m_CN.d_axis_position(nL2), -3)
|
||||
Axis3Lbl.Content = DoubleToString(m_CN.d_axis_position(nL3), -3)
|
||||
Axis4Lbl.Content = DoubleToString(m_CN.d_axis_position(nR1), -3)
|
||||
Axis5Lbl.Content = DoubleToString(m_CN.d_axis_position(nR2), -3)
|
||||
Axis1TxBx.Text = DoubleToString(m_CN.d_axis_position(nL1), -3)
|
||||
Axis2TxBx.Text = DoubleToString(m_CN.d_axis_position(nL2), -3)
|
||||
Axis3TxBx.Text = DoubleToString(m_CN.d_axis_position(nL3), -3)
|
||||
Axis4TxBx.Text = DoubleToString(m_CN.d_axis_position(nR1), -3)
|
||||
Axis5TxBx.Text = DoubleToString(m_CN.d_axis_position(nR2), -3)
|
||||
End Sub
|
||||
|
||||
Sub DisplayPositionDelta(nL1 As Integer, nL2 As Integer, nL3 As Integer, nR1 As Integer, nR2 As Integer)
|
||||
DeltaAxis1Lbl.Content = DoubleToString(m_CN.d_axis_delta(nL1), -3)
|
||||
DeltaAxis2Lbl.Content = DoubleToString(m_CN.d_axis_delta(nL2), -3)
|
||||
DeltaAxis3Lbl.Content = DoubleToString(m_CN.d_axis_delta(nL3), -3)
|
||||
DeltaAxis4Lbl.Content = DoubleToString(m_CN.d_axis_delta(nR1), -3)
|
||||
DeltaAxis5Lbl.Content = DoubleToString(m_CN.d_axis_delta(nR2), -3)
|
||||
DeltaAxis1TxBx.Text = DoubleToString(m_CN.d_axis_delta(nL1), -3)
|
||||
DeltaAxis2TxBx.Text = DoubleToString(m_CN.d_axis_delta(nL2), -3)
|
||||
DeltaAxis3TxBx.Text = DoubleToString(m_CN.d_axis_delta(nL3), -3)
|
||||
DeltaAxis4TxBx.Text = DoubleToString(m_CN.d_axis_delta(nR1), -3)
|
||||
DeltaAxis5TxBx.Text = DoubleToString(m_CN.d_axis_delta(nR2), -3)
|
||||
End Sub
|
||||
|
||||
Sub DisplayFeed()
|
||||
Dim dRealFeed As Double = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
||||
FeedLbl.Content = DoubleToString(dRealFeed, 0)
|
||||
FeedOverrideLbl.Content = DoubleToString(m_CN.d_DInterpo_Feed_override, 0) & "%"
|
||||
FeedTxBx.Text = DoubleToString(dRealFeed, 0)
|
||||
FeedOverrideTxBx.Text = DoubleToString(m_CN.d_DInterpo_Feed_override, 0) & "%"
|
||||
End Sub
|
||||
|
||||
Sub DisplaySpeed()
|
||||
SpeedLbl.Content = DoubleToString(m_CN.d_spindle_eff(0), 0)
|
||||
SpeedOverrideLbl.Content = DoubleToString(m_CN.n_spindle_override(0), 0) & "%"
|
||||
SpeedTxBx.Text = DoubleToString(m_CN.d_spindle_eff(0), 0)
|
||||
SpeedOverrideTxBx.Text = DoubleToString(m_CN.n_spindle_override(0), 0) & "%"
|
||||
End Sub
|
||||
|
||||
Sub DisplayPower()
|
||||
ConsumptionLbl.Content = DoubleToString(m_CN.d_spindle_power, -2)
|
||||
ConsumptionTxBx.Text = DoubleToString(m_CN.d_spindle_power, -2)
|
||||
' AOverrideLbl
|
||||
End Sub
|
||||
|
||||
|
||||
+55
-55
@@ -1,65 +1,65 @@
|
||||
<Window x:Class="MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:OmagCUT"
|
||||
Title="MainWindow" Height="1024" Width="1280" Loaded="Window_Loaded" Background="Gray" ResizeMode="NoResize"
|
||||
WindowStyle="None" Initialized="Window_Initialized" PreviewMouseDown="MainWindow_PreviewMouseDown"
|
||||
KeyDown="MainWindow_KeyDown" Unloaded="MainWindow_Unloaded" ContentRendered="Window_ContentRendered" >
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:OmagCUT"
|
||||
Title="MainWindow" Height="1024" Width="1280" ResizeMode="NoResize" WindowStyle="None"
|
||||
FontFamily="./Resources/Fonts/#Century Gothic"
|
||||
Initialized="Window_Initialized" Loaded="Window_Loaded" ContentRendered="Window_ContentRendered"
|
||||
PreviewMouseDown="MainWindow_PreviewMouseDown" KeyDown="MainWindow_KeyDown" Unloaded="MainWindow_Unloaded">
|
||||
|
||||
<!-- Chiamata al Dictionary -->
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="OmagCUTDictionary.xaml" />
|
||||
</Window.Resources>
|
||||
|
||||
<!-- ** Definizione della Grid della MainWindow ** -->
|
||||
<Grid Name="MainWindowGrid" Background="{StaticResource OmagCut_Gray}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Chiamata al Dictionary -->
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="OmagCUTDictionary.xaml" />
|
||||
</Window.Resources>
|
||||
<!-- ** Definizione della Grid della Row 0 (Barra superiore) ** -->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="11*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- ** Definizione della Grid della MainWindow ** -->
|
||||
<Grid Name="MainWindowGrid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Style="{StaticResource OmagCut_IconBorder}">
|
||||
<Image Source="Resources/LogoOmag.jpg" Stretch="Fill"/>
|
||||
</Border>
|
||||
|
||||
|
||||
<!-- ** Definizione della Grid della Row 0 (Barra superiore) ** -->
|
||||
<Grid >
|
||||
<!-- ** Definizione della Grid delle tab ** -->
|
||||
<Grid Name="MainTabGrid" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="11*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Source="Resources/LogoOmag.jpg" Stretch="Fill"/>
|
||||
|
||||
<Button Grid.Column="7" Click="ExitBtn_Click">
|
||||
<Image Source="Resources/X.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<!-- ** Definizione della Grid delle tab ** -->
|
||||
<Grid Name="MainTabGrid" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="WorkInProgressBtn" Grid.Column="0" FontSize="20" >
|
||||
<TextBlock Name="WorkInProgressTxBl" TextWrapping="Wrap" TextAlignment="Center" />
|
||||
<ToggleButton Name="WorkInProgressBtn" Grid.Column="0" Style="{StaticResource OmagCut_BlueToggleButton}">
|
||||
<!--<TextBlock Name="WorkInProgressTxBl" TextWrapping="Wrap" TextAlignment="Center" />-->
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="DirectCutBtn" Grid.Column="1" FontSize="20" />
|
||||
<ToggleButton Name="CadCutBtn" Grid.Column="2" FontSize="20" />
|
||||
<ToggleButton Name="FrameCutBtn" Grid.Column="3" FontSize="20" />
|
||||
<ToggleButton Name="MachineBtn" Grid.Column="4" FontSize="20" />
|
||||
<ToggleButton Name="OptionsBtn" Grid.Column="5" FontSize="20" />
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
<ToggleButton Name="DirectCutBtn" Grid.Column="1" Style="{StaticResource OmagCut_BlueToggleButton}"/>
|
||||
<ToggleButton Name="CadCutBtn" Grid.Column="2" Style="{StaticResource OmagCut_BlueToggleButton}"/>
|
||||
<ToggleButton Name="FrameCutBtn" Grid.Column="3" Style="{StaticResource OmagCut_BlueToggleButton}"/>
|
||||
<ToggleButton Name="MachineBtn" Grid.Column="4" Style="{StaticResource OmagCut_BlueToggleButton}"/>
|
||||
<ToggleButton Name="OptionsBtn" Grid.Column="5" Style="{StaticResource OmagCut_BlueToggleButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Button Grid.Column="7" Style="{StaticResource OmagCut_BlueIconButton}" Click="ExitBtn_Click">
|
||||
<Image Source="Resources/X.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Window>
|
||||
|
||||
+1
-1
@@ -278,7 +278,7 @@ Class MainWindow
|
||||
End If
|
||||
Next
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
WorkInProgressTxBl.Text = EgtMsg(MSG_GENERAL + 1)
|
||||
WorkInProgressBtn.Content = EgtMsg(MSG_GENERAL + 1)
|
||||
DirectCutBtn.Content = EgtMsg(MSG_GENERAL + 2)
|
||||
CadCutBtn.Content = EgtMsg(MSG_GENERAL + 3)
|
||||
FrameCutBtn.Content = EgtMsg(MSG_GENERAL + 4)
|
||||
|
||||
+21
-6
@@ -12,13 +12,14 @@
|
||||
</UserControl.Resources>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Name="LeftButtonGrid" Background="LightGray">
|
||||
<Grid Background="LightGray">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
@@ -27,13 +28,13 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FeedTxBl" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
|
||||
<TextBlock Name="FeedTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
|
||||
<TextBox Name="FeedTxBx" Grid.Column="1" Grid.Row="0" FontSize="20"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" Width="150" TextAlignment="Center"
|
||||
Style="{StaticResource NumericKeyboard}" />
|
||||
<TextBlock Name="SpeedTxBl" Grid.Column="0" Grid.Row="1" FontSize="20" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
|
||||
<TextBlock Name="SpeedTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
|
||||
<TextBox Name="SpeedTxBx" Grid.Column="1" Grid.Row="1" FontSize="20"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" Width="150" TextAlignment="Center"
|
||||
Style="{StaticResource NumericKeyboard}" />
|
||||
@@ -54,5 +55,19 @@
|
||||
<TextBox Name="R2TxBx" Grid.Column="1" Grid.Row="6" FontSize="20" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Width="150" TextAlignment="Center" Style="{StaticResource NumericKeyboard}" />
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="BackBtn" Grid.Column="1" >
|
||||
<Image Source="Resources/NumericKeyboardArrow.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -147,4 +147,8 @@ Public Class ManualAxesMoveUC
|
||||
Return dVal
|
||||
End Function
|
||||
|
||||
Private Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
+87
-87
@@ -1,92 +1,92 @@
|
||||
<UserControl x:Class="NestPageUC"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="256" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="256" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
|
||||
|
||||
<!-- Chiamata al Dictionary -->
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary Source="OmagCUTDictionary.xaml"></ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
|
||||
<!-- Definizione della NestPage -->
|
||||
<Grid Grid.Column="0" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Name="PositioningLbl" Grid.ColumnSpan="3" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center" FontSize="15" />
|
||||
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="Resources/UpArrow.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_LeftGrayGradientYellowButton}">
|
||||
<Image Source="Resources/LeftArrow.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<ToggleButton Name="MaximizeMoveBtn" Grid.Column="1" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_YellowToggleButton}">
|
||||
<Image Source="Resources/MaxMove.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</ToggleButton>
|
||||
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/RightArrow.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<Image Source="Resources/DownArrow.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/CounterClockwiseRotate.png" Width="64" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="RotateHalfTurnBtn" Grid.Column="1" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/HalfTurnRotate.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/ClockwiseRotate.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="InsertPartBtn" Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="StorePartBtn" Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<!-- Chiamata al Dictionary -->
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary Source="OmagCUTDictionary.xaml"></ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<!-- Definizione della NestPage -->
|
||||
<Grid Grid.Column="0" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Name="PositioningLbl" Grid.ColumnSpan="3" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center" FontSize="15" />
|
||||
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1" >
|
||||
<Image Source="Resources/UpArrow.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2" >
|
||||
<Image Source="Resources/LeftArrow.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<ToggleButton Name="MaximizeMoveBtn" Grid.Column="1" Grid.Row="2" >
|
||||
<Image Source="Resources/MaxMove.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</ToggleButton>
|
||||
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2" >
|
||||
<Image Source="Resources/RightArrow.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3" >
|
||||
<Image Source="Resources/DownArrow.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4" >
|
||||
<Image Source="Resources/CounterClockwiseRotate.png" Width="64" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="RotateHalfTurnBtn" Grid.Column="1" Grid.Row="4" >
|
||||
<Image Source="Resources/HalfTurnRotate.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4" >
|
||||
<Image Source="Resources/ClockwiseRotate.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelectAllBtn" FontSize="22" >
|
||||
<TextBlock Name="SelectAllTxt" TextWrapping="Wrap" TextAlignment="Center"/>
|
||||
</Button>
|
||||
<Button Name="DeselectAllBtn" FontSize="22" >
|
||||
<TextBlock Name="DeselectAllTxt" TextWrapping="Wrap" TextAlignment="Center"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="InsertPartBtn" FontSize="22" >
|
||||
<TextBlock Name="InsertPartTxt" TextWrapping="Wrap" TextAlignment="Center"/>
|
||||
</Button>
|
||||
<Button Name="StorePartBtn" FontSize="22" >
|
||||
<TextBlock Name="StorePartTxt" TextWrapping="Wrap" TextAlignment="Center"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6" FontSize="22" />
|
||||
|
||||
</Grid>
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelectAllBtn" Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="DeselectAllBtn" Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
+4
-4
@@ -30,11 +30,11 @@ Public Class NestPageUC
|
||||
|
||||
Private Sub NestPage_Initialized(sender As Object, e As EventArgs)
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
InsertPartTxt.Text = EgtMsg(MSG_NESTPAGEUC + 1) 'Insert part - Inserisci pezzo
|
||||
StorePartTxt.Text = EgtMsg(MSG_NESTPAGEUC + 2) 'Store part - Parcheggia pezzo
|
||||
InsertPartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 1) 'Insert part - Inserisci pezzo
|
||||
StorePartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 2) 'Store part - Parcheggia pezzo
|
||||
RemovePartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo
|
||||
SelectAllTxt.Text = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
|
||||
DeselectAllTxt.Text = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
|
||||
SelectAllBtn.Content = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
|
||||
DeselectAllBtn.Content = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
|
||||
End Sub
|
||||
|
||||
Private Sub NestPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
@@ -140,6 +140,9 @@
|
||||
<Compile Include="DrawPageUC.xaml.vb">
|
||||
<DependentUpon>DrawPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtDictionary.xaml.vb">
|
||||
<DependentUpon>EgtDictionary.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FrameCutPageUC.xaml.vb">
|
||||
<DependentUpon>FrameCutPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -244,6 +247,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtDictionary.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="FrameCutPageUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
+443
-14
@@ -1,11 +1,440 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
|
||||
xmlns:local="clr-namespace:OmagCUT.ArithmeticConverterNameSpace"
|
||||
x:Class="OmagCUTDictionary">
|
||||
|
||||
<!-- ** COLORI ** -->
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:project="clr-namespace:OmagCUT"
|
||||
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions"
|
||||
|
||||
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
|
||||
xmlns:local="clr-namespace:OmagCUT.ArithmeticConverterNameSpace"
|
||||
x:Class="OmagCUTDictionary">
|
||||
|
||||
|
||||
<!--Importo EgtDictionary-->
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="EgtDictionary.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!--Colori predefiniti-->
|
||||
<SolidColorBrush x:Key="OmagCut_Blue" Color="#FF095CA8" />
|
||||
<SolidColorBrush x:Key="OmagCut_Yellow" Color="#FFFFCE5B" />
|
||||
<SolidColorBrush x:Key="OmagCut_Red" Color="Red" />
|
||||
<SolidColorBrush x:Key="OmagCut_LightGray" Color="LightGray" />
|
||||
<SolidColorBrush x:Key="OmagCut_Gray" Color="#FF9E9E9E" />
|
||||
<SolidColorBrush x:Key="OmagCut_DarkGray" Color="#FF444444" />
|
||||
<SolidColorBrush x:Key="OmagCut_White" Color="#FFFFFFFF" />
|
||||
|
||||
<LinearGradientBrush x:Key="OmagCut_GradientBlue" StartPoint="0,0" EndPoint="0,1" >
|
||||
<GradientStop Color="LightGray"/>
|
||||
<GradientStop Color="#BCB8C3CD" Offset="0.3894"/>
|
||||
<GradientStop Color="#9387A6C3" Offset="0.7356"/>
|
||||
<GradientStop Color="#8E85A5C2" Offset="0.8942"/>
|
||||
<GradientStop Color="#826A95BD" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="OmagCut_GradientYellow" StartPoint="0,0" EndPoint="0,1" >
|
||||
<GradientStop Color="LightGray" Offset="0.2212"/>
|
||||
<GradientStop Color="#66FFCE5B" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="OmagCut_TopGradientGray" StartPoint="0,1" EndPoint="0,0" >
|
||||
<GradientStop Color="LightGray"/>
|
||||
<GradientStop Color="#FF9E9E9E" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="OmagCut_BottomGradientGray" StartPoint="0,0" EndPoint="0,1" >
|
||||
<GradientStop Color="LightGray"/>
|
||||
<GradientStop Color="#FF9E9E9E" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="OmagCut_LeftGradientGray" StartPoint="1,0" EndPoint="0,0" >
|
||||
<GradientStop Color="LightGray"/>
|
||||
<GradientStop Color="#FF9E9E9E" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="OmagCut_RightGradientGray" StartPoint="0,0" EndPoint="1,0" >
|
||||
<GradientStop Color="LightGray"/>
|
||||
<GradientStop Color="#FF9E9E9E" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="OmagCut_TreeViewGradientGray" StartPoint="0,0" EndPoint="0,1" >
|
||||
<GradientStop Color="LightGray"/>
|
||||
<GradientStop Color="#B29E9E9E" Offset="0.7007"/>
|
||||
<GradientStop Color="#CC565656" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<!--Parametri predefiniti-->
|
||||
<system:Double x:Key="Button_CornerRadius">9.5</system:Double> <!--2.5mm-->
|
||||
<CornerRadius x:Key="EmptyBorder_CornerRadius">9.5</CornerRadius> <!--2.5mm-->
|
||||
<Thickness x:Key="BorderThickness">3.3</Thickness> <!--2.5pt-->
|
||||
<system:Double x:Key="GroupBox_CornerRadius">9.5</system:Double> <!--2.5mm-->
|
||||
<system:Double x:Key="GroupBox_FirstColumn">12.5</system:Double> <!--3.3mm-->
|
||||
<system:Double x:Key="CheckBox_Height">40</system:Double>
|
||||
<system:Double x:Key="FontSize_UpperCaseCharacter">18.6</system:Double> <!--14pt-->
|
||||
<system:Double x:Key="FontSize_LowerCaseCharacter">20</system:Double> <!--15pt-->
|
||||
<system:Double x:Key="FontSize_LowerBarTitle">33.3</system:Double> <!--25pt-->
|
||||
<system:Double x:Key="FontSize_LowerBarValue">24</system:Double> <!--18pt-->
|
||||
<system:Double x:Key="FontSize_LowerBarOverride">18.6</system:Double> <!--14pt-->
|
||||
<system:Double x:Key="FontSize_UnitOfMeasure">13.3</system:Double> <!--10pt-->
|
||||
<Thickness x:Key="Button_MarginThickness">1</Thickness>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--Empty Border-->
|
||||
<Style x:Key="OmagCut_EmptyBorder" TargetType="{x:Type Border}" >
|
||||
<Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
|
||||
<Setter Property="CornerRadius" Value="{StaticResource EmptyBorder_CornerRadius}"/>
|
||||
<Setter Property="Margin" Value="1" />
|
||||
</Style>
|
||||
|
||||
<!--Border-->
|
||||
<Style x:Key="OmagCut_Border" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}" >
|
||||
<Setter Property="Background" Value="LightGray"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_IconBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}" >
|
||||
<Setter Property="Background" Value="White"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
|
||||
<Setter Property="Padding" Value="5"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--Button generico-->
|
||||
<Style x:Key="OmagCut_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
|
||||
<Setter Property="project:ButtonExtensions.CornerRadius" Value="{StaticResource Button_CornerRadius}"/>
|
||||
<Setter Property="Margin" Value="{StaticResource Button_MarginThickness}"/>
|
||||
<Setter Property="Padding" Value="5"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_Button_Wrap" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ToggleButton_DataTemplate_Wrap}" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_LowerCaseCharacter}" />
|
||||
</Style>
|
||||
|
||||
<!--BlueIconOmagCutButton-->
|
||||
<Style x:Key="OmagCut_BlueIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</Style>
|
||||
|
||||
<!--BlueTextOmagCutButton-->
|
||||
<Style x:Key="OmagCut_BlueTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</Style>
|
||||
|
||||
<!--GradientBlueOmagCutButton-->
|
||||
<Style x:Key="OmagCut_GradientBlueTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_GradientBlue}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</Style>
|
||||
|
||||
<!--YellowIconOmagCutButton-->
|
||||
<Style x:Key="OmagCut_YellowIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</Style>
|
||||
|
||||
<!--YellowTextOmagCutButton-->
|
||||
<Style x:Key="OmagCut_YellowTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</Style>
|
||||
|
||||
<!--YellowOmagCutButton-->
|
||||
<Style x:Key="OmagCut_YellowGradientYellowTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_GradientYellow}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</Style>
|
||||
|
||||
<!--YellowOmagCutButton-->
|
||||
<Style x:Key="OmagCut_TopGrayGradientYellowButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_TopGradientGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</Style>
|
||||
|
||||
<!--YellowOmagCutButton-->
|
||||
<Style x:Key="OmagCut_BottomGrayGradientYellowButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_BottomGradientGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</Style>
|
||||
|
||||
<!--YellowOmagCutButton-->
|
||||
<Style x:Key="OmagCut_LeftGrayGradientYellowButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_LeftGradientGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</Style>
|
||||
|
||||
<!--YellowOmagCutButton-->
|
||||
<Style x:Key="OmagCut_RightGrayGradientYellowButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_RightGradientGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</Style>
|
||||
|
||||
<!--YellowOmagCutButton-->
|
||||
<Style x:Key="OmagCut_TreeViewGrayGradientYellowButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_TreeViewGradientGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--CheckBox-->
|
||||
|
||||
<Style x:Key="OmagCut_CheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource {x:Type CheckBox}}">
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="Height" Value="{StaticResource CheckBox_Height}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CheckBox_Wrap" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource OmagCut_CheckBox}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource CheckBox_DataTemplate_Wrap}" />
|
||||
</Style>
|
||||
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--ComboBox-->
|
||||
|
||||
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--GroupBox-->
|
||||
|
||||
<DataTemplate x:Key="GroupBoxHeaderTemplate">
|
||||
<TextBlock Text="{Binding}" FontSize="22"/>
|
||||
</DataTemplate>
|
||||
|
||||
<Style x:Key="OmagCut_GroupBox" TargetType="{x:Type GroupBox}" BasedOn="{StaticResource {x:Type GroupBox}}">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="BorderThickness" Value="{StaticResource BorderThickness}" />
|
||||
<Setter Property="HeaderTemplate" Value="{StaticResource GroupBoxHeaderTemplate}"/>
|
||||
<Setter Property="ControlExtensions:GroupBoxExtensions.CornerRadius" Value="{StaticResource GroupBox_CornerRadius}" />
|
||||
<Setter Property="ControlExtensions:GroupBoxExtensions.FirstColumn" Value="{StaticResource GroupBox_FirstColumn}" />
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--Image-->
|
||||
|
||||
<!--Style dell'immagine all'interno di un Button-->
|
||||
<Style x:Key="ButtonIcon" TargetType="{x:Type Image}" >
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="65"/>
|
||||
<Setter Property="Height" Value="65"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--TextBlock-->
|
||||
|
||||
<Style x:Key="OmagCut_UpperCaseCharacterTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_LowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CurrProjSummeryTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
|
||||
<Setter Property="TextWrapping" Value="NoWrap"/>
|
||||
<Setter Property="Margin" Value="6,1,0,1"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_LowerBarTitleTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_LowerBarTitle}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
<Setter Property="Margin" Value="5,0,0,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_LowerBarValueTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_LowerBarValue}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="0,0,5,2"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_LowerBarOverrideTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_LowerBarOverride}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="0,0,5,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_UnitOfMeasureTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_UnitOfMeasure}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_SingleUpperCaseCharacterTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_LowerBarTitle}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--TextBox-->
|
||||
|
||||
<Style x:Key="OmagCut_TextBox" BasedOn="{x:Null}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Black"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_FixedTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Gray}"/>
|
||||
<Setter Property="IsReadOnly" Value="True"/>
|
||||
<Setter Property="IsEnabled" Value="False"/>
|
||||
<Setter Property="Template" Value="{StaticResource FixedTextBoxTemplate}" />
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--ToggleButton-->
|
||||
|
||||
<Style x:Key="OmagCut_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
|
||||
<Setter Property="ControlExtensions:ToggleButtonExtensions.CornerRadius" Value="{StaticResource Button_CornerRadius}"/>
|
||||
<Setter Property="Margin" Value="{StaticResource Button_MarginThickness}"/>
|
||||
<Setter Property="Padding" Value="5"/>
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_ToggleButton_Wrap" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ToggleButton_DataTemplate_Wrap}" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_BlueToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton_Wrap}">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Yellow}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_YellowToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton}">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Blue}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--TreeView-->
|
||||
|
||||
<!--Style dei nodi CathegoryItem che non li evidenzia quando clicckati-->
|
||||
<Style x:Key="OmagCut_ItemContainerStyle" TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="19" Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border x:Name="ExpanderBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
|
||||
</Border>
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
<ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="false">
|
||||
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="HasItems" Value="false">
|
||||
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" TargetName="Bd" Value="0,1,1,1"/>
|
||||
<Setter Property="Background" TargetName="ExpanderBorder" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" TargetName="ExpanderBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" TargetName="ExpanderBorder" Value="1,1,0,1"/>
|
||||
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="true"/>
|
||||
<Condition Property="IsSelectionActive" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</MultiTrigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
|
||||
<!-- ** COLORI ** -->
|
||||
|
||||
<!-- ** TAB CONTROL ** -->
|
||||
<!-- ** Tab Item ** -->
|
||||
@@ -203,7 +632,7 @@
|
||||
|
||||
<!-- ** BUTTON ** -->
|
||||
|
||||
<Style TargetType="Button">
|
||||
<!--<Style TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
@@ -222,7 +651,7 @@
|
||||
</Border>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<!--The appearance of a Button when it's pressed-->
|
||||
--><!--The appearance of a Button when it's pressed--><!--
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Panel.ZIndex" Value="90" />
|
||||
<Setter TargetName="Border" Property="BorderBrush"
|
||||
@@ -238,7 +667,7 @@
|
||||
</Setter>
|
||||
</Trigger>
|
||||
|
||||
<!--The appearance of a Button when it's not pressed-->
|
||||
--><!--The appearance of a Button when it's not pressed--><!--
|
||||
<Trigger Property="IsPressed" Value="False">
|
||||
<Setter Property="Foreground"
|
||||
Value="{StaticResource ButtonTextColor_Unselected}"/>
|
||||
@@ -247,7 +676,7 @@
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Style>-->
|
||||
|
||||
<!-- Button Image Style -->
|
||||
<Style TargetType="Image" x:Key="ButtonImage">
|
||||
@@ -267,7 +696,7 @@
|
||||
|
||||
<!-- ** TOGGLEBUTTON ** -->
|
||||
|
||||
<Style TargetType="ToggleButton">
|
||||
<!--<Style TargetType="ToggleButton">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
@@ -287,7 +716,7 @@
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
|
||||
<!--The appearance of a Button when it's checked-->
|
||||
--><!--The appearance of a Button when it's checked--><!--
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="Panel.ZIndex" Value="90" />
|
||||
<Setter TargetName="Border" Property="BorderBrush"
|
||||
@@ -300,7 +729,7 @@
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Style>-->
|
||||
|
||||
<!-- *************************************************************************** -->
|
||||
|
||||
|
||||
+40
-47
@@ -1,57 +1,50 @@
|
||||
<UserControl x:Class="SceneButtonsUC"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="64" d:DesignWidth="455">
|
||||
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="64" d:DesignWidth="455">
|
||||
|
||||
<!-- Chiamata al Dictionary -->
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<!-- Definizione del controllo SceneButton -->
|
||||
<Grid Name="SceneButtonsGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="ZoomAllBtn" Grid.Column="0" >
|
||||
<Image Source="Resources/ZoomAll.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="ZoomInBtn" Grid.Column="1" >
|
||||
<Image Source="Resources/ZoomIn.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="ZoomOutBtn" Grid.Column="2" >
|
||||
<Image Source="Resources/ZoomOut.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="ZoomWinBtn" Grid.Column="3" >
|
||||
<Image Source="Resources/ZoomWin.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="PanBtn" Grid.Column="4" >
|
||||
<Image Source="Resources/Pan.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="GenericViewBtn" Grid.Column="5">
|
||||
<Image Source="Resources/GenericView.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="TopViewBtn" Grid.Column="6">
|
||||
<Image Source="Resources/LookFromTOP.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Grid Name="SceneButtonsGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
<Button Name="ZoomAllBtn" Grid.Column="0" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/ZoomAll.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ZoomInBtn" Grid.Column="1" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/ZoomIn.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ZoomOutBtn" Grid.Column="2" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/ZoomOut.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ZoomWinBtn" Grid.Column="3" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/ZoomWin.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="PanBtn" Grid.Column="4" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/Pan.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="GenericViewBtn" Grid.Column="5" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/GenericView.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="TopViewBtn" Grid.Column="6" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="Resources/LookFromTOP.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user