public SafeZonePage(IncidentRegister incident, MediaFile mediaFile) { InitializeComponent(); EvidenceImg.Source = ImageSource.FromStream(mediaFile.GetStream); this.mediaFile = mediaFile; BindingContext = new SafeZoneViewModel(incident, mediaFile); }
public RegisterIncidentStateViewModel(decimal latitude, decimal longitude) { Incident = new IncidentRegister { Latitude = latitude, Longitude = longitude, UserId = Settings.UserId }; SafeZoneCommand = new Command(async() => await ManageSafeZone()); UnsafeZoneCommand = new Command(async() => await ManageUnsafeZone()); }
public async Task SaveIncident(IncidentRegister incident) { await PostApiAsync("Pins", incident); }
public UnsafeZonePage(IncidentRegister incident) { InitializeComponent(); BindingContext = new UnsafeZoneViewModel(incident); ProblemPicker.SelectedIndex = 0; }
public SafeZoneViewModel(IncidentRegister incident, MediaFile mediaFile) { Incident = incident; MediaFile = mediaFile; SendCommand = new Command(async() => await SendIncident()); }
public UnsafeZoneViewModel(IncidentRegister incident) { Incident = incident; SendCommand = new Command(async() => await Send()); TakePicCommand = new Command(async() => await TakePic()); }