public static void SetUser(Account account) { if (account == null) { Account = null; Client = null; Accounts.SetDefault(null); return; } Account = account; Accounts.SetDefault(Account); Client = new GitHubSharp.Client(Account.Username, Account.Password) { Timeout = 1000 * 30, //30 seconds CacheProvider = Cache, }; }
public AccountElement(Account account) : base(account.Username) { Account = account; Image = Images.Anonymous; if (!string.IsNullOrEmpty(Account.AvatarUrl)) this.ImageUri = new Uri(Account.AvatarUrl); }