Exemple #1
0
 /// <summary>
 /// Update information of the Place.
 /// </summary>
 /// <param name="place">DB Place to be represented by this item.</param>
 public void UpdatePlace(Place place)
 {
     data.place = place;
     if (place?.arrivaltime != "")
     {
         arrivalTimeLabel.text = place.ArrivalDateTime().ToString(Place.timeDisplayFormat);
     }
 }
Exemple #2
0
 void UpdateArrivalTime(Place place)
 {
     arrivalTitle.text = "Arrival Time";
     if (place?.arrivaltime != "")
     {
         DateTime arrival = place.ArrivalDateTime();
         arrivalTitle.text      += ": " + arrival.ToString(Place.timeDisplayFormat);
         datePicker.SelectedDate = new UI.Dates.SerializableDate(arrival);
         hoursDropdown.value     = arrival.Hour;
         minutesDropdown.value   = Mathf.FloorToInt(arrival.Minute / 5f);
     }
     else
     {
         datePicker.SelectedDate = new UI.Dates.SerializableDate();
     }
 }
Exemple #3
0
    /// <summary>
    /// Initialize the item with Place data from database
    /// and retrieve information of the Google Place
    /// </summary>
    /// <param name="place">DB Place to be represented by this item.</param>
    public void Init(Place place)
    {
        data.place = place;
        // start getting the Google Place information
        StartCoroutine(GetPlaceCoroutine(place.googleid));
        // set the label color
        SetLabel(place.labelid);
        loading.gameObject.SetActive(false);
        IsLoading = true;

        // show arrival time if there's any
        if (!string.IsNullOrEmpty(place?.arrivaltime))
        {
            arrivalTimeLabel.text =
                place.ArrivalDateTime()
                .ToString(Place.timeDisplayFormat);
        }
    }