Gestione colori interfaccia MachiningDB

This commit is contained in:
Nicola Pievani
2023-09-07 14:59:39 +02:00
parent 66685b7e4f
commit 41f5b6ba70
10 changed files with 227 additions and 94 deletions
+15 -7
View File
@@ -28,16 +28,19 @@
</Grid.RowDefinitions>
<!--Seconda Colonna Terza riga-->
<GroupBox Header="{Binding SetUpMsg}" Grid.Column="1" Grid.Row="2">
<GroupBox Header="{Binding SetUpMsg}" Grid.Column="1" Grid.Row="2"
Style="{StaticResource GroupBoxOptionWnd}">
<Grid>
<ComboBox ItemsSource="{Binding ArchivedSetUpList}"
Style="{StaticResource OptionWnd_ComboBox}"
SelectedItem="{Binding SelectedDefaultSetUp}"
VerticalAlignment="Center"/>
</Grid>
</GroupBox>
<!--Seconda colonna Prima Riga-->
<GroupBox Header="{Binding HolesMsg}" Grid.Column="1" Grid.Row="0">
<GroupBox Header="{Binding HolesMsg}" Grid.Column="1" Grid.Row="0"
Style="{StaticResource GroupBoxOptionWnd}">
<Grid>
<Grid.RowDefinitions>
@@ -75,7 +78,8 @@
<!--Prima Colonna quarta riga - Lista Materiali-->
<GroupBox Header="{Binding MaterialsMsg}" Grid.Column="0"
Grid.Row="3" Grid.RowSpan="5" Visibility="{Binding Materials_Visibility}">
Grid.Row="3" Grid.RowSpan="5" Visibility="{Binding Materials_Visibility}"
Style="{StaticResource GroupBoxOptionWnd}">
<DockPanel>
@@ -126,7 +130,8 @@
</GroupBox>
<!--Parametri taglio lama-->
<GroupBox Header="{Binding SawParamMsg}" Visibility="{Binding SawParam_Visibility}">
<GroupBox Header="{Binding SawParamMsg}" Visibility="{Binding SawParam_Visibility}"
Style="{StaticResource GroupBoxOptionWnd}">
<UniformGrid Columns="2" >
<TextBlock Text="{Binding CutExtraLenMsg}"
@@ -157,7 +162,8 @@
</GroupBox>
<!--Seconda colonna, seconda riga-->
<GroupBox Header="{Binding MachineParamMsg}" Grid.Column="1" Grid.Row="1">
<GroupBox Header="{Binding MachineParamMsg}" Grid.Column="1" Grid.Row="1"
Style="{StaticResource GroupBoxOptionWnd}">
<UniformGrid Columns="2">
<TextBlock Text="{Binding SafeZMsg}"
@@ -168,7 +174,8 @@
</GroupBox>
<GroupBox Header="{Binding MillingParamMsg}" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2">
<GroupBox Header="{Binding MillingParamMsg}" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2"
Style="{StaticResource GroupBoxOptionWnd}">
<UniformGrid Rows="3">
<Grid Visibility="{Binding MillingParam_Visibility}">
@@ -194,7 +201,8 @@
</GroupBox>
<!--Nesting-->
<GroupBox Header="{Binding NestingParamMsg}" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2">
<GroupBox Header="{Binding NestingParamMsg}" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2"
Style="{StaticResource GroupBoxOptionWnd}">
<UniformGrid Columns="2" >
+2 -1
View File
@@ -1,3 +1,4 @@
Public Class MachinePanelV
Public Class MachinePanelV
End Class
+12 -1
View File
@@ -122,6 +122,7 @@ Public Class MyMachinePanelVM
Dim ToolDbWindowVM As New ToolDbWindowVM(CurrentMachine.sMachDir, CurrentMachine.sMachIniFile, OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx(), "Stone", OmagOFFICEMap.refMainWindowVM.MainWindowM.nUserLevel > 5)
Dim ToolDbWindowV As New ToolDbWindowV(Application.Current.MainWindow, ToolDbWindowVM)
'Dim ToolDbWindowV As New MyToolDbWindowV(Application.Current.MainWindow, ToolDbWindowVM)
If ToolDbWindowVM.MatType <> 0 Then
ToolDbWindowV.Height = 640
ToolDbWindowV.Width = 1024
@@ -142,6 +143,7 @@ Public Class MyMachinePanelVM
''' </summary>
Public Overrides Sub MachDb(ByVal param As Object)
If Not VerifyMachinesDir(m_sMachinesRoot) Then Return
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtMdbReload() Then
EgtOutLog("Impossible reloading machining Db")
@@ -149,7 +151,16 @@ Public Class MyMachinePanelVM
Return
End If
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(CurrentMachine.sMachIniFile, OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx(), "Stone", OmagOFFICEMap.refMainWindowVM.MainWindowM.nUserLevel > 5)
Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
' Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
' definisco lo stile della pagina
MachDbWindowVM.TextForegroundTxBl = Brushes.White
MachDbWindowVM.BorderGrbThickness = 0.25
MachDbWindowVM.TextBackgroundTxBx = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
MachDbWindowVM.TextForegroundTxBx = Brushes.White
Dim MachDbWindowV As New MyMachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
MachDbWindowV.Height = 768
+46 -18
View File
@@ -94,36 +94,61 @@
<sys:Int32 x:Key="ThicknessFeed">71</sys:Int32>
</EgtWPFLib5:EgtCustomWindow.Resources>
<Grid>
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.75*"/>
<ColumnDefinition Width="0.95*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="11*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="12*"/>
</Grid.RowDefinitions>
<UniformGrid Grid.Row="0" Columns="3">
<UniformGrid Grid.Row="0" Columns="6">
<Button Content="New" Command="{Binding NewCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"/>
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
Height="45" Width="45"
Background="{StaticResource Omag_Black}" Foreground="{StaticResource Omag_White}"/>
<Button Content="Save" Command="{Binding SaveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"/>
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
Height="45" Width="45"
Background="{StaticResource Omag_Black}" Foreground="{StaticResource Omag_White}"/>
<Button Content="Remove" Command="{Binding RemoveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"/>
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
Height="45" Width="45"
Background="{StaticResource Omag_Black}" Foreground="{StaticResource Omag_White}"/>
<Button Content="Import"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
Height="45" Width="45"
Background="{StaticResource Omag_Black}" Foreground="{StaticResource Omag_White}"/>
<Button Content="Export"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
Height="45" Width="45"
Background="{StaticResource Omag_Black}" Foreground="{StaticResource Omag_White}"/>
<Button Content="Reset"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
Height="45" Width="45"
Background="{StaticResource Omag_Black}" Foreground="{StaticResource Omag_White}"/>
</UniformGrid>
<TreeView Name="MachiningsTreeView" Grid.Row="1"
ItemsSource="{Binding Path=MachiningsList}">
<TreeView Name="MachiningsTreeView" Grid.Row="1"
Background="Transparent" BorderThickness="0"
ItemsSource="{Binding Path=MachiningsList}">
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="FontSize" Value="10" />
<Setter Property="Foreground" Value="{StaticResource Omag_White}" />
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
@@ -133,23 +158,23 @@
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}" ItemsSource="{Binding Items}">
<Grid >
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" />
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="5,0,10,0" VerticalAlignment="Center" HorizontalAlignment="left" />
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
</Grid>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}">
<Grid >
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
@@ -157,14 +182,17 @@
</Grid.ColumnDefinitions>
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
<TextBlock Grid.Column="1" Text="{Binding NamePar}" Height="18" FontSize="15" Margin="10"/>
<TextBlock Grid.Column="1" Text="{Binding NamePar}" Height="21" FontSize="13" Margin="30,0,10,0"
VerticalAlignment="Center" HorizontalAlignment="left"/>
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
</Grid>
</DataTemplate>
</TreeView.Resources>
</TreeView>
</Grid>
@@ -1,21 +1,21 @@
'Imports EgtWPFLib5
Imports EgtWPFLib5
Public Class MyMachiningDbWindowV
' Private WithEvents m_MachiningDbWindowVM As MyMachiningDbWindowVM
Private WithEvents m_MachiningDbWindowVM As EgtWPFLib5.MachiningDbWindowVM
' Sub New(Owner As Window, MachiningDbWindowVM As MyMachiningDbWindowVM)
' MyBase.New(Owner)
' ' This call is required by the designer.
' InitializeComponent()
' Me.DataContext = MachiningDbWindowVM
' ' Assegno al riferimento locale al VM il VM preso dal DataContext
' m_MachiningDbWindowVM = MachiningDbWindowVM
' End Sub
Sub New(Owner As Window, MachiningDbWindowVM As EgtWPFLib5.MachiningDbWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = MachiningDbWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_MachiningDbWindowVM = MachiningDbWindowVM
End Sub
' Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MachiningDbWindowVM.m_CloseWindow
' Me.DataContext = Nothing
' Me.DialogResult = bDialogResult
' End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MachiningDbWindowVM.m_CloseWindow
Me.DataContext = Nothing
Me.DialogResult = bDialogResult
End Sub
End Class
+77 -50
View File
@@ -48,40 +48,65 @@
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.75*"/>
<ColumnDefinition Width="0.95*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="11*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="12*"/>
</Grid.RowDefinitions>
<UniformGrid Grid.Row="0" Columns="3">
<Button Content="New" Command="{Binding NewCommand}"
<UniformGrid Grid.Row="0" Columns="6">
<Button Content="New" Command="{Binding NewCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"/>
<Button Content="Save" Command="{Binding SaveCommand}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
Height="45" Width="45"
Background="{StaticResource Omag_Black}" Foreground="{StaticResource Omag_White}"/>
<Button Content="Save" Command="{Binding SaveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"/>
<Button Content="Remove" Command="{Binding RemoveCommand}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
Height="45" Width="45"
Background="{StaticResource Omag_Black}" Foreground="{StaticResource Omag_White}"/>
<Button Content="Remove" Command="{Binding RemoveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"/>
</UniformGrid>
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
Height="45" Width="45"
Background="{StaticResource Omag_Black}" Foreground="{StaticResource Omag_White}"/>
<!--Elenco degli utensili-->
<Button Content="Import"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
Height="45" Width="45"
Background="{StaticResource Omag_Black}" Foreground="{StaticResource Omag_White}"/>
<Button Content="Export"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
Height="45" Width="45"
Background="{StaticResource Omag_Black}" Foreground="{StaticResource Omag_White}"/>
<Button Content="Reset"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
Height="45" Width="45"
Background="{StaticResource Omag_Black}" Foreground="{StaticResource Omag_White}"/>
</UniformGrid>
<!--Elenco degli utensili-->
<TreeView Name="ToolsTreeView" Grid.Row="1"
Background="Transparent" BorderThickness="0"
ItemsSource="{Binding ToolsList}">
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
</Style>
</TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="FontSize" Value="10" />
<Setter Property="Foreground" Value="{StaticResource Omag_White}" />
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
</Style>
</TreeView.ItemContainerStyle>
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyToolTreeViewItem}" ItemsSource="{Binding Items}">
@@ -118,7 +143,7 @@
</Grid>
<Grid Grid.Column="1" Grid.RowSpan="2" Margin="0,2,0,0">
<!--<Grid Grid.Column="1" Grid.RowSpan="2" Margin="0,2,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
@@ -214,10 +239,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource Feed}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=FeedTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
@@ -242,10 +267,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource StartFeed}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=StartFeedTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
@@ -387,10 +412,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource LonOffset}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=LonOffsetTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
@@ -446,10 +471,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource Corr}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=CorrTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
@@ -474,10 +499,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource UserNotes}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=UserNotesTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
@@ -587,10 +612,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource TipFeed}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=TipFeedTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
@@ -615,10 +640,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource EndFeed}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=EndFeedTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
@@ -702,10 +727,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource CornRad}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=CornRadTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
@@ -730,10 +755,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource SideAng}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=SideAngTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
@@ -758,10 +783,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource RadOffset}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=RadOffsetTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
@@ -818,10 +843,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource TcPos}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=TcPosTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
@@ -846,10 +871,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource MaxAbsorption}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=MaxAbsorptionTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
@@ -874,10 +899,10 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource MinFeed}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=MinFeedTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
<Grid Grid.Column="0" Grid.Row="13">
@@ -904,17 +929,19 @@
ElementName=ToolsTreeView,
Converter={StaticResource ToolParamVisibilityConverter},
ConverterParameter={StaticResource Coolant}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
--><!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=CoolantTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
UpdateSourceTrigger=PropertyChanged}"/>--><!--
</Grid>
</Grid>
</Grid>-->
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
<ContentControl Content="{Binding ToolSceneHost}" Grid.Column="2"/>
<ContentControl Content="{Binding Path=ParamPageV}" Grid.Column="1"/>
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
<ContentControl Content="{Binding ToolSceneHost}" Grid.Column="2"/>
</Grid>
+30 -1
View File
@@ -1,3 +1,32 @@
Public Class MyToolDbWindowV
Imports EgtUILib
Public Class MyToolDbWindowV
Private WithEvents m_ToolDbWindowVM As EgtWPFLib5.ToolDbWindowVM
Sub New(Owner As Window, ToolDbWindowVM As EgtWPFLib5.ToolDbWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ToolDbWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_ToolDbWindowVM = ToolDbWindowVM
End Sub
Private Sub ToolsDbView_Closed(sender As Object, e As System.EventArgs) Handles Me.Closed
'' Imposto contesto generale
'EgtSetCurrentContext(EgtWPFLib5.ToolDbWindowVM.m_ProjectSceneContext)
'' Cancello contesto di visualizzazione utensile
'EgtDeleteContext(ToolDbWindowVM.m_ToolDbSceneContext)
'ToolDbWindowVM.m_ToolDbSceneContext = 0
Dim x As Boolean = False
End Sub
Private Sub ToolsDbView_Closing(sender As Object, e As ComponentModel.CancelEventArgs) Handles Me.Closing
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
e.Cancel = True
Return
End If
End Sub
End Class
+1
View File
@@ -5,6 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtPHOTOLib="clr-namespace:EgtPHOTOLib;assembly=EgtPHOTOLib"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300"
Title="OmagPHOTO"
+11 -1
View File
@@ -21,9 +21,11 @@
</Grid.RowDefinitions>
<GroupBox Header="{Binding CurrentLanguageMsg}"
Style="{StaticResource GroupBoxOptionWnd}"
Grid.Column="0" Margin="0,0,5,5">
<UniformGrid Rows="2">
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
Style="{DynamicResource OptionWnd_ComboBox}"
SelectedItem="{Binding SelLanguage}" DisplayMemberPath="Name"/>
<TextBlock Text="{Binding LanguageAdvertMsg}" TextWrapping="Wrap"
TextAlignment="Center"/>
@@ -31,20 +33,25 @@
</GroupBox>
<GroupBox Header="{Binding MeasureUnitMsg}"
Style="{StaticResource GroupBoxOptionWnd}"
Grid.Column="1" Margin="0,0,5,5">
<ComboBox ItemsSource="{Binding MeasureUnitList, Mode=OneWay}"
Style="{DynamicResource OptionWnd_ComboBox}"
SelectedIndex="{Binding SelMeasureUnit}"
Height="25" Width="60"/>
</GroupBox>
<GroupBox Header="{Binding SideAngleHdr}"
Style="{StaticResource GroupBoxOptionWnd}"
Grid.Row="1" Margin="0,0,5,5">
<ComboBox ItemsSource="{Binding SideModeList, Mode=OneWay}"
Style="{DynamicResource OptionWnd_ComboBox}"
SelectedIndex="{Binding SelSideModeIndex}"
Height="25"/>
</GroupBox>
<GroupBox Header="{Binding DirectInsertHdr}"
Style="{StaticResource GroupBoxOptionWnd}"
Grid.Row="2" Margin="0,0,5,5">
<UniformGrid Rows="2">
<Grid>
@@ -63,7 +70,8 @@
</GroupBox>
<GroupBox Header="{Binding TextColorMsg}"
Grid.Column="1" Grid.Row="1" Margin="0,0,5,5">
Style="{StaticResource GroupBoxOptionWnd}"
Grid.Column="1" Grid.Row="1" Margin="0,0,5,5">
<Button Height="25" Width="60" Margin="0,5,0,0" Background="{Binding TextColorBackground}"
Command="{Binding ChangeColorCommand}" IsEnabled="{Binding bSelOk}" Style="{StaticResource Option_ColorButton}">
</Button>
@@ -71,6 +79,7 @@
<!--SideAngle from color-->
<GroupBox Name="ColorToSideAngGpBx" Header="{Binding ColorToSideAngMsg}"
Style="{StaticResource GroupBoxOptionWnd}"
Grid.Column="0" Grid.Row="3" Margin="0,0,5,5" >
<Grid>
@@ -146,6 +155,7 @@
<!--Engrave from color-->
<GroupBox Name="ColorToEngraveGpBx" Header="{Binding ColorToEngraveMsg}"
Style="{StaticResource GroupBoxOptionWnd}"
Grid.Column="1" Grid.Row="3" Margin="0,0,5,5" >
<Grid>
+19 -1
View File
@@ -53,7 +53,9 @@
<Thickness x:Key="BorderGpBx_Thickness">0.25</Thickness>
<Thickness x:Key="BorderBrd_Thickness">0.5</Thickness>
<SolidColorBrush x:Key="ForegroundTextBlock" Color="White" />
<Style x:Key="MyStyleStringParam" TargetType="{x:Type EgtWPFLib5:StringParamV}" BasedOn="{StaticResource {x:Type EgtWPFLib5:StringParamV}}">
<Setter Property="ForegroundParamTxBl" Value="White"/>
</Style>
<!--Colori per EgtWPFLib5-->
<!-- ____________________________________ EGT TEXTBOX ____________________________________ -->
@@ -930,6 +932,15 @@
<Setter Property="Width" Value="Auto" />
</Style>
<Style x:Key="OptionWnd_ComboBox" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
<Setter Property="Background" Value="{StaticResource Omag_Black}"/>
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
<Setter Property="BorderThickness" Value="{StaticResource BorderBtn_Thickness}"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Height" Value="30" />
<Setter Property="Width" Value="Auto" />
</Style>
<Style x:Key="MachiningsComboBox" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
<Setter Property="Margin" Value="0,0,0,10"/>
</Style>
@@ -1017,4 +1028,11 @@
<Setter Property="Margin" Value="0,0,0,0"/>
</Style>
<Style x:Key="GroupBoxOptionWnd" TargetType="{x:Type GroupBox}">
<Setter Property="BorderThickness" Value="{StaticResource BorderGpBx_Thickness}"/>
<Setter Property="BorderBrush" Value="{StaticResource Omag_White}"/>
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
<Setter Property="Margin" Value="0,0,0,0"/>
</Style>
</ResourceDictionary>