public override void Build(SpaceDrawing e)
        {
            var cur = new InternalStyle();

            cur.AddChild(e.OuterElementStyle);
            e.OuterElementStyle = cur;

            var em = e.OuterElementStyle;
            em.Padding = string.Format("{0} {0} {0} {0}", ( Radius ).px());
            em.BackgroundColor = Color;
            em.Border = "solid 2px black";
            /// Window.Alert("good1");

            em.Left = ( em.Left.nopx() - Radius ).px();
            em.Top = ( em.Top.nopx() - Radius ).px();

            em.BorderRadius = 15.0.px();
            em.BoxShadow = "4px 4px 2px #333";
        }
Ejemplo n.º 2
0
 public SpaceDrawing(Element item1)
 {
     OuterElement = item1;
     ChildNodes = new List<CardDrawing>();
     OuterElementStyle = new InternalStyle();
 }
Ejemplo n.º 3
0
        public void SetStyle(Element outerElement)
        {
            var fm = lastStyle.keys;
            foreach (var item in fm) {
                if (!keys.ContainsKey(item.Key)) outerElement.Style[item.Key] = null;
            }

            foreach (var key in keys) {
                if (fm.ContainsKey(key.Key)) {
                    if (fm[key.Key] != key.Value) outerElement.Style[key.Key] = key.Value == null ? null : key.Value.ToString();
                } else {
                    if (key.Value == null) {
                        if (outerElement.Style[key.Key] == null)
                            outerElement.Style[key.Key] = null;
                    } else outerElement.Style[key.Key] = key.Value.ToString();
                }
            }
            lastStyle = new InternalStyle(this);
        }
Ejemplo n.º 4
0
 public void AddChild(InternalStyle style)
 {
     Children.Add(style);
     style.Parent = this;
 }
Ejemplo n.º 5
0
        private InternalStyle(InternalStyle val)
        {
            Children = new List<InternalStyle>();

            if (val == null) return;

            myAccelerator = val.Accelerator;
            myBackground = val.Background;
            myBackgroundAttachment = val.BackgroundAttachment;
            myBoxShadow = val.BoxShadow;
            myBorderRadius = val.BorderRadius;
            myTransform = val.Transform;
            myBackgroundColor = val.BackgroundColor;
            myBackgroundImage = val.BackgroundImage;
            myBackgroundPosition = val.BackgroundPosition;
            myBackgroundPositionX = val.BackgroundPositionX;
            myBackgroundPositionY = val.BackgroundPositionY;
            myBackgroundRepeat = val.BackgroundRepeat;
            myBorder = val.Border;
            myBorderBottom = val.BorderBottom;
            myBorderBottomColor = val.BorderBottomColor;
            myBorderBottomStyle = val.BorderBottomStyle;
            myBorderBottomWidth = val.BorderBottomWidth;
            myBorderCollapse = val.BorderCollapse;
            myBorderColor = val.BorderColor;
            myBorderLeft = val.BorderLeft;
            myBorderLeftColor = val.BorderLeftColor;
            myBorderLeftStyle = val.BorderLeftStyle;
            myBorderLeftWidth = val.BorderLeftWidth;
            myBorderRight = val.BorderRight;
            myBorderRightColor = val.BorderRightColor;
            myBorderRightStyle = val.BorderRightStyle;
            myBorderRightWidth = val.BorderRightWidth;
            myBorderStyle = val.BorderStyle;
            myBorderTop = val.BorderTop;
            myBorderTopColor = val.BorderTopColor;
            myBorderTopStyle = val.BorderTopStyle;
            myBorderTopWidth = val.BorderTopWidth;
            myBorderWidth = val.BorderWidth;
            myBottom = val.Bottom;
            myClear = val.Clear;
            myClip = val.Clip;
            myColor = val.Color;
            myCssFloat = val.CssFloat;
            myCssText = val.CssText;
            myCursor = val.Cursor;
            myDirection = val.Direction;
            myDisplay = val.Display;
            myFilter = val.Filter;
            myFont = val.Font;
            myFontFamily = val.FontFamily;
            myFontSize = val.FontSize;
            myFontStyle = val.FontStyle;
            myFontVariant = val.FontVariant;
            myFontWeight = val.FontWeight;
            myHeight = val.Height;
            myLeft = val.Left;
            myLetterSpacing = val.LetterSpacing;
            myLineHeight = val.LineHeight;
            myListStyle = val.ListStyle;
            myListStyleImage = val.ListStyleImage;
            myListStylePosition = val.ListStylePosition;
            myListStyleType = val.ListStyleType;
            myMargin = val.Margin;
            myMarginBottom = val.MarginBottom;
            myMarginLeft = val.MarginLeft;
            myMarginRight = val.MarginRight;
            myMarginTop = val.MarginTop;
            myMaxHeight = val.MaxHeight;
            myMaxWidth = val.MaxWidth;
            myMinHeight = val.MinHeight;
            myMinWidth = val.MinWidth;
            myMsInterpolationMode = val.MsInterpolationMode;
            myOpacity = val.Opacity;
            myOverflow = val.Overflow;
            myOverflowX = val.OverflowX;
            myOverflowY = val.OverflowY;
            myPadding = val.Padding;
            myPaddingBottom = val.PaddingBottom;
            myPaddingLeft = val.PaddingLeft;
            myPaddingRight = val.PaddingRight;
            myPaddingTop = val.PaddingTop;
            myPageBreakAfter = val.PageBreakAfter;
            myPageBreakBefore = val.PageBreakBefore;
            myPixelBottom = val.PixelBottom;
            myPixelHeight = val.PixelHeight;
            myPixelLeft = val.PixelLeft;
            myPixelRight = val.PixelRight;
            myPixelTop = val.PixelTop;
            myPixelWidth = val.PixelWidth;
            myPosBottom = val.PosBottom;
            myPosHeight = val.PosHeight;
            myPosition = val.Position;
            myPosLeft = val.PosLeft;
            myPosRight = val.PosRight;
            myPosTop = val.PosTop;
            myPosWidth = val.PosWidth;
            myRight = val.Right;
            myStyleFloat = val.StyleFloat;
            myTableLayout = val.TableLayout;
            myTextAlign = val.TextAlign;
            myTextDecoration = val.TextDecoration;
            myTextDecorationBlink = val.TextDecorationBlink;
            myTextDecorationLineThrough = val.TextDecorationLineThrough;
            myTextDecorationNone = val.TextDecorationNone;
            myTextDecorationOverline = val.TextDecorationOverline;
            myTextDecorationUnderline = val.TextDecorationUnderline;
            myTextIndent = val.TextIndent;
            myTextJustify = val.TextJustify;
            myTextOverflow = val.TextOverflow;
            myTextTransform = val.TextTransform;
            myTop = val.Top;
            myVerticalAlign = val.VerticalAlign;
            myVisibility = val.Visibility;
            myWhiteSpace = val.WhiteSpace;
            myWidth = val.Width;
            myWordSpacing = val.WordSpacing;
            myWordWrap = val.WordWrap;
            myWritingMode = val.WritingMode;
            myZIndex = val.ZIndex;
            myZoom = val.Zoom;
        }
Ejemplo n.º 6
0
        public InternalStyle()
        {
            Children = new List<InternalStyle>();

            lastStyle = new InternalStyle(null);
        }
Ejemplo n.º 7
0
 public CardDrawing(Element item1)
 {
     OuterElement = item1;
     OuterElementStyle = new InternalStyle();
 }