|
7 | 7 | xmlns:heroIcons="clr-namespace:HeroIconsAvalonia.Controls;assembly=HeroIconsAvalonia" |
8 | 8 | xmlns:harp="clr-namespace:Bonsai.Harp;assembly=Bonsai.Harp" |
9 | 9 | xmlns:local="clr-namespace:Harp.Olfactometer;assembly=Harp.Olfactometer" |
10 | | - xmlns:md="clr-namespace:Markdown.Avalonia;assembly=Markdown.Avalonia" |
11 | 10 | xmlns:system="clr-namespace:System;assembly=System.Runtime" |
12 | 11 | xmlns:vm="clr-namespace:Harp.Olfactometer.Design.ViewModels" |
13 | 12 | mc:Ignorable="d" d:DesignWidth="1100" d:DesignHeight="900" |
|
17 | 16 | <UserControl.Resources> |
18 | 17 | <conv:EnableFlagConverter x:Key="EnableFlagConverter"/> |
19 | 18 | <conv:PayloadFieldConverter x:Key="PayloadFieldConverter"/> |
| 19 | + <system:Boolean x:Key="BoolTrue">True</system:Boolean> |
| 20 | + <system:Boolean x:Key="BoolFalse">False</system:Boolean> |
20 | 21 | </UserControl.Resources> |
21 | 22 |
|
22 | 23 | <Design.DataContext> |
|
789 | 790 | </ComboBox> |
790 | 791 | </StackPanel> |
791 | 792 | <!-- Register: MimicCheckValve0 (Write) --> |
792 | | - <StackPanel Orientation="Vertical" Spacing="10"> |
| 793 | + <StackPanel Orientation="Vertical" Spacing="10" IsVisible="{Binding ShowChecksFields}"> |
793 | 794 | <StackPanel Orientation="Horizontal" Spacing="5"> |
794 | 795 | <Label FontWeight="Bold" FontSize="14" Padding="0">MimicCheckValve0</Label> |
795 | 796 | <heroIcons:HeroIcon Type="InformationCircle" Width="14" Height="14" |
|
823 | 824 | </ComboBox> |
824 | 825 | </StackPanel> |
825 | 826 | <!-- Register: MimicCheckValve1 (Write) --> |
826 | | - <StackPanel Orientation="Vertical" Spacing="10"> |
| 827 | + <StackPanel Orientation="Vertical" Spacing="10" IsVisible="{Binding ShowChecksFields}"> |
827 | 828 | <StackPanel Orientation="Horizontal" Spacing="5"> |
828 | 829 | <Label FontWeight="Bold" FontSize="14" Padding="0">MimicCheckValve1</Label> |
829 | 830 | <heroIcons:HeroIcon Type="InformationCircle" Width="14" Height="14" |
|
857 | 858 | </ComboBox> |
858 | 859 | </StackPanel> |
859 | 860 | <!-- Register: MimicCheckValve2 (Write) --> |
860 | | - <StackPanel Orientation="Vertical" Spacing="10"> |
| 861 | + <StackPanel Orientation="Vertical" Spacing="10" IsVisible="{Binding ShowChecksFields}"> |
861 | 862 | <StackPanel Orientation="Horizontal" Spacing="5"> |
862 | 863 | <Label FontWeight="Bold" FontSize="14" Padding="0">MimicCheckValve2</Label> |
863 | 864 | <heroIcons:HeroIcon Type="InformationCircle" Width="14" Height="14" |
|
891 | 892 | </ComboBox> |
892 | 893 | </StackPanel> |
893 | 894 | <!-- Register: MimicCheckValve3 (Write) --> |
894 | | - <StackPanel Orientation="Vertical" Spacing="10"> |
| 895 | + <StackPanel Orientation="Vertical" Spacing="10" IsVisible="{Binding ShowChecksFields}"> |
895 | 896 | <StackPanel Orientation="Horizontal" Spacing="5"> |
896 | 897 | <Label FontWeight="Bold" FontSize="14" Padding="0">MimicCheckValve3</Label> |
897 | 898 | <heroIcons:HeroIcon Type="InformationCircle" Width="14" Height="14" |
|
1026 | 1027 | <x:Static Member="local:DI0TriggerConfig.ValveToggle" /> |
1027 | 1028 | </ComboBox> |
1028 | 1029 | </StackPanel> |
1029 | | - <!-- Register: DigitalOutputClear (Write) --> |
| 1030 | + <!-- Registers: DigitalOutput0Set and DigitalOutput0Clear (Write) --> |
1030 | 1031 | <StackPanel Orientation="Vertical" Spacing="10"> |
1031 | 1032 | <StackPanel Orientation="Horizontal" Spacing="5"> |
1032 | | - <Label FontWeight="Bold" FontSize="14" Padding="0">DigitalOutputClear</Label> |
| 1033 | + <Label FontWeight="Bold" FontSize="14" Padding="0">Digital Output 0</Label> |
1033 | 1034 | <heroIcons:HeroIcon Type="InformationCircle" Width="14" Height="14" |
1034 | 1035 | Foreground="{Binding IconColor}" |
1035 | 1036 | VerticalAlignment="Top"> |
1036 | | - <ToolTip.Tip>Clears the specified digital output lines.</ToolTip.Tip> |
| 1037 | + <ToolTip.Tip>Sets or clears the digital output 0 line.</ToolTip.Tip> |
1037 | 1038 | </heroIcons:HeroIcon> |
1038 | 1039 | </StackPanel> |
1039 | | - <CheckBox IsChecked="{Binding IsDO0Enabled_DigitalOutputClear}" |
1040 | | - IsEnabled="True"> |
1041 | | - DO0 |
1042 | | - </CheckBox> |
1043 | | - <CheckBox IsChecked="{Binding IsDO1Enabled_DigitalOutputClear}" |
1044 | | - IsEnabled="True"> |
1045 | | - DO1 |
1046 | | - </CheckBox> |
1047 | | - </StackPanel> |
1048 | | - <!-- Register: DigitalOutputSet (Write) --> |
1049 | | - <StackPanel Orientation="Vertical" Spacing="10"> |
1050 | | - <StackPanel Orientation="Horizontal" Spacing="5"> |
1051 | | - <Label FontWeight="Bold" FontSize="14" Padding="0">DigitalOutputSet</Label> |
1052 | | - <heroIcons:HeroIcon Type="InformationCircle" Width="14" Height="14" |
1053 | | - Foreground="{Binding IconColor}" |
1054 | | - VerticalAlignment="Top"> |
1055 | | - <ToolTip.Tip>Set the specified digital output lines.</ToolTip.Tip> |
1056 | | - </heroIcons:HeroIcon> |
| 1040 | + <StackPanel Orientation="Horizontal" Spacing="10"> |
| 1041 | + <StackPanel Orientation="Horizontal" Spacing="5"> |
| 1042 | + <controls:VisualStatus Status="{Binding IsDO0Enabled_DigitalOutputState}" Width="15" |
| 1043 | + Height="15" /> |
| 1044 | + <TextBlock Text="Active" FontSize="12" VerticalAlignment="Center" /> |
| 1045 | + </StackPanel> |
| 1046 | + <ToggleButton |
| 1047 | + IsChecked="{Binding IsDO0Enabled_DigitalOutputSet}" |
| 1048 | + Command="{Binding DO0SetClearCommand}" |
| 1049 | + CommandParameter="{StaticResource BoolTrue}" |
| 1050 | + IsEnabled="True"> |
| 1051 | + Set |
| 1052 | + </ToggleButton> |
| 1053 | + <ToggleButton |
| 1054 | + IsChecked="{Binding IsDO0Enabled_DigitalOutputClear}" |
| 1055 | + Command="{Binding DO0SetClearCommand}" |
| 1056 | + CommandParameter="{StaticResource BoolFalse}" |
| 1057 | + IsEnabled="True"> |
| 1058 | + Clear |
| 1059 | + </ToggleButton> |
1057 | 1060 | </StackPanel> |
1058 | | - <CheckBox IsChecked="{Binding IsDO0Enabled_DigitalOutputSet}" |
1059 | | - IsEnabled="True"> |
1060 | | - DO0 |
1061 | | - </CheckBox> |
1062 | | - <CheckBox IsChecked="{Binding IsDO1Enabled_DigitalOutputSet}" |
1063 | | - IsEnabled="True"> |
1064 | | - DO1 |
1065 | | - </CheckBox> |
1066 | 1061 | </StackPanel> |
1067 | | - <!-- Register: DigitalOutputState (Write) --> |
| 1062 | + <!-- Registers: DigitalOutput1Set and DigitalOutput1Clear (Write) --> |
1068 | 1063 | <StackPanel Orientation="Vertical" Spacing="10"> |
1069 | 1064 | <StackPanel Orientation="Horizontal" Spacing="5"> |
1070 | | - <Label FontWeight="Bold" FontSize="14" Padding="0">DigitalOutputState</Label> |
| 1065 | + <Label FontWeight="Bold" FontSize="14" Padding="0">Digital Output 1</Label> |
1071 | 1066 | <heroIcons:HeroIcon Type="InformationCircle" Width="14" Height="14" |
1072 | 1067 | Foreground="{Binding IconColor}" |
1073 | 1068 | VerticalAlignment="Top"> |
1074 | | - <ToolTip.Tip>Write the state of all digital output lines.</ToolTip.Tip> |
| 1069 | + <ToolTip.Tip>Sets or clears the digital output 1 line.</ToolTip.Tip> |
1075 | 1070 | </heroIcons:HeroIcon> |
1076 | 1071 | </StackPanel> |
1077 | | - <CheckBox IsChecked="{Binding IsDO0Enabled_DigitalOutputState}" |
1078 | | - IsEnabled="True"> |
1079 | | - DO0 |
1080 | | - </CheckBox> |
1081 | | - <CheckBox IsChecked="{Binding IsDO1Enabled_DigitalOutputState}" |
1082 | | - IsEnabled="True"> |
1083 | | - DO1 |
1084 | | - </CheckBox> |
1085 | | - </StackPanel> |
1086 | | - <!-- Register: DigitalOutputToggle (Write) --> |
1087 | | - <StackPanel Orientation="Vertical" Spacing="10"> |
1088 | | - <StackPanel Orientation="Horizontal" Spacing="5"> |
1089 | | - <Label FontWeight="Bold" FontSize="14" Padding="0">DigitalOutputToggle</Label> |
1090 | | - <heroIcons:HeroIcon Type="InformationCircle" Width="14" Height="14" |
1091 | | - Foreground="{Binding IconColor}" |
1092 | | - VerticalAlignment="Top"> |
1093 | | - <ToolTip.Tip>Toggles the specified digital output lines.</ToolTip.Tip> |
1094 | | - </heroIcons:HeroIcon> |
| 1072 | + <StackPanel Orientation="Horizontal" Spacing="10"> |
| 1073 | + <StackPanel Orientation="Horizontal" Spacing="5"> |
| 1074 | + <controls:VisualStatus Status="{Binding IsDO1Enabled_DigitalOutputState}" Width="15" |
| 1075 | + Height="15" /> |
| 1076 | + <TextBlock Text="Active" FontSize="12" VerticalAlignment="Center" /></StackPanel> |
| 1077 | + <ToggleButton |
| 1078 | + IsChecked="{Binding IsDO1Enabled_DigitalOutputSet}" |
| 1079 | + Command="{Binding DO1SetClearCommand}" |
| 1080 | + CommandParameter="{StaticResource BoolTrue}" |
| 1081 | + IsEnabled="True"> |
| 1082 | + Set |
| 1083 | + </ToggleButton> |
| 1084 | + <ToggleButton |
| 1085 | + IsChecked="{Binding IsDO1Enabled_DigitalOutputClear}" |
| 1086 | + Command="{Binding DO1SetClearCommand}" |
| 1087 | + CommandParameter="{StaticResource BoolFalse}" |
| 1088 | + IsEnabled="True"> |
| 1089 | + Clear |
| 1090 | + </ToggleButton> |
1095 | 1091 | </StackPanel> |
1096 | | - <CheckBox IsChecked="{Binding IsDO0Enabled_DigitalOutputToggle}" |
1097 | | - IsEnabled="True"> |
1098 | | - DO0 |
1099 | | - </CheckBox> |
1100 | | - <CheckBox IsChecked="{Binding IsDO1Enabled_DigitalOutputToggle}" |
1101 | | - IsEnabled="True"> |
1102 | | - DO1 |
1103 | | - </CheckBox> |
1104 | 1092 | </StackPanel> |
1105 | 1093 | </StackPanel> |
1106 | 1094 |
|
|
0 commit comments