Exemplo n.º 1
0
        public int CalculateTotalStall()
        {
            int res = 0;

            for (int i = 0; i < this.list.Count; i++)
            {
                RowNode node = this.list[i];
                if (node.name.Equals("CarStallRow"))
                {
                    CarStallMeta meta  = (CarStallMeta)node.metaItem;
                    int          multi = meta.IsDouble() ? 2 : 1;
                    res += (int)(node.GetLineLength() / meta.GetClearLength()) * multi;
                }
            }
            this.totalCount = res;

            return(res);
        }
Exemplo n.º 2
0
        public int CalculateTotalStall()
        {
            RowNode node = endNode;
            int     res  = 0;

            while (node != null)
            {
                if (node.name.Equals("CarStallRow"))
                {
                    CarStallMeta meta  = (CarStallMeta)node.metaItem;
                    int          multi = meta.IsDouble() ? 2 : 1;
                    res += (int)(node.GetLineLength() / meta.GetClearLength()) * multi;
                }


                //Rhino.RhinoApp.WriteLine(node.ToString());
                node = node.prev;
            }
            this.totalStall = res;
            return(res);
        }