Example #1
0
 private void ApplicationStartup(object sender, StartupEventArgs e)
 {
     if (e.InitParams.ContainsKey("credentials"))
     {
         string[] credentials = e.InitParams["credentials"].Split(':');
         if (credentials.Length == 2 && !string.IsNullOrEmpty(credentials[0]) && !string.IsNullOrEmpty(credentials[1]))
         {
             EarthwatcherRequests earthwatcherRequest = new EarthwatcherRequests(new Uri(Application.Current.Host.Source, "/api").ToString());
             earthwatcherRequest.EarthwatcherReceived += earthwatcherRequest_EarthwatcherReceived;
             password = credentials[1].Trim();
             earthwatcherRequest.GetByName(credentials[0].Trim(), password);
         }
         else
         {
             BackToLoginPage();
         }
     }
     else
     {
         BackToLoginPage();
     }
 }