Login() public method

public Login ( ) : void
return void
示例#1
0
 private void AuthenticatedLogin(string username, string password)
 {
     ThreadAssist.Spawn(delegate {
         try {
             client.Login(username, password);
         } catch (DAAP.AuthenticationException) {
             ThreadAssist.ProxyToMain(delegate {
                 ShowErrorView(DaapErrorType.InvalidAuthentication);
             });
         }
     });
 }
示例#2
0
        public override void Activate()
        {
            if (client != null || is_activating)
            {
                return;
            }

            ClearErrorView();

            is_activating = true;
            base.Activate();

            SetStatus(String.Format(Catalog.GetString("Connecting to {0}"), service.Name), false);

            ThreadAssist.Spawn(delegate {
                try {
                    client          = new DAAP.Client(service);
                    client.Updated += OnClientUpdated;

                    if (client.AuthenticationMethod == DAAP.AuthenticationMethod.None)
                    {
                        client.Login();
                    }
                    else
                    {
                        ThreadAssist.ProxyToMain(PromptLogin);
                    }
                } catch (Exception e) {
                    ThreadAssist.ProxyToMain(delegate {
                        ShowErrorView(DaapErrorType.BrokenAuthentication);
                    });
                    Hyena.Log.Exception(e);
                }

                is_activating = false;
            });
        }
示例#3
0
        public override void Activate()
        {
            if (client != null || is_activating) {
                return;
            }

            ClearErrorView ();

            is_activating = true;
            base.Activate ();

            SetStatus (String.Format (Catalog.GetString ("Connecting to {0}"), service.Name), false);

            ThreadAssist.Spawn (delegate {
                try {
                    client = new DAAP.Client (service);
                    client.Updated += OnClientUpdated;

                    if (client.AuthenticationMethod == DAAP.AuthenticationMethod.None) {
                        client.Login ();
                    } else {
                        ThreadAssist.ProxyToMain (PromptLogin);
                    }
                } catch(Exception e) {
                    ThreadAssist.ProxyToMain (delegate {
                        ShowErrorView (DaapErrorType.BrokenAuthentication);
                    });
                    Log.Error (e);
                }

                is_activating = false;
            });
        }