private async void NewRunePageItem_StoreNew() { try { Json.Value value = await Wrapper.GetCurrentRunePageAsync(); if (value != null) { value.Remove("current"); value.Remove("id"); value.Remove("isActive"); value.Remove("isDeletable"); value.Remove("isEditable"); value.Remove("isValid"); value.Remove("lastModified"); value.Remove("order"); AppendRunePage(value); UpdateConfig(); } else { MessagePopup messagePopup = new MessagePopup("Please select a page, try again?"); messagePopup.Decided += delegate(bool result) { if (result) { NewRunePageItem_StoreNew(); } MainViewGrid.Children.Remove(messagePopup); }; } } catch (RequestWrapper.NoClientException) { MessagePopup messagePopup = new MessagePopup("Service currently unavailable, try again?"); messagePopup.Decided += delegate(bool result) { if (result) { NewRunePageItem_StoreNew(); } MainViewGrid.Children.Remove(messagePopup); }; MainViewGrid.Children.Add(messagePopup); } }