Example #1
0
 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);
     }
 }
Example #2
0
        internal void InternalPowerOff(PowerOfFEventType eventType)
        {
            PowerOff(eventType);

            foreach (var uiController in UIControllers)
            {
                uiController.InternalRoomPowerOff(eventType);
            }
        }
Example #3
0
 internal void InternalRoomPowerOff(PowerOfFEventType eventType)
 {
     try
     {
         RoomDidPowerOff(eventType);
     }
     catch (Exception e)
     {
         CloudLog.Exception(e);
     }
 }
Example #4
0
        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;
            }
        }
Example #5
0
 protected abstract void RoomDidPowerOff(PowerOfFEventType eventType);
Example #6
0
 protected override void RoomDidPowerOff(PowerOfFEventType eventType)
 {
 }
Example #7
0
 public override void PowerOff(bool askToConfirm, PowerOfFEventType eventType)
 {
     PowerOff(askToConfirm, eventType, Digitals.SubPageActionSheetPowerOff);
 }