protected void PowerOff(bool askToConfirm, PowerOfFEventType eventType, uint customSubPageJoinForPrompt) { if (askToConfirm) { PromptUsers(prompt => { if (prompt.Response.Responded && prompt.Response.Action.ActionType == PromptActionType.Cancel) { //Ignore } else { InternalPowerOff((PowerOfFEventType)prompt.UserDefinedObject); } }, customSubPageJoinForPrompt, PowerOffPromptHeaderText, PowerOffPromptSubHeaderText, 60, eventType, new PromptAction { ActionName = "Cancel", ActionType = PromptActionType.Cancel }, new PromptAction { ActionName = PowerOffPromptConfirmButtonText, ActionType = PromptActionType.Acknowledge }); } else { InternalPowerOff(eventType); } }
internal void InternalPowerOff(PowerOfFEventType eventType) { PowerOff(eventType); foreach (var uiController in UIControllers) { uiController.InternalRoomPowerOff(eventType); } }
internal void InternalRoomPowerOff(PowerOfFEventType eventType) { try { RoomDidPowerOff(eventType); } catch (Exception e) { CloudLog.Exception(e); } }
protected override void PowerOff(PowerOfFEventType eventType) { Source = null; foreach (var display in Displays.Where(display => display.Device != null)) { #if DEBUG CloudLog.Notice("{0} Power Off!", display.Device.Name); #endif display.Device.Power = false; } }
protected abstract void RoomDidPowerOff(PowerOfFEventType eventType);
protected override void RoomDidPowerOff(PowerOfFEventType eventType) { }
public override void PowerOff(bool askToConfirm, PowerOfFEventType eventType) { PowerOff(askToConfirm, eventType, Digitals.SubPageActionSheetPowerOff); }