123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <UserControl
- x:Class="ShakerApp.Views.ShakerMiniStatusControl"
- xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:suki="https://github.com/kikipoulet/SukiUI"
- xmlns:vm="using:ShakerApp.ViewModels"
- d:DesignHeight="450"
- d:DesignWidth="150"
- x:DataType="vm:ShakerStatusViewModel"
- DataContext="{Binding Source={x:Static vm:ShakerStatusViewModel.Instance}}"
- mc:Ignorable="d">
- <StackPanel>
- <suki:GroupBox>
- <suki:GroupBox.Header>
- <TextBlock
- Margin="4,0,0,0"
- FontSize="24"
- FontWeight="Bold"
- Text="{DynamicResource TestControl}" />
- </suki:GroupBox.Header>
- <StackPanel
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <StackPanel>
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{DynamicResource Start}" />
- <Button
- Width="60"
- Height="60"
- Classes="Basic"
- Command="{Binding StartCommand}"
- IsEnabled="{Binding SignalStartEnabled}">
- <PathIcon
- Width="50"
- Height="50"
- Padding="0"
- Data="{StaticResource StartGeometry}">
- <PathIcon.Styles>
- <Style Selector="PathIcon">
- <Setter Property="Foreground" Value="Green" />
- </Style>
- <Style Selector="PathIcon:disabled">
- <Setter Property="Foreground" Value="Gray" />
- </Style>
- </PathIcon.Styles>
- </PathIcon>
- </Button>
- </StackPanel>
- <StackPanel Margin="10,0,0,0">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{DynamicResource Stop}" />
- <Button
- Width="60"
- Height="60"
- Classes="Basic"
- Command="{Binding StopCommand}"
- IsEnabled="{Binding SignalStopEnabled}">
- <PathIcon
- Width="45"
- Height="45"
- Padding="0"
- Data="{StaticResource StopGeometry}">
- <PathIcon.Styles>
- <Style Selector="PathIcon">
- <Setter Property="Foreground" Value="Red" />
- </Style>
- <Style Selector="PathIcon:disabled">
- <Setter Property="Foreground" Value="Gray" />
- </Style>
- </PathIcon.Styles>
- </PathIcon>
- </Button>
- </StackPanel>
- </StackPanel>
- </suki:GroupBox>
- <Expander ExpandDirection="Down">
- <Expander.Header>
- <TextBlock
- FontSize="24"
- FontWeight="Bold"
- Text="{DynamicResource SignalValue}" />
- </Expander.Header>
- <StackPanel>
- <StackPanel Height="{StaticResource ItemHeight}" Orientation="Horizontal">
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- FontWeight="Bold">
- <Run Text="{DynamicResource GivenDisplacementSignal}" />
- <Run Text=":" />
- </TextBlock>
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- Text="{Binding GivenDisplacement, StringFormat='{}{0}mm'}" />
- </StackPanel>
- <StackPanel Height="{StaticResource ItemHeight}" Orientation="Horizontal">
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- FontWeight="Bold">
- <Run Text="{DynamicResource MeasuredDisplacementSignal}" />
- <Run Text=":" />
- </TextBlock>
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- Text="{Binding MeasuredDisplacement, StringFormat='{}{0}mm'}" />
- </StackPanel>
- <StackPanel Height="{StaticResource ItemHeight}" Orientation="Horizontal">
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- FontWeight="Bold">
- <Run Text="{DynamicResource AccelerationSignal}" />
- <Run Text=":" />
- </TextBlock>
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- Text="{Binding Acceleration, StringFormat='{}{0}g'}" />
- </StackPanel>
- <StackPanel Height="{StaticResource ItemHeight}" Orientation="Horizontal">
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- FontWeight="Bold">
- <Run Text="{DynamicResource ValveDriveSignal}" />
- <Run Text=":" />
- </TextBlock>
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- Text="{Binding ValveDrive, StringFormat='{}{0}V'}" />
- </StackPanel>
- <StackPanel Height="{StaticResource ItemHeight}" Orientation="Horizontal">
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- FontWeight="Bold">
- <Run Text="{DynamicResource OutInputSignal}" />
- <Run Text=":" />
- </TextBlock>
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- Text="{Binding OutSignal, StringFormat='{}{0}V'}" />
- </StackPanel>
- </StackPanel>
- </Expander>
- </StackPanel>
- </UserControl>
|