public LevelItemControl(LevelInfo info) { if (info == null) throw new ArgumentNullException("info"); m_Info = info; Text = info.Caption; UseAllLevelIcon = true; }
public static LevelInfo CreateLevelInfo(Level level) { if (level == null) return null; LevelInfo info = new LevelInfo(); info.Caption = level.Caption; info.Description = level.Description; info.LevelNumber = level.LevelNumber; info.LevelType = (LevelInfoTypeEnum)(level.LevelType); info.MemberCount = level.MemberCount; info.Name = level.Name; info.UniqueName = level.UniqueName; // Информация о предках if (level.ParentHierarchy != null) { info.ParentHirerachyId = level.ParentHierarchy.UniqueName; info.CustomProperties.Add(new PropertyInfo(InfoBase.HIERARCHY_CAPTION, level.ParentHierarchy.Caption)); if (level.ParentHierarchy.ParentDimension != null) { info.ParentDimensionId = level.ParentHierarchy.ParentDimension.UniqueName; info.CustomProperties.Add(new PropertyInfo(InfoBase.DIMENSION_CAPTION, level.ParentHierarchy.ParentDimension.Caption)); if (level.ParentHierarchy.ParentDimension.ParentCube != null) { info.ParentCubeId = level.ParentHierarchy.ParentDimension.ParentCube.Name; info.CustomProperties.Add(new PropertyInfo(InfoBase.CUBE_CAPTION, level.ParentHierarchy.ParentDimension.ParentCube.Caption)); } } } // Свойства foreach (Property prop in level.Properties) { //PropertyInfo pi = new PropertyInfo(prop.Name, prop.Type, prop.Value); PropertyInfo pi = new PropertyInfo(prop.Name, prop.Value); info.Properties.Add(pi); } //// Свойства уровня //foreach(LevelProperty lp in level.LevelProperties) //{ // LevelPropertyInfo lpi = new LevelPropertyInfo(); // lpi.Caption = lp.Caption; // lpi.Description = lp.Description; // lpi.Name = lp.Name; // if(lp.ParentLevel != null) // { // lpi.ParentLevelId = lp.ParentLevel.UniqueName; // } // lpi.UniqueName = lp...UniqueName; // info.LevelProperties.Add(lpi); //} return info; }
public Level_AreaItemWrapper(LevelInfo info) : base(info) { UniqueName = info.UniqueName; HierarchyUniqueName = info.ParentHirerachyId; }
public LevelTreeNode(LevelInfo info) : base(info) { UseAllLevelIcon = true; }