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); } } }
private SolidColorBrush SelectBrush(IBoolState state) { if (state.State == true) { return(TrueBrush); } else if (state.State == false) { return(FalseBrush); } else { return(NullBrush); } }
public void Set(IImage image, IBoolState state) { (image.Native as Image).OpacityMask = SelectBrush(state); }
public void Set(IText text, IBoolState state) { WpfBlockHelper.GetTextBlock(text).Foreground = SelectBrush(state); }
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); }
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); }
public void Set(ILine line, IBoolState state) { (line.Native as Line).Stroke = SelectBrush(state); }