aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2018-08-04 15:27:45 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2018-08-04 15:27:45 +0300
commitdf9efa378c7741e325b0de775cf7b33634b9f8b3 (patch)
tree6b21faff08f9fbbf1e6e158ccab4ea3f81b60371 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views
parentdb9119d86fa9e2efd2c3dfab8ac2c49c2ee4da70 (diff)
downloadTango-df9efa378c7741e325b0de775cf7b33634b9f8b3.tar.gz
Tango-df9efa378c7741e325b0de775cf7b33634b9f8b3.zip
Implemented Blowers, Break Sensors in Machine Versions Module.
Removed all unnecessary Observable entities extension methods.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml76
1 files changed, 76 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml
index e22b0e71a..86e0da5b5 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml
@@ -263,6 +263,82 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
+
+ <StackPanel Orientation="Horizontal" Margin="0 20 0 0">
+ <Image VerticalAlignment="Center" Source="../Images/blower.png" Width="32"></Image>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="18" FontWeight="SemiBold">BLOWERS</TextBlock>
+ </StackPanel>
+ <ListBox Style="{StaticResource typesList}" HorizontalContentAlignment="Stretch" ItemsSource="{Binding BlowerTypes}" Margin="60 15" SelectedItem="{Binding SelectedHardwareObjectType}">
+ <ListBox.ItemTemplate>
+ <DataTemplate DataType="{x:Type entities:HardwareBlowerType}">
+ <DockPanel>
+ <Button DockPanel.Dock="Right" Cursor="Hand" Foreground="DimGray" Height="20" FontSize="10" ToolTip="Copy this item parameters to the selected item" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.CopyParametersCommand}" CommandParameter="{Binding}">
+ <Button.Style>
+ <Style TargetType="Button" BasedOn="{StaticResource MaterialDesignFlatButton}">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.SelectedHardwareObjectType.Data.ObjectType.BaseType}" Value="{x:Type entities:HardwareBlowerType}">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Button.Style>
+ <Button.Content>
+ <StackPanel Orientation="Horizontal">
+ <TextBlock VerticalAlignment="Center">Copy Parameters</TextBlock>
+ <materialDesign:PackIcon Margin="10 0 0 0" VerticalAlignment="Center" Kind="ArrowRight" Width="16" Height="16" />
+ </StackPanel>
+ </Button.Content>
+ </Button>
+ <StackPanel Orientation="Horizontal">
+ <CheckBox VerticalAlignment="Center" IsChecked="{Binding IsSelected}"></CheckBox>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding Data.Description}"></TextBlock>
+ </StackPanel>
+ </DockPanel>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+
+ <StackPanel Orientation="Horizontal" Margin="0 20 0 0">
+ <Image VerticalAlignment="Center" Source="../Images/break.png" Width="32"></Image>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="18" FontWeight="SemiBold">BREAK SENSORS</TextBlock>
+ </StackPanel>
+ <ListBox Style="{StaticResource typesList}" HorizontalContentAlignment="Stretch" ItemsSource="{Binding BreakSensorTypes}" Margin="60 15" SelectedItem="{Binding SelectedHardwareObjectType}">
+ <ListBox.ItemTemplate>
+ <DataTemplate DataType="{x:Type entities:HardwareBreakSensorType}">
+ <DockPanel>
+ <Button DockPanel.Dock="Right" Cursor="Hand" Foreground="DimGray" Height="20" FontSize="10" ToolTip="Copy this item parameters to the selected item" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.CopyParametersCommand}" CommandParameter="{Binding}">
+ <Button.Style>
+ <Style TargetType="Button" BasedOn="{StaticResource MaterialDesignFlatButton}">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.SelectedHardwareObjectType.Data.ObjectType.BaseType}" Value="{x:Type entities:HardwareBreakSensorType}">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Button.Style>
+ <Button.Content>
+ <StackPanel Orientation="Horizontal">
+ <TextBlock VerticalAlignment="Center">Copy Parameters</TextBlock>
+ <materialDesign:PackIcon Margin="10 0 0 0" VerticalAlignment="Center" Kind="ArrowRight" Width="16" Height="16" />
+ </StackPanel>
+ </Button.Content>
+ </Button>
+ <StackPanel Orientation="Horizontal">
+ <CheckBox VerticalAlignment="Center" IsChecked="{Binding IsSelected}"></CheckBox>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding Data.Description}"></TextBlock>
+ </StackPanel>
+ </DockPanel>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
</StackPanel>
</ScrollViewer>