-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified string formatting, as appropriate, to use interpolated strings.
Updated user manual to correct dome setup screenshot so that it matches the narrative. Bumped version to 6.5.1.2
- Loading branch information
1 parent
428e3cf
commit 12f1bb1
Showing
41 changed files
with
501 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ASCOM.DeviceHub | ||
{ | ||
class DisplayAttribute : Attribute | ||
{ | ||
public string Name { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,43 @@ | ||
namespace ASCOM.DeviceHub | ||
using System; | ||
|
||
namespace ASCOM.DeviceHub | ||
{ | ||
public enum DeviceTypeEnum { Unknown, Telescope, Dome, Focuser }; | ||
public enum DeviceTypeEnum | ||
{ | ||
[Display(Name = "Unknown")] | ||
Unknown, | ||
[Display(Name = "Telescope")] | ||
Telescope, | ||
[Display(Name = "Dome")] | ||
Dome, | ||
[Display(Name = "Focuser")] | ||
Focuser | ||
}; | ||
public enum ParkingStateEnum { Unparked, ParkInProgress, IsAtPark, ParkFailed }; | ||
public enum HomingStateEnum { NotAtHome, HomingInProgress, IsAtHome, HomeFailed }; | ||
public enum MoveDirections { None = -1, North, South, East, West, Up, Down, Left, Right, Clockwise, CounterClockwise }; | ||
public enum ScopeMoveEnum { Variable, Fixed }; | ||
public enum FocuserMoveCompletionState { Success, Timeout, Cancelled }; | ||
|
||
public static class EnumExtensions | ||
{ | ||
public static string GetDisplayName( this Enum GenericEnum ) | ||
{ | ||
|
||
Type genericEnumType = GenericEnum.GetType(); | ||
System.Reflection.MemberInfo[] memberInfo = genericEnumType.GetMember(GenericEnum.ToString()); | ||
|
||
if ( ( memberInfo != null && memberInfo.Length > 0 ) ) | ||
{ | ||
dynamic _Attribs = memberInfo[0].GetCustomAttributes(typeof(DisplayAttribute), false); | ||
|
||
if ( ( _Attribs != null && _Attribs.Length > 0 ) ) | ||
{ | ||
return ( (DisplayAttribute)_Attribs[0] ).Name; | ||
} | ||
} | ||
|
||
return GenericEnum.ToString(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.