Exemple #1
0
 private List<User> CreateBlankUser(int userNumber, List<GeoXYRect> rects, CellServiceContext ctx)
 {
     List<User> list = new List<User>();
     while (true)
     {
         double num;
         double num2;
         if (userNumber <= 0)
         {
             return list;
         }
         User user = new User();
         ClutterInfo info = new ClutterInfo(-1);
         int num3 = this.m_Random.Next(0, rects.Count);
         this.GenUserXY(user, out num, out num2, rects[num3]);
         GeoXYPoint geoXYPoint = new GeoXYPoint(num, num2);
         if (this.m_CellRectHelper.IsPoiontIsPolyRegion(geoXYPoint))
         {
             user.Clutter = info;
             user.Service = ctx.Service;
             user.LinkType = ctx.LinkType;
             user.Priority = 1;
             list.Add(user);
             if (userNumber == list.Count)
             {
                 return list;
             }
         }
     }
 }
Exemple #2
0
 private List<User> CreateUsers(CellServiceContext ctx, List<GeoXYPoint> pts, short clutterID)
 {
     List<User> list = new List<User>();
     foreach (GeoXYPoint point in pts)
     {
         User item = new User {
             X = point.X,
             Y = point.Y,
             Service = ctx.Service,
             LinkType = ctx.LinkType
         };
         ClutterInfo info = new ClutterInfo {
             Id = clutterID
         };
         item.Clutter = info;
         item.UserProfile = string.Empty;
         item.Priority = 1;
         list.Add(item);
     }
     return list;
 }
Exemple #3
0
 private void SetIndoor(List<User> users, float indoorRate, short ClutterID)
 {
     ClutterInfo info = new ClutterInfo {
         Id = ClutterID
     };
     int threshold = (int) ((users.Count * indoorRate) / 100f);
     for (int i = 0; i < users.Count; i++)
     {
         this.SetUserIndoor(users, threshold, i);
         users[i].Clutter = info;
     }
 }