Example #1
0
 private void _ReadFanFic(FanFicItemViewModel fanFicData)
 {
     if (fanFicData != null)
     {
         FullStoryData fanFicStory = _scrapersManager.GetFanFicFullStory(fanFicData.Uri);
         if (fanFicStory == null)
         {
             return;                      //TODO: Implement message
         }
         CurrentCategoryViewModel = InitializeReadingPage(fanFicStory);
     }
 }
Example #2
0
        private void _SaveAsPDF(FanFicItemViewModel fanFicData)
        {
            if (fanFicData != null)
            {
                string fanFicStoryUri = _scrapersManager.GetFanFicFullStoryUrl(fanFicData.Uri);
                if (string.IsNullOrEmpty(fanFicStoryUri))
                {
                    return;                                       //TODO: Implement message
                }
                //TODO: Advise before saving that it will take time and can continue working
                System.Windows.Forms.SaveFileDialog saveFile = new System.Windows.Forms.SaveFileDialog();
                saveFile.Filter   = "PDF File (*.pdf)|*.pdf";
                saveFile.FileName = string.Format("{0}.pdf", fanFicData.Title);
                saveFile.ShowDialog();

                if (saveFile.FileName != string.Empty)
                {
                    _pdfManager.SaveHtmlToPDF(fanFicStoryUri, saveFile.FileName, fanFicData.Title);
                    OnPropertyChanged(nameof(IsThreadsButtonEnabled));
                }
            }
        }