当前位置: 首页>>代码示例>>C#>>正文


C# Place类代码示例

本文整理汇总了C#中Place的典型用法代码示例。如果您正苦于以下问题:C# Place类的具体用法?C# Place怎么用?C# Place使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Place类属于命名空间,在下文中一共展示了Place类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            _MapView = new MapView(new RectangleF(0, 0, View.Frame.Width, View.Frame.Height));
            _MapView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;

            View.AddSubview(_MapView);

            var home = new Place()
            {
                Name = "Home",
                Description = "Boring Home Town",
                Latitude = 32.725410,
                Longitude = -97.320840,
            };

            var office = new Place()
            {
                Name = "Austin",
                Description = "Super Awesome Town",
                Latitude = 30.26710,
                Longitude = -97.744546,
            };

            _MapView.ShowRouteFrom(office, home);
        }
开发者ID:anujb,项目名称:MapWithRoutes,代码行数:27,代码来源:MapWithRouteViewController.cs

示例2: MobilityRequired

    public override decimal MobilityRequired( Place place )
    {
      if ( place.Owner == this.Owner )//在自己的领土上移动不需要移动力
        return 0;

      return base.MobilityRequired( place );
    }
开发者ID:Ivony,项目名称:HelloWorld,代码行数:7,代码来源:Worker.cs

示例3: doBFS

    List<Place> doBFS(Place pathTarget)
    {
        Queue<Place> BFSQueue = new Queue<Place> ();
        BFSQueue.Enqueue (currentPlace);
        currentPlace.visited = true;
        Debug.Log ("Start point: " + currentPlace.placeName);
        while (BFSQueue.Count != 0) {
            Place cur = BFSQueue.Dequeue();
            Debug.Log ("Current place: " + cur.placeName);
            if(cur.placeName.Equals (pathTarget.placeName)){
                Debug.Log ("Done!");
                return retracePath(cur);
            }
            for (int i = 0; i < cur.adjacencies.Length; i++){
                if (!cur.adjacencies[i].visited) {
                    cur.adjacencies[i].visited =  true;
                    cur.adjacencies[i].prevPlace = cur;
                    BFSQueue.Enqueue (cur.adjacencies[i]);
                    Debug.Log ("  Neighbor of current place (being enqueued now): "+cur.adjacencies[i].placeName);
                }
            }
        }

        Debug.Log ("NO PATH FOUND - ERROR");
        return null;
    }
开发者ID:jondutko,项目名称:Summer2014,代码行数:26,代码来源:Server.cs

示例4: Map

        public Map(XmlElement map)
        {
            Row = int.Parse(map.GetAttribute("row"));
            Col = int.Parse(map.GetAttribute("col"));
            Places = new Place[Row, Col];
            PlaceIdToCoordinate = new Dictionary<int, Tuple<int, int>>();
            _MaxId = 0;

            for (int r = 0; r < Row; r++)
            {
                for (int c = 0; c < Col; c++)
                {
                    Places[r, c] = new None(0);
                }
            }

            foreach (XmlNode item in map.ChildNodes)
            {
                int r = int.Parse((item as XmlElement).GetAttribute("row"));
                int c = int.Parse((item as XmlElement).GetAttribute("col"));
                int id = int.Parse((item as XmlElement).GetAttribute("id"));
                NewInstanceFromXml(item, ref Places[r, c], id);
                PlaceIdToCoordinate.Add(id, new Tuple<int, int>(r, c));
                if (id > _MaxId)
                {
                    _MaxId = id;
                }
            }
        }
开发者ID:halfdb,项目名称:MyMonopoly,代码行数:29,代码来源:Map.cs

示例5: CreateNewInstance

 public static PlaceReviewsFragment CreateNewInstance(Place place)
 {
     return new PlaceReviewsFragment {
         Place = place,
         Arguments = new Bundle ()
     };
 }
开发者ID:RobGibbens,项目名称:Coffee-Filter,代码行数:7,代码来源:PlaceReviewsFragment.cs

示例6: CreateDay

 internal virtual Day CreateDay()
 {
     // TODO: Instantiate an appropriate concrete class.
     int[] click = {700,1000};
     Place hq = new Place(0.0, 0.0, "HQ", click);
     Day target = new Future(1, hq);
     return target;
 }
开发者ID:RxnDbr,项目名称:PI_Mars,代码行数:8,代码来源:DayTest.cs

示例7: NewInstanceFromXml

 internal static void NewInstanceFromXml(XmlNode detail, ref Place result, int id)
 {
     if (detail.Name != "Bank")
     {
         return;
     }
     result = new Bank(id);
 }
开发者ID:halfdb,项目名称:MyMonopoly,代码行数:8,代码来源:PlaceWithEvent.cs

示例8: SPlaceExtended

 public SPlaceExtended(HttpContextBase context, Place place, Culture culture = Culture.En)
     : base(context, place, culture)
 {
     Type = PlaceTypes.GetPlaceType(place.TypeId).GetName(culture);
     Description = place.GetDescription(culture);
     RegionId = place.RegionId;
     RegionName = place.Region.GetName(culture);
 }
开发者ID:Reidan94,项目名称:ITouristDashboard,代码行数:8,代码来源:SPlace.cs

示例9: WhenSavingItShouldDelegateToMongoAbstraction

        public void WhenSavingItShouldDelegateToMongoAbstraction()
        {
            var place = new Place("fooBarBazQuux");

            _allPlaces.Save(place);

            _mongoDB.Verify(it => it.Save("places", place));
        }
开发者ID:hammernight,项目名称:Garcom,代码行数:8,代码来源:AllPlacesSpec.cs

示例10: UpdatePlaceInfo

        public void UpdatePlaceInfo(Place place)
        {
            Log("Begin updating Place in database. Place object", place);

            DatabaseConnector.PushCommandToDatabase(sqlConnection, CommandList.Build_UpdatePlaceCommand(place));

            Log("End updating Place in database. Place object", place);
        }
开发者ID:Bot32,项目名称:MeetGenerator,代码行数:8,代码来源:PlaceRepository.cs

示例11: Day

 public Day(int _number, Place _map_hq)
 {
     number = _number;
     map_hq = _map_hq;
     l_activity = new List<Activity>();
     createDfaultActList();
     sortActivityList();
 }
开发者ID:RxnDbr,项目名称:PI_Mars,代码行数:8,代码来源:Day.cs

示例12: Activity

 public Activity(int _start, int _end, Place _place, string _type = "private")
 {
     //choose the place in a list / with the map. If it's not there, create it
     start = _start;
     end = _end;
     place = _place;
     type = _type;
 }
开发者ID:RxnDbr,项目名称:PI_Mars,代码行数:8,代码来源:Activity.cs

示例13: GetID

 public int GetID(string country, string city, string street, int house, int flat)
 {
     Place place = new Place {city = city, country = country, house = house, street = street, flat = flat};
     if (!pr.Exist(place.idPlace)) {
         pr.Add(place);
     }
     return pr.GetId(place);
 }
开发者ID:m13oas,项目名称:DevSchool,代码行数:8,代码来源:PlaceController.cs

示例14: CreatePlace

        public void CreatePlace(Place place)
        {
            Log("Begin creating Place in database. Place object", place);

            DatabaseConnector.PushCommandToDatabase(sqlConnection, CommandList.Build_CreatePlaceCommand(place));

            Log("End creating Place in database. Place object", place);
        }
开发者ID:Bot32,项目名称:MeetGenerator,代码行数:8,代码来源:PlaceRepository.cs

示例15: GetPlacesFromMongoPlaces

        private Place GetPlacesFromMongoPlaces(MongoPlace mongoPlace)
        {
            var place = new Place();
            place.PlaceId = mongoPlace.Id;
            place.Name = mongoPlace.Name;

            return place;
        }
开发者ID:Team-Lawrencium,项目名称:AvalancheTesterDB,代码行数:8,代码来源:PlaceEntitiesController.cs


注:本文中的Place类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。