包廂計時功能
This commit is contained in:
parent
744f66c1ee
commit
be19d8bcf7
@ -253,14 +253,14 @@ namespace DualScreenDemo
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//public void RoomTimeStart()
|
public void RoomTimeStart()
|
||||||
//{
|
{
|
||||||
// //DateTime now = DateTime.Now;
|
//DateTime now = DateTime.Now;
|
||||||
// //DateTime tenMinutesLater = now.AddMinutes(120);
|
//DateTime tenMinutesLater = now.AddMinutes(120);
|
||||||
// //remainingTime = tenMinutesLater - now;
|
//remainingTime = tenMinutesLater - now;
|
||||||
// remainingTime = Program.room.timePeriod;
|
remainingTime = Program.room.timePeriod;
|
||||||
// timerCountdown.Start();
|
timerCountdown.Start();
|
||||||
//}
|
}
|
||||||
|
|
||||||
private async void TimerCountdown_Tick(object sender, EventArgs e)
|
private async void TimerCountdown_Tick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -274,8 +274,8 @@ namespace DualScreenDemo
|
|||||||
{
|
{
|
||||||
timerCountdown.Stop();
|
timerCountdown.Stop();
|
||||||
await Task.Delay(10000);
|
await Task.Delay(10000);
|
||||||
Program.room.setDB("closed");
|
//Program.room.setDB("closed");
|
||||||
Program.room.set("");
|
//Program.room.set("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
Room.cs
6
Room.cs
@ -13,7 +13,7 @@ namespace DualScreenDemo
|
|||||||
private string State = "error";
|
private string State = "error";
|
||||||
private DateTime? startedAt;
|
private DateTime? startedAt;
|
||||||
private DateTime? endedAt;
|
private DateTime? endedAt;
|
||||||
//public TimeSpan timePeriod;
|
public TimeSpan timePeriod;
|
||||||
|
|
||||||
public Room()
|
public Room()
|
||||||
{
|
{
|
||||||
@ -47,8 +47,8 @@ namespace DualScreenDemo
|
|||||||
var Statedb = db.Field<string>("status");
|
var Statedb = db.Field<string>("status");
|
||||||
startedAt = ParseTime(db.Field<string>("started_at"));
|
startedAt = ParseTime(db.Field<string>("started_at"));
|
||||||
endedAt = ParseTime(db.Field<string>("ended_at"));
|
endedAt = ParseTime(db.Field<string>("ended_at"));
|
||||||
//timePeriod = (TimeSpan)(endedAt - DateTime.Now);
|
timePeriod = (TimeSpan)(endedAt - DateTime.Now);
|
||||||
////PrimaryForm.Instance.RoomTimeStart();
|
PrimaryForm.Instance.RoomTimeStart();
|
||||||
if (Statedb.Equals("maintain")) { Statedb = "active"; }
|
if (Statedb.Equals("maintain")) { Statedb = "active"; }
|
||||||
return Statedb;
|
return Statedb;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user