public void Start() { string url, location; if (GetViewName() == PLANTS_VIEW) { Plant currentPlant = PlantsService.plant; location = currentPlant._request.GetAddress(); url = ENV.GOOGLE_MAPS_COORD_URL.Replace("PLACE", location); } else if (GetViewName() == SUBMISSIONS_VIEW) { MissionAnswer currentAnswer = MissionsService.missionAnswer; location_lat = (currentAnswer.location_lat != null ? currentAnswer.location_lat : "0"); location_lng = (currentAnswer.location_lng != null ? currentAnswer.location_lng : "0"); location = location_lat + "," + location_lng; url = ENV.GOOGLE_MAPS_COORD_URL.Replace("PLACE", location); } else { PlantType plantType = PlantsService.type; url = plantType.photo; } if (url != null) { StartCoroutine(_ShowImage(url)); } }
public void Start() { MissionAnswer currentAnswer = MissionsService.missionAnswer; location_lat = (currentAnswer.location_lat != null ? currentAnswer.location_lat : "0"); location_lng = (currentAnswer.location_lng != null ? currentAnswer.location_lng : "0"); location = location_lat + "," + location_lng; StartCoroutine(_UpdateImage()); }
public void Start() { previousView = "Missions"; currentMission = MissionsService.mission; sendButton.interactable = false; missionName.text = currentMission.name; missionDescription.text = currentMission.description; currentMission = MissionsService.mission; currentAnswer = MissionsService.missionAnswer; ResetButtons(); UpdateMissionInfo(); StartCoroutine(_CheckResponses()); }
public void Start() { string url, location; MissionAnswer currentAnswer = MissionsService.missionAnswer; location_lat = (currentAnswer.location_lat != null ? currentAnswer.location_lat : "0"); location_lng = (currentAnswer.location_lng != null ? currentAnswer.location_lng : "0"); location = location_lat + "," + location_lng; url = ENV.GOOGLE_MAPS_COORD_URL.Replace("PLACE", location); if (url != null) { StartCoroutine(_ShowImage(url)); } }
public void UpdateSubmissionCard(MissionAnswer submission) { ResetButtons(); this.submission = submission; title.text = "Missão #" + submission._mission.ToString(); date.text = "Submissão enviada em " + UtilsService.GetDate(submission.created_at); if (submission.image != null && submission.image.Length > 0) { imageButton.SetActive(true); } if (submission.audio != null && submission.audio.Length > 0) { audioButton.SetActive(true); } if (submission.video != null && submission.video.Length > 0) { videoButton.SetActive(true); } if (submission.location_lat != null && submission.location_lng != null && submission.location_lat.Length > 0 && submission.location_lng.Length > 0) { gpsButton.SetActive(true); } if (submission.text_msg != null && submission.text_msg.Length > 0) { textButton.SetActive(true); } switch (submission.status) { case "Pendente": statusPendent.SetActive(true); break; case "Válida": statusApproved.SetActive(true); break; case "Inválida": statusRejected.SetActive(true); break; } StartCoroutine(_UpdateMission()); }
public void Start() { if (GetViewName() == PLANTS_VIEW) { Plant currentPlant = PlantsService.plant; location_lat = (currentPlant.location_lat != null ? currentPlant.location_lat : "0"); location_lng = (currentPlant.location_lng != null ? currentPlant.location_lng : "0"); } else { MissionAnswer currentAnswer = MissionsService.missionAnswer; location_lat = (currentAnswer.location_lat != null ? currentAnswer.location_lat : "0"); location_lng = (currentAnswer.location_lng != null ? currentAnswer.location_lng : "0"); } location = location_lat + "," + location_lng; StartCoroutine(_UpdateImage()); }
public static void UpdateMissionAnswer(string field, string fieldValue, string fieldValue2) { if (_missionAnswer == null) { _missionAnswer = new MissionAnswer(); } if (fieldValue == null) { string message = "Ocorreu um problema com sua submissão de " + field + ". Por favor, verifique sua submissão."; AlertsService.makeAlert("Campo inválido", message, "OK"); return; } if (field == "Image") { _missionAnswer.image = fieldValue; } if (field == "GPS") { _missionAnswer.location_lat = fieldValue; _missionAnswer.location_lng = fieldValue2; } if (field == "Text") { _missionAnswer.text_msg = fieldValue; } if (field == "Video") { _missionAnswer.video = fieldValue; } if (field == "Audio") { _missionAnswer.audio = fieldValue; } }
public void Start() { MissionAnswer currentAnswer = MissionsService.missionAnswer; textMsg.text = currentAnswer.text_msg; }
private static void ResetContent() { _missions = null; _mission = new Mission(); _missionAnswer = new MissionAnswer(); }
public static void UpdateMissionAnswer(MissionAnswer missionAnswer) { _missionAnswer = missionAnswer; }