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; } }
public AlarmAction(AlarmActionTypes ActionType, string CommandString) { this.ActionType = ActionType; this.CommandString = CommandString; }