public void addScope(Scope scope) { Ids ids = new Ids(); ids.id = scope.getId(); hasScope.Add(ids); }
public void removeScope(Scope scope) { foreach (Ids ids in hasScope) { if (scope.getId() == ids.id) { hasScope.Remove(ids); } } }
private void fetchSubCategories(Scope scope, string prefix, ListBox lbox) { KeyValue keyValue = new KeyValue(); keyValue.key = scope.getId().ToString(); keyValue.value = prefix + scope.getName(); lbox.Items.Add(keyValue); foreach (ComponentModel sco in scope.getSubComponents()) { if (sco.GetType() == typeof(Scope)) { this.fetchSubCategories((Scope)sco, "- " + prefix, lbox); } } }