Example #1
0
 public void OnClick(View v)
 {
     if (v.Tag != null)
     {
         ArticleActivity.Start(context, v.Tag.ToString());
     }
 }
Example #2
0
        public void OnClick(View v)
        {
            if (v.Tag != null)
            {
                switch (position)
                {
                case 0:
                    ArticleActivity.Start(context, Convert.ToInt32(v.Tag.ToString()));
                    break;

                case 1:
                    NewsActivity.Start(context, Convert.ToInt32(v.Tag.ToString()));
                    break;

                case 2:
                    KbArticleActivity.Start(context, Convert.ToInt32(v.Tag.ToString()));
                    break;

                case 3:
                    var tag = v.Tag.ToString();
                    var id  = tag.Substring(tag.LastIndexOf("/") + 1);
                    QuestionActivity.Start(context, Convert.ToInt32(id));
                    break;

                default:
                    break;
                }
            }
        }
Example #3
0
        public async Task GetArticleActivity(string articleId)
        {
            var articleActivity = new ArticleActivity()
            {
                Id        = articleId,
                ViewCount = StaticRepo.ViewCount
            };

            await Clients.All.ReceiveArticleUpdate(articleActivity);
        }
Example #4
0
 public void OnArticleClicked(ArticleClickedMessage msg)
 {
     StartActivity(ArticleActivity.CreateIntent(this, msg.Id));
 }