Пример #1
0
        private async void OnDeckDragAnDrop(DeckInformation parent, DeckInformation child)
        {
            try
            {
                deckListViewModel.DragAnDrop(parent, child, decksView);

                UpdateNoticeText();
            }
            catch (DeckRenameException ex)
            {
                if (ex.Error == DeckRenameException.ErrorCode.ALREADY_EXISTS)
                {
                    await UIHelper.ShowMessageDialog("A deck with the same name already exists.");

                    return;
                }
                if (ex.Error == DeckRenameException.ErrorCode.FILTERED_NOSUBDEKCS)
                {
                    await UIHelper.ShowMessageDialog("A \"Custom Study Deck\" can't become a parent deck.");

                    return;
                }
            }
            catch
            {
                await UIHelper.ShowMessageDialog("Unexpected error.");

                return;
            }
        }