Exemplo n.º 1
0
        public OnChangeDefaultZoneHandler(BeaconListViewModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model", "model is null on OnChangeCustomZoneHandler");
            }

            this.model = model;
        }
Exemplo n.º 2
0
        public OnExitCustomZoneHandler(BeaconListViewModel model, string[] zoneBeacons)
        {
            if (zoneBeacons == null)
            {
                throw new ArgumentNullException("zoneBeacons", "zoneBeacons is null on OnExitCustomZoneHandler");
            }
            if (model == null)
            {
                throw new ArgumentNullException("model", "model is null on OnExitCustomZoneHandler");
            }

            this.model       = model;
            this.zoneBeacons = zoneBeacons;
        }
Exemplo n.º 3
0
        public MainPage()
        {
            var model = new BeaconListViewModel();

            this.BindingContext = model;

            var scanner = DependencyService.Get <IProximityScanner>();

            scanner.Model = model;

            InitializeComponent();

            lstBeacons.ItemTapped += (object sender, ItemTappedEventArgs e) =>
            {
                // don't do anything if we just de-selected the row
                if (e.Item == null)
                {
                    return;
                }
                // do something with e.SelectedItem
                ((ListView)sender).SelectedItem = null; // de-select the row
            };
        }