コード例 #1
0
        private void MenuOnMenuItemClick(AnimeGridItemMoreFlyoutButtons btn)
        {
            switch (btn)
            {
            case AnimeGridItemMoreFlyoutButtons.CopyLink:
                ViewModel.CopyLinkToClipboardCommand.Execute(null);
                break;

            case AnimeGridItemMoreFlyoutButtons.OpenInBrowser:
                ViewModel.OpenInMALCommand.Execute(null);
                break;

            case AnimeGridItemMoreFlyoutButtons.SetStatus:
                ShowStatusDialog();
                break;

            case AnimeGridItemMoreFlyoutButtons.SetRating:
                ShowRatingDialog();
                break;

            case AnimeGridItemMoreFlyoutButtons.SetWatched:
                ShowWatchedDialog();
                break;

            case AnimeGridItemMoreFlyoutButtons.CopyTitle:
                ViewModel.CopyTitleToClipboardCommand.Execute(null);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(btn), btn, null);
            }
            _menu.Dismiss(true);
        }
コード例 #2
0
        private void OnMoreFlyoutSelection(AnimeGridItemMoreFlyoutButtons animeGridItemMoreFlyoutButtons)
        {
            switch (animeGridItemMoreFlyoutButtons)
            {
            case AnimeGridItemMoreFlyoutButtons.CopyLink:
                ViewModel.CopyLinkToClipboardCommand.Execute(null);
                break;

            case AnimeGridItemMoreFlyoutButtons.OpenInBrowser:
                ViewModel.OpenInMALCommand.Execute(null);
                break;
            }
            _menu.Dismiss(true);
        }