Exemplo n.º 1
0
        public override async void PerformAction()
        {
            AlarmActionTypes desiredAction = this.GetActionFromCommand();

            switch (desiredAction)
            {
            case AlarmActionTypes.CREATE:
                var alarm = await this.NewAlarm();

                this.ClearArea();
                if (this.DynamicArea != null)
                {
                    RelativePanel panel = CreateAlarmCard(alarm);
                    this.DynamicArea.Children.Add(panel);
                    RelativePanel.SetAlignHorizontalCenterWithPanel(panel, true);
                    RelativePanel.SetAlignVerticalCenterWithPanel(panel, true);
                }
                break;

            case AlarmActionTypes.EDIT:
                this.EditAlarm();
                break;

            case AlarmActionTypes.DELETE:
                this.DeleteAlarm();
                break;
            }
        }
Exemplo n.º 2
0
 public AlarmAction(AlarmActionTypes ActionType, string CommandString)
 {
     this.ActionType    = ActionType;
     this.CommandString = CommandString;
 }