public static async void Commit() { if (NeedsCommit) { int id = Apparatus.Id; ApparatusApi api = new ApparatusApi(OnDuty.Core.Manager.SettingsManager.ApiRootPath); await api.UpdateStatus(id, NewApparatusStatus); } Clear(); }
public VehiclesListController(IntPtr handle) : base(handle) { API = new ApparatusAPI(OnDuty.Core.Manager.SettingsManager.ApiRootPath); EventBus.Attach("api.update.vehicle.status.before", ShowUpdateSpinner); EventBus.Attach("api.update.vehicle.status.after", forceRefresh); }
public UIVehiclesList(IntPtr handle) : base(handle) { API = new ApparatusAPI("http://localhost/app_dev.php/api"); VehicleLoader = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.WhiteLarge); RefreshVehiclesList(); }