Beispiel #1
0
        /// <summary>
        /// The log data.
        /// </summary>
        /// <param name="data">
        /// The data.
        /// </param>
        public void LogData(object data)
        {
            IConnectorInfo info = this.Info as IConnectorInfo;

            if (info != null && info.Graph != null)
            {
                info.Graph.HistoryManager.LogData(this, data);
            }
        }
Beispiel #2
0
        /// <summary>
        /// The on property changed.
        /// </summary>
        /// <param name="name">
        /// The name.
        /// </param>
        protected override void OnPropertyChanged(string name)
        {
            IConnectorInfo info = this.Info as IConnectorInfo;

            if (info != null && info.Graph != null && info.Graph.HistoryManager != null && this.AllowLogData(name))
            {
                if (info.Graph.HistoryManager.CanLogData(info.Graph.HistoryManager, this._mCollectionData))
                {
                    this.LogData(this._mCollectionData);
                }
            }

            base.OnPropertyChanged(name);
            switch (name)
            {
            case ConnectorConstants.SourceCap:
                this.SourceDecorator            = this.SourceCap;
                this._mCollectionData.SourceCap = this.SourceCap;
                break;

            case ConnectorConstants.TargetCap:
                this.TargetDecorator            = this.TargetCap;
                this._mCollectionData.TargetCap = this.TargetCap;
                break;

            case ConnectorConstants.Type:
                this.OnTypeChanged();
                break;

            case ConnectorConstants.Decorator:
                this._mCollectionData.Decorator = this.Decorator;
                break;

            case ConnectorConstants.SourceDecoratorStyle:
            case ConnectorConstants.TargetDecoratorStyle:
            case ConnectorConstants.ConnectorGeometryStyle:
            case ConnectorConstants.SourceDecorator:
            case ConnectorConstants.TargetDecorator:
                this._mCollectionData.SourceDecoratorStyle   = this.SourceDecoratorStyle;
                this._mCollectionData.TargetDecoratorStyle   = this.TargetDecoratorStyle;
                this._mCollectionData.SourceDecorator        = this.SourceDecorator;
                this._mCollectionData.TargetDecorator        = this.TargetDecorator;
                this._mCollectionData.ConnectorGeometryStyle = this.ConnectorGeometryStyle;
                break;

            case GroupableConstants.Stroke:
                this._mCollectionData.Stroke = this.Stroke;
                this.ApplyStyle(this.GetCustomStyle());
                break;

            case GroupableConstants.Style:
                if (this.Style != null)
                {
                    this.DecodeStyle(this.Style);
                }
                break;

            case GroupableConstants.Opacity:
                this.ApplyStyle(this.GetCustomStyle());
                break;

            case GroupableConstants.Thickness:
                this._mCollectionData.Thickness = this.Thickness;
                this.ApplyStyle(this.GetCustomStyle());
                break;

            case GroupableConstants.DashDot:
                this._mCollectionData.DashDot = this.DashDot;
                this.ApplyStyle(this.GetCustomStyle());
                break;
            }
        }