Exemplo n.º 1
0
        private static bool Sync(Shape formatShape, Shape newShape)
        {
            try
            {
                GlowFormat dest   = newShape.Glow;
                GlowFormat source = formatShape.Glow;

                // Color.SchemeColor must be skipped, setting it sometimes throws an exception for unknown reasons.
                // Color.ObjectThemeColor must be set despite the unrelated description in documentation.
                // The color intensity of glow will not match otherwise

                // syncing NotThemeColor throws an exception
                if (source.Color.ObjectThemeColor != MsoThemeColorIndex.msoNotThemeColor)
                {
                    dest.Color.ObjectThemeColor = source.Color.ObjectThemeColor;
                }

                dest.Color.RGB          = source.Color.RGB;
                dest.Color.Brightness   = source.Color.Brightness;
                dest.Color.TintAndShade = source.Color.TintAndShade;
            }
            catch (Exception)
            {
                return(false);
            }
            return(true);
        }
        private static bool Sync(Shape formatShape, Shape newShape)
        {
            try
            {
                GlowFormat dest   = newShape.Glow;
                GlowFormat source = formatShape.Glow;

                dest.Transparency = source.Transparency;
            }
            catch (Exception)
            {
                return(false);
            }
            return(true);
        }
        private static bool Sync(Shape formatShape, Shape newShape)
        {
            try
            {
                GlowFormat dest   = newShape.Glow;
                GlowFormat source = formatShape.Glow;

                dest.Transparency = source.Transparency;
                return(true);
            }
            catch (Exception e)
            {
                Logger.LogException(e, "Sync GlowTransparencyFormat");
                return(false);
            }
        }
Exemplo n.º 4
0
        private static bool Sync(Shape formatShape, Shape newShape)
        {
            try
            {
                GlowFormat dest   = newShape.Glow;
                GlowFormat source = formatShape.Glow;

                dest.Radius = source.Radius;
                return(true);
            }
            catch (Exception e)
            {
                Logger.LogException(e, "Sync GlowSizeFormat");
                return(false);
            }
        }
        public override bool CanCopy(Shape formatShape)
        {
            GlowFormat glow = formatShape.Glow;

            return(glow.Radius > 0 && glow.Transparency > 0.0f);
        }