示例#1
0
        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));
            }
        }
示例#2
0
        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);
        }
示例#4
0
        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;
        }
示例#5
0
 public Smoothing(IDescriptionable descriptor) : base(descriptor)
 {
 }
示例#6
0
 public FlipHorizontal(IDescriptionable descriptor) : base(descriptor)
 {
 }
示例#7
0
 public ZoomIn(IDescriptionable descriptor) : base(descriptor)
 {
 }
示例#8
0
 public Sharpness(IDescriptionable descriptor) : base(descriptor)
 {
 }
示例#9
0
 public Embrass(IDescriptionable descriptor) : base(descriptor)
 {
 }
示例#10
0
 public RotateUnderClock(IDescriptionable descriptor) : base(descriptor)
 {
 }
示例#11
0
 public ShowContextMenuEventArgs(ICell cell, IDescriptionable cubeItem, ContextMenu menu)
     : base(cell)
 {
     ContextMenu = menu;
     CubeItem    = cubeItem;
 }
示例#12
0
 public PhotoTool(IDescriptionable descriptor)
 {
     Descriptor = descriptor;
 }
示例#13
0
 public Blur(IDescriptionable descriptor) : base(descriptor)
 {
 }
示例#14
0
 public FlipVertical(IDescriptionable descriptor) : base(descriptor)
 {
 }