Skip to content

Commit

Permalink
Alt Az user interface enhancements (#61)
Browse files Browse the repository at this point in the history
Alt Az GoTo control implemented
Az direction status indicator, toggles with SOP indicator
Flip Az Direction button, toggles with Flip SOP button
Fixes for Home and Park button functionality on floating buttons window
Documentation updates for Alt Az user interface
  • Loading branch information
Principia4834 authored Apr 7, 2024
1 parent 4d2f457 commit f8fa624
Show file tree
Hide file tree
Showing 29 changed files with 2,032 additions and 243 deletions.
8 changes: 4 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<Trademark>GS Server</Trademark>
<NeutralLanguage>en</NeutralLanguage>
<Copyright>Copyright © GreenSwamp Software 2019-2024</Copyright>
<AssemblyVersion>1.0.8.0</AssemblyVersion>
<FileVersion>1.0.8.0</FileVersion>
<ProductVersion>1.0.8.0</ProductVersion>
<Version>1.0.8.0</Version>
<AssemblyVersion>1.0.8.1</AssemblyVersion>
<FileVersion>1.0.8.1</FileVersion>
<ProductVersion>1.0.8.1</ProductVersion>
<Version>1.0.8.1</Version>
</PropertyGroup>
</Project>
141 changes: 141 additions & 0 deletions GS.Server/Controls/AltAzGoTo.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<UserControl x:Class="GS.Server.Controls.AltAzGoTo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:domain="clr-namespace:GS.Server.Domain"
xmlns:domain1="clr-namespace:GS.Shared.Domain;assembly=GS.Shared"
xmlns:skyTelescope="clr-namespace:GS.Server.SkyTelescope"
mc:Ignorable="d" d:DataContext="{d:DesignInstance skyTelescope:SkyTelescopeVM}">
<Border Margin="0,0,10,0" BorderBrush="DimGray" BorderThickness="2" CornerRadius="5">
<Grid Background="{StaticResource MaterialDesignToolBarBackground}" ShowGridLines="False"
ToolTip="{StaticResource goChangeToRaDec}">
<Grid.RowDefinitions>
<RowDefinition Height="47"/>
<RowDefinition Height="47"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Orientation="Vertical" VerticalAlignment="Center">
<Button Margin="0,0,0,0" Height="20" Padding="-5" Width="75" ToolTip="{StaticResource goTipCopy}" Command="{Binding PopulateGoToAzAltCommand}" Style="{StaticResource MaterialDesignRaisedDarkButton}" Content="{StaticResource goCopy}" />
<Button Margin="0,2,0,0" Height="20" Padding="-5" Width="75" ToolTip="{StaticResource goTipGoTo}" Command="{Binding OpenAzGoToDialogCommand}" Style="{StaticResource MaterialDesignRaisedDarkButton}" Content="{StaticResource goGoTo}" />
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" >
<StackPanel>
<Label Content="{StaticResource goAz}" />
<Button Margin="-5,0,0,0" Style="{StaticResource MaterialDesignFloatingActionMiniAccentButton}" Command="{Binding OpenAzDecimalDialogCmd}" Width="18" Height="18" >
<md:PackIcon Kind="Plus" />
</Button>
</StackPanel>
</StackPanel>
<ComboBox Grid.Row="0" Grid.Column="2" md:HintAssist.Hint="{StaticResource edDegrees}" IsEditable="True" md:HintAssist.FloatingScale="1" Margin="2" ItemsSource="{Binding AzRange}" Style="{StaticResource MaterialDesignFloatingHintComboBox}" >
<ComboBox.Text>
<Binding Path="AzDegrees" Mode="TwoWay" UpdateSourceTrigger="LostFocus">
<Binding.ValidationRules>
<domain1:NotEmptyValidationRule ValidatesOnTargetUpdated="True"/>
<domain:DoubleValidationRule ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
</ComboBox.Text>
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
</ComboBox>
<ComboBox Grid.Row="0" Grid.Column="3" md:HintAssist.Hint="{StaticResource edMinutes}" IsEditable="True" md:HintAssist.FloatingScale="1" Margin="2"
ItemsSource="{Binding Range60}" Style="{StaticResource MaterialDesignFloatingHintComboBox}" >
<ComboBox.Text>
<Binding Path="AzMinutes" Mode="TwoWay" UpdateSourceTrigger="LostFocus">
<Binding.ValidationRules>
<domain1:NotEmptyValidationRule ValidatesOnTargetUpdated="True"/>
<domain:DoubleValidationRule ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
</ComboBox.Text>
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
</ComboBox>
<ComboBox Grid.Row="0" Grid.Column="4" md:HintAssist.Hint="{StaticResource edSeconds}" IsEditable="True" md:HintAssist.FloatingScale="1" Margin="2"
ItemsSource="{Binding Range60}" Style="{StaticResource MaterialDesignFloatingHintComboBox}" >
<ComboBox.Text>
<Binding Path="AzSeconds" Mode="TwoWay" UpdateSourceTrigger="LostFocus">
<Binding.ValidationRules>
<domain1:NotEmptyValidationRule ValidatesOnTargetUpdated="True"/>
<domain:DoubleValidationRule ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
</ComboBox.Text>
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
</ComboBox>
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" >
<StackPanel>
<Label Content="{StaticResource goAlt}" />
<Button Margin="-10,0,0,0" Style="{StaticResource MaterialDesignFloatingActionMiniAccentButton}" Command="{Binding OpenAltDecimalDialogCmd}" Width="18" Height="18">
<md:PackIcon Kind="Plus" />
</Button>
</StackPanel>
</StackPanel>
<ComboBox Grid.Row="1" Grid.Column="2" md:HintAssist.Hint="{StaticResource edDegrees}" md:HintAssist.FloatingScale="1" IsEditable="True" Margin="2" ItemsSource="{Binding AltRange}" Style="{StaticResource MaterialDesignFloatingHintComboBox}" >
<ComboBox.Text>
<Binding Path="AltDegrees" Mode="TwoWay" UpdateSourceTrigger="LostFocus">
<Binding.ValidationRules>
<domain1:NotEmptyValidationRule ValidatesOnTargetUpdated="True"/>
<domain:DoubleValidationRule ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
</ComboBox.Text>
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
</ComboBox>
<ComboBox Grid.Row="1" Grid.Column="3" md:HintAssist.Hint="{StaticResource edMinutes}" IsEditable="True" md:HintAssist.FloatingScale="1" Margin="2"
ItemsSource="{Binding Range60}" Style="{StaticResource MaterialDesignFloatingHintComboBox}" >
<ComboBox.Text>
<Binding Path="AltMinutes" Mode="TwoWay" UpdateSourceTrigger="LostFocus">
<Binding.ValidationRules>
<domain1:NotEmptyValidationRule ValidatesOnTargetUpdated="True"/>
<domain:DoubleValidationRule ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
</ComboBox.Text>
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
</ComboBox>
<ComboBox Grid.Row="1" Grid.Column="4" md:HintAssist.Hint="{StaticResource edSeconds}" IsEditable="True" md:HintAssist.FloatingScale="1" Margin="2"
ItemsSource="{Binding Range60}" Style="{StaticResource MaterialDesignFloatingHintComboBox}" >
<ComboBox.Text>
<Binding Path="AltSeconds" Mode="TwoWay" UpdateSourceTrigger="LostFocus">
<Binding.ValidationRules>
<domain1:NotEmptyValidationRule ValidatesOnTargetUpdated="True"/>
<domain:DoubleValidationRule ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
</ComboBox.Text>
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
</ComboBox>
</Grid>
</Border>
</UserControl>
16 changes: 16 additions & 0 deletions GS.Server/Controls/AltAzGoTo.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Runtime.InteropServices;

namespace GS.Server.Controls
{
/// <summary>
/// Interaction logic for AltAzGoTo.xaml
/// </summary>
[ComVisible(false)]
public partial class AltAzGoTo
{
public AltAzGoTo()
{
InitializeComponent();
}
}
}
15 changes: 13 additions & 2 deletions GS.Server/Controls/BottomStatusBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Grid.Column="4" Margin="3 0" VerticalAlignment="Center" ToolTip="{StaticResource botTipSOP}" Text="{Binding IsSideOfPier}" Foreground="DimGray" FontSize="15">
<TextBlock Grid.Column="4" Margin="3 0" VerticalAlignment="Center" ToolTip="{StaticResource botTipSOP}" Visibility="{Binding SopShow, Converter={StaticResource BoolToClap}}" Text="{Binding IsSideOfPier}" Foreground="DimGray" FontSize="15">
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource MaterialDesignTextBlock}">
<Style.Triggers>
Expand All @@ -121,7 +121,7 @@
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard RepeatBehavior="5x">
<ColorAnimation To="Transparent" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
<ColorAnimation To="Transparent" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
Duration="0:0:0.15" BeginTime="0:0:0"/>
<ColorAnimation To="DimGray" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
Duration="0:0:0.15" BeginTime="0:0:0.15"/>
Expand All @@ -133,6 +133,17 @@
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Grid.Column="4" Margin="3 0" VerticalAlignment="Center" Text="{Binding AzDirection}" ToolTip="{StaticResource botTipAzDir}" Visibility="{Binding AzDirShow, Converter={StaticResource BoolToClap}}" FontSize="15" Foreground="{StaticResource SecondaryHueMidBrush}">
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource MaterialDesignTextBlock}">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<Path Grid.Column="5" Data="{StaticResource PecVector}" ToolTip="{StaticResource PecStatus}" Stretch="Fill" Margin="3" Width="25" Height="25" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="{Binding PecShow, Converter={StaticResource BoolToClap}}">
<Path.Style>
<Style TargetType="Path">
Expand Down
27 changes: 27 additions & 0 deletions GS.Server/Controls/Dialogs/AltGoToDecimal.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<UserControl x:Class="GS.Server.Controls.Dialogs.AltGoToDecimalDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
xmlns:domain1="clr-namespace:GS.Shared.Domain;assembly=GS.Shared"
xmlns:domain="clr-namespace:GS.Server.Domain">
<GroupBox Header="{StaticResource goAlt}" Margin="5">
<StackPanel Orientation="Vertical">
<TextBox Width="110" Style="{StaticResource MaterialDesignFloatingHintTextBox}">
<TextBox.Text>
<Binding Path="AltDecimal" Mode="TwoWay" UpdateSourceTrigger="LostFocus">
<Binding.ValidationRules>
<domain1:NotEmptyValidationRule ValidatesOnTargetUpdated="True" />
<domain:DoubleValidationRule ValidatesOnTargetUpdated="True" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
<StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Center">
<Button IsDefault="False" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptAltDecimalDialogCmd}" Content="{StaticResource diaAccept}"/>
<Button IsCancel="True" IsDefault="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelAltDecimalDialogCmd}" Content="{StaticResource diaCancel}"/>
</StackPanel>
</StackPanel>
</GroupBox>
</UserControl>
16 changes: 16 additions & 0 deletions GS.Server/Controls/Dialogs/AltGoToDecimal.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Runtime.InteropServices;

namespace GS.Server.Controls.Dialogs
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
[ComVisible(false)]
public partial class AltGoToDecimalDialog
{
public AltGoToDecimalDialog()
{
InitializeComponent();
}
}
}
27 changes: 27 additions & 0 deletions GS.Server/Controls/Dialogs/AzGoToDecimal.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<UserControl x:Class="GS.Server.Controls.Dialogs.AzGoToDecimalDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
xmlns:domain1="clr-namespace:GS.Shared.Domain;assembly=GS.Shared"
xmlns:domain="clr-namespace:GS.Server.Domain">
<GroupBox Header="{StaticResource goAz}" Margin="5">
<StackPanel Orientation="Vertical">
<TextBox Width="110" Style="{StaticResource MaterialDesignFloatingHintTextBox}">
<TextBox.Text>
<Binding Path="AzDecimal" Mode="TwoWay" UpdateSourceTrigger="LostFocus">
<Binding.ValidationRules>
<domain1:NotEmptyValidationRule ValidatesOnTargetUpdated="True" />
<domain:DoubleValidationRule ValidatesOnTargetUpdated="True" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
<StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Center">
<Button IsDefault="False" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptAzDecimalDialogCmd}" Content="{StaticResource diaAccept}"/>
<Button IsCancel="True" IsDefault="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelAzDecimalDialogCmd}" Content="{StaticResource diaCancel}"/>
</StackPanel>
</StackPanel>
</GroupBox>
</UserControl>
16 changes: 16 additions & 0 deletions GS.Server/Controls/Dialogs/AzGoToDecimal.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Runtime.InteropServices;

namespace GS.Server.Controls.Dialogs
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
[ComVisible(false)]
public partial class AzGoToDecimalDialog
{
public AzGoToDecimalDialog()
{
InitializeComponent();
}
}
}
27 changes: 27 additions & 0 deletions GS.Server/Controls/Dialogs/AzGoToDialog.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<UserControl x:Class="GS.Server.Controls.Dialogs.AzGoToDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:skyTelescope="clr-namespace:GS.Server.SkyTelescope"
mc:Ignorable="d" d:DataContext="{d:DesignInstance skyTelescope:SkyTelescopeVM}">
<GroupBox Header="{StaticResource goGoTo}" Margin="5">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<StackPanel Orientation="Horizontal" >
<TextBlock Text="Az: "/>
<TextBlock Text="{Binding GoToAzString}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Alt: "/>
<TextBlock Text="{Binding GoToAltString}"/>
</StackPanel>
</StackPanel>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,10,0,0" Text="{StaticResource goAcpCoords}"/>
<StackPanel Orientation="Horizontal" Margin="0 10 0 0">
<Button IsDefault="False" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptAzGoToDialogCommand}" Content="{StaticResource diaAccept}"/>
<Button IsCancel="True" IsDefault="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelAzGoToDialogCommand}" Content="{StaticResource diaCancel}"/>
</StackPanel>
</StackPanel>
</GroupBox>
</UserControl>
16 changes: 16 additions & 0 deletions GS.Server/Controls/Dialogs/AzGoToDialog.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Runtime.InteropServices;

namespace GS.Server.Controls.Dialogs
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
[ComVisible(false)]
public partial class AzGoToDialog
{
public AzGoToDialog()
{
InitializeComponent();
}
}
}
Loading

0 comments on commit f8fa624

Please sign in to comment.