Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0594355072 | |||
| aec6cc19ab | |||
| 58b0e1395c | |||
| 274ecbab6b | |||
| 544cdd826b | |||
| fc68a788ac | |||
| 9c689f1179 | |||
| 6e7ff70862 | |||
| 0a0072ce43 | |||
| 0e31149e31 | |||
| d332243772 | |||
| d9aa68f1e9 | |||
| 2cc27788c8 | |||
| 5a0b3bba25 | |||
| 7a80ad4662 | |||
| 3eddc52c6a | |||
| 64a72560bc | |||
| 0a6ba16c61 | |||
| b932bd8eb6 | |||
| 5aec81b45f | |||
| d68d51bd9c |
@@ -39,7 +39,7 @@
|
|||||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -36,6 +36,25 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
|
|||||||
Binary file not shown.
@@ -18,41 +18,6 @@
|
|||||||
Vital="yes"
|
Vital="yes"
|
||||||
Assembly=".net"
|
Assembly=".net"
|
||||||
AssemblyApplication="filFocuserDriverAssembly" />
|
AssemblyApplication="filFocuserDriverAssembly" />
|
||||||
<!-- Registry entries suitable for a LocalServer served class -->
|
|
||||||
<!-- HKCR\CLSID\{driver-guid} -->
|
|
||||||
<RegistryKey Root="HKCR" Key="CLSID">
|
|
||||||
<RegistryKey Key="$(var.FocuserDriverClassId)">
|
|
||||||
<RegistryValue Value="$(var.FocuserDriverProgId)" Type="string"/>
|
|
||||||
<RegistryValue Name="AppId" Value="$(var.LocalServerAppId)" Type="string"/>
|
|
||||||
<RegistryKey Key="Implemented Categories">
|
|
||||||
<RegistryKey Key="{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}"
|
|
||||||
ForceCreateOnInstall="yes"
|
|
||||||
ForceDeleteOnUninstall="yes"/>
|
|
||||||
</RegistryKey>
|
|
||||||
<RegistryKey Key="ProgId">
|
|
||||||
<RegistryValue Value="$(var.FocuserDriverProgId)" Type="string"/>
|
|
||||||
</RegistryKey>
|
|
||||||
<RegistryKey Key="Programmable"
|
|
||||||
ForceCreateOnInstall="yes"
|
|
||||||
ForceDeleteOnUninstall="yes" />
|
|
||||||
<RegistryKey Key="LocalServer32">
|
|
||||||
<RegistryValue Value="[#filLocalServerAssembly]" Type="string"/>
|
|
||||||
</RegistryKey>
|
|
||||||
</RegistryKey>
|
|
||||||
</RegistryKey>
|
|
||||||
|
|
||||||
<!-- HKCR\{driver-prog-id} -->
|
|
||||||
<RegistryKey Root="HKCR" Key="$(var.FocuserDriverProgId)">
|
|
||||||
<RegistryValue Value="$(var.FocuserDriverDescription)" Type="string"/>
|
|
||||||
<RegistryKey Key="CLSID">
|
|
||||||
<RegistryValue Value="$(var.FocuserDriverClassId)" Type="string" />
|
|
||||||
</RegistryKey>
|
|
||||||
</RegistryKey>
|
|
||||||
|
|
||||||
<!--Register the driver with the ASCOM Profile-->
|
|
||||||
<RegistryKey Root="HKLM" Key="SOFTWARE\ASCOM\Focuser Drivers\$(var.FocuserDriverProgId)">
|
|
||||||
<RegistryValue Value="$(var.FocuserDriverDescription)" Type="string"/>
|
|
||||||
</RegistryKey>
|
|
||||||
</Component>
|
</Component>
|
||||||
</ComponentGroup>
|
</ComponentGroup>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
@@ -12,21 +12,31 @@
|
|||||||
Assembly=".net"
|
Assembly=".net"
|
||||||
AssemblyApplication="filLocalServerAssembly" />
|
AssemblyApplication="filLocalServerAssembly" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpLocalServerRegistry" Win64="no">
|
|
||||||
<!-- LocalServer32 COM Registration -->
|
|
||||||
<RegistryKey Root="HKCR" Key="AppID" >
|
|
||||||
<!-- HKCR\AppID\{my-app-id} -->
|
|
||||||
<RegistryKey Key="$(var.LocalServerAppId)">
|
|
||||||
<RegistryValue Value="$(var.InstallName)" Type="string"/>
|
|
||||||
<RegistryValue Name="AppID" Value="$(var.LocalServerAppId)" Type="string"/>
|
|
||||||
<RegistryValue Name="AuthenticationLevel" Value="1" Type="integer"/>
|
|
||||||
</RegistryKey>
|
|
||||||
<!-- HKCR\AppID\{exe-name} -->
|
|
||||||
<RegistryKey Key="$(var.Meade.net.TargetFileName)">
|
|
||||||
<RegistryValue Name="AppID" Value="$(var.LocalServerAppId)" Type="string"/>
|
|
||||||
</RegistryKey>
|
|
||||||
</RegistryKey>
|
|
||||||
</Component>
|
|
||||||
</ComponentGroup>
|
</ComponentGroup>
|
||||||
|
|
||||||
|
<CustomAction Id="RegisterEXE"
|
||||||
|
Directory="INSTALLFOLDER"
|
||||||
|
ExeCommand=""[#filLocalServerAssembly]" /register"
|
||||||
|
Execute="deferred"
|
||||||
|
Return="ignore"
|
||||||
|
Impersonate="no"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<CustomAction Id="UnRegisterEXE"
|
||||||
|
Directory="INSTALLFOLDER"
|
||||||
|
ExeCommand=""[#filLocalServerAssembly]" /unregister"
|
||||||
|
Execute="deferred"
|
||||||
|
Return="ignore"
|
||||||
|
Impersonate="no"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<InstallExecuteSequence>
|
||||||
|
<Custom Action='RegisterEXE' Before="InstallFinalize">
|
||||||
|
<![CDATA[(NOT Installed)]]>
|
||||||
|
</Custom>
|
||||||
|
<Custom Action="UnRegisterEXE" After="InstallInitialize">
|
||||||
|
<![CDATA[(REMOVE ~= "ALL" AND NOT UPGRADINGPRODUCTCODE)]]>
|
||||||
|
</Custom>
|
||||||
|
</InstallExecuteSequence>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
</Wix>
|
</Wix>
|
||||||
@@ -18,41 +18,6 @@
|
|||||||
Vital="yes"
|
Vital="yes"
|
||||||
Assembly=".net"
|
Assembly=".net"
|
||||||
AssemblyApplication="filTelescopeDriverAssembly" />
|
AssemblyApplication="filTelescopeDriverAssembly" />
|
||||||
<!-- Registry entries suitable for a LocalServer served class -->
|
|
||||||
<!-- HKCR\CLSID\{driver-guid} -->
|
|
||||||
<RegistryKey Root="HKCR" Key="CLSID">
|
|
||||||
<RegistryKey Key="$(var.TelescopeDriverClassId)">
|
|
||||||
<RegistryValue Value="$(var.TelescopeDriverProgId)" Type="string"/>
|
|
||||||
<RegistryValue Name="AppId" Value="$(var.LocalServerAppId)" Type="string"/>
|
|
||||||
<RegistryKey Key="Implemented Categories">
|
|
||||||
<RegistryKey Key="{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}"
|
|
||||||
ForceCreateOnInstall="yes"
|
|
||||||
ForceDeleteOnUninstall="yes"/>
|
|
||||||
</RegistryKey>
|
|
||||||
<RegistryKey Key="ProgId">
|
|
||||||
<RegistryValue Value="$(var.TelescopeDriverProgId)" Type="string"/>
|
|
||||||
</RegistryKey>
|
|
||||||
<RegistryKey Key="Programmable"
|
|
||||||
ForceCreateOnInstall="yes"
|
|
||||||
ForceDeleteOnUninstall="yes" />
|
|
||||||
<RegistryKey Key="LocalServer32">
|
|
||||||
<RegistryValue Value="[#filLocalServerAssembly]" Type="string"/>
|
|
||||||
</RegistryKey>
|
|
||||||
</RegistryKey>
|
|
||||||
</RegistryKey>
|
|
||||||
|
|
||||||
<!-- HKCR\{driver-prog-id} -->
|
|
||||||
<RegistryKey Root="HKCR" Key="$(var.TelescopeDriverProgId)">
|
|
||||||
<RegistryValue Value="$(var.TelescopeDriverDescription)" Type="string"/>
|
|
||||||
<RegistryKey Key="CLSID">
|
|
||||||
<RegistryValue Value="$(var.TelescopeDriverClassId)" Type="string" />
|
|
||||||
</RegistryKey>
|
|
||||||
</RegistryKey>
|
|
||||||
|
|
||||||
<!--Register the driver with the ASCOM Profile-->
|
|
||||||
<RegistryKey Root="HKLM" Key="SOFTWARE\ASCOM\Telescope Drivers\$(var.TelescopeDriverProgId)">
|
|
||||||
<RegistryValue Value="$(var.TelescopeDriverDescription)" Type="string"/>
|
|
||||||
</RegistryKey>
|
|
||||||
</Component>
|
</Component>
|
||||||
</ComponentGroup>
|
</ComponentGroup>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
Binary file not shown.
@@ -48,6 +48,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Config.wxi" />
|
<Content Include="Config.wxi" />
|
||||||
|
<Content Include="License.rtf" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Meade.net.focuser\Meade.net.focuser.csproj">
|
<ProjectReference Include="..\Meade.net.focuser\Meade.net.focuser.csproj">
|
||||||
|
|||||||
@@ -30,12 +30,7 @@
|
|||||||
<![CDATA[Installed OR NETFRAMEWORK40FULL]]>
|
<![CDATA[Installed OR NETFRAMEWORK40FULL]]>
|
||||||
</Condition>
|
</Condition>
|
||||||
|
|
||||||
<!--todo create a method to check if ASCOM is installed.-->
|
<!-- <Condition Message="Please use the correct installer for your operating system - x86 for 32-bit, x64 for 64-bit.">
|
||||||
<!--<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.">
|
|
||||||
<?if $(var.Win64) = "yes" ?>
|
<?if $(var.Win64) = "yes" ?>
|
||||||
VersionNT64
|
VersionNT64
|
||||||
<?else?>
|
<?else?>
|
||||||
@@ -46,6 +41,7 @@
|
|||||||
|
|
||||||
<UIRef Id="InstallationUI"/>
|
<UIRef Id="InstallationUI"/>
|
||||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
|
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
|
||||||
|
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
|
||||||
|
|
||||||
<FeatureGroupRef Id="fgRoot"/>
|
<FeatureGroupRef Id="fgRoot"/>
|
||||||
</Product>
|
</Product>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<RegisterForComInterop>true</RegisterForComInterop>
|
<RegisterForComInterop>true</RegisterForComInterop>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||||
<OutputPath>..\bin\Debug\</OutputPath>
|
<OutputPath>..\bin\Debug\</OutputPath>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace ASCOM.Meade.net
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Guid("d9fd4b3e-c4f1-48ac-a16f-d02eef30d86f")]
|
[Guid("d9fd4b3e-c4f1-48ac-a16f-d02eef30d86f")]
|
||||||
[ProgId("ASCOM.MeadeGeneric.Telescope")]
|
[ProgId("ASCOM.MeadeGeneric.Telescope")]
|
||||||
[ServedClassName("Meade.net Telescope")]
|
[ServedClassName("Meade Generic")]
|
||||||
[ClassInterface(ClassInterfaceType.None)]
|
[ClassInterface(ClassInterfaceType.None)]
|
||||||
public class Telescope : ReferenceCountedObjectBase, ITelescopeV3
|
public class Telescope : ReferenceCountedObjectBase, ITelescopeV3
|
||||||
{
|
{
|
||||||
@@ -388,6 +388,7 @@ namespace ASCOM.Meade.net
|
|||||||
|
|
||||||
if (connectionInfo.SameDevice == 1)
|
if (connectionInfo.SameDevice == 1)
|
||||||
{
|
{
|
||||||
|
LogMessage("Connected Set", $"Making first connection telescope adjustments");
|
||||||
//These settings are applied only when the first device connects to the telescope.
|
//These settings are applied only when the first device connects to the telescope.
|
||||||
SetLongFormat(true);
|
SetLongFormat(true);
|
||||||
|
|
||||||
@@ -398,6 +399,10 @@ namespace ASCOM.Meade.net
|
|||||||
|
|
||||||
SetTelescopePrecision("Connect");
|
SetTelescopePrecision("Connect");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogMessage("Connected Set", $"Skipping first connection telescope adjustments (current connections: {connectionInfo.SameDevice})");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
@@ -520,7 +525,7 @@ namespace ASCOM.Meade.net
|
|||||||
return highPrecision;
|
return highPrecision;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TelescopePointingPrecision(bool high)
|
private void TelescopePointingPrecision(bool high)
|
||||||
{
|
{
|
||||||
var currentPrecision = TogglePrecision();
|
var currentPrecision = TogglePrecision();
|
||||||
|
|
||||||
@@ -2308,7 +2313,7 @@ namespace ASCOM.Meade.net
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read the device configuration from the ASCOM Profile store
|
/// Read the device configuration from the ASCOM Profile store
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal void ReadProfile()
|
private void ReadProfile()
|
||||||
{
|
{
|
||||||
ProfileProperties profileProperties = _sharedResourcesWrapper.ReadProfile();
|
ProfileProperties profileProperties = _sharedResourcesWrapper.ReadProfile();
|
||||||
_tl.Enabled = profileProperties.TraceLogger;
|
_tl.Enabled = profileProperties.TraceLogger;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace ASCOM.Meade.net
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Guid("a32ac647-bf0f-42f9-8ab0-d166fa5884ad")]
|
[Guid("a32ac647-bf0f-42f9-8ab0-d166fa5884ad")]
|
||||||
[ProgId("ASCOM.MeadeGeneric.focuser")]
|
[ProgId("ASCOM.MeadeGeneric.focuser")]
|
||||||
[ServedClassName("Meade.net Focuser")]
|
[ServedClassName("Meade Generic")]
|
||||||
[ClassInterface(ClassInterfaceType.None)]
|
[ClassInterface(ClassInterfaceType.None)]
|
||||||
public class Focuser : ReferenceCountedObjectBase, IFocuserV3
|
public class Focuser : ReferenceCountedObjectBase, IFocuserV3
|
||||||
{
|
{
|
||||||
@@ -37,7 +37,7 @@ namespace ASCOM.Meade.net
|
|||||||
/// The DeviceID is used by ASCOM applications to load the driver at runtime.
|
/// The DeviceID is used by ASCOM applications to load the driver at runtime.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//internal static string driverID = "ASCOM.Meade.net.Focuser";
|
//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
|
// TODO Change the descriptive string for your driver then remove this line
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Driver description that displays in the ASCOM Chooser.
|
/// Driver description that displays in the ASCOM Chooser.
|
||||||
@@ -54,7 +54,7 @@ namespace ASCOM.Meade.net
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Variable to hold the trace logger object (creates a diagnostic log file with information that you specify)
|
/// Variable to hold the trace logger object (creates a diagnostic log file with information that you specify)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static TraceLogger Tl;
|
private static TraceLogger Tl;
|
||||||
|
|
||||||
private readonly ISharedResourcesWrapper _sharedResourcesWrapper;
|
private readonly ISharedResourcesWrapper _sharedResourcesWrapper;
|
||||||
|
|
||||||
@@ -358,16 +358,7 @@ namespace ASCOM.Meade.net
|
|||||||
if (position == 0)
|
if (position == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (position > 0)
|
MoveFocuser(position > 0, Math.Abs(position));
|
||||||
{
|
|
||||||
//desired move direction is out
|
|
||||||
MoveFocuser(true, Math.Abs(position));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//desired move direction is in
|
|
||||||
MoveFocuser(false, Math.Abs(position));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MoveFocuser(bool directionOut, int steps)
|
private void MoveFocuser(bool directionOut, int steps)
|
||||||
@@ -426,6 +417,7 @@ namespace ASCOM.Meade.net
|
|||||||
Tl.LogMessage("TempComp Get", false.ToString());
|
Tl.LogMessage("TempComp Get", false.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// ReSharper disable once ValueParameterNotUsed
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
Tl.LogMessage("TempComp Set", "Not implemented");
|
Tl.LogMessage("TempComp Set", "Not implemented");
|
||||||
@@ -551,7 +543,7 @@ namespace ASCOM.Meade.net
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read the device configuration from the ASCOM Profile store
|
/// Read the device configuration from the ASCOM Profile store
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal void ReadProfile()
|
private void ReadProfile()
|
||||||
{
|
{
|
||||||
var profileProperties = _sharedResourcesWrapper.ReadProfile();
|
var profileProperties = _sharedResourcesWrapper.ReadProfile();
|
||||||
Tl.Enabled = profileProperties.TraceLogger;
|
Tl.Enabled = profileProperties.TraceLogger;
|
||||||
@@ -567,7 +559,7 @@ namespace ASCOM.Meade.net
|
|||||||
/// <param name="identifier"></param>
|
/// <param name="identifier"></param>
|
||||||
/// <param name="message"></param>
|
/// <param name="message"></param>
|
||||||
/// <param name="args"></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);
|
var msg = string.Format(message, args);
|
||||||
Tl.LogMessage(identifier, msg);
|
Tl.LogMessage(identifier, msg);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<RegisterForComInterop>true</RegisterForComInterop>
|
<RegisterForComInterop>true</RegisterForComInterop>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
+9
-6
@@ -71,21 +71,23 @@ Global
|
|||||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Release|x64.Build.0 = Release|Any CPU
|
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Release|x86.ActiveCfg = Release|x86
|
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Release|x86.ActiveCfg = Release|x86
|
||||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Release|x86.Build.0 = Release|x86
|
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Release|x86.Build.0 = Release|x86
|
||||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|Any CPU.ActiveCfg = Debug|x86
|
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|x64.ActiveCfg = Debug|x86
|
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|x64.ActiveCfg = Debug|x86
|
||||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|x64.Build.0 = Debug|x86
|
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|x64.Build.0 = Debug|x86
|
||||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|x86.ActiveCfg = Debug|x86
|
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|x86.Build.0 = Debug|x86
|
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|x86.Build.0 = Debug|x86
|
||||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Release|Any CPU.ActiveCfg = Release|x86
|
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Release|x64.ActiveCfg = Release|x86
|
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Release|x64.ActiveCfg = Release|x86
|
||||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Release|x86.ActiveCfg = Release|x86
|
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Release|x86.ActiveCfg = Release|x86
|
||||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Release|x86.Build.0 = Release|x86
|
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Release|x86.Build.0 = Release|x86
|
||||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|Any CPU.ActiveCfg = Debug|x86
|
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|x64.ActiveCfg = Debug|x86
|
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|x64.ActiveCfg = Debug|x86
|
||||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|x64.Build.0 = Debug|x86
|
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|x64.Build.0 = Debug|x86
|
||||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|x86.ActiveCfg = Debug|x86
|
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|x86.Build.0 = Debug|x86
|
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|x86.Build.0 = Debug|x86
|
||||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Release|Any CPU.ActiveCfg = Release|x86
|
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Release|x64.ActiveCfg = Release|x86
|
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Release|x64.ActiveCfg = Release|x86
|
||||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Release|x86.ActiveCfg = Release|x86
|
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Release|x86.ActiveCfg = Release|x86
|
||||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Release|x86.Build.0 = Release|x86
|
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Release|x86.Build.0 = Release|x86
|
||||||
@@ -101,12 +103,13 @@ Global
|
|||||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Release|x64.Build.0 = Release|Any CPU
|
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Release|x86.ActiveCfg = Release|x86
|
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Release|x86.ActiveCfg = Release|x86
|
||||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Release|x86.Build.0 = Release|x86
|
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Release|x86.Build.0 = Release|x86
|
||||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|Any CPU.ActiveCfg = Debug|x64
|
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|Any CPU.Build.0 = Debug|x64
|
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|Any CPU.Build.0 = Debug|x86
|
||||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|x64.ActiveCfg = Debug|x64
|
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|x86.ActiveCfg = Debug|x86
|
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|x86.Build.0 = Debug|x86
|
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|x86.Build.0 = Debug|x86
|
||||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|Any CPU.ActiveCfg = Release|x86
|
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|Any CPU.ActiveCfg = Release|x86
|
||||||
|
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|Any CPU.Build.0 = Release|x86
|
||||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|x64.ActiveCfg = Release|x86
|
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|x64.ActiveCfg = Release|x86
|
||||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|x86.ActiveCfg = Release|x86
|
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|x86.ActiveCfg = Release|x86
|
||||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|x86.Build.0 = Release|x86
|
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|x86.Build.0 = Release|x86
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
|
namespace ASCOM.Meade.net
|
||||||
|
{
|
||||||
|
public class AssemblyInfo
|
||||||
|
{
|
||||||
|
// The assembly information values.
|
||||||
|
public string Title = "", Description = "", Company = "",
|
||||||
|
Product = "", Copyright = "", Trademark = "",
|
||||||
|
AssemblyVersion = "", FileVersion = "", Guid = "",
|
||||||
|
NeutralLanguage = "";
|
||||||
|
public bool IsComVisible = false;
|
||||||
|
|
||||||
|
// Return a particular assembly attribute value.
|
||||||
|
public static T GetAssemblyAttribute<T>(Assembly assembly)
|
||||||
|
where T : Attribute
|
||||||
|
{
|
||||||
|
// Get attributes of this type.
|
||||||
|
object[] attributes =
|
||||||
|
assembly.GetCustomAttributes(typeof(T), true);
|
||||||
|
|
||||||
|
// If we didn't get anything, return null.
|
||||||
|
if ((attributes == null) || (attributes.Length == 0))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
// Convert the first attribute value into
|
||||||
|
// the desired type and return it.
|
||||||
|
return (T)attributes[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructors.
|
||||||
|
public AssemblyInfo()
|
||||||
|
: this(Assembly.GetExecutingAssembly())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public AssemblyInfo(Assembly assembly)
|
||||||
|
{
|
||||||
|
// Get values from the assembly.
|
||||||
|
AssemblyTitleAttribute titleAttr =
|
||||||
|
GetAssemblyAttribute<AssemblyTitleAttribute>(assembly);
|
||||||
|
if (titleAttr != null) Title = titleAttr.Title;
|
||||||
|
|
||||||
|
AssemblyDescriptionAttribute assemblyAttr =
|
||||||
|
GetAssemblyAttribute<AssemblyDescriptionAttribute>(assembly);
|
||||||
|
if (assemblyAttr != null) Description =
|
||||||
|
assemblyAttr.Description;
|
||||||
|
|
||||||
|
AssemblyCompanyAttribute companyAttr =
|
||||||
|
GetAssemblyAttribute<AssemblyCompanyAttribute>(assembly);
|
||||||
|
if (companyAttr != null) Company = companyAttr.Company;
|
||||||
|
|
||||||
|
AssemblyProductAttribute productAttr =
|
||||||
|
GetAssemblyAttribute<AssemblyProductAttribute>(assembly);
|
||||||
|
if (productAttr != null) Product = productAttr.Product;
|
||||||
|
|
||||||
|
AssemblyCopyrightAttribute copyrightAttr =
|
||||||
|
GetAssemblyAttribute<AssemblyCopyrightAttribute>(assembly);
|
||||||
|
if (copyrightAttr != null) Copyright = copyrightAttr.Copyright;
|
||||||
|
|
||||||
|
AssemblyTrademarkAttribute trademarkAttr =
|
||||||
|
GetAssemblyAttribute<AssemblyTrademarkAttribute>(assembly);
|
||||||
|
if (trademarkAttr != null) Trademark = trademarkAttr.Trademark;
|
||||||
|
|
||||||
|
var version = assembly.GetName().Version;
|
||||||
|
AssemblyVersion = $"{version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
|
||||||
|
|
||||||
|
|
||||||
|
AssemblyFileVersionAttribute fileVersionAttr =
|
||||||
|
GetAssemblyAttribute<AssemblyFileVersionAttribute>(assembly);
|
||||||
|
if (fileVersionAttr != null) FileVersion =
|
||||||
|
fileVersionAttr.Version;
|
||||||
|
|
||||||
|
GuidAttribute guidAttr = GetAssemblyAttribute<GuidAttribute>(assembly);
|
||||||
|
if (guidAttr != null) Guid = guidAttr.Value;
|
||||||
|
|
||||||
|
NeutralResourcesLanguageAttribute languageAttr =
|
||||||
|
GetAssemblyAttribute<NeutralResourcesLanguageAttribute>(assembly);
|
||||||
|
if (languageAttr != null) NeutralLanguage =
|
||||||
|
languageAttr.CultureName;
|
||||||
|
|
||||||
|
ComVisibleAttribute comAttr =
|
||||||
|
GetAssemblyAttribute<ComVisibleAttribute>(assembly);
|
||||||
|
if (comAttr != null) IsComVisible = comAttr.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
-10
@@ -29,6 +29,8 @@ namespace ASCOM.Meade.net
|
|||||||
public static class Server
|
public static class Server
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private const string DRIVER_NAME = "Meade Generic";
|
||||||
|
|
||||||
#region Access to kernel32.dll, user32.dll, and ole32.dll functions
|
#region Access to kernel32.dll, user32.dll, and ole32.dll functions
|
||||||
[Flags]
|
[Flags]
|
||||||
enum Clsctx : uint
|
enum Clsctx : uint
|
||||||
@@ -256,8 +258,8 @@ namespace ASCOM.Meade.net
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Failed to load served COM class assembly " + fi.Name + " - " + e.Message,
|
MessageBox.Show($"Failed to load served COM class assembly {fi.Name} - {e.Message}",
|
||||||
"Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
DRIVER_NAME, MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,12 +295,11 @@ namespace ASCOM.Meade.net
|
|||||||
try { Process.Start(si); }
|
try { Process.Start(si); }
|
||||||
catch (System.ComponentModel.Win32Exception)
|
catch (System.ComponentModel.Win32Exception)
|
||||||
{
|
{
|
||||||
MessageBox.Show("The Meade.net was not " + (arg == "/register" ? "registered" : "unregistered") +
|
MessageBox.Show($"The {DRIVER_NAME} was not {(arg == "/register" ? "registered" : "unregistered")} because you did not allow it.", DRIVER_NAME, MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
" because you did not allow it.", "Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show(ex.ToString(), "Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
MessageBox.Show(ex.ToString(), DRIVER_NAME, MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -356,8 +357,8 @@ namespace ASCOM.Meade.net
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Error while registering the server:\n" + ex.ToString(),
|
MessageBox.Show($"Error while registering the server:\n{ex}",
|
||||||
"Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
DRIVER_NAME, MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -426,7 +427,7 @@ namespace ASCOM.Meade.net
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Error while registering the server:\n" + ex.ToString(),
|
MessageBox.Show("Error while registering the server:\n" + ex.ToString(),
|
||||||
"Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
DRIVER_NAME, MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||||
bFail = true;
|
bFail = true;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -514,7 +515,7 @@ namespace ASCOM.Meade.net
|
|||||||
if (!factory.RegisterClassObject())
|
if (!factory.RegisterClassObject())
|
||||||
{
|
{
|
||||||
MessageBox.Show("Failed to register class factory for " + type.Name,
|
MessageBox.Show("Failed to register class factory for " + type.Name,
|
||||||
"Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
DRIVER_NAME, MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -570,7 +571,7 @@ namespace ASCOM.Meade.net
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
MessageBox.Show("Unknown argument: " + args[0] + "\nValid are : -register, -unregister and -embedding",
|
MessageBox.Show("Unknown argument: " + args[0] + "\nValid are : -register, -unregister and -embedding",
|
||||||
"Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
DRIVER_NAME, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<Prefer32Bit>true</Prefer32Bit>
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
|
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
@@ -68,7 +69,7 @@
|
|||||||
<OutputPath>..\bin\Debug\</OutputPath>
|
<OutputPath>..\bin\Debug\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<Prefer32Bit>true</Prefer32Bit>
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
@@ -121,6 +122,7 @@
|
|||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="AssemblyInfo.cs" />
|
||||||
<Compile Include="ClassFactory.cs" />
|
<Compile Include="ClassFactory.cs" />
|
||||||
<Compile Include="ConnectionInfo.cs" />
|
<Compile Include="ConnectionInfo.cs" />
|
||||||
<Compile Include="frmMain.cs">
|
<Compile Include="frmMain.cs">
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyDescription("ASCOM multi-interface server for Meade.net")]
|
[assembly: AssemblyDescription("ASCOM multi-interface server for Meade.net")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("cjdawson.com")]
|
[assembly: AssemblyCompany("cjdawson.com")]
|
||||||
[assembly: AssemblyProduct("")]
|
[assembly: AssemblyProduct("ASCOM Meade Generic")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2019 cjdawson.com")]
|
[assembly: AssemblyCopyright("Copyright © 2019 cjdawson.com")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace ASCOM.Meade.net
|
namespace ASCOM.Meade.net
|
||||||
@@ -13,6 +11,10 @@ namespace ASCOM.Meade.net
|
|||||||
public SetupDialogForm()
|
public SetupDialogForm()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
var assemblyInfo = new AssemblyInfo();
|
||||||
|
|
||||||
|
Text = $"{assemblyInfo.Product} Settings ({assemblyInfo.AssemblyVersion})";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cmdCancel_Click(object sender, EventArgs e) // Cancel button event handler
|
private void cmdCancel_Click(object sender, EventArgs e) // Cancel button event handler
|
||||||
@@ -113,5 +115,20 @@ namespace ASCOM.Meade.net
|
|||||||
{
|
{
|
||||||
UpdateOKButton();
|
UpdateOKButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetReadOnlyMode()
|
||||||
|
{
|
||||||
|
foreach (Control control in Controls)
|
||||||
|
{
|
||||||
|
control.Enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
cmdCancel.Enabled = true;
|
||||||
|
//cmdOK.Enabled = false;
|
||||||
|
//comboBoxComPort.Enabled = false;
|
||||||
|
//chkTrace.Enabled = false;
|
||||||
|
//txtGuideRate.Enabled = false;
|
||||||
|
//cboPrecision.Enabled = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
<value>12, 9</value>
|
<value>12, 9</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>123, 31</value>
|
<value>274, 31</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
//
|
//
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using ASCOM.Utilities;
|
using ASCOM.Utilities;
|
||||||
|
|
||||||
namespace ASCOM.Meade.net
|
namespace ASCOM.Meade.net
|
||||||
@@ -227,6 +228,11 @@ namespace ASCOM.Meade.net
|
|||||||
{
|
{
|
||||||
f.SetProfile(profileProperties);
|
f.SetProfile(profileProperties);
|
||||||
|
|
||||||
|
if (IsConnected())
|
||||||
|
{
|
||||||
|
f.SetReadOnlyMode();
|
||||||
|
}
|
||||||
|
|
||||||
var result = f.ShowDialog();
|
var result = f.ShowDialog();
|
||||||
if (result == System.Windows.Forms.DialogResult.OK)
|
if (result == System.Windows.Forms.DialogResult.OK)
|
||||||
{
|
{
|
||||||
@@ -332,6 +338,17 @@ namespace ASCOM.Meade.net
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsConnected()
|
||||||
|
{
|
||||||
|
foreach (var device in _connectedDevices)
|
||||||
|
{
|
||||||
|
if (device.Value.Count > 0)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public static bool IsConnected(string deviceId)
|
public static bool IsConnected(string deviceId)
|
||||||
{
|
{
|
||||||
if (_connectedDevices.ContainsKey(deviceId))
|
if (_connectedDevices.ContainsKey(deviceId))
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
@@ -36,6 +36,25 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||||
|
|||||||
Reference in New Issue
Block a user