Esempio n. 1
0
 public MainPage()
 {
     InitializeComponent();
     IsolatedStorageSettings.ApplicationSettings["session_data"] = 0L;
     IsolatedStorageSettings.ApplicationSettings.Save();
     Loaded += new RoutedEventHandler(MainPage_Loaded);
     loginbtn = (ApplicationBarIconButton)ApplicationBar.Buttons[0];
     progindicator = new ProgressIndicator();
     SystemTray.SetProgressIndicator(this, progindicator);
     if (Network.IsConnected())
     {
         auth = new Authentication();
         auth.NewTokenReceived += new TokenReceivedEventHandler(auth_NewTokenReceived);
     }
 }
Esempio n. 2
0
 // Code to execute when the application is activated (brought to foreground)
 // This code will not execute when the application is first launched
 private void Application_Activated(object sender, ActivatedEventArgs e)
 {
     if (Network.IsConnected())
     {
         Authentication auth;
         auth = new Authentication();
         auth.RefreshToken();
     }
 }