Esempio n. 1
0
        public void Set(IBlock parent, IBoolState state)
        {
            if (parent.Lines != null)
            {
                foreach (var line in parent.Lines)
                {
                    Set(line, state);
                }
            }

            if (parent.Rectangles != null)
            {
                foreach (var rectangle in parent.Rectangles)
                {
                    Set(rectangle, state);
                }
            }

            if (parent.Ellipses != null)
            {
                foreach (var ellipse in parent.Ellipses)
                {
                    Set(ellipse, state);
                }
            }

            if (parent.Texts != null)
            {
                foreach (var text in parent.Texts)
                {
                    Set(text, state);
                }
            }

            if (parent.Images != null)
            {
                foreach (var image in parent.Images)
                {
                    Set(image, state);
                }
            }

            if (parent.Blocks != null)
            {
                foreach (var block in parent.Blocks)
                {
                    Set(block, state);
                }
            }
        }
Esempio n. 2
0
 private SolidColorBrush SelectBrush(IBoolState state)
 {
     if (state.State == true)
     {
         return(TrueBrush);
     }
     else if (state.State == false)
     {
         return(FalseBrush);
     }
     else
     {
         return(NullBrush);
     }
 }
Esempio n. 3
0
 public void Set(IImage image, IBoolState state)
 {
     (image.Native as Image).OpacityMask = SelectBrush(state);
 }
Esempio n. 4
0
 public void Set(IText text, IBoolState state)
 {
     WpfBlockHelper.GetTextBlock(text).Foreground = SelectBrush(state);
 }
Esempio n. 5
0
 public void Set(IEllipse ellipse, IBoolState state)
 {
     (ellipse.Native as Ellipse).Stroke = SelectBrush(state);
     (ellipse.Native as Ellipse).Fill   =
         (ellipse.Native as Ellipse).Fill == WpfBlockFactory.TransparentBrush ? WpfBlockFactory.TransparentBrush : SelectBrush(state);
 }
Esempio n. 6
0
 public void Set(IRectangle rectangle, IBoolState state)
 {
     (rectangle.Native as Rectangle).Stroke = SelectBrush(state);
     (rectangle.Native as Rectangle).Fill   =
         (rectangle.Native as Rectangle).Fill == WpfBlockFactory.TransparentBrush ? WpfBlockFactory.TransparentBrush : SelectBrush(state);
 }
Esempio n. 7
0
 public void Set(ILine line, IBoolState state)
 {
     (line.Native as Line).Stroke = SelectBrush(state);
 }