Skip to content

Commit

Permalink
Merge pull request #13 from anes300/BP-64-stop-query-message
Browse files Browse the repository at this point in the history
Fixed minor server commands interface issues
  • Loading branch information
Chillhound authored Mar 25, 2022
2 parents 0e699fc + d887c81 commit 9ee8ec5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions IOTManagment/Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
Console.WriteLine("Re-enter query or write quit");
}
}
else
{
Console.WriteLine("Re-enter Query or write quit");
}
}
break;
case "info": //TODO: Create list of all queries
Expand All @@ -94,16 +98,16 @@
break;
case "stop": //TODO: send a stop message and remove query from list
Console.WriteLine("Input query id");
Guid id = default;
Guid id = default;
while (true)
{
string value = Console.ReadLine().Trim();
if (value == "quit") { Console.Clear(); break; }
if(value != "")
{
if (value != "")
{
Guid.TryParse(value, out id);
var foundQ = queries.Where(x => x.Id == id).FirstOrDefault();
if(foundQ != null)
if (foundQ != null)
{
Console.Clear();
queries.Remove(foundQ);
Expand All @@ -113,6 +117,10 @@
}
else { colorConsole("No such Query found", ConsoleColor.Red, ConsoleColor.White); Console.WriteLine("Please re-enter query id or write quit"); }
}
else
{
Console.WriteLine("Re-enter query id or write quit");
}
}
break;
case "-help":
Expand Down

0 comments on commit 9ee8ec5

Please sign in to comment.