コード例 #1
0
ファイル: StrokableShape.cs プロジェクト: xfirefly/AD_server
 protected override void AfterPropertyChanged(BaseProperty oldValue, BaseProperty newValue)
 {
     _property = (StrokableProperty)newValue;
     if (_property != null)
     {
         SetNewPen();
     }
 }
コード例 #2
0
ファイル: DrawableBase.cs プロジェクト: xfirefly/AD_server
        public DrawableBase(EPKernel container, BaseProperty property)
        {
            path           = new GraphicsPath();
            matrix         = new Matrix();
            _container     = container;
            _shapeProperty = property;

            is_visible    = true;
            is_increating = true;
        }
コード例 #3
0
ファイル: DrawableBase.cs プロジェクト: xfirefly/AD_server
 protected virtual void AfterPropertyChanged(BaseProperty oldValue, BaseProperty newValue)
 {
 }
コード例 #4
0
 protected override void AfterPropertyChanged(BaseProperty oldValue, BaseProperty newValue)
 {
     _pro = (RoundedRectProperty)newValue;
     base.AfterPropertyChanged(oldValue, newValue);
 }
コード例 #5
0
ファイル: EPKernel.cs プロジェクト: xfirefly/AD_server
        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);
            }
        }
コード例 #6
0
 protected override void AfterPropertyChanged(BaseProperty oldValue, BaseProperty newValue)
 {
     base.AfterPropertyChanged(oldValue, newValue);
     _pro = (FillableProperty)newValue;
     SetNewBrush();
 }