コード例 #1
0
        void Save()
        {
            var cfg = new ConfigNode("LOD_CONFIG");

            var thumb = cfg.AddNode("Thumbnail");

            thumb.AddValue("Enabled", ThumbnailEnabled.ToString());
            thumb.AddValue("Width", ThumbnailWidth.ToString());
            thumb.AddValue("Height", ThumbnailHeight.ToString());
            thumb.AddValue("Format", ThumbnailFormat.ToString());

            var ui = cfg.AddNode("ActivityInterface");

            ui.AddValue("SecondsBeforeShowing", UI_DelayBeforeShowingActivityUI.TotalSeconds.ToInt().ToString());
            ui.AddValue("SecondsBeforeHiding", UI_DelayBeforeHidingActivityUI.TotalSeconds.ToInt().ToString());

            cfg.AddValue("TryUseToolbarForDebugUI", UI_TryUseToolbarForDebugUI.ToString());
            cfg.AddValue("ShowDebugUI", UI_DisplayDebugUI.ToString());
            cfg.AddValue("DontLoadEditorCatalogParts", Debug_DontLoadEditorCatalogThumbnailParts.ToString());

            cfg.AddValue("CompressTextures", CompressTextures.ToString());


            var cache = cfg.AddNode("Cache");

            foreach (var el in CachedDataPerResUrl)
            {
                cache.AddNode(el.Value.ToConfigNode());
            }

            cfg.Save(cfgFileLocation.FullName);
            IsDirty = false;
        }
コード例 #2
0
        /// <summary>
        /// Returns true if ImageGetPageThumbnailParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of ImageGetPageThumbnailParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ImageGetPageThumbnailParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FileId == input.FileId ||
                     (FileId != null &&
                      FileId.Equals(input.FileId))
                     ) &&
                 (
                     PageRange == input.PageRange ||
                     (PageRange != null &&
                      PageRange.Equals(input.PageRange))
                 ) &&
                 (
                     ThumbnailWidth == input.ThumbnailWidth ||
                     ThumbnailWidth.Equals(input.ThumbnailWidth)
                 ) &&
                 (
                     ThumbnailHeight == input.ThumbnailHeight ||
                     ThumbnailHeight.Equals(input.ThumbnailHeight)
                 ));
        }
コード例 #3
0
        /// <summary>
        /// Returns true if GetDocumentPreviewParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of GetDocumentPreviewParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(GetDocumentPreviewParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FileId == input.FileId ||
                     (FileId != null &&
                      FileId.Equals(input.FileId))
                     ) &&
                 (
                     ThumbnailWidth == input.ThumbnailWidth ||
                     ThumbnailWidth.Equals(input.ThumbnailWidth)
                 ) &&
                 (
                     ThumbnailHeight == input.ThumbnailHeight ||
                     ThumbnailHeight.Equals(input.ThumbnailHeight)
                 ) &&
                 (
                     ThumbnailBackgroundColor == input.ThumbnailBackgroundColor ||
                     (ThumbnailBackgroundColor != null &&
                      ThumbnailBackgroundColor.Equals(input.ThumbnailBackgroundColor))
                 ) &&
                 (
                     ThumbnailFitToPageSize == input.ThumbnailFitToPageSize ||
                     ThumbnailFitToPageSize.Equals(input.ThumbnailFitToPageSize)
                 ));
        }
コード例 #4
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (Content != null)
         {
             hashCode = hashCode * 59 + Content.GetHashCode();
         }
         if (FileName != null)
         {
             hashCode = hashCode * 59 + FileName.GetHashCode();
         }
         hashCode = hashCode * 59 + ContentEncoding.GetHashCode();
         hashCode = hashCode * 59 + GetPreview.GetHashCode();
         hashCode = hashCode * 59 + ThumbnailWidth.GetHashCode();
         hashCode = hashCode * 59 + ThumbnailHeight.GetHashCode();
         if (ThumbnailBackgroundColor != null)
         {
             hashCode = hashCode * 59 + ThumbnailBackgroundColor.GetHashCode();
         }
         hashCode = hashCode * 59 + ThumbnailFitToPageSize.GetHashCode();
         return(hashCode);
     }
 }
コード例 #5
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (Content != null)
         {
             hashCode = hashCode * 59 + Content.GetHashCode();
         }
         if (FileName != null)
         {
             hashCode = hashCode * 59 + FileName.GetHashCode();
         }
         if (Password != null)
         {
             hashCode = hashCode * 59 + Password.GetHashCode();
         }
         hashCode = hashCode * 59 + Conformance.GetHashCode();
         hashCode = hashCode * 59 + ContentEncoding.GetHashCode();
         hashCode = hashCode * 59 + EnableColorDetection.GetHashCode();
         hashCode = hashCode * 59 + GetPreview.GetHashCode();
         hashCode = hashCode * 59 + ThumbnailWidth.GetHashCode();
         hashCode = hashCode * 59 + ThumbnailHeight.GetHashCode();
         if (ThumbnailBackgroundColor != null)
         {
             hashCode = hashCode * 59 + ThumbnailBackgroundColor.GetHashCode();
         }
         hashCode = hashCode * 59 + ThumbnailFitToPageSize.GetHashCode();
         hashCode = hashCode * 59 + TxtPageWidth.GetHashCode();
         hashCode = hashCode * 59 + TxtPageHeight.GetHashCode();
         hashCode = hashCode * 59 + TxtPageMarginLeft.GetHashCode();
         hashCode = hashCode * 59 + TxtPageMarginTop.GetHashCode();
         hashCode = hashCode * 59 + TxtPageMarginRight.GetHashCode();
         hashCode = hashCode * 59 + TxtPageMarginBottom.GetHashCode();
         hashCode = hashCode * 59 + TxtHorizontalTextAlignment.GetHashCode();
         hashCode = hashCode * 59 + TxtFontSize.GetHashCode();
         if (TxtFontFamily != null)
         {
             hashCode = hashCode * 59 + TxtFontFamily.GetHashCode();
         }
         hashCode = hashCode * 59 + TxtFontBold.GetHashCode();
         hashCode = hashCode * 59 + TxtFontItalic.GetHashCode();
         return(hashCode);
     }
 }
コード例 #6
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (FileId != null)
         {
             hashCode = hashCode * 59 + FileId.GetHashCode();
         }
         if (PageRange != null)
         {
             hashCode = hashCode * 59 + PageRange.GetHashCode();
         }
         hashCode = hashCode * 59 + ThumbnailWidth.GetHashCode();
         hashCode = hashCode * 59 + ThumbnailHeight.GetHashCode();
         return(hashCode);
     }
 }
コード例 #7
0
        /// <summary>
        /// Returns true if LoadImageFromByteArrayParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of LoadImageFromByteArrayParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(LoadImageFromByteArrayParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Content == input.Content ||
                     (Content != null &&
                      Content.Equals(input.Content))
                     ) &&
                 (
                     FileName == input.FileName ||
                     (FileName != null &&
                      FileName.Equals(input.FileName))
                 ) &&
                 (
                     ContentEncoding == input.ContentEncoding ||
                     ContentEncoding.Equals(input.ContentEncoding)
                 ) &&
                 (
                     GetPreview == input.GetPreview ||
                     GetPreview.Equals(input.GetPreview)
                 ) &&
                 (
                     ThumbnailWidth == input.ThumbnailWidth ||
                     ThumbnailWidth.Equals(input.ThumbnailWidth)
                 ) &&
                 (
                     ThumbnailHeight == input.ThumbnailHeight ||
                     ThumbnailHeight.Equals(input.ThumbnailHeight)
                 ) &&
                 (
                     ThumbnailBackgroundColor == input.ThumbnailBackgroundColor ||
                     (ThumbnailBackgroundColor != null &&
                      ThumbnailBackgroundColor.Equals(input.ThumbnailBackgroundColor))
                 ) &&
                 (
                     ThumbnailFitToPageSize == input.ThumbnailFitToPageSize ||
                     ThumbnailFitToPageSize.Equals(input.ThumbnailFitToPageSize)
                 ));
        }
コード例 #8
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (FileId != null)
         {
             hashCode = hashCode * 59 + FileId.GetHashCode();
         }
         hashCode = hashCode * 59 + ThumbnailWidth.GetHashCode();
         hashCode = hashCode * 59 + ThumbnailHeight.GetHashCode();
         if (ThumbnailBackgroundColor != null)
         {
             hashCode = hashCode * 59 + ThumbnailBackgroundColor.GetHashCode();
         }
         hashCode = hashCode * 59 + ThumbnailFitToPageSize.GetHashCode();
         return(hashCode);
     }
 }
コード例 #9
0
        /// <summary>
        /// Returns true if PdfGetPageThumbnailParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of PdfGetPageThumbnailParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PdfGetPageThumbnailParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FileId == input.FileId ||
                     (FileId != null &&
                      FileId.Equals(input.FileId))
                     ) &&
                 (
                     PageRange == input.PageRange ||
                     (PageRange != null &&
                      PageRange.Equals(input.PageRange))
                 ) &&
                 (
                     ThumbnailWidth == input.ThumbnailWidth ||
                     ThumbnailWidth.Equals(input.ThumbnailWidth)
                 ) &&
                 (
                     ThumbnailHeight == input.ThumbnailHeight ||
                     ThumbnailHeight.Equals(input.ThumbnailHeight)
                 ) &&
                 (
                     BackgroundColor == input.BackgroundColor ||
                     (BackgroundColor != null &&
                      BackgroundColor.Equals(input.BackgroundColor))
                 ) &&
                 (
                     ThumbnailFitToPageSize == input.ThumbnailFitToPageSize ||
                     ThumbnailFitToPageSize.Equals(input.ThumbnailFitToPageSize)
                 ));
        }
コード例 #10
0
        /// <summary>
        /// Returns true if PdfLoadDocumentParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of PdfLoadDocumentParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PdfLoadDocumentParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FileName == input.FileName ||
                     (FileName != null &&
                      FileName.Equals(input.FileName))
                     ) &&
                 (
                     Password == input.Password ||
                     (Password != null &&
                      Password.Equals(input.Password))
                 ) &&
                 (
                     Conformance == input.Conformance ||
                     Conformance.Equals(input.Conformance)
                 ) &&
                 (
                     ContentEncoding == input.ContentEncoding ||
                     ContentEncoding.Equals(input.ContentEncoding)
                 ) &&
                 (
                     EnableColorDetection == input.EnableColorDetection ||
                     EnableColorDetection.Equals(input.EnableColorDetection)
                 ) &&
                 (
                     GetPreview == input.GetPreview ||
                     GetPreview.Equals(input.GetPreview)
                 ) &&
                 (
                     ThumbnailWidth == input.ThumbnailWidth ||
                     ThumbnailWidth.Equals(input.ThumbnailWidth)
                 ) &&
                 (
                     ThumbnailHeight == input.ThumbnailHeight ||
                     ThumbnailHeight.Equals(input.ThumbnailHeight)
                 ) &&
                 (
                     ThumbnailBackgroundColor == input.ThumbnailBackgroundColor ||
                     (ThumbnailBackgroundColor != null &&
                      ThumbnailBackgroundColor.Equals(input.ThumbnailBackgroundColor))
                 ) &&
                 (
                     ThumbnailFitToPageSize == input.ThumbnailFitToPageSize ||
                     ThumbnailFitToPageSize.Equals(input.ThumbnailFitToPageSize)
                 ) &&
                 (
                     TxtPageWidth == input.TxtPageWidth ||
                     TxtPageWidth.Equals(input.TxtPageWidth)
                 ) &&
                 (
                     TxtPageHeight == input.TxtPageHeight ||
                     TxtPageHeight.Equals(input.TxtPageHeight)
                 ) &&
                 (
                     TxtPageMarginLeft == input.TxtPageMarginLeft ||
                     TxtPageMarginLeft.Equals(input.TxtPageMarginLeft)
                 ) &&
                 (
                     TxtPageMarginTop == input.TxtPageMarginTop ||
                     TxtPageMarginTop.Equals(input.TxtPageMarginTop)
                 ) &&
                 (
                     TxtPageMarginRight == input.TxtPageMarginRight ||
                     TxtPageMarginRight.Equals(input.TxtPageMarginRight)
                 ) &&
                 (
                     TxtPageMarginBottom == input.TxtPageMarginBottom ||
                     TxtPageMarginBottom.Equals(input.TxtPageMarginBottom)
                 ) &&
                 (
                     TxtHorizontalTextAlignment == input.TxtHorizontalTextAlignment ||
                     TxtHorizontalTextAlignment.Equals(input.TxtHorizontalTextAlignment)
                 ) &&
                 (
                     TxtFontSize == input.TxtFontSize ||
                     TxtFontSize.Equals(input.TxtFontSize)
                 ) &&
                 (
                     TxtFontFamily == input.TxtFontFamily ||
                     (TxtFontFamily != null &&
                      TxtFontFamily.Equals(input.TxtFontFamily))
                 ) &&
                 (
                     TxtFontBold == input.TxtFontBold ||
                     TxtFontBold.Equals(input.TxtFontBold)
                 ) &&
                 (
                     TxtFontItalic == input.TxtFontItalic ||
                     TxtFontItalic.Equals(input.TxtFontItalic)
                 ));
        }