Code inspections
This commit is contained in:
@@ -79,5 +79,32 @@ namespace ASCOM.Meade.net.Properties {
|
||||
return ((System.Drawing.Icon)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Site out of range.
|
||||
/// </summary>
|
||||
internal static string Telescope_GetSiteName_Site_out_of_range {
|
||||
get {
|
||||
return ResourceManager.GetString("Telescope_GetSiteName_Site_out_of_range", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Site cannot be higher than 4.
|
||||
/// </summary>
|
||||
internal static string Telescope_SelectSite_Site_cannot_be_higher_than_4 {
|
||||
get {
|
||||
return ResourceManager.GetString("Telescope_SelectSite_Site_cannot_be_higher_than_4", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Site cannot be lower than 1.
|
||||
/// </summary>
|
||||
internal static string Telescope_SelectSite_Site_cannot_be_lower_than_1 {
|
||||
get {
|
||||
return ResourceManager.GetString("Telescope_SelectSite_Site_cannot_be_lower_than_1", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,4 +124,13 @@
|
||||
<data name="DefaultIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\ASCOM.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Telescope_SelectSite_Site_cannot_be_lower_than_1" xml:space="preserve">
|
||||
<value>Site cannot be lower than 1</value>
|
||||
</data>
|
||||
<data name="Telescope_SelectSite_Site_cannot_be_higher_than_4" xml:space="preserve">
|
||||
<value>Site cannot be higher than 4</value>
|
||||
</data>
|
||||
<data name="Telescope_GetSiteName_Site_out_of_range" xml:space="preserve">
|
||||
<value>Site out of range</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -9,6 +9,7 @@ using System.Collections;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using ASCOM.Meade.net.AstroMaths;
|
||||
using ASCOM.Meade.net.Properties;
|
||||
using ASCOM.Meade.net.Wrapper;
|
||||
using ASCOM.Utilities.Interfaces;
|
||||
|
||||
@@ -536,9 +537,9 @@ namespace ASCOM.Meade.net
|
||||
CheckConnected("SelectSite");
|
||||
|
||||
if (site < 1)
|
||||
throw new ArgumentOutOfRangeException(nameof(site),site,"Site cannot be lower than 1");
|
||||
throw new ArgumentOutOfRangeException(nameof(site),site,Resources.Telescope_SelectSite_Site_cannot_be_lower_than_1);
|
||||
else if (site > 4)
|
||||
throw new ArgumentOutOfRangeException(nameof(site), site, "Site cannot be higher than 4");
|
||||
throw new ArgumentOutOfRangeException(nameof(site), site, Resources.Telescope_SelectSite_Site_cannot_be_higher_than_4);
|
||||
|
||||
_sharedResourcesWrapper.SendBlind($":W{site}#");
|
||||
//:W<n>#
|
||||
@@ -551,9 +552,9 @@ namespace ASCOM.Meade.net
|
||||
CheckConnected("SetSiteName");
|
||||
|
||||
if (site < 1)
|
||||
throw new ArgumentOutOfRangeException(nameof(site), site, "Site cannot be lower than 1");
|
||||
throw new ArgumentOutOfRangeException(nameof(site), site, Resources.Telescope_SelectSite_Site_cannot_be_lower_than_1);
|
||||
else if (site > 4)
|
||||
throw new ArgumentOutOfRangeException(nameof(site), site, "Site cannot be higher than 4");
|
||||
throw new ArgumentOutOfRangeException(nameof(site), site, Resources.Telescope_SelectSite_Site_cannot_be_higher_than_4);
|
||||
|
||||
string command = String.Empty;
|
||||
switch (site)
|
||||
@@ -605,9 +606,9 @@ namespace ASCOM.Meade.net
|
||||
CheckConnected("GetSiteName");
|
||||
|
||||
if (site < 1)
|
||||
throw new ArgumentOutOfRangeException(nameof(site), site, "Site cannot be lower than 1");
|
||||
throw new ArgumentOutOfRangeException(nameof(site), site, Resources.Telescope_SelectSite_Site_cannot_be_lower_than_1);
|
||||
else if (site > 4)
|
||||
throw new ArgumentOutOfRangeException(nameof(site), site, "Site cannot be higher than 4");
|
||||
throw new ArgumentOutOfRangeException(nameof(site), site, Resources.Telescope_SelectSite_Site_cannot_be_higher_than_4);
|
||||
|
||||
switch (site)
|
||||
{
|
||||
@@ -633,7 +634,7 @@ namespace ASCOM.Meade.net
|
||||
//A ‘#’ terminated string with the name of the requested site.
|
||||
}
|
||||
|
||||
throw new ArgumentOutOfRangeException(nameof(site), site, "Site out of range");
|
||||
throw new ArgumentOutOfRangeException(nameof(site), site, Resources.Telescope_GetSiteName_Site_out_of_range);
|
||||
}
|
||||
|
||||
public string Description
|
||||
|
||||
Reference in New Issue
Block a user