Beispiel #1
0
 /// <summary>
 /// Called when another resource in the Document containing this resource is modified.
 /// This is used so certain objects which refer to other Resources can update themselves accordingly, for
 /// example by redrawing themselves.
 /// </summary>
 /// <param name="resource">The other resource which was modified.</param>
 /// <param name="type">The type of resource modification which took place.</param>
 public override void ResourceModified(Resource resource, ResourceModifyType type)
 {
     base.ResourceModified(resource, type);
     if (resource == this)
     {
         Graph.OnUpdate();
     }
     else
     {
         Graph.ResourceModified(resource, type);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Called when another resource in the Document containing this resource is modified.
 /// This allows removed resource to also be removed from the Graph.
 /// </summary>
 /// <param name="resource">The other resource which was modified.</param>
 /// <param name="type">The type of resource modification which took place.</param>
 public void ResourceModified(Resource resource, ResourceModifyType type)
 {
     if (resource is IPlottable)
     {
         IPlottable plottable = resource as IPlottable;
         if (Resources.ContainsKey(plottable))
         {
             if (type == ResourceModifyType.Remove)
             {
                 Remove(plottable);
                 OnUpdate();
             }
             else if (type == ResourceModifyType.Modify)
             {
                 OnUpdate();
             }
         }
     }
 }
Beispiel #3
0
 /// <summary>
 /// Called when another resource in the Document containing this resource is modified.
 /// This is used so certain objects which refer to other Resources can update themselves accordingly, for
 /// example by redrawing themselves.
 /// </summary>
 /// <param name="resource">The other resource which was modified.</param>
 /// <param name="type">The type of resource modification which took place.</param>
 public virtual void ResourceModified(Resource resource, ResourceModifyType type)
 {
 }