Skip to content

Commit

Permalink
Custom Gearing
Browse files Browse the repository at this point in the history
  • Loading branch information
rmorgan001 committed Jul 20, 2021
1 parent dce1094 commit 18d9152
Show file tree
Hide file tree
Showing 57 changed files with 5,203 additions and 4,198 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-2021</Copyright>
<AssemblyVersion>1.0.3.2</AssemblyVersion>
<FileVersion>1.0.3.2</FileVersion>
<ProductVersion>1.0.3.2</ProductVersion>
<Version>1.0.3.2</Version>
<AssemblyVersion>1.0.3.3</AssemblyVersion>
<FileVersion>1.0.3.3</FileVersion>
<ProductVersion>1.0.3.3</ProductVersion>
<Version>1.0.3.3</Version>
</PropertyGroup>
</Project>
21 changes: 21 additions & 0 deletions GS.Server/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,27 @@
<setting name="SyncLimitOn" serializeAs="String">
<value>True</value>
</setting>
<setting name="CustomRaWormTeeth" serializeAs="String">
<value>0</value>
</setting>
<setting name="CustomDecWormTeeth" serializeAs="String">
<value>0</value>
</setting>
<setting name="CustomRa360Steps" serializeAs="String">
<value>0</value>
</setting>
<setting name="CustomDec360Steps" serializeAs="String">
<value>0</value>
</setting>
<setting name="CustomRaTrackingOffset" serializeAs="String">
<value>0</value>
</setting>
<setting name="CustomDecTrackingOffset" serializeAs="String">
<value>0</value>
</setting>
<setting name="CustomGearing" serializeAs="String">
<value>False</value>
</setting>
</GS.Server.Properties.SkyTelescope>
</userSettings>
</configuration>
4 changes: 2 additions & 2 deletions GS.Server/Cdc/CdcDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
</StackPanel>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5" Text="{StaticResource cdcAccept}"/>
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" >
<Button IsDefault="True" Style="{StaticResource MaterialDesignFlatButton}" Content="{StaticResource diaAccept}" Command="{Binding AcceptCdcDialogCommand}"/>
<Button IsCancel="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Content="{StaticResource diaCancel}" Command="{Binding CancelCdcDialogCommand}"/>
<Button IsDefault="False" Style="{StaticResource MaterialDesignFlatButton}" Content="{StaticResource diaAccept}" Command="{Binding AcceptCdcDialogCommand}"/>
<Button IsCancel="True" IsDefault="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Content="{StaticResource diaCancel}" Command="{Binding CancelCdcDialogCommand}"/>
</StackPanel>
</StackPanel>
</GroupBox>
Expand Down
2 changes: 1 addition & 1 deletion GS.Server/Controls/BottomStatusBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
</md:PackIcon.Style>
</md:PackIcon>
</Button>
<Button Grid.Column="9" Command="{Binding ClickMountInfoDialogCommand}" Style="{StaticResource MaterialDesignFlatButton}" ToolTip="{StaticResource botTipConnected}" Padding="9">
<Button Grid.Column="9" Command="{Binding OpenMountInfoDialogCmd}" Style="{StaticResource MaterialDesignFlatButton}" ToolTip="{StaticResource botTipConnected}" Padding="9">
<md:PackIcon Kind="Usb" Width="29" Height="29" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="-5" ToolTip="{StaticResource botTipConnected}">
<md:PackIcon.Style>
<Style TargetType="md:PackIcon">
Expand Down
4 changes: 2 additions & 2 deletions GS.Server/Controls/Dialogs/AutoHomeDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 10 0 0" HorizontalAlignment="Center">
<Button IsEnabled="{Binding StartEnabled}" IsDefault="True" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding StartAutoHomeDialogCommand}" Content="{StaticResource diaStart}"/>
<Button IsCancel="True" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelAutoHomeDialogCommand}" Content="{StaticResource diaCancel}"/>
<Button IsEnabled="{Binding StartEnabled}" IsDefault="False" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding StartAutoHomeDialogCommand}" Content="{StaticResource diaStart}"/>
<Button IsCancel="True" IsDefault="True" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelAutoHomeDialogCommand}" Content="{StaticResource diaCancel}"/>
</StackPanel>
</StackPanel>
</GroupBox>
Expand Down
4 changes: 2 additions & 2 deletions GS.Server/Controls/Dialogs/CloseDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<StackPanel Orientation="Vertical">
<TextBlock VerticalAlignment="Center" Margin="5" xml:space="preserve" Text="{StaticResource titleCloseApps}"/>
<StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Center">
<Button IsDefault="True" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptCloseDialogCommand}" Content="{StaticResource diaAccept}"/>
<Button IsCancel="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelCloseDialogCommand}" Content="{StaticResource diaCancel}"/>
<Button IsDefault="False" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptCloseDialogCommand}" Content="{StaticResource diaAccept}"/>
<Button IsCancel="True" IsDefault="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelCloseDialogCommand}" Content="{StaticResource diaCancel}"/>
</StackPanel>
</StackPanel>
</GroupBox>
Expand Down
101 changes: 101 additions & 0 deletions GS.Server/Controls/Dialogs/CustomGearingDialog.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<UserControl x:Class="GS.Server.Controls.Dialogs.CustomGearingDialog"
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"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:domain="clr-namespace:GS.Shared.Domain;assembly=GS.Shared"
xmlns:domain1="clr-namespace:GS.Server.Domain"
mc:Ignorable="d" d:DataContext="{d:DesignInstance skyTelescope:SkyTelescopeVM}">
<GroupBox Header="{StaticResource customGears}" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="55"/>
<RowDefinition Height="55"/>
<RowDefinition Height="55"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40" />
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="20"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBox Grid.Row="0" Grid.Column="0" Width="110" VerticalAlignment="Top" md:HintAssist.Hint="{StaticResource raTotalSteps}" ToolTip="{StaticResource raTotalSteps}" Style="{StaticResource MaterialDesignFloatingHintTextBox}">
<TextBox.Text>
<Binding Path="CustomRa360Steps" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<domain1:IntValidationRule ValidatesOnTargetUpdated="True" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
<TextBox Grid.Row="0" Grid.Column="2" Width="110" VerticalAlignment="Top" md:HintAssist.Hint="{StaticResource decTotalSteps}" ToolTip="{StaticResource decTotalSteps}" Style="{StaticResource MaterialDesignFloatingHintTextBox}">
<TextBox.Text>
<Binding Path="CustomDec360Steps" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<domain1:IntValidationRule ValidatesOnTargetUpdated="True" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
<TextBox Grid.Row="1" Grid.Column="0" Width="110" VerticalAlignment="Top" md:HintAssist.Hint="{StaticResource raWormTeeth}" ToolTip="{StaticResource raWormTeeth}" Style="{StaticResource MaterialDesignFloatingHintTextBox}">
<TextBox.Text>
<Binding Path="CustomRaWormTeeth" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<domain1:IntValidationRule ValidatesOnTargetUpdated="True" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
<TextBox Grid.Row="1" Grid.Column="2" Width="110" VerticalAlignment="Top" md:HintAssist.Hint="{StaticResource decWormTeeth}" ToolTip="{StaticResource decWormTeeth}" Style="{StaticResource MaterialDesignFloatingHintTextBox}">
<TextBox.Text>
<Binding Path="CustomDecWormTeeth" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<domain1:IntValidationRule ValidatesOnTargetUpdated="True" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
<ComboBox Grid.Row="2" Grid.Column="0" Width="110" VerticalAlignment="Center" md:HintAssist.Hint="{StaticResource raTrackingOffset}" MinWidth="10" ToolTip="{StaticResource raTrackingOffset}" ItemsSource="{Binding CustomMountOffset}" Style="{StaticResource MaterialDesignFloatingHintComboBox}">
<ComboBox.SelectedItem>
<Binding Path="CustomRaTrackingOffset" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<domain:NotEmptyValidationRule ValidatesOnTargetUpdated="True" />
</Binding.ValidationRules>
</Binding>
</ComboBox.SelectedItem>
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
</ComboBox>
<ComboBox Grid.Row="2" Grid.Column="2" Width="110" VerticalAlignment="Center" md:HintAssist.Hint="{StaticResource decTrackingOffset}" ToolTip="{StaticResource decTrackingOffset}" ItemsSource="{Binding CustomMountOffset}" Style="{StaticResource MaterialDesignFloatingHintComboBox}">
<ComboBox.SelectedItem>
<Binding Path="CustomDecTrackingOffset" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<domain:NotEmptyValidationRule ValidatesOnTargetUpdated="True" />
</Binding.ValidationRules>
</Binding>
</ComboBox.SelectedItem>
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
</ComboBox>
<StackPanel Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Center">
<Label VerticalAlignment="Bottom" HorizontalAlignment="Center" Content="{StaticResource applyGearing}" />
<ToggleButton Style="{StaticResource MaterialDesignSwitchAccentToggleButton}" IsChecked="{Binding CustomGearing}" />
</StackPanel>
<Label Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Bottom" HorizontalAlignment="Center" Content="{StaticResource gearingConnect}"/>
<StackPanel Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="3" Orientation="Horizontal" HorizontalAlignment="Center" >
<Button IsDefault="False" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptGearDialogCommand}" Content="{StaticResource diaAccept}" />
<Button IsCancel="True" IsDefault="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelGearDialogCommand}" Content="{StaticResource diaCancel}" />
</StackPanel>
</Grid>
</GroupBox>
</UserControl>
16 changes: 16 additions & 0 deletions GS.Server/Controls/Dialogs/CustomGearingDialog.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 CustomGearingDialog
{
public CustomGearingDialog()
{
InitializeComponent();
}
}
}
4 changes: 2 additions & 2 deletions GS.Server/Controls/Dialogs/DownloadUpdateDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

</StackPanel>
<StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Center">
<Button IsDefault="True" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding ClickDownloadUpdateCmd}" Content="{StaticResource optDownload}" IsEnabled="{Binding UpdateEnabled}"/>
<Button IsCancel="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelUpdateDialogCmd}" Content="{StaticResource diaCancel}"/>
<Button IsDefault="False" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding ClickDownloadUpdateCmd}" Content="{StaticResource optDownload}" IsEnabled="{Binding UpdateEnabled}"/>
<Button IsCancel="True" IsDefault="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelUpdateDialogCmd}" Content="{StaticResource diaCancel}"/>
</StackPanel>
</StackPanel>
</GroupBox>
Expand Down
4 changes: 2 additions & 2 deletions GS.Server/Controls/Dialogs/FlipDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<StackPanel Orientation="Vertical">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,5,0,0" Text="{StaticResource btnContinueFlip}"/>
<StackPanel Orientation="Horizontal" Margin="0 10 0 0">
<Button IsDefault="True" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptFlipDialogCommand}" Content="{StaticResource diaAccept}"/>
<Button IsCancel="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelFlipDialogCommand}" Content="{StaticResource diaCancel}"/>
<Button IsDefault="False" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptFlipDialogCommand}" Content="{StaticResource diaAccept}"/>
<Button IsCancel="True" IsDefault="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelFlipDialogCommand}" Content="{StaticResource diaCancel}"/>
</StackPanel>
</StackPanel>
</GroupBox>
Expand Down
4 changes: 2 additions & 2 deletions GS.Server/Controls/Dialogs/HomeResetDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<StackPanel Orientation="Vertical">
<TextBlock VerticalAlignment="Center" Margin="10 0" Text="{StaticResource btnHomeReset}"/>
<StackPanel Orientation="Horizontal" Margin="0 5 0 0" HorizontalAlignment="Center">
<Button IsDefault="True" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptHomeResetDialogCommand}"
<Button IsDefault="False" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptHomeResetDialogCommand}"
Content="{StaticResource diaAccept}"/>
<Button IsCancel="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelHomeResetDialogCommand}"
<Button IsCancel="True" IsDefault="True" Margin="8 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding CancelHomeResetDialogCommand}"
Content="{StaticResource diaCancel}"/>
</StackPanel>
</StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion GS.Server/Controls/Dialogs/LimitDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</ComboBox.ItemTemplate>
</ComboBox>
</StackPanel>
<Button Margin="0,10,0,0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding OkLimitDialogCommand}" Content="{StaticResource diaOk}"/>
<Button IsCancel="True" IsDefault="True" Margin="0,10,0,0" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding OkLimitDialogCommand}" Content="{StaticResource diaOk}"/>
</StackPanel>
</GroupBox>
</UserControl>
Expand Down
Loading

0 comments on commit 18d9152

Please sign in to comment.