Beispiel #1
0
        void httpChannel_ShellToastNotificationReceived(object sender, NotificationEventArgs e)
        {
            string        msg  = string.Empty;
            EmergencyMesg Info = new EmergencyMesg();

            // 在此处要添加 将类赋值为全局变量, 然后在导航到emergency 界面

            foreach (var key in e.Collection.Keys)
            {
                if (key == "wp:Text1")
                {
                    Info.patientName = e.Collection[key];
                }
                else if (key == "wp:Text2")
                {
                    Info.latitude = e.Collection[key];
                }
                else if (key == "wp:Text3")
                {
                    Info.longitude = e.Collection[key];
                }
                // msg += key + " : " + e.Collection[key] + Environment.NewLine;
            }

            var app = App.Current as App;

            app.patientlocation = Info;

            Dispatcher.BeginInvoke(() =>
            {
                //msgTextBlock.Text = msg;
                this.NavigationService.Navigate(new Uri("/Emergency.xaml", UriKind.Relative));
            });
        }
        void httpChannel_ShellToastNotificationReceived(object sender, NotificationEventArgs e)
        {
            string msg = string.Empty;
            EmergencyMesg Info = new EmergencyMesg();

            // 在此处要添加 将类赋值为全局变量, 然后在导航到emergency 界面

            foreach (var key in e.Collection.Keys)
            {
                if (key == "wp:Text1")
                    Info.patientName = e.Collection[key];
                else if (key == "wp:Text2")
                    Info.latitude = e.Collection[key];
                else if (key =="wp:Text3")
                    Info.longitude = e.Collection[key];
               // msg += key + " : " + e.Collection[key] + Environment.NewLine;
            }

            var app = App.Current as App;
            app.patientlocation = Info;

            Dispatcher.BeginInvoke(() =>
            {
                //msgTextBlock.Text = msg;
                this.NavigationService.Navigate(new Uri("/Emergency.xaml", UriKind.Relative));
            });
        }