public async void OnClick(View v) { switch (v.Id) { case Resource.Id.headerAvatar: var token = UserShared.GetAccessToken(this); var user = await SQLiteUtils.Instance().QueryUser(); if (user == null || token == null || token.access_token == "") { StartActivityForResult(new Intent(this, typeof(AuthorizeActivity)), (int)RequestCode.LoginCode); } else { if (string.IsNullOrEmpty(user.BlogApp)) { Toast.MakeText(this, "未开通博客", ToastLength.Short).Show(); } else { BlogActivity.Start(this, user.BlogApp); } } break; } }
public async void OnClick(View v) { switch (v.Id) { case Resource.Id.headerAvatar: var token = UserShared.GetAccessToken(this); if (token == null || token.access_token == "") { StartActivityForResult(new Intent(this, typeof(LoginActivity)), (int)RequestCode.LoginCode); } else { var user = await SQLiteUtils.Instance().QueryUser(); BlogActivity.Start(this, user.BlogApp); } break; } }