1 // OpenTween - Client of Twitter
2 // Copyright (c) 2007-2011 kiri_feather (@kiri_feather) <kiri.feather@gmail.com>
3 // (c) 2008-2011 Moz (@syo68k)
4 // (c) 2008-2011 takeshik (@takeshik) <http://www.takeshik.org/>
5 // (c) 2010-2011 anis774 (@anis774) <http://d.hatena.ne.jp/anis774/>
6 // (c) 2010-2011 fantasticswallow (@f_swallow) <http://twitter.com/f_swallow>
7 // (c) 2011 Egtra (@egtra) <http://dev.activebasic.com/egtra/>
8 // All rights reserved.
10 // This file is part of OpenTween.
12 // This program is free software; you can redistribute it and/or modify it
13 // under the terms of the GNU General Public License as published by the Free
14 // Software Foundation; either version 3 of the License, or (at your option)
17 // This program is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 // You should have received a copy of the GNU General Public License along
23 // with this program. If not, see <http://www.gnu.org/licenses/>, or write to
24 // the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
25 // Boston, MA 02110-1301, USA.
37 public UserInfo(TwitterDataModel.User user)
40 this.Name = user.Name.Trim();
41 this.ScreenName = user.ScreenName;
42 this.Location = user.Location;
43 this.Description = user.Description;
46 this.ImageUrl = new Uri(user.ProfileImageUrlHttps);
53 this.Protect = user.Protected;
54 this.FriendsCount = user.FriendsCount;
55 this.FollowersCount = user.FollowersCount;
56 this.CreatedAt = MyCommon.DateTimeParse(user.CreatedAt);
57 this.StatusesCount = user.StatusesCount;
58 this.Verified = user.Verified;
59 if (user.Status != null)
61 this.RecentPost = user.Status.Text;
62 this.PostCreatedAt = MyCommon.DateTimeParse(user.Status.CreatedAt);
63 this.PostSource = user.Status.Source;
67 public string Name = "";
68 public string ScreenName = "";
69 public string Location = "";
70 public string Description = "";
71 public Uri ImageUrl = null;
72 public string Url = "";
73 public bool Protect = false;
74 public int FriendsCount = 0;
75 public int FollowersCount = 0;
76 public int FavoriteCount = 0;
77 public DateTime CreatedAt = new DateTime();
78 public int StatusesCount = 0;
79 public bool Verified = false;
80 public string RecentPost = "";
81 public DateTime PostCreatedAt = new DateTime();
82 public string PostSource = ""; // html形式 "<a href="http://sourceforge.jp/projects/tween/wiki/FrontPage" rel="nofollow">Tween</a>"
83 public bool isFollowing = false;
84 public bool isFollowed = false;
86 public override string ToString()
88 return this.ScreenName + " / " + this.Name;