Ejemplo n.º 1
0
        private void AddDefaultTextDrawPackProperties(ThemePropertyContainer container)
        {
            container.EnsureColorValue(TMT.TEXTCOLOR, Color.FromArgb(0));

            if (container.HasProperty(TMT.TEXTSHADOWOFFSET))
            {
                container.EnsureColorValue(TMT.TEXTSHADOWCOLOR, Color.FromArgb(0));
                container.EnsureEnumValue(TMT.TEXTSHADOWTYPE, TEXTSHADOWTYPE.TST_NONE);
            }

            if (!container.HasProperty(TMT.TEXTBORDERSIZE))
            {
                container.EnsureIntValue(TMT.TEXTBORDERSIZE, 0);
            }
            else
            {
                container.EnsureColorValue(TMT.TEXTBORDERCOLOR, Color.FromArgb(0));
                container.EnsureBoolValue(TMT.TEXTAPPLYOVERLAY, false);
            }

            container.EnsureIntValue(TMT.TEXTGLOWSIZE, 0);
            container.EnsureIntValue(TMT.GLOWINTENSITY, 0);
            container.EnsureColorValue(TMT.GLOWCOLOR, Color.FromArgb(0xFFFFFF));

            container.EnsureBoolValue(TMT.TEXTITALIC, false);

            var edgeLight = container.EnsureColorValue(TMT.EDGELIGHTCOLOR, Color.FromArgb(0xC0C0C0));

            container.EnsureColorValue(TMT.EDGEHIGHLIGHTCOLOR, Color.FromArgb(0xFFFFFF));
            container.EnsureColorValue(TMT.EDGESHADOWCOLOR, Color.FromArgb(0x808080));
            container.EnsureColorValue(TMT.EDGEDKSHADOWCOLOR, Color.FromArgb(0));
            container.EnsureColorValue(TMT.EDGEFILLCOLOR, edgeLight);
            container.EnsureBoolValue(TMT.COMPOSITED, false);
        }
Ejemplo n.º 2
0
        private void AddDefaultImageFileProperties(ThemePropertyContainer container)
        {
            container.EnsureIntValue(TMT.IMAGECOUNT, 1);
            container.EnsureEnumValue(TMT.IMAGELAYOUT, IMAGELAYOUT.IL_HORIZONTAL);

            container.EnsureEnumValue(TMT.TRUESIZESCALINGTYPE, TRUESIZESCALINGTYPE.TSST_NONE);
            container.EnsureEnumValue(TMT.SIZINGTYPE, SIZINGTYPE.ST_STRETCH);
            container.EnsureEnumValue(TMT.TRUESIZESCALINGTYPE, TRUESIZESCALINGTYPE.TSST_NONE);
            container.EnsureBoolValue(TMT.BORDERONLY, false);
            container.EnsureIntValue(TMT.TRUESIZESTRETCHMARK, 0);
            container.EnsureBoolValue(TMT.UNIFORMSIZING, false);
            container.EnsureBoolValue(TMT.INTEGRALSIZING, false);
            container.EnsureBoolValue(TMT.MIRRORIMAGE, true);
            container.EnsureEnumValue(TMT.HALIGN, HALIGN.HA_CENTER);
            container.EnsureEnumValue(TMT.VALIGN, VALIGN.VA_CENTER);

            if (container.HasProperty(TMT.BGFILL))
            {
                container.EnsureColorValue(TMT.FILLCOLOR, Color.FromArgb(0xFFFFFF));
            }

            var sizingMargins = container.EnsureMarginsValue(TMT.SIZINGMARGINS, new MARGINS());

            container.EnsureMarginsValue(TMT.CONTENTMARGINS, sizingMargins);
            container.EnsureBoolValue(TMT.SOURCEGROW, false);
            container.EnsureBoolValue(TMT.SOURCESHRINK, false);

            var glyphType = container.EnsureEnumValue(TMT.GLYPHTYPE, GLYPHTYPE.GT_NONE);

            if (glyphType == GLYPHTYPE.GT_FONTGLYPH)
            {
                container.EnsureColorValue(TMT.GLYPHTEXTCOLOR, Color.FromArgb(0));
                container.EnsureIntValue(TMT.GLYPHINDEX, 1);
            }

            if (glyphType != 0)
            {
                container.EnsureBoolValue(TMT.GLYPHONLY, false);
            }

            container.EnsureEnumValue(TMT.IMAGESELECTTYPE, IMAGESELECTTYPE.IST_NONE);
        }