public static TweetViewModel CreateTweet() { TweetViewModel vm = new TweetViewModel(); vm.Message = tweets[GetRandomItemFromList(tweets)]; vm.ProfilePhotoURL= picUrls[GetRandomItemFromList(picUrls)]; vm.Username = names[GetRandomItemFromList(names)]; //vm.RealName = names[GetRandomItemFromList(names)]; vm.Favourite = true; //vm.SearchTag = "#xna"; return vm; }
public TweetViewViewModel() { tweetreply = new TweetViewModel() { AppName = string.Empty, AppPicURL = string.Empty, DateTime = DateTime.MinValue, Favourite = false, Message = string.Empty, ProfilePhotoURL = string.Empty, RealName = string.Empty, SearchTag = string.Empty, UserId = 0, Username = string.Empty, }; }
internal static TweetViewModel FromTwitterStatus(TweetSharp.TwitterStatus item) { int id = item.User.Id; /* if (item.Entities != null && item.Entities.HashTags.Count > 0) { ViewModelLocator.Instance.SearchResults.AddItem(item); } */ string source = item.Source; if (source.Contains("<")) { source = source.Substring(source.IndexOf(">") + 1); source = source.Substring(0, source.IndexOf("<")); } var vm = new TweetViewModel() { Username = item.User.ScreenName, Message = item.Text, ProfilePhotoURL = item.User.ProfileImageUrl, ID = item.Id, AppName = source, AppPicURL = item.Author.ProfileImageUrl, RealName = item.User.Name, DateTime = item.CreatedDate, UserId = item.User.Id }; return vm; }