public async void Logout() { bool bRet = await oAuth.InvalidateToken(); _recap = null; ReCapLoginIcon.Source = (Properties.Settings.Default.oauth_token_secret.Length == 0 ? new BitmapImage(new Uri(@"Images\Login.png", UriKind.Relative)) : new BitmapImage(new Uri(@"Images\Logout.png", UriKind.Relative)) ); }
protected bool ConnectWithReCap() { if (_recap != null) { return(true); } _recap = new AdskReCap( UserSettings.ReCapClientID, UserSettings.CONSUMER_KEY, UserSettings.CONSUMER_SECRET, Properties.Settings.Default.oauth_token, Properties.Settings.Default.oauth_token_secret ); return(_recap != null); }
protected async Task <bool> ConnectWithReCapServer() { if (_recap != null) { return(true); } _recap = new AdskReCap( UserSettings.ReCapClientID, UserSettings.CONSUMER_KEY, UserSettings.CONSUMER_SECRET, Properties.Settings.Default.oauth_token, Properties.Settings.Default.oauth_token_secret ); System.Diagnostics.Debug.WriteLine("tokens: " + Properties.Settings.Default.oauth_token + " - " + Properties.Settings.Default.oauth_token_secret, "Debug"); if (!await TestConnection()) { _recap = null; } return(_recap != null); }