a4b5cd4834
- Cambiati nomi classi e file.
93 lines
5.0 KiB
XML
93 lines
5.0 KiB
XML
<UserControl x:Class="OperationExpanderView"
|
|
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:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
|
|
|
<StackPanel Name="OperationExpanderViewStackPanel" IsEnabled="{Binding OperViewIsEnabled}">
|
|
|
|
<Expander Header="{Binding OperationListHeader}" IsExpanded="{Binding ListIsExpanded}" Name="OperationsListExpander"
|
|
Style="{StaticResource ExpanderStyle}">
|
|
<Expander.InputBindings>
|
|
<KeyBinding Key="Escape" Command="{Binding CancelOperationCommand}" CommandParameter="Escape"/>
|
|
</Expander.InputBindings>
|
|
|
|
<StackPanel>
|
|
|
|
<UniformGrid Rows="1">
|
|
<Button Content="{Binding NewMachiningBtnContent}" Command="{Binding NewMachiningCommand}" Height="30"/>
|
|
<Button Content="{Binding NewPositioningBtnContent}" Command="{Binding NewPositioningCommand}" Height="30"/>
|
|
<Button Content="{Binding CancelOperationBtnContent}" Command="{Binding CancelOperationCommand}" Height="30"/>
|
|
</UniformGrid>
|
|
<ListBox IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding OperationList}" SelectedItem="{Binding SelectedOperation}"
|
|
Height="200" x:Name="OperationList" IsEnabled="{Binding IsEnabledOperationList}">
|
|
<ListBox.Resources>
|
|
<DataTemplate DataType="{x:Type EgtCAM5:MachiningOpListBoxItem}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<CheckBox IsChecked="{Binding Status}" Margin="0,0,5,0"/>
|
|
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}" Margin="0,0,5,0"/>
|
|
<TextBlock Grid.Column="2" Text="{Binding Info}"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type EgtCAM5:DispositionOpListBoxItem}">
|
|
<Border CornerRadius="1" Background="{StaticResource EgaltechBlue3}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
|
|
<TextBlock Text="{Binding Name}" Foreground="White"
|
|
FontSize="15" FontWeight="SemiBold"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.Resources>
|
|
<Interactivity:Interaction.Triggers>
|
|
<Interactivity:EventTrigger EventName="MouseDoubleClick">
|
|
<Interactivity:InvokeCommandAction Command="{Binding OperationListDoubleClickCommand}"/>
|
|
</Interactivity:EventTrigger>
|
|
</Interactivity:Interaction.Triggers>
|
|
<Interactivity:Interaction.Behaviors>
|
|
<EgtCAM5:ScrollIntoViewForListBox/>
|
|
</Interactivity:Interaction.Behaviors>
|
|
<ListBox.InputBindings>
|
|
<KeyBinding Key="Delete" Command="{Binding CancelOperationCommand}"/>
|
|
</ListBox.InputBindings>
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
</ListBox>
|
|
|
|
<UniformGrid Rows="1">
|
|
<Button Content="{Binding MoveUpMsg}" Command="{Binding MoveUpCommand}" Height="30"/>
|
|
<Button Content="{Binding MoveDownMsg}" Command="{Binding MoveDownCommand}" Height="30"/>
|
|
<Button Content="{Binding UpdateMsg}" Command="{Binding UpdateCommand}" Height="30"/>
|
|
<Button Content="{Binding SetUpMsg}" Command="{Binding SetUpCommand}" Height="30"/>
|
|
</UniformGrid>
|
|
|
|
</StackPanel>
|
|
</Expander>
|
|
|
|
<Expander IsExpanded="{Binding ParametersIsExpanded}" Name="OperationParametersExpander"
|
|
Style="{StaticResource ExpanderStyle}" Padding="3">
|
|
<Expander.Header>
|
|
<TextBlock Text="{Binding ParametersExpanderName}"/>
|
|
</Expander.Header>
|
|
|
|
<!--ContentPresenter that contains the OperationParameters-->
|
|
<ContentPresenter Name="OperationParameters" Content="{Binding OperationParameters,Mode=OneWay}"/>
|
|
|
|
</Expander>
|
|
|
|
</StackPanel>
|
|
|
|
</UserControl>
|