/// <summary> /// Handles the PropertyChanged event for a Node /// </summary> /// <param name="sender">The Node that fired the event</param> /// <param name="e">The arguments for the event</param> private void Node_PropertyChanged(object sender, Common.Events.PropertyChangedEventArgs <string> e) { // We need to pass this event on so we are going to fire // a new, more specific, event and provide the Node // whose property has changed. OnNodePropertyChanged(new NodeEventArgs(sender as Node, e)); }
/// <summary> /// Handles the PropertyChanged event for an Edge /// </summary> /// <param name="sender">The Edge that fired the event</param> /// <param name="e">The arguments for the event</param> void Edge_PropertyChanged(object sender, Common.Events.PropertyChangedEventArgs <object> e) { // We need to pass this event on so we are going to fire // a new, more specific, event and provide the Edge // whose property has changed. OnEdgePropertyChanged(new EdgeEventArgs(sender as Edge, e)); }
/// <summary> /// Handles the PropertyChanged event /// </summary> /// <param name="sender">The object that fired the event</param> /// <param name="e">The arguments for the event</param> void edge_PropertyChanged(object sender, Common.Events.PropertyChangedEventArgs <object> e) { // Check if the edges DisplayValue property was changed if (e.PropertyName == "DisplayValue") { edgeLine.Text = e.NewValue as string; } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void AttributeValuePropertyChangedHandler(object sender, Common.Events.PropertyChangedEventArgs <object> e) { base.AttributeValuePropertyChangedHandler(sender, e); // If an attribute value has changed on the target or source node // we may need to recalculate the similarity for it (which // is used as the edges Weight) //TODO: NEED A WAY TO KNOW WHAT ATTRIBUTES ARE BEING CLUSTERED ON AND ONLY RECALCULATE ONLY IF ONE OF THOSE CHANGED RecalculateWeight(); }
/// <summary> /// Creates a new instance of the Berico.SnagL.Events. /// EdgeEventArgs class using the provided IEdge, /// PropertyChangedEventArgs and scope. /// </summary> /// <param name="_node">The IEdge that fired the event</param> /// <param name="_args">The arguments related to the initial event</param> /// <param name="_sourceID">The ID for graph that this object belongs to</param> public EdgeEventArgs(IEdge _edge, Common.Events.PropertyChangedEventArgs <object> _propChangedArgs) { AffectedEdge = _edge; PropertyChangedArguments = _propChangedArgs; }
/// <summary> /// Handles the event that the source or target node's properties /// have changed /// </summary> /// <param name="sender">The object that fired the event</param> /// <param name="e">The arguments for the event</param> protected virtual void AttributeValuePropertyChangedHandler(object sender, Common.Events.PropertyChangedEventArgs <object> e) { // This handles the event that at least on of the source // or target node's properties have changed }
/// <summary> /// Creates a new instance of the Berico.SnagL.Events. /// NodeEventArgs class using the provided Node, /// PropertyChangedEventArgs and scope. /// </summary> /// <param name="_node">The Node that fired the event</param> /// <param name="_args">The arguments related to the initial event</param> /// <param name="_sourceID">The ID for graph that this object belongs to</param> public NodeEventArgs(Node _node, Common.Events.PropertyChangedEventArgs <string> _propChangedArgs) { AffectedNode = _node; PropertyChangedArguments = _propChangedArgs; }