示例#1
0
 public void OnConnect(object sender, SktEvents.OnConnectArgs e)
 {
     if (e.success)
     {
         LoginRec login = tutorials.ShowLoginDialog(this);
         username = login.username;
         password = login.password;
         if (!login.abort)
         {
             account = skype.GetAccount(username);
             account.LoginWithPassword(password, false, false);
         }
     }
     else
     {
         throw new Exception("IPC handshake failed with: " + e.handshakeResult);
     }
 }
示例#2
0
 // Fired when connection to the runtime is established (or fails)
 // If it's up, we can initiate account login.
 // Once we have called account.LoginWithPassword, we can expect
 // OnAccountStatus events firing, in near future..
 public void OnConnect(object sender, SktEvents.OnConnectArgs e)
 {
     if (e.success)
     {
         textBox1.AppendText("Connection to runtime is up. Lets see if we can log in..\n");
         LoginRec login = tutorials.ShowLoginDialog(this);
         username = login.username;
         password = login.password;
         if (!login.abort)
         {
             account = skype.GetAccount(username);
             account.LoginWithPassword(password, false, true);
         }
     }
     else
     {
         textBox1.AppendText("IPC handshake failed with: " + e.handshakeResult + "\n");
     }
 }
示例#3
0
        // Connection to runtime came up. Prompting user for login
        public void OnConnect(object sender, SktEvents.OnConnectArgs e)
        {
            if (e.success)
            {
                this.messageLog.AppendText("Connection to runtime is up. Lets see if we can log in..\r\n");

                LoginRec login = tutorials.ShowLoginDialog(this);
                username = login.username;
                password = login.password;
                if (!login.abort)
                {
                    // This will cause OnAccountStatus to fire, some time later
                    account = skype.GetAccount(username);
                    account.LoginWithPassword(password, false, false);
                }
            }
            else
            {
                this.messageLog.AppendText("IPC handshake failed with: " + e.handshakeResult + "\r\n");
            }
        }