private void ShowUserInfo_Load(object sender, EventArgs e)
{
MyOwner = (TweenMain)this.Owner;
if (!AnalizeUserInfo(userInfo))
{
MessageBox.Show(Properties.Resources.ShowUserInfo1);
this.Close();
return;
}
//アイコンロード
BackgroundWorkerImageLoader.RunWorkerAsync();
InitPath();
InitTooltip();
this.Text = this.Text.Insert(0, _info.ScreenName + " ");
LabelId.Text = _info.Id.ToString();
LabelScreenName.Text = _info.ScreenName;
LabelName.Text = _info.Name;
LabelLocation.Text = _info.Location;
SetLinklabelWeb(_info.Url);
DescriptionBrowser.Visible = false;
MakeDescriptionBrowserText(_info.Description);
RecentPostBrowser.Visible = false;
if (_info.RecentPost != null)
{
recentPostTxt = MyOwner.createDetailHtml(
MyOwner.TwitterInstance.CreateHtmlAnchor(ref _info.RecentPost, atlist, userInfo.Status.Entities, null) +
" Posted at " + _info.PostCreatedAt.ToString() +
" via " + _info.PostSource);
}
LinkLabelFollowing.Text = _info.FriendsCount.ToString();
LinkLabelFollowers.Text = _info.FollowersCount.ToString();
LinkLabelFav.Text = _info.FavoriteCount.ToString();
LinkLabelTweet.Text = _info.StatusesCount.ToString();
LinkLabelListed.Text = _info.ListedCount.ToString();
LabelCreatedAt.Text = _info.CreatedAt.ToString();
if (_info.Protect)
{
LabelIsProtected.Text = Properties.Resources.Yes;
}
else
{
LabelIsProtected.Text = Properties.Resources.No;
}
if (_info.Verified)
{
LabelIsVerified.Text = Properties.Resources.Yes;
}
else
{
LabelIsVerified.Text = Properties.Resources.No;
}
if (MyOwner.TwitterInstance.Username == _info.ScreenName)
{
ButtonEdit.Enabled = true;
ChangeIconToolStripMenuItem.Enabled = true;
ButtonBlock.Enabled = false;
ButtonReportSpam.Enabled = false;
ButtonBlockDestroy.Enabled = false;
}
else
{
ButtonEdit.Enabled = false;
ChangeIconToolStripMenuItem.Enabled = false;
ButtonBlock.Enabled = true;
ButtonReportSpam.Enabled = true;
ButtonBlockDestroy.Enabled = true;
}
}