/// <summary> /// Constuctor /// </summary> /// <param name="alias">alias</param> /// <param name="name">name</param> /// <param name="number">Number of component</param> public AliasNameVector(IAliasVector alias, string name, int number) { this.alias = alias; this.name = name; this.number = number; }
static private void GetAllAliases(INamedComponent nc, IObjectLabel lab, object labObject, List <string> list, object type) { if (labObject == null) { return; } IDesktop d = nc.Desktop; if (labObject is IAliasBase) { IAliasBase ab = labObject as IAliasBase; if (ab is IAlias) { IAlias al = ab as IAlias; foreach (string s in al.AliasNames) { string str = lab.GetName(d) + "." + s; if (type != null) { if (!al.GetType(s).Equals(type)) { continue; } } if (list.Contains(str)) { continue; } list.Add(lab.GetName(d) + "." + s); } } if (ab is IAliasVector) { IAliasVector av = ab as IAliasVector; foreach (string s in av.AliasNames) { string str = lab.GetName(d) + "." + s; if (type != null) { if (!av.GetType(s).Equals(type)) { continue; } } if (list.Contains(str)) { continue; } list.Add(lab.GetName(d) + "." + s); } } } if (labObject is IChildrenObject) { IChildrenObject co = labObject as IChildrenObject; IAssociatedObject[] children = co.Children; foreach (object child in children) { GetAllAliases(nc, lab, child, list, type); } } }