コード例 #1
0
 public void UpdateImage()
 {
     if (_deck == null)
     {
         return;
     }
     DeckImage = DeckScreenshotHelper.Generate(_deck, CardsOnly);
 }
コード例 #2
0
        public void Save()
        {
            var file = DeckScreenshotHelper.Save(Deck, DeckImage);

            if (file != null)
            {
                SavedFile = new FileInfo(file);
            }
        }
コード例 #3
0
        public async void CopyToClipboard()
        {
            var success = DeckScreenshotHelper.CopyToClipboard(DeckImage);

            if (!success)
            {
                return;
            }
            CopyToClipboardButtonText = LocUtil.Get(ClipboardCopied, true);
            await Task.Delay(2000);

            CopyToClipboardButtonText = LocUtil.Get(ClipboardDefault, true);
        }
コード例 #4
0
        private async void Upload()
        {
            UploadButtonEnabled = false;
            UploadButtonText    = LocUtil.Get(ImgurUploading, true);
            var url = await DeckScreenshotHelper.Upload(DeckImage);

            if (url == null)
            {
                UploadErrorVisibility = Visibility.Visible;
                UploadButtonEnabled   = true;
                UploadButtonText      = LocUtil.Get(ImgurDefault, true);
            }
            else
            {
                ImgurUrl         = url;
                UploadButtonText = LocUtil.Get(ImgurUploaded, true);
            }
        }