public ReportMappingPage()
 {
     InitializeComponent();
     googlemap.SetView(geocenter, 9);
     DobbermanServiceClient client = new DobbermanServiceClient();
     client.GetAllReportsWithLocationCompleted += new EventHandler<GetAllReportsWithLocationCompletedEventArgs>(client_FindReportCompleted);
     client.GetAllReportsWithLocationAsync(1);
 }
Example #2
0
        public AddReport()
        {
            InitializeComponent();
            newReport = new Report();
            DobbermanServiceClient client = new DobbermanServiceClient();
            client.GetAllAuthoritiesCompleted += new EventHandler<GetAllAuthoritiesCompletedEventArgs>(client_GetAllAuthoritiesCompleted);
            client.GetAllAuthoritiesAsync();
            

        }
Example #3
0
        private void PostToServer()
        {

            DobbermanServiceClient client = new DobbermanServiceClient();
            client.CreateNewReportCompleted += new EventHandler<CreateNewReportCompletedEventArgs>(client_CreateNewReportCompletedE);
            client.CreateNewReportAsync(newReport);


        }
Example #4
0
        // authenticates and registers the user at the dobberman service
        void Register_User()
        {
            this.loading.Visibility=Visibility.Visible;
            var fb = new FacebookClient(_accessToken);

            fb.GetCompleted += (o, args) =>
            {
                if (args.Error == null)
                {
                    _me = (IDictionary<string, object>)args.GetResultData();

                    Dispatcher.BeginInvoke(
                        () =>
                        {
                            //Welcome.Text = "Welcome " + _me["first_name"] + "!";

                            DobbermanServiceClient client = new DobbermanServiceClient();
                            User user = new User()
                            {
                                Name = (string)_me["name"],
                                Email = (string)_me["email"],
                            };
                            client.CreateNewUserCompleted += new EventHandler<CreateNewUserCompletedEventArgs>(client_CreateNewUserCompleted);
                            client.CreateNewUserAsync(user);

                        });
                }
                else
                {
                    Dispatcher.BeginInvoke(() => MessageBox.Show(args.Error.Message));
                }
            };

            // do a GetAsync me in order to get basic details of the user.
            fb.GetAsync("me");
        }