コード例 #1
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            // Set the data context of the listbox control to the sample data
            DataContext = App.ViewModel;
            this.Loaded += new RoutedEventHandler(MainPage_Loaded);

            //Load Europeana API
            EuropeanaAPI = new EUPwebclient();
            EuropeanaAPI.searchDoneEvent += new EUPwebclient.searchDone(EuropeanaAPI_searchDoneEvent);

            //Load GPS
            phoneGPS = new GPS();
            phoneGPS.posFoundEvent += new GPS.posFound(phoneGPS_posFoundEvent);

            //Load city finder
            cityFinder = new googleCityLookup();
            cityFinder.cityFoundEvent += new googleCityLookup.cityFound(cityFinder_cityFoundEvent);

            //Progress bar control
            SystemTray.SetIsVisible(this, true);
            SystemTray.SetOpacity(this, 0);
            prog = new ProgressIndicator();
            prog.IsVisible = true;
            prog.IsIndeterminate = true;
            prog.Text = "Loading...";
            SystemTray.SetProgressIndicator(this, prog);

            this.BackKeyPress += new EventHandler<System.ComponentModel.CancelEventArgs>(MainPage_BackKeyPress);
        }
コード例 #2
0
        public LocalizedMapPage()
        {
            InitializeComponent();

            // test data
            //LocationData.Instance["http://www.europeana.eu/portal/record/08547/6A0C00645813BEF4B4D7CDB36AFAFB9524B99F97.html"] = new SimpleCoordinates(14.508628, 35.896);
            //LocationData.Instance["bcd"] = new SimpleCoordinates(14.505367, 35.894453);

            GPS gps = new GPS();
            gps.posFoundEvent += new GPS.posFound(gps_posFoundEvent);
            gps.GetPosition();

            this.BackKeyPress += new EventHandler<System.ComponentModel.CancelEventArgs>(MainPage_BackKeyPress);
        }
コード例 #3
0
 private void PinIt_Click(object sender, RoutedEventArgs e)
 {
     GPS gps = new GPS();
     gps.posFoundEvent += new GPS.posFound(gps_posFoundEvent);
     NavigationService.Navigate(new Uri("/SuccessPage.xaml", UriKind.Relative));
 }