Пример #1
0
        private void CreateTweetView(string tweet)
        {
            var boxWidth  = View.Bounds.Width - 30 - PadX * 2;
            var tweetRect = new RectangleF(PadX, 0, boxWidth, 100);

            var tweetView = new TweetView(tweetRect, tweet, (t) =>
            {
                string url = t.Value;
                switch (t.Type)
                {
                case TweetView.TweetType.Url:
                    break;

                case TweetView.TweetType.Mention:
                    url = "http://twitter.com/" + t.Value;
                    break;

                case TweetView.TweetType.Hashtag:
                    url = "http://twitter.com/search/" + Uri.EscapeDataString(t.Value);
                    break;
                }
                WebViewController.OpenUrl(this, url, true /* enableTitle */);
            }, null);

            _tweetBox = new UIViewElement("Twitter", tweetView, false);
        }
Пример #2
0
		private void CreateTweetView(string tweet)
		{
			var boxWidth = View.Bounds.Width - 30 - PadX * 2;
			var tweetRect = new RectangleF (PadX, 0, boxWidth, 100);
						
			var tweetView = new TweetView(tweetRect, tweet, (t) =>
			{
				string url = t.Value;
				switch(t.Type)
				{
					case TweetView.TweetType.Url:
						break;
					case TweetView.TweetType.Mention:
						url = "http://twitter.com/" + t.Value;
						break;
					case TweetView.TweetType.Hashtag:
						url = "http://twitter.com/search/" + Uri.EscapeDataString(t.Value);
						break;
				}
				WebViewController.OpenUrl(this, url, true /* enableTitle */);
			}, null);
			_tweetBox = new UIViewElement("Twitter", tweetView, false);
		}