Example #1
0
        private async void InviteControl_OnDeleteInvite(object sender, EventArgs e)
        {
            string code = ((Invite)sender).String;
            await RESTCalls.DeleteInvite(code);

            InviteView.Items.Remove(InviteView.Items.FirstOrDefault(x => ((Invite)x).String == code));
        }
Example #2
0
        private async void InviteControl_OnDeleteInvite(object sender, EventArgs e)
        {
            string code = ((Invite)sender).String;

            try
            {
                await RESTCalls.DeleteInvite(code);

                InviteView.Items.Remove(InviteView.Items.FirstOrDefault(x => ((Invite)x).String == code));
            }
            catch (Exception)
            {
                MessageDialog md = new MessageDialog("Something went wrong, and we weren't able to delete the invite.",
                                                     "Sorry :/");
            }
        }