コード例 #1
0
ファイル: SignInPage.xaml.cs プロジェクト: jet-pilot/VkClient
 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));
             }
         });
 }
コード例 #2
0
ファイル: AccessInfoStore.cs プロジェクト: jet-pilot/VkClient
 public static void Save(AccessInfoBag obj)
 {
     IsolatedStorageSettings.ApplicationSettings[tokenkey] = obj.token;
     IsolatedStorageSettings.ApplicationSettings[uidkey] = obj.uid;
     IsolatedStorageSettings.ApplicationSettings.Save();
 }