Re-designed the Site action so that you can now select a site, get a site name, or get a site name.

This commit is contained in:
2019-07-22 16:45:01 +01:00
parent 64e2b9c6f9
commit 1452f3cf07
3 changed files with 237 additions and 12 deletions
+18
View File
@@ -11,5 +11,23 @@ namespace ASCOM.Meade.net
{
return double.Parse(str);
}
public static int Position(this string str, char find, int instance)
{
var currentInstance = 0;
for (var i = 0; i < str.Length; i++)
{
if (str[i] == find)
{
currentInstance++;
if (currentInstance == instance)
{
return i;
}
}
}
return -1;
}
}
}