|
6 | 6 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
7 | 7 | xmlns:local="clr-namespace:OATControl" xmlns:controls="clr-namespace:OATControl.Converters" |
8 | 8 | mc:Ignorable="d" |
9 | | - Title="Polar Alignment" Height="275" Width="480" ResizeMode="NoResize" WindowStyle="ToolWindow" FontSize="16" FontWeight="Bold" > |
| 9 | + Title="Polar Alignment" Height="220" Width="480" ResizeMode="NoResize" WindowStyle="ToolWindow" FontSize="16" FontWeight="Bold" > |
10 | 10 | <Controls:MetroWindow.Resources> |
11 | 11 | <Style x:Key="StateText" TargetType="TextBlock"> |
12 | 12 | <Setter Property="Margin" Value="10,0" /> |
|
26 | 26 | <controls:IntToVisibilityConverter x:Key="State1Visible" VisibleValue="1" Operator=">="/> |
27 | 27 | <controls:IntToVisibilityConverter x:Key="State2Visible" VisibleValue="2" Operator=">=" /> |
28 | 28 | <controls:IntToVisibilityConverter x:Key="State3Visible" VisibleValue="3" Operator=">=" /> |
29 | | - <controls:IntToVisibilityConverter x:Key="State4Visible" VisibleValue="4" Operator=">=" /> |
30 | 29 | <controls:IntToBoolConverter x:Key="State1Enabled" TrueValue="1" Operator="=="/> |
31 | 30 | <controls:IntToBoolConverter x:Key="State2Enabled" TrueValue="2" Operator="==" /> |
32 | 31 | <controls:IntToBoolConverter x:Key="State3Enabled" TrueValue="3" Operator="==" /> |
33 | | - <controls:IntToBoolConverter x:Key="State4Enabled" TrueValue="4" Operator="==" /> |
34 | 32 | </Controls:MetroWindow.Resources> |
35 | 33 | <Grid> |
36 | 34 | <Grid.ColumnDefinitions> |
|
59 | 57 | IsEnabled="{Binding State, Converter={StaticResource State1Enabled}}" |
60 | 58 | /> |
61 | 59 |
|
62 | | - <TextBlock Grid.Row="1" Grid.Column="0" |
63 | | - Text="Move the mount such that Polaris is in the center of your cameras viewfinder." |
64 | | - Style="{StaticResource StateText}" |
65 | | - IsEnabled="{Binding State, Converter={StaticResource State2Enabled}}" |
66 | | - Visibility="{Binding State, Converter={StaticResource State2Visible}}" |
67 | | -/> |
68 | | - <Button Grid.Row="1" Grid.Column="1" |
69 | | - Content="Done" |
70 | | - Command="{Binding OKCommand}" |
71 | | - Style="{StaticResource StateButton}" |
72 | | - IsEnabled="{Binding State, Converter={StaticResource State2Enabled}}" |
73 | | - Visibility="{Binding State, Converter={StaticResource State2Visible}}" |
74 | | - /> |
75 | | - |
76 | 60 | <TextBlock Grid.Row="2" Grid.Column="0" |
77 | | - Text="Again move the mount such that Polaris is in the center of your cameras viewfinder." |
| 61 | + Text="Move the mount such that Polaris is in the center of your cameras viewfinder." |
78 | 62 | Style="{StaticResource StateText}" |
79 | | - IsEnabled="{Binding State, Converter={StaticResource State3Enabled}}" |
80 | | - Visibility="{Binding State, Converter={StaticResource State3Visible}}" |
| 63 | + IsEnabled="{Binding State, Converter={StaticResource State2Enabled}}" |
| 64 | + Visibility="{Binding State, Converter={StaticResource State2Visible}}" |
81 | 65 | /> |
82 | 66 |
|
83 | 67 | <Button Grid.Row="2" Grid.Column="1" |
84 | 68 | Content="Done" |
85 | 69 | Command="{Binding OKCommand}" |
86 | | - IsEnabled="{Binding State, Converter={StaticResource State3Enabled}}" |
87 | | - Visibility="{Binding State, Converter={StaticResource State3Visible}}" |
| 70 | + IsEnabled="{Binding State, Converter={StaticResource State2Enabled}}" |
| 71 | + Visibility="{Binding State, Converter={StaticResource State2Visible}}" |
88 | 72 | Style="{StaticResource StateButton}" |
89 | 73 | /> |
90 | 74 |
|
91 | 75 | <TextBlock Grid.Row="3" Grid.Column="0" |
92 | 76 | Text="Your mount is now polar aligned." |
93 | 77 | Style="{StaticResource StateText}" |
94 | | - IsEnabled="{Binding State, Converter={StaticResource State4Enabled}}" |
95 | | - Visibility="{Binding State, Converter={StaticResource State4Visible}}" |
| 78 | + IsEnabled="{Binding State, Converter={StaticResource State3Enabled}}" |
| 79 | + Visibility="{Binding State, Converter={StaticResource State3Visible}}" |
96 | 80 | /> |
97 | 81 |
|
98 | 82 | <Button Grid.Row="3" Grid.Column="2" |
|
0 commit comments