コード例 #1
0
ファイル: PointScript.cs プロジェクト: TailsMiles54/Map
 void Awake()
 {
     Info     = GameObject.Find("GameMan").GetComponent <GameManager>().Info;
     azxcv    = this.gameObject.name;
     myObject = this.gameObject;
     Info.SetActive(false);
     d = GameObject.Find("GameMan").GetComponent <AllCity>();
 }
コード例 #2
0
        //GET
        //get all the details as per restaurant Id : user

        public async Task <AllDetails> GetRestaurantDetails(int id)
        {
            var eatery = await _dataRepository.Where <Restaurant>(r => r.ID == id).Include(l => l.Location).FirstAsync();

            var reviews = await _dataRepository.Where <Review>(r => r.Restaurant.ID == id).Include(u => u.User).ToListAsync();

            var comments = await _dataRepository.GetAll <Comment>().Include(c => c.User).ToListAsync();

            //reviews
            var reviewsAC = new List <ReviewsAC>();

            _mapper.Map(reviews, reviewsAC);

            //comments
            var commentACs           = new List <CommentAC>();
            List <CommentAC> comment = new List <CommentAC>();

            foreach (var item in reviewsAC)
            {
                var allComments = comments.Where(k => k.ReviewID == item.ReviewId).ToList();
                _mapper.Map(allComments, commentACs);
                comment.AddRange(commentACs);
            }
            //adding every detail to AllDetails class
            var details = new AllDetails
            {
                RestaurantID   = id,
                LocationID     = eatery.ID,
                Locations      = eatery.Location,
                RestaurantName = eatery.RestaurantName,
                Description    = eatery.Description,
                ContactNumber  = eatery.ContactNumber,
                CuisineType    = eatery.CuisineType,
                AverageCost    = eatery.AverageCost,
                OpeningHours   = eatery.OpeningHours,
                MoreInfo       = eatery.MoreInfo,
                Reviews        = reviewsAC,
                Comments       = comment
            };

            //location
            var allCity    = new AllCity();
            var allCountry = new AllCountry();

            _mapper.Map(await _dataRepository.Where <City>(c => c.ID == eatery.Location.FirstOrDefault().CityID).FirstAsync(), allCity);
            _mapper.Map(await _dataRepository.Where <Country>(c => c.ID == eatery.Location.FirstOrDefault().CountryID).FirstAsync(), allCountry);

            details.City    = allCity;
            details.Country = allCountry;

            return(details);
        }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: mirazik18/Weather
        private void TextBox_KeyUp(object sender, KeyEventArgs e)
        {
            var    cities = AllCity.GetCity();
            string query  = (sender as TextBox).Text;

            hintCities.Children.Clear();

            foreach (var obj in cities)
            {
                if (obj.ToLower().StartsWith(query.ToLower()))
                {
                    addItem(obj);
                }
            }
        }
コード例 #4
0
 public void Start()
 {
     d = GameObject.Find("GameMan").GetComponent <AllCity>();
 }
コード例 #5
0
ファイル: GameManager.cs プロジェクト: TailsMiles54/Map
 void Start()
 {
     Spis_List.SetActive(false);
     d    = GameObject.Find("GameMan").GetComponent <AllCity>();
     Gmob = GameObject.FindGameObjectsWithTag("Marker");
 }