Tidy up a few code inspection issues and add the MIT License to the installer.

This commit is contained in:
2019-08-24 22:38:16 +01:00
parent 64a72560bc
commit 3eddc52c6a
5 changed files with 11 additions and 22 deletions
Binary file not shown.
+1
View File
@@ -48,6 +48,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="Config.wxi" />
<Content Include="License.rtf" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Meade.net.focuser\Meade.net.focuser.csproj">
+2 -6
View File
@@ -30,12 +30,7 @@
<![CDATA[Installed OR NETFRAMEWORK40FULL]]>
</Condition>
<!--todo create a method to check if ASCOM is installed.-->
<!--<Condition Message="This application requires ASCOM Platform 6.4 or later. Please install this and try again.">
<![CDATA[Installed or WIX_IS_NETFRAMEWORK_471_OR_LATER_INSTALLED]]>
</Condition>-->
<!-- <Condition Message="Please use the correct installer for your operating system - x86 for 32-bit, x64 for 64-bit.">
<!-- <Condition Message="Please use the correct installer for your operating system - x86 for 32-bit, x64 for 64-bit.">
<?if $(var.Win64) = "yes" ?>
VersionNT64
<?else?>
@@ -46,6 +41,7 @@
<UIRef Id="InstallationUI"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
<FeatureGroupRef Id="fgRoot"/>
</Product>
+2 -2
View File
@@ -525,7 +525,7 @@ namespace ASCOM.Meade.net
return highPrecision;
}
public void TelescopePointingPrecision(bool high)
private void TelescopePointingPrecision(bool high)
{
var currentPrecision = TogglePrecision();
@@ -2313,7 +2313,7 @@ namespace ASCOM.Meade.net
/// <summary>
/// Read the device configuration from the ASCOM Profile store
/// </summary>
internal void ReadProfile()
private void ReadProfile()
{
ProfileProperties profileProperties = _sharedResourcesWrapper.ReadProfile();
_tl.Enabled = profileProperties.TraceLogger;
+6 -14
View File
@@ -37,7 +37,7 @@ namespace ASCOM.Meade.net
/// The DeviceID is used by ASCOM applications to load the driver at runtime.
/// </summary>
//internal static string driverID = "ASCOM.Meade.net.Focuser";
private static readonly string DriverId = Marshal.GenerateProgIdForType(MethodBase.GetCurrentMethod().DeclaringType);
private static readonly string DriverId = Marshal.GenerateProgIdForType(MethodBase.GetCurrentMethod().DeclaringType ?? throw new System.InvalidOperationException());
// TODO Change the descriptive string for your driver then remove this line
/// <summary>
/// Driver description that displays in the ASCOM Chooser.
@@ -54,7 +54,7 @@ namespace ASCOM.Meade.net
/// <summary>
/// Variable to hold the trace logger object (creates a diagnostic log file with information that you specify)
/// </summary>
internal static TraceLogger Tl;
private static TraceLogger Tl;
private readonly ISharedResourcesWrapper _sharedResourcesWrapper;
@@ -358,16 +358,7 @@ namespace ASCOM.Meade.net
if (position == 0)
return;
if (position > 0)
{
//desired move direction is out
MoveFocuser(true, Math.Abs(position));
}
else
{
//desired move direction is in
MoveFocuser(false, Math.Abs(position));
}
MoveFocuser(position > 0, Math.Abs(position));
}
private void MoveFocuser(bool directionOut, int steps)
@@ -426,6 +417,7 @@ namespace ASCOM.Meade.net
Tl.LogMessage("TempComp Get", false.ToString());
return false;
}
// ReSharper disable once ValueParameterNotUsed
set
{
Tl.LogMessage("TempComp Set", "Not implemented");
@@ -551,7 +543,7 @@ namespace ASCOM.Meade.net
/// <summary>
/// Read the device configuration from the ASCOM Profile store
/// </summary>
internal void ReadProfile()
private void ReadProfile()
{
var profileProperties = _sharedResourcesWrapper.ReadProfile();
Tl.Enabled = profileProperties.TraceLogger;
@@ -567,7 +559,7 @@ namespace ASCOM.Meade.net
/// <param name="identifier"></param>
/// <param name="message"></param>
/// <param name="args"></param>
internal static void LogMessage(string identifier, string message, params object[] args)
private static void LogMessage(string identifier, string message, params object[] args)
{
var msg = string.Format(message, args);
Tl.LogMessage(identifier, msg);