Exemplo n.º 1
0
 public void SetHaspels(Haspel[] haspels)
 {
     Haspels.Clear();
     foreach (Haspel h in haspels)
     {
         Haspels.Add(h);
     }
 }
Exemplo n.º 2
0
        public async void SetHaspels()
        {
            Haspel[] haspels = await myApiManager.HaspelApiManager.GetData();

            Haspels.Clear();
            foreach (Haspel h in haspels)
            {
                Haspels.Add(h);
            }
        }
Exemplo n.º 3
0
        public MainViewModel(INavigationService navigationService, ApiManager apiManager)
        {
            myNavigationService = navigationService;
            myApiManager        = apiManager;

            Haspels.Add(new Haspel
            {
                Barcode = "Kan niet met de server verbinden!"
            });

            Haspels.CollectionChanged += Haspels_CollectionChanged;

            myApiManager.Connected += (a, s) => SetHaspels();
            myApiManager.Initialize();

            RefreshCommand = new Command(RefreshCommandExecute);
        }
Exemplo n.º 4
0
        public MainPage(ApiManager manager)
        {
            InitializeComponent();

            myApiManager = manager;
            Haspels.Add(new Haspel
            {
                Barcode = "Barcode",
                Status  = Enums.EHaspelStatus.Unkown,
                UsedBy  = "User"
            });

            Haspels.CollectionChanged += Haspels_CollectionChanged;

            myApiManager.Connected += (a, s) => SetHaspels(myApiManager.HaspelApiManager.GetData().Result);
            myApiManager.Initialize();
        }