Example #1
0
        public override async void PerformAction()
        {
            ReminderActionTypes desiredAction = this.GetActionFromCommand();

            switch (desiredAction)
            {
            case ReminderActionTypes.CREATE:
                var reminder = await this.NewReminderAsync();

                // if the reminder is null, don't do anything
                if (reminder != null)
                {
                    this.ClearArea();
                    if (this.DynamicArea != null)
                    {
                        RelativePanel panel = this.CreateReminderCard(reminder);
                        this.DynamicArea.Children.Add(panel);
                        RelativePanel.SetAlignHorizontalCenterWithPanel(panel, true);
                        RelativePanel.SetAlignVerticalCenterWithPanel(panel, true);
                    }
                }
                break;

            case ReminderActionTypes.EDIT:
                this.EditReminder();
                break;

            case ReminderActionTypes.DELETE:
                this.DeleteReminder();
                break;
            }
        }
Example #2
0
 public ReminderAction(ReminderActionTypes ActionType, string CommandString)
 {
     this.ActionType    = ActionType;
     this.CommandString = CommandString;
 }