예제 #1
0
        public static Dictionary <string, object> GetPeakZoneGroupGains(BuildingData BuildingData, TSDZoneArray TSDZoneArray, List <ZoneDataGroup> ZoneDataGroups)
        {
            List <string> aValues = new List <string>();

            foreach (ZoneDataGroup aZoneDataGroup in ZoneDataGroups)
            {
                string aValue = ZoneDataGroup.Name(aZoneDataGroup);
                foreach (ZoneData aZoneData in ZoneDataGroup.GetZonesData(aZoneDataGroup))
                {
                    aValue += ":" + ZoneData.GUID(aZoneData);
                }

                aValues.Add(aValue);
            }

            object[,] aResults = BuildingData.pBuildingData.GetPeakZoneGroupGains(aValues.ToArray(), new TSDZoneArray[] { TSDZoneArray }) as object[, ];
            List <List <object> > aListList = new List <List <object> >();

            for (int i = 0; i < aResults.GetLength(0); i++)
            {
                List <object> aList = new List <object>();
                for (int j = 0; j < aResults.GetLength(1); j++)
                {
                    aList.Add(aResults[i, j]);
                }
                aListList.Add(aList);
            }

            return(new Dictionary <string, object>
            {
                { "ZoneDataGroupNames", aListList[0] },
                { "Gains", aListList[1] },
                { "Indexes", aListList[2] }
            });
        }
예제 #2
0
        public static List <ZoneData> GetZonesData(ZoneDataGroup ZoneDataGroup)
        {
            List <ZoneData> aZoneDataGroupList = new List <ZoneData>();

            int aIndex = 1;

            TSD.ZoneData aZoneData = ZoneDataGroup.pZoneDataGroup.GetZoneData(aIndex);
            while (aZoneData != null)
            {
                aZoneDataGroupList.Add(new ZoneData(aZoneData));
                aIndex++;
                aZoneData = ZoneDataGroup.pZoneDataGroup.GetZoneData(aIndex);
            }
            return(aZoneDataGroupList);
        }
예제 #3
0
        /// <summary>
        /// Get Peak Zone Group Gain
        /// </summary>
        /// <param name="BuildingData">TSD Building Data</param>
        /// <param name="TSDZoneArray">TSD Zone Array</param>
        /// <param name="ZoneDataGroup">TSD Zone Data Group</param>
        /// <returns name="Values">Values</returns>
        /// <search>
        /// TAS, TSDDocument, TSDDocument, BuildingData, tas, tsddocument, tsddocument, GetPeakZoneGroupGain, Get Peak Zone Group Gain
        /// </search>
        public static float GetPeakZoneGroupGain(BuildingData BuildingData, TSDZoneArray TSDZoneArray, ZoneDataGroup ZoneDataGroup)
        {
            List <ZoneData> aZoneDataList = ZoneDataGroup.GetZonesData(ZoneDataGroup);

            return(BuildingData.pBuildingData.GetPeakZoneGroupGain(aZoneDataList.ConvertAll(x => ZoneData.GUID(x)).ToArray(), new TSDZoneArray[] { TSDZoneArray }));
        }
예제 #4
0
 public static ZoneData GetZoneData(ZoneDataGroup ZoneDataGroup, int Index = 1)
 {
     return(new ZoneData(ZoneDataGroup.pZoneDataGroup.GetZoneData(Index)));
 }
예제 #5
0
 public static string Description(ZoneDataGroup ZoneDataGroup)
 {
     return(ZoneDataGroup.pZoneDataGroup.description);
 }
예제 #6
0
 public static string Name(ZoneDataGroup ZoneDataGroup)
 {
     return(ZoneDataGroup.pZoneDataGroup.name);
 }
예제 #7
0
 public static int ZoneCount(ZoneDataGroup ZoneDataGroup)
 {
     return(ZoneDataGroup.pZoneDataGroup.zoneCount);
 }