LoaderStationPositionControl.xaml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <UserControl
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="CyberX8_Themes.UserControls"
  7. xmlns:converters="clr-namespace:CyberX8_Themes.Converters"
  8. xmlns:customControls="clr-namespace:CyberX8_Themes.CustomControls"
  9. xmlns:Control="clr-namespace:MECF.Framework.UI.Core.Control;assembly=MECF.Framework.UI.Core"
  10. x:Class="CyberX8_Themes.UserControls.LoaderStationPositionControl"
  11. mc:Ignorable="d" x:Name="self"
  12. d:DesignHeight="160" d:DesignWidth="400" IsVisibleChanged="IsControlVisibleChanged">
  13. <UserControl.Resources>
  14. <converters:BoolToColor x:Key="boolToColor"/>
  15. </UserControl.Resources>
  16. <Grid>
  17. <GroupBox Header="{Binding ModuleTitle, ElementName=self}" Background="{DynamicResource Table_BD_Title}" BorderBrush="DarkGray">
  18. <Grid>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="30"/>
  21. <RowDefinition Height="30"/>
  22. <RowDefinition Height="30"/>
  23. <RowDefinition Height="30"/>
  24. <RowDefinition Height="30"/>
  25. <RowDefinition/>
  26. </Grid.RowDefinitions>
  27. <Grid.ColumnDefinitions>
  28. <ColumnDefinition Width="130"/>
  29. <ColumnDefinition Width="135"/>
  30. <ColumnDefinition Width="120"/>
  31. </Grid.ColumnDefinitions>
  32. <ComboBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="7,2" ItemsSource="{Binding ElementName=self,Path=ModuleItemSource}" SelectedItem="{Binding ElementName=self,Path=ModuleSelectedItem,Mode=TwoWay}"
  33. SelectionChanged="Station_SelectionChanged"/>
  34. <WrapPanel Grid.Row="0" Grid.Column="2" >
  35. <Label Height="40" FontSize="12" Content="At Station" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  36. <Ellipse Margin="5,0" Width="16" Height="16" Fill="{Binding IsAtStation, Converter={StaticResource boolToColor}, ElementName=self}" Stroke="Silver"/>
  37. </WrapPanel>
  38. <Label Grid.Row="1" Grid.Column="0" Content="Saved Position" VerticalAlignment="Center" Margin="2" FontSize="14" FontWeight="Bold"/>
  39. <WrapPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
  40. <TextBlock Width="80" Text="{Binding SavedPosition, ElementName=self, StringFormat=\{0:F2\},Mode=TwoWay}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  41. <TextBlock Margin="2,0" Width="45" Text="deg" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  42. </WrapPanel>
  43. <Button Style="{StaticResource SysBtnStyle}" Content="Goto Saved Pos" Grid.Column="2" Grid.Row="1" Height="25" FontSize="13" Click="SavedPos_Click" Margin="0,2,0,3"/>
  44. <Label Grid.Row="2" Grid.Column="0" Content="Current Position" VerticalAlignment="Center" Margin="2" FontSize="14" FontWeight="Bold"/>
  45. <WrapPanel Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
  46. <TextBlock Width="80" Text="{Binding CurrentPosition, ElementName=self, StringFormat=\{0:F2\},Mode=TwoWay}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  47. <TextBlock Margin="2,0" Width="45" Text="deg" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  48. </WrapPanel>
  49. <Button Style="{StaticResource SysBtnStyle}" Content="Save Motor Pos" Grid.Column="2" Grid.Row="2" Height="25" FontSize="13" Click="MotorPos_Click" Margin="0,3,0,2"/>
  50. <customControls:PathButton Grid.Row="3" Grid.Column="0" PathData="{StaticResource Ico_LeftDbArrow}" DefaultFillBrush="White" Click="LeftCommand_Click" Width="40" Height="25" Margin="80,2,10,2" />
  51. <WrapPanel Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
  52. <Control:NumbericUpDown Height="30" Width="80" Value="{Binding ElementName=self,Path=DegValue,Mode=TwoWay}" IncrementValue="{Binding ElementName=self,Path=IncrementValue}"/>
  53. <TextBlock Margin="2,0" Width="45" Height="22" Text="deg" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  54. </WrapPanel>
  55. <customControls:PathButton Grid.Row="3" Grid.Column="2" PathData="{StaticResource Ico_RightDbArrow}" DefaultFillBrush="White" Click="RightCommand_Click" Width="40" Height="25" Margin="0,2,80,2" />
  56. <Label Grid.Row="4" Grid.Column="0" Content="Torque" VerticalAlignment="Center" Margin="2" FontSize="14" FontWeight="Bold"/>
  57. <WrapPanel Grid.Row="4" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
  58. <TextBlock Width="80" Text="{Binding Torque, ElementName=self, StringFormat=\{0:F2\},Mode=TwoWay}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  59. <TextBlock Margin="2,0" Width="45" Text="%" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  60. </WrapPanel>
  61. <WrapPanel Grid.Row="4" Grid.Column="2">
  62. <Label FontSize="12" Height="30" Content="Station" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  63. <Label FontSize="12" Height="30" Content="{Binding ElementName=self,Path=CurrentStation}" Foreground="DarkBlue" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left"
  64. VerticalAlignment="Center" HorizontalAlignment="Center" Width="68"/>
  65. </WrapPanel>
  66. </Grid>
  67. </GroupBox>
  68. </Grid>
  69. </UserControl>