コード例 #1
0
        /// <summary>
        /// CONSTRUCTOR
        /// </summary>
        /// <param name="PathToOriginal"></param>
        public ReportImage(string PathToOriginal, ReportImageStateEnum reportsSupported)
        {
            this.PathToOriginal = PathToOriginal;

            this.ImageReportState = reportsSupported;
            if (filePaths.ContainsKey(PathToOriginal))
            {
                OriginalHash = filePaths[PathToOriginal];
            }
            else
            {
                byte[] bytes = File.ReadAllBytes(PathToOriginal);
                OriginalHash = ImageHasher.Hash(bytes);
                filePaths.Add(PathToOriginal, OriginalHash);
            }
        }
コード例 #2
0
 /// <summary>
 /// Use this if you have an image instead of UserControl
 /// </summary>
 /// <param name="image"></param>
 public ReportImage(string PathToOriginal, Image image, ReportImageStateEnum reportsSupported)
     : this(PathToOriginal, reportsSupported)
 {
     this.ModifiedImage = image;
 }
コード例 #3
0
 /// <summary>
 /// OVERLOADED CONSTRUCTOR
 /// </summary>
 /// <param name="PathToOriginal"></param>
 /// <param name="control"></param>
 public ReportImage(string PathToOriginal, System.Windows.Controls.UserControl control, ReportImageStateEnum reportsSupported)
     : this(PathToOriginal, reportsSupported)
 {
     this.ModifiedImage = chartToImage.SaveChartAsImage(control);
 }