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