public ManagementController(ILoggerProvider loggerProvider, IPaintingService paintingService, IVideoService videoService, ICategoryService categoryService, IArticleService articleService) : base(loggerProvider) { _paintingService = paintingService; _videoService = videoService; _categoryService = categoryService; _articleService = articleService; }
public static Bitmap GetLayerImage(Color color, int width, IPaintingService painting) { Bitmap back = new Bitmap(width, width); using (Graphics gfx = Graphics.FromImage(back)) { SolidBrush brush = painting.GetBrush(color); gfx.FillRectangle(brush, 0, 0, width, width); } return(back); }
public static Bitmap GetFiveBackground(Bitmap mask, Color innerBorder, Color outerBorder, IPaintingService painting) { // TODO: calculate points using functions. using (var input = GetLayerImage(innerBorder, mask.Width, painting)) { using (var gfx = Graphics.FromImage(input)) { var pen = painting.GetPen(outerBorder); gfx.DrawLines(pen, new[] { new Point(36, 25), new Point(36, 0), new Point(75, 0), new Point(75, 25) }); gfx.DrawLines(pen, new[] { new Point(86, 36), new Point(111, 36), new Point(111, 75), new Point(86, 75) }); gfx.DrawLines(pen, new[] { new Point(75, 86), new Point(75, 111), new Point(36, 111), new Point(36, 86) }); gfx.DrawLines(pen, new[] { new Point(25, 75), new Point(0, 75), new Point(0, 36), new Point(25, 36) }); var pen2 = painting.GetPen(outerBorder, 2); gfx.DrawLine(pen2, new Point(36, 25), new Point(25, 36)); gfx.DrawLine(pen2, new Point(75, 25), new Point(86, 36)); gfx.DrawLine(pen2, new Point(86, 75), new Point(75, 86)); gfx.DrawLine(pen2, new Point(36, 86), new Point(25, 75)); } return(MaskImages(input, mask)); } }
public PaintingsController(IPaintingService paintingService) : base(paintingService) { }
public PaintingsController(IPaintingService paintingService, IStorageService storageService) { PaintingService = paintingService; StorageService = storageService; }
public OrderController(IPaintingService paintingService, IOrderService orderService) { PaintingService = paintingService; OrderService = orderService; }
/// <summary> /// Gets images for docking indicators. /// </summary> /// <returns></returns> public static Bitmap GetDockIcon(Bitmap maskArrow, Bitmap layerArrow, Bitmap maskWindow, Bitmap layerWindow, Bitmap maskBack, Color background, IPaintingService painting, Bitmap maskCore = null, Bitmap layerCore = null, Color?separator = null) { var width = maskBack.Width; var height = maskBack.Height; var rect = new Rectangle(0, 0, width, height); Bitmap arrowOut = null; if (maskArrow != null) { Bitmap input = layerArrow; arrowOut = MaskImages(input, maskArrow); } Bitmap windowIn = layerWindow; Bitmap windowOut = MaskImages(windowIn, maskWindow); Bitmap coreOut = null; if (layerCore != null) { var coreIn = layerCore; coreOut = MaskImages(coreIn, maskCore); } Bitmap backIn = new Bitmap(width, height); using (Graphics gfx = Graphics.FromImage(backIn)) { SolidBrush brush = painting.GetBrush(background); gfx.FillRectangle(brush, 0, 0, width, height); gfx.DrawImageUnscaled(windowOut, 0, 0); windowOut.Dispose(); if (layerCore != null) { gfx.DrawImageUnscaled(coreOut, 0, 0); coreOut.Dispose(); } if (separator != null) { Pen sep = painting.GetPen(separator.Value); gfx.DrawRectangle(sep, 0, 0, width - 1, height - 1); } } Bitmap backOut = MaskImages(backIn, maskBack); backIn.Dispose(); using (Graphics gfx = Graphics.FromImage(backOut)) { if (arrowOut != null) { gfx.DrawImageUnscaled(arrowOut, 0, 0); arrowOut.Dispose(); } } return(backOut); }
public static Bitmap GetBackground(Color innerBorder, Color outerBorder, int width, IPaintingService painting) { Bitmap back = new Bitmap(width, width); using (Graphics gfx = Graphics.FromImage(back)) { SolidBrush brush = painting.GetBrush(innerBorder); SolidBrush brush2 = painting.GetBrush(outerBorder); gfx.FillRectangle(brush2, 0, 0, width, width); gfx.FillRectangle(brush, 1, 1, width - 2, width - 2); } return(back); }
public GalleryController(ILoggerProvider loggerProvider, ICategoryService categoryService, IPaintingService paintingService) : base(loggerProvider) { _categoryService = categoryService; _paintingService = paintingService; }
public PaintingController(IPaintingService paintingService, IColorService colorService) { this.paintingService = paintingService; this.colorService = colorService; }
public static Bitmap GetLayerImage(Color color, int width, IPaintingService painting) { Bitmap back = new Bitmap(width, width); using (Graphics gfx = Graphics.FromImage(back)) { SolidBrush brush = painting.GetBrush(color); gfx.FillRectangle(brush, 0, 0, width, width); } return back; }
public static Bitmap GetFiveBackground(Bitmap mask, Color innerBorder, Color outerBorder, IPaintingService painting) { // TODO: calculate points using functions. using (var input = GetLayerImage(innerBorder, mask.Width, painting)) { using (var gfx = Graphics.FromImage(input)) { var pen = painting.GetPen(outerBorder); gfx.DrawLines(pen, new[] { new Point(36, 25),new Point(36, 0), new Point(75, 0), new Point(75, 25) }); gfx.DrawLines(pen, new[] { new Point(86, 36), new Point(111, 36), new Point(111, 75), new Point(86, 75) }); gfx.DrawLines(pen, new[] { new Point(75, 86), new Point(75, 111), new Point(36, 111), new Point(36, 86) }); gfx.DrawLines(pen, new[] { new Point(25, 75), new Point(0, 75), new Point(0, 36), new Point(25, 36) }); var pen2 = painting.GetPen(outerBorder, 2); gfx.DrawLine(pen2, new Point(36, 25), new Point(25, 36)); gfx.DrawLine(pen2, new Point(75, 25), new Point(86, 36)); gfx.DrawLine(pen2, new Point(86, 75), new Point(75, 86)); gfx.DrawLine(pen2, new Point(36, 86), new Point(25, 75)); } return MaskImages(input, mask); } }
/// <summary> /// Gets images for docking indicators. /// </summary> /// <returns></returns> public static Bitmap GetDockIcon(Bitmap maskArrow, Bitmap layerArrow, Bitmap maskWindow, Bitmap layerWindow, Bitmap maskBack, Color background, IPaintingService painting, Bitmap maskCore = null, Bitmap layerCore = null, Color? separator = null) { var width = maskBack.Width; var height = maskBack.Height; var rect = new Rectangle(0, 0, width, height); Bitmap arrowOut = null; if (maskArrow != null) { Bitmap input = layerArrow; arrowOut = MaskImages(input, maskArrow); } Bitmap windowIn = layerWindow; Bitmap windowOut = MaskImages(windowIn, maskWindow); Bitmap coreOut = null; if (layerCore != null) { var coreIn = layerCore; coreOut = MaskImages(coreIn, maskCore); } Bitmap backIn = new Bitmap(width, height); using (Graphics gfx = Graphics.FromImage(backIn)) { SolidBrush brush = painting.GetBrush(background); gfx.FillRectangle(brush, 0, 0, width, height); gfx.DrawImageUnscaled(windowOut, 0, 0); windowOut.Dispose(); if (layerCore != null) { gfx.DrawImageUnscaled(coreOut, 0, 0); coreOut.Dispose(); } if (separator != null) { Pen sep = painting.GetPen(separator.Value); gfx.DrawRectangle(sep, 0, 0, width - 1, height - 1); } } Bitmap backOut = MaskImages(backIn, maskBack); backIn.Dispose(); using (Graphics gfx = Graphics.FromImage(backOut)) { if (arrowOut != null) { gfx.DrawImageUnscaled(arrowOut, 0, 0); arrowOut.Dispose(); } } return backOut; }
public static Bitmap GetBackground(Color innerBorder, Color outerBorder, int width, IPaintingService painting) { Bitmap back = new Bitmap(width, width); using (Graphics gfx = Graphics.FromImage(back)) { SolidBrush brush = painting.GetBrush(innerBorder); SolidBrush brush2 = painting.GetBrush(outerBorder); gfx.FillRectangle(brush2, 0, 0, width, width); gfx.FillRectangle(brush, 1, 1, width - 2, width - 2); } return back; }
public VideoService(IRepository <Video> videoRepository, ICategoryService categoryService, IPaintingService paintingService) { _videoRepository = videoRepository; _categoryService = categoryService; _paintingService = paintingService; }