예제 #1
0
            private static void WriteIntoPG(string FGCode, string PGName, string PinYinSuffix, PGComponents PGComp, double areaBase)
            {
                int index;

                if (_dictionary.TryGetValue(FGCode + _direction.ToString(), out index))
                {
                    _PGItems.ElementAt(index).Num[_floor_bottom] += _area / areaBase;
                }
                else
                {
                    PGItem pgItem = new PGItem();
                    pgItem.PGName              = PGName;
                    pgItem.PinYinSuffix        = PinYinSuffix;
                    pgItem.Code                = FGCode;
                    pgItem.direction           = _direction;
                    pgItem.Num[_floor_bottom] += ((byte)_finishType % 2 == 1 ? 1:2) * _area / areaBase;
                    pgItem.Price               = _addiInfo.prices[(byte)PGComp];
                    if (pgItem.Price == 0.0)
                    {
                        pgItem.IfDefinePrice = false;
                    }
                    else
                    {
                        pgItem.IfDefinePrice = true;
                    }
                    _PGItems.Add(pgItem);
                    _dictionary.Add(FGCode + _direction.ToString(), _PGItems.Count - 1);
                }
            }
예제 #2
0
 private static void WriteIntoPG(string FGCode, string PGName, string PinYinSuffix, PGComponents PGComp, double areaBase)
 {
     int index;
     if (_dictionary.TryGetValue(FGCode + _direction.ToString(), out index))
     {
         _PGItems.ElementAt(index).Num[_floor_bottom] += _area / areaBase;
     }
     else
     {
         PGItem pgItem = new PGItem();
         pgItem.PGName = PGName;
         pgItem.PinYinSuffix = PinYinSuffix;
         pgItem.Code = FGCode;
         pgItem.direction = _direction;
         pgItem.Num[_floor_bottom] += ((byte)_finishType % 2 == 1 ? 1:2) * _area / areaBase;
         pgItem.Price = _addiInfo.prices[(byte)PGComp];
         if (pgItem.Price == 0.0) pgItem.IfDefinePrice = false;
         else pgItem.IfDefinePrice = true;
         _PGItems.Add(pgItem);
         _dictionary.Add(FGCode + _direction.ToString(), _PGItems.Count - 1);
     }
 }