public TestNetwork()
 {
     nodes          = new EventedList <INode>();
     branches       = new EventedList <IBranch>();
     nodeFeatures   = new EventedList <INodeFeature>();
     branchFeatures = new EventedList <IBranchFeature>();
 }
Exemple #2
0
        public EventedListView(IEventedList <T> parent, Func <T, bool> filter)
        {
            Parent = parent;
            Filter = filter;

            if (Parent == null)
            {
                return;
            }

            Parent.CollectionChanged += Parent_CollectionChanged;

            for (var i = 0; i < parent.Count; i++)
            {
                var item = parent[i];

                if (!Filter(item))
                {
                    continue;
                }

                indices.Add(i);
                Add(item);
            }
        }
Exemple #3
0
 public TestNetwork()
 {
     nodes = new EventedList<INode>();
     branches = new EventedList<IBranch>();
     nodeFeatures= new EventedList<INodeFeature>();
     branchFeatures= new EventedList<IBranchFeature>();
 }
Exemple #4
0
        /// <summary>
        /// Create folder with specific name
        /// </summary>
        /// <param name="name"></param>
        public ClassImplementingIEventedList(string name)
        {
            this.name = name;

            //assign lists in constructor so event bubbling will be supported
            children = new EventedList <ClassImplementingIEventedList>();
            children.CollectionChanged += ChildCollectionChanged;
        }
Exemple #5
0
        public void Dispose()
        {
            // Events
            this.Items.ItemAdded -= this.ItemAdded;

            // Data
            this.Items = null;
        }
        public MemoryFunctionStore()
        {
            functions = new EventedList <IFunction>();
            SubscribeToFunctions();
            FireEvents = true;

            FunctionValues = new List <IMultiDimensionalArray>();
            TypeConverters = new List <ITypeConverter>();
        }
Exemple #7
0
        public Template()
        {
            this.Name     = string.Empty;
            this.Path     = string.Empty;
            this.Encoding = Encoding.Default;
            this.Items    = new EventedList <IFile>();

            this.Items.CountChanged += this.OnChanged;
        }
Exemple #8
0
        //private ItemStatistics statistics;
        #endregion

        #region IDisposable
        public void Dispose()
        {
            this.Images    = null;
            this.Keywords  = null;
            this.Presets   = null;
            this.Tasks     = null;
            this.Templates = null;
            this.Text      = null;
        }
Exemple #9
0
        public void Dispose()
        {
            // Events
            this.Makers.ItemAdded   -= this.MakersItemAdded;
            this.Controls.ItemAdded -= this.ControlsItemAdded;
            this.Settings.ItemAdded -= this.SettingsItemAdded;

            // Data
            this.Makers   = null;
            this.Controls = null;
            this.Settings = null;
        }
 public DrainageBasin()
 {
     // Add an empty (evented) list of features and subscribe to changes (bubble changes)
     catchments = new EventedList <IFeature>();
     catchments.CollectionChanged += (s, e) =>
     {
         if (CollectionChanged != null)
         {
             CollectionChanged(s, e);
         }
     };
 }
Exemple #11
0
        public void SetUp()
        {
            boundaries = new EventedList <SimpleFeature>();

            // Add boundaries; offset is used to sort the boundaries within a branch.
            boundary11 = new SimpleFeature(1);
            boundary12 = new SimpleFeature(2);
            boundary13 = new SimpleFeature(3);

            boundaries.Add(boundary11);
            boundaries.Add(boundary12);
            boundaries.Add(boundary13);

            boundary21 = new SimpleFeature(4);
            boundary22 = new SimpleFeature(5);
            boundary23 = new SimpleFeature(6);

            boundaries.Add(boundary21);
            boundaries.Add(boundary22);
            boundaries.Add(boundary23);
        }
        public void SetUp()
        {
            boundaries = new EventedList<SimpleFeature>();
            
            // Add boundaries; offset is used to sort the boundaries within a branch.
            boundary11 = new SimpleFeature(1);
            boundary12 = new SimpleFeature(2);
            boundary13 = new SimpleFeature(3);

            boundaries.Add(boundary11);
            boundaries.Add(boundary12);
            boundaries.Add(boundary13);

            boundary21 = new SimpleFeature(4);
            boundary22 = new SimpleFeature(5);
            boundary23 = new SimpleFeature(6);

            boundaries.Add(boundary21);
            boundaries.Add(boundary22);
            boundaries.Add(boundary23);
        }
 public ClassWithMultipleAspects()
 {
     items = new EventedList<ClassWithPropertyChangedAspect>();
 }
Exemple #14
0
 public ParentObject()
 {
     Children = new EventedList <ChildObject>();
 }
Exemple #15
0
 public ActivityRunner()
 {
     activities = new EventedList <IActivity>();
     activities.CollectionChanged += HandleActivitiesCollectionChanged;
 }
Exemple #16
0
 public void Dispose()
 {
     this.Items = null;
 }
Exemple #17
0
 public ParentObject()
 {
     Children = new EventedList<ChildObject>();
 }
Exemple #18
0
 public ClassWithMultipleAspects()
 {
     items = new EventedList <ClassWithPropertyChangedAspect>();
 }