private void TapGestureRecognizer_Tapped(object sender, EventArgs e) { StoreListView.BeginRefresh(); MultipleStores multi = new MultipleStores(); var labelHandler = (Label)sender; join_line1.IsEnabled = true; join_line1.BackgroundColor = Color.FromHex("#0071BC"); join_line2.IsEnabled = true; join_line2.BackgroundColor = Color.FromHex("#0071BC"); //schedule.IsVisible = true; for (int j = 0; j < i; j++) { if ((string)addressArray[j] == (string)labelHandler.Text || (string)streetArray[j] == (string)labelHandler.Text) { multi.backcolor = Color.White; multi.wait_time = "0"; Int32.TryParse((string)uidArray[j], out v_uid); travel = Math.Round(GetTravelTime(getDistance((double)latArray[j], (double)longArray[j]), speed), 0); lat3 = (double)latArray[j]; long3 = (double)longArray[j]; join_line1.Text = (DateTime.Now.AddMinutes(travel + (double)waitArray[j])).ToString().Substring(9, 10).TrimStart('0'); de_selected_time_min = Math.Round(travel + (double)waitArray[j], 0); de_selected_time_min2 = Math.Round(travel + (double)waitArray[j] + 60, 0); de_selected_time = TimeSpan.FromMinutes(de_selected_time_min); join_line2.Text = (DateTime.Now.AddMinutes(travel + (double)waitArray[j] + 60)).ToString().Substring(9, 10).TrimStart('0'); select_time = DateTime.Now.TimeOfDay.Add(TimeSpan.FromMinutes(Math.Round(travel + (double)waitArray[j] + 60, 0))); } } StoreListView.EndRefresh(); }
private void Car_Selected(object sender, EventArgs e) { StoreListView.BeginRefresh(); Car.BackgroundColor = Color.FromHex("#0071BC"); Car.BorderColor = Color.FromHex("#0071BC"); Walk.BackgroundColor = Color.White; Walk.BorderColor = Color.Black; Bus.BackgroundColor = Color.White; Bus.BorderColor = Color.Black; Preferences.Set("MOT", "driving"); speed = 51.0; StoreListView.EndRefresh(); }