Exemple #1
0
 private void buttonLogin_Click(object sender, RoutedEventArgs e)
 {
     if (nomeInvocador.Text != string.Empty && senha.Password != string.Empty)
     {
         buttonCadastro.IsEnabled    = false;
         buttonSemCadastro.IsEnabled = false;
         buttonLogin.IsEnabled       = false;
         ls = new LeagueWS.LeagueServiceClient();
         ls.loginCompleted += ls_loginCompleted;
         ls.loginAsync(nomeInvocador.Text, senha.Password);
     }
     else
     {
         MessageBox.Show("Insira o seu nome de invocadsor e sua senha.");
     }
 }
Exemple #2
0
        public async Task LoginAutomatico()
        {
            var settings = IsolatedStorageSettings.ApplicationSettings;

            if (settings != null && settings.Count > 0 && settings["Senha"].ToString() != string.Empty && settings["Login"].ToString() != string.Empty)
            {
                buttonLogin.IsEnabled           = false;
                buttonCadastro.IsEnabled        = false;
                buttonSemCadastro.IsEnabled     = false;
                progresBarCarregando.Visibility = System.Windows.Visibility.Visible;
                ls = new LeagueWS.LeagueServiceClient();
                ls.loginCompleted += ls_loginCompleted;
                ls.loginAsync(settings["Login"].ToString(), settings["Senha"].ToString());
                while (wait)
                {
                    await Task.Delay(10);
                }
                buttonSemCadastro.Visibility = System.Windows.Visibility.Collapsed;
            }
        }