예제 #1
0
        public DlBook UpdateFromServer(DlBook serverDlBook, bool requireUpdateKey = false)
        {
            if (DlStatus == (short)DlStatusEnum.NotDownloaded || requireUpdateKey)
            {
                InitVector = serverDlBook.InitVector;
                K2Key      = serverDlBook.K2Key;
                HmacKey    = serverDlBook.HmacKey;

                ColorPrimary   = serverDlBook.ColorPrimary;
                ColorSecondary = serverDlBook.ColorSecondary;
                FontColor      = serverDlBook.FontColor;

                Name        = serverDlBook.Name;
                Author      = serverDlBook.Author;
                Description = serverDlBook.Description;
                DpsiCode    = serverDlBook.DpsiCode;
            }

            LastUpdatedDate = serverDlBook.LastUpdatedDate;
            FileUrl         = serverDlBook.FileUrl;
            Size            = serverDlBook.Size;
            CurrentVersion  = serverDlBook.CurrentVersion;

            IsLoan  = serverDlBook.IsLoan;
            IsTrial = serverDlBook.IsTrial;
            ValidTo = serverDlBook.ValidTo;
            return(this);
        }
예제 #2
0
        public string UpdateContentImgSrcValue(string content)
        {
            Regex  regex  = new Regex(Constants.CONTENT_IMAGES_PLACEHOLDER, RegexOptions.IgnoreCase);
            string imgSrc = Path.Combine(GlobalAccess.DirectoryService.GetAppExternalRootPath(),
                                         DlBook.GetDirectory() + "\\");

            content = regex.Replace(content, imgSrc);
            return(content);
        }
예제 #3
0
 public PublicationContent(DlBook dlBook, byte[] contentKey)
 {
     this.contentKey = contentKey;
     this.dlBook     = dlBook;
 }