blob: 7b33b87309ec7a96ddb9c93f961cc289d4fc5508 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
<Window x:Class="Tango.ContinuousPumpsActivation.UI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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:local="clr-namespace:Tango.ContinuousPumpsActivation.UI"
mc:Ignorable="d"
Title="MainWindow" Height="850" Width="800">
<Grid Margin="50 100 50 0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Margin="370 0 0 0 " Grid.Row="0">
<TextBlock FontSize="21">Status</TextBlock>
<TextBlock FontSize="21" Margin="80 0 0 0">Set Values</TextBlock>
</StackPanel>
<DockPanel Grid.Row="1">
<ItemsControl ItemsSource="{Binding Pumps}" DockPanel.Dock="Top">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border BorderBrush="DimGray" BorderThickness="1" Padding="5" CornerRadius="5" Margin="10 10 10 10">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding PumpName}" Width="120"></TextBlock>
<ComboBox Width="200" Margin="10 0 20 0" ItemsSource="{Binding AvailablePortNames}" SelectedItem="{Binding PortName, Mode=TwoWay}" ></ComboBox>
<Border BorderThickness="1" BorderBrush="DimGray" Width="120" >
<Border.Background>
<SolidColorBrush Color="{Binding PumpColor}"/>
</Border.Background>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="21" Text="{Binding Status}"/>
</Border>
<Border BorderThickness="1" BorderBrush="DimGray" Width="120" Margin="20 0 0 0">
<Border.Background>
<SolidColorBrush Color="{Binding PumpColor}"/>
</Border.Background>
<TextBox VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="21" Text="{Binding SetValue}"/>
</Border>
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<DockPanel DockPanel.Dock="Bottom">
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal">
<TextBox FontSize="21" VerticalAlignment="Center"> TIME: </TextBox>
<Border Width="120" BorderThickness="1" BorderBrush="DimGray" HorizontalAlignment="Center" Margin="20 0 0 0">
<Label Content="{Binding Timer}" FontSize="21" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</StackPanel>
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Margin="0 0 10 0" Width="160" Height="50" Background="#AB3EB5FF" BorderBrush="#AB3EB5FF" Command="{Binding SetCommand}">
<StackPanel Orientation="Horizontal">
<TextBlock Margin="5 0 0 0" FontSize="16">SET</TextBlock>
</StackPanel>
</Button>
<Button Margin="0 0 10 0" Width="160" Height="50" Background="#AB3EB5FF" BorderBrush="#AB3EB5FF" Command="{Binding StopCommand}">
<StackPanel Orientation="Horizontal">
<TextBlock Margin="5 0 0 0" FontSize="16">STOP</TextBlock>
</StackPanel>
</Button>
</StackPanel>
</DockPanel>
</DockPanel>
</Grid>
</Window>
|