예제 #1
0
        protected Image DrawSquareCover(IExportItem exportItem)
        {
            var subject = exportItem.Subject;

            var(graphics, image) = FillHalfAndDrawImage(exportItem.Cover, 1000, 1000);

            var realtyType = BeautifyString(subject.RealtyType.Name);
            var operation  = BeautifyString(subject.Operation.Name);

            DrawString(subject.Code, graphics, new PointF(20, 20), VeryLargeFont, AccentBrush);
            DrawOperationAndRealtyType(graphics, realtyType, operation, 110, 450, 460);

            if (Logo != null)
            {
                graphics.DrawImage(Logo, 40, 540, 260, 85);
            }

            DrawString(GetAgentName(subject.Agent), graphics, new PointF(35, 720), MediumFont, DefaultBrush);
            DrawString("риэлтор", graphics, new PointF(35, 820), VerySmallFont, AccentBrush);

            var(phone1, phone2) = GetAgentPhones(subject.Agent);

            DrawString(phone1, graphics, new PointF(35, 885), SmallFont, DefaultBrush);
            DrawString(phone2, graphics, new PointF(35, 930), SmallFont, DefaultBrush);

            return(image);
        }
예제 #2
0
 Assembly TryReflectionOnlyLoad(IExportItem file)
 {
     try
     {
         return Assembly.ReflectionOnlyLoadFrom(file.FullPath);
     }
     catch{
         return null;
     }
 }
예제 #3
0
파일: Publisher.cs 프로젝트: q2een/InvEx
        protected virtual void HandleImages(IExportItem exportItem)
        {
            if (ImageHandler == null)
            {
                return;
            }

            exportItem.Cover  = ImageHandler.HandleMainPhoto(exportItem);
            exportItem.Photos = ImageHandler.HandlePhotos(exportItem);
        }
 static IExportItem CreateAssemblyRef(IExportItem item)
 {
     try
     {
         return new AssemblyReferenceExportItem(item);
     }
     catch (Exception)
     {
         return null;
     }
 }
 public AssemblyReferenceExportItem(IExportItem item)
 {
     _wrapped = item;
     AssemblyName = AssemblyName.GetAssemblyName(item.FullPath);
 }
예제 #6
0
파일: Publisher.cs 프로젝트: q2een/InvEx
 internal protected abstract Task <PublishedItem> ExportAsync(IExportItem exportItem);
예제 #7
0
 protected override Task <PublishedItem> ExportAsync(IExportItem exportItem)
 {
     Debug.WriteLine("ExportAsync");
     return(new Task <PublishedItem>(() => new PublishedItem()));
 }