public void Login(string username, string password) { LoginFactory lf = new LoginFactory(); lf.Login(username, password, delegate(object sender, LoginCompleteEventArgs args) { _currentUser = args.User; Deployment.Current.Dispatcher.BeginInvoke(() => OnLoginComplete(null, EventArgs.Empty)); }); }
public void Logout() { _currentUser = null; }