示例#1
0
        /// <summary>
        /// Called whenever a relationship of type SerializationClassReferencesChildren is deleted and
        /// the element hosted by this model is the source.
        /// </summary>
        /// <param name="args"></param>
        private void OnChildRemoved(ElementDeletedEventArgs args)
        {
            SerializationClassReferencesChildren con = args.ModelElement as SerializationClassReferencesChildren;

            if (con != null)
            {
                DeleteChild(con.Child);
            }
        }
示例#2
0
        /// <summary>
        /// Called whenever a relationship of type SerializationClassReferencesChildren is added and
        /// the element hosted by this model is the source.
        /// </summary>
        /// <param name="args"></param>
        private void OnChildAdded(ElementAddedEventArgs args)
        {
            SerializationClassReferencesChildren con = args.ModelElement as SerializationClassReferencesChildren;

            if (con != null)
            {
                AddChild(con.Child);
            }
        }