Ejemplo n.º 1
0
 public void GetAllMeasures(Action<List<MeasureModel>> callback)
 {
     MeasureRepository measureRepository = new MeasureRepository();
     ViewCallback = callback;
     GetAllMeasuresCallback handler = new GetAllMeasuresCallback(GetAllMeasuresCompleted);
     measureRepository.getAllMeasures(new Action<List<MeasureModel>>(handler));
 }
Ejemplo n.º 2
0
        public AddField()
        {
            InitializeComponent();

            MeasureModel measureModel = new MeasureModel();
            GetAllMeasuresCallback handler = new GetAllMeasuresCallback(GetAllMeasuresCompleted);
            measureModel.GetAllMeasures(new Action<List<MeasureModel>>(handler));

            Latitude = 48.3669;
            Longitude = 14.5172;
            mapMain.Center = new GeoCoordinate(Latitude, Longitude);
            mapMain.ZoomLevel = 15;
            mapMain.ZoomBarVisibility = Visibility.Visible;
            coordinateWatcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High);
            coordinateWatcher.PositionChanged += new EventHandler<GeoPositionChangedEventArgs<GeoCoordinate>>(coordinateWatcher_PositionChanged);
        }