When building a Windows Console App in C#, is it possible to update lines in the console while the user is entering text?
My current code is:
public static void Scope()
{
bool stop = false;
ASCOM.Utilities.Chooser chooser = new ASCOM.Utilities.Chooser {DeviceType = "Telescope"};
ASCOM.Interface.ITelescope scope = new ASCOM.DriverAccess.Telescope(chooser.Choose());
scope.Connected = true;
ThreadPool.QueueUserWorkItem(
cb =>
{
do
{
Console.WriteLine("RA: " + scope.RightAscension);
Console.WriteLine("Dec: " + scope.Declination);
Console.WriteLine("Status: " + scope.Slewing);
Console.SetCursorPosition(0, Console.CursorTop - 3);
Thread.Sleep(1000);
} while (!stop);
}
);
Console.Read();
stop = true;
}