public static PhotoTool EffectRender(Effect type, IDescriptionable descriptionable) { switch (type) { case Effect.None: return(default(PhotoTool)); case Effect.Blur: return(new Blur(descriptionable)); case Effect.Embrass: return(new Embrass(descriptionable)); case Effect.RotateOnClock: return(new RotateOnClock(descriptionable)); case Effect.RotateUnderClock: return(new RotateUnderClock(descriptionable)); case Effect.Smoothing: return(new Smoothing(descriptionable)); case Effect.Sharpness: return(new Sharpness(descriptionable)); case Effect.FlipHorizontal: return(new FlipHorizontal(descriptionable)); case Effect.FlipVertical: return(new FlipVertical(descriptionable)); case Effect.ZoomIn: return(new ZoomIn(descriptionable)); case Effect.ZoomOut: return(new ZoomOut(descriptionable)); default: return(default(PhotoTool)); } }
public CanvasForm(string canvasName, IDescriptionable descriptor) { InitializeComponent(); ShowedPictureBox.Image = new Bitmap(ShowedPictureBox.Width, ShowedPictureBox.Height); Graphics g = Graphics.FromImage(ShowedPictureBox.Image); g.Clear(Color.White); CanvasName = canvasName; Path = canvasName; Descriptor = descriptor; g.Dispose(); CZoom = 100; }
private static string MakeProperName(IDescriptionable source) { var un = source.UniqueName; if (un.Length == 36 && un[8] == '-' && un[8] == '-' && un[13] == '-' && un[23] == '-') { var m = source as Measure; if (m != null) { return("[Measures].[" + m.DisplayName + "]"); } var cm = source as CubeMeasure; if (cm != null) { return("[Measures].[" + cm.DisplayName + "]"); } var d = source as Dimension; if (d != null) { return("[" + d.DisplayName + "]"); } var h = source as Hierarchy; if (h != null) { return("[" + h.Dimension.DisplayName + "].[" + h.DisplayName + "]"); } var l = source as Level; if (l != null) { return("[" + l.Hierarchy.Dimension.DisplayName + "].[" + l.Hierarchy.DisplayName + "].[" + l.DisplayName + "]"); } var mm = source as Member; if (mm != null) { return("[" + mm.Level.Hierarchy.Dimension.DisplayName + "].[" + mm.Level.Hierarchy.DisplayName + "].[" + mm.Level.DisplayName + "].[" + mm.DisplayName + "]"); } } return(un); }
public CanvasForm(string canvasName, Image image, string _Path, IDescriptionable descriptor) { InitializeComponent(); CanvasName = canvasName; Path = _Path; Descriptor = descriptor; OriginPicture = new Bitmap(image, ShowedPictureBox.Width, ShowedPictureBox.Height); ShowedPictureBox.Image = new Bitmap(ShowedPictureBox.Width, ShowedPictureBox.Height); Graphics g = Graphics.FromImage(ShowedPictureBox.Image); g.Clear(Color.White); g.DrawImage(OriginPicture, 0, 0); g.Dispose(); Fit_size(); CZoom = 100; }
public Smoothing(IDescriptionable descriptor) : base(descriptor) { }
public FlipHorizontal(IDescriptionable descriptor) : base(descriptor) { }
public ZoomIn(IDescriptionable descriptor) : base(descriptor) { }
public Sharpness(IDescriptionable descriptor) : base(descriptor) { }
public Embrass(IDescriptionable descriptor) : base(descriptor) { }
public RotateUnderClock(IDescriptionable descriptor) : base(descriptor) { }
public ShowContextMenuEventArgs(ICell cell, IDescriptionable cubeItem, ContextMenu menu) : base(cell) { ContextMenu = menu; CubeItem = cubeItem; }
public PhotoTool(IDescriptionable descriptor) { Descriptor = descriptor; }
public Blur(IDescriptionable descriptor) : base(descriptor) { }
public FlipVertical(IDescriptionable descriptor) : base(descriptor) { }