private void webBrowser1_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e) { this.Dispatcher.BeginInvoke(() => { this.progressBar1.IsIndeterminate = false; if (webBrowser.Source.AbsolutePath == "/blank.html") { this.webBrowser.Visibility = Visibility.Collapsed; var accessInfo = new AccessInfoBag { token = webBrowser.Source.Fragment.Substring(14, 63), uid = webBrowser.Source.Fragment.Substring(103) }; AccessInfoStore.Save(accessInfo); Client.Instance.Start(accessInfo); NavigationService.GoBack(); //NavigationService.Navigate(new System.Uri("/MainPage.xaml", System.UriKind.Relative)); } }); }
public static void Save(AccessInfoBag obj) { IsolatedStorageSettings.ApplicationSettings[tokenkey] = obj.token; IsolatedStorageSettings.ApplicationSettings[uidkey] = obj.uid; IsolatedStorageSettings.ApplicationSettings.Save(); }