Example #1
0
 public CompositeActivity(string name) : base(name)
 {
     this.activities = new ActivityCollection(this);
     this.activities.ListChanging += new EventHandler <ActivityCollectionChangeEventArgs>(this.OnListChangingEventHandler);
     this.activities.ListChanged  += new EventHandler <ActivityCollectionChangeEventArgs>(this.OnListChangedEventHandler);
     base.SetValue(CanModifyActivitiesProperty, false);
 }
Example #2
0
        internal override void FixUpParentChildRelationship(Activity definitionActivity, Activity parentActivity, Hashtable deserializedActivities)
        {
            CompositeActivity activity = definitionActivity as CompositeActivity;

            if (activity == null)
            {
                throw new ArgumentException("definitionActivity");
            }
            base.FixUpParentChildRelationship(definitionActivity, parentActivity, deserializedActivities);
            this.activities = new ActivityCollection(this);
            this.activities.ListChanging += new EventHandler <ActivityCollectionChangeEventArgs>(this.OnListChangingEventHandler);
            this.activities.ListChanged  += new EventHandler <ActivityCollectionChangeEventArgs>(this.OnListChangedEventHandler);
            string dottedPath = base.DottedPath;
            int    num        = 0;

            foreach (Activity activity2 in activity.activities)
            {
                Activity activity3 = (Activity)deserializedActivities[(dottedPath.Length == 0) ? num.ToString(CultureInfo.InvariantCulture) : (dottedPath + "." + num.ToString(CultureInfo.InvariantCulture))];
                this.activities.InnerAdd(activity3);
                activity3.FixUpParentChildRelationship(activity2, this, deserializedActivities);
                num++;
            }
        }
Example #3
0
 public CompositeActivity()
 {
     activities        = new ActivityCollection(this);
     modify_activities = true;
 }