Skip to content
Snippets Groups Projects

final merge request related to addtime feature

Merged Linda Nguyen requested to merge ChangeTimeWhileCooking into main
2 files
+ 23
19
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 16
15
using System;
using System.Threading;
using Microwave.Classes.Boundary;
using Microwave.Classes.Controllers;
using Timer = Microwave.Classes.Boundary.Timer;
namespace Microwave.App
{
@@ -40,31 +42,30 @@ namespace Microwave.App
var powerButtonPresses = 20;
for (int i = 0; i < powerButtonPresses; i++)
{
powerButton.Press();
}
defrostButton.Press();
timeButton.Press();
startCancelButton.Press();
for (int i = 0; i < powerButtonPresses; i++)
{
powerButton.Press();
}
// The simple sequence should now run
timeButton.Press();
startCancelButton.Press();
// The simple sequence should now run
System.Console.WriteLine("press 's' to stop program or 't' to extend the cooking time");
System.Console.WriteLine("When you press enter, the program will stop");
// Wait for input
char key = '0';
while (key != 's')
{
key = System.Console.ReadKey().KeyChar;
//string input = System.Console.ReadLine();
//if(input == "t")
// timeButton.Press();
if(key == 't')
timeButton.Press();
}
System.Console.ReadLine();
}
Loading