protected override void AfterPropertyChanged(BaseProperty oldValue, BaseProperty newValue) { _property = (StrokableProperty)newValue; if (_property != null) { SetNewPen(); } }
public DrawableBase(EPKernel container, BaseProperty property) { path = new GraphicsPath(); matrix = new Matrix(); _container = container; _shapeProperty = property; is_visible = true; is_increating = true; }
protected virtual void AfterPropertyChanged(BaseProperty oldValue, BaseProperty newValue) { }
protected override void AfterPropertyChanged(BaseProperty oldValue, BaseProperty newValue) { _pro = (RoundedRectProperty)newValue; base.AfterPropertyChanged(oldValue, newValue); }
private void CheckShapeProperty() { if (currentTool != ToolType.ShapeSelect || SelectedShapesCount != 1) { return; } bool diff = false; BaseProperty basepro = shapesList[selectedShapesIndexList[0]].ShapeProperty; if (proCollector.Antialias != basepro.Antialias) { proCollector.Antialias = basepro.Antialias; diff = true; } if (basepro is IndicatorArrowProperty) { IndicatorArrowProperty ip = (IndicatorArrowProperty)basepro; if (ip.LineColor != proCollector.StrokeColor || ip.LineSize != proCollector.IndicatorLineSize) { diff = true; proCollector.StrokeColor = ip.LineColor; proCollector.IndicatorLineSize = ip.LineSize; } } if (basepro is StrokableProperty) { StrokableProperty sp = (StrokableProperty)basepro; if (proCollector.PenWidth != sp.PenWidth || proCollector.StrokeColor != sp.StrokeColor || proCollector.LineDash != sp.LineDash || proCollector.StartLineCap != sp.StartLineCap || proCollector.EndLineCap != sp.EndLineCap || proCollector.PenAlign != sp.PenAlign || proCollector.HowLineJoin != sp.HowLineJoin) { diff = true; proCollector.PenWidth = sp.PenWidth; proCollector.StrokeColor = sp.StrokeColor; proCollector.LineDash = sp.LineDash; proCollector.StartLineCap = sp.StartLineCap; proCollector.EndLineCap = sp.EndLineCap; proCollector.PenAlign = sp.PenAlign; proCollector.HowLineJoin = sp.HowLineJoin; } } if (basepro is FillableProperty) { FillableProperty fp = (FillableProperty)basepro; if (proCollector.PaintType != fp.PaintType || proCollector.FillColor != fp.FillColor || proCollector.FillType != fp.FillType) { diff = true; proCollector.PaintType = fp.PaintType; proCollector.FillColor = fp.FillColor; proCollector.FillType = fp.FillType; } } if (basepro is RoundedRectProperty) { RoundedRectProperty rp = (RoundedRectProperty)basepro; if (proCollector.RadiusAll != rp.RadiusAll) { diff = true; proCollector.RadiusAll = rp.RadiusAll; } } if (diff) { OnPropertyCollectorChanged(EventArgs.Empty); } }
protected override void AfterPropertyChanged(BaseProperty oldValue, BaseProperty newValue) { base.AfterPropertyChanged(oldValue, newValue); _pro = (FillableProperty)newValue; SetNewBrush(); }