public void OnResourceListSelectionChanged(MpeResource resource) { if (resource is MpeControl) { mask.SelectedControl = (MpeControl)resource; } }
public void Remove(MpeResource resource) { if (resource == null) { throw new MpCollectionException("A null resource cannot be removed from the collection"); } resources.Remove(resource); }
public void Add(MpeResource resource) { if (resource == null) { MpeLog.Warn("The control was null and therefore not added to the resource collection."); return; } if (IsUniqueId(resource.Id) == false) { int id = GenerateUniqueId(); MpeLog.Warn("The control id must be unique. The id [" + resource.Id + "] will be changed to [" + id + "]"); resource.Id = id; } resources.Add(resource); }
public MpeResource this[string id] { get { for (int i = 0; i < resources.Count; i++) { MpeResource r = (MpeResource)resources[i]; if (r.Id.Equals(id)) { return(r); } } return(null); } }
public void OnResourceListSelectionChanged(MpeResource resource) { if (resource is MpeControl) { mask.SelectedControl = (MpeControl) resource; } }