IModel.cs 820 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.ComponentModel;
  3. using InABox.Core;
  4. using Xamarin.Forms;
  5. namespace InABox.Mobile
  6. {
  7. public class ModelChangedEventArgs : EventArgs
  8. {
  9. }
  10. public delegate void ModelChangedEvent(object sender, ModelChangedEventArgs args);
  11. public interface IModel : INotifyPropertyChanged
  12. {
  13. //IColumns GetColumns();
  14. ImageSource GetImage(Guid id);
  15. bool HasImages();
  16. bool Loaded { get; }
  17. void BeforeLoad(MultiQuery query);
  18. void AfterLoad(MultiQuery query);
  19. void Load(Action loaded = null);
  20. IModel Refresh(bool force);
  21. void Refresh(bool force, Action loaded);
  22. event ModelChangedEvent Changed;
  23. IModelHost Host { get; }
  24. ModelType Type { get; }
  25. }
  26. }