public TestNetwork() { nodes = new EventedList <INode>(); branches = new EventedList <IBranch>(); nodeFeatures = new EventedList <INodeFeature>(); branchFeatures = new EventedList <IBranchFeature>(); }
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); } }
public TestNetwork() { nodes = new EventedList<INode>(); branches = new EventedList<IBranch>(); nodeFeatures= new EventedList<INodeFeature>(); branchFeatures= new EventedList<IBranchFeature>(); }
/// <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; }
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>(); }
public Template() { this.Name = string.Empty; this.Path = string.Empty; this.Encoding = Encoding.Default; this.Items = new EventedList <IFile>(); this.Items.CountChanged += this.OnChanged; }
//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; }
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); } }; }
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>(); }
public ParentObject() { Children = new EventedList <ChildObject>(); }
public ActivityRunner() { activities = new EventedList <IActivity>(); activities.CollectionChanged += HandleActivitiesCollectionChanged; }
public void Dispose() { this.Items = null; }
public ParentObject() { Children = new EventedList<ChildObject>(); }
public ClassWithMultipleAspects() { items = new EventedList <ClassWithPropertyChangedAspect>(); }