protected override void PageLoaded() { pageLoaded = true; ClearSearchTextBox(); ShowLoader(); base.PageLoaded(); Stops.Clear(); if (unitOfWork.AppSettingRepository.FindByType(ApplicationSetting.AllowLocation).Value) { if (user.IsLocationUptodate) { UserLocationFound(new GpsWatcherResponseMessage(true, user.LastKnownGeneralLocation, GpsWatcherResponseMessageReason.Coordinate)); } else { RegisterWatcher(); } } else { AddStops(); } pageLoaded = false; }
private void AddStops() { ShowLoader(); Stops.Clear(); Stops.AddRange(unitOfWork.PublicStopRepository.GetNearby(30)); ShowList(); }
public void Clear() { Stops.Clear(); CurrentLegs = null; PreviousLegs = null; IsStarted = false; }
public LcColorTheme(string property, Func <double, ComputationUnit, double> selector = null) : base(property, 0, 100) { Stops.Clear(); AddStop(0.0, Colors.Green); AddStop(0.5, Colors.Yellow); AddStop(1.0, Colors.Red); if (selector != null) { _selector = selector; } }
private void TimerTickSearch(object sender, EventArgs e) { timerSearch.Stop(); ShowHeaderLoader(); IEnumerable <PublicStop> stops = unitOfWork.PublicStopRepository.GetByName(searchText); Stops.Clear(); Stops.AddRange(stops); HideHeaderLoader(); base.AddFeatureUse(PageUseType.TextBox, string.Format("Searched for [{0}]", searchText)); }
private void ResetStopsAndPoints() { int i = 0; Stops.Clear(); this.points = new Point[Route.Count]; foreach (RoadPoint rd in Route) { if (rd is RoadStop) { RoadStop rs = (RoadStop)rd; Stops.Add(rs.StopName); } points[i] = rd.Coordinate; i++; } }
public void LoadStops() { Transport transport = new Transport(); List <StopWithLineInfo> stops; if (OfflineMode) { transport._request = new OfflineRequest(Resource.offline_stops_near_cci); stops = transport.GetStopsListWithLineInfosOffline(); } else { stops = transport.GetStopsListWithLineInfo(Longitude.ToString().Replace(',', '.'), Latitude.ToString().Replace(',', '.'), Distance, true); } Stops.Clear(); foreach (StopWithLineInfo stop in stops) { Stops.Add(stop); } }
protected override void PageUnloaded() { base.PageUnloaded(); Stops.Clear(); }