/// <summary> /// The event sequence on changing value of data at other plugin. /// </summary> /// <param name="oldKey">The ID before value change.</param> /// <param name="newKey">The data type before value change.</param> /// <param name="obj">Changed value of object.</param> public void DataChanged(string oldKey, string newKey, PPathwayObject obj) { if (!oldKey.Equals(newKey)) { UpdateDictionaryKey(oldKey, newKey, obj); if( !m_con.Window.IsLoading) MoveObject(oldKey, newKey, obj); RefreshEdges(); } // Set Layer SetLayer(obj, obj.EcellObject.Layer); // Set visibility obj.RefreshView(); // If this obj is root system, Refresh OverView. if (newKey.Equals(Constants.delimiterPath)) { RefreshOverView(); SetStepperPosition(); } if (obj is PPathwayStepper) SetStepperPosition(); }
private void SetTemplate(ComponentSetting setting) { if (setting == null) return; RectangleF bounds = base.Camera.ViewBounds; PointF center = new PointF(bounds.X + bounds.Width / 2f, bounds.Y + bounds.Height / 2f); if (m_object != null) m_object.RemoveFromParent(); m_object = setting.CreateTemplate(); m_object.Pickable = false; m_object.Center = center; m_object.RefreshView(); base.Layer.AddChild(m_object); }