本文整理汇总了C#中Bobs.Usr.HimString方法的典型用法代码示例。如果您正苦于以下问题:C# Usr.HimString方法的具体用法?C# Usr.HimString怎么用?C# Usr.HimString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bobs.Usr
的用法示例。
在下文中一共展示了Usr.HimString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Invite
//.........这里部分代码省略.........
}
}
//We still add this user to the alertedusers list (even if !addThreadUsr) - this just makes sure we don't attempt to send them an invite a second time.
alertedUsrs.Add(u.K);
if (addThreadUsr)
{
ThreadUsr tu = this.GetThreadUsr(u);
tu.ChangeStatus(ThreadUsr.StatusEnum.NewInvite, DateTime.Now, false, false);
try
{
addedThreadUsrsUsrKs.Add(u.K);
}
catch { }
tu.InvitingUsrK = invitingUsr.K;
tu.StatusChangeObjectK = invitingUsr.K;
tu.StatusChangeObjectType = Model.Entities.ObjectType.Usr;
tu.Update();
count++;
#region sendInviteAlerts
if (sendInviteAlerts)
{
try
{
Mailer usrMail = new Mailer();
if (isNewThread && this.Private && this.ParentObjectType.Equals(Model.Entities.ObjectType.Photo))
{
usrMail.Subject = invitingUsr.NickName + " sent you a photo";
usrMail.Body += "<h1>" + invitingUsr.NickName + " sent you a photo</h1>";
usrMail.Body += "<p align=\"center\"><a href=\"[LOGIN]\"><img border=\"0\" src=\"" + this.ParentPhoto.WebPath + "\" width=\"" + this.ParentPhoto.WebWidth + "\" height=\"" + this.ParentPhoto.WebHeight + "\" class=\"BorderBlack All\" /></a></p>";
}
else if (isNewThread)
{
usrMail.Subject = invitingUsr.NickName + " posts: \"" + this.SubjectSnip(40) + "\"";
usrMail.Body += "<h1>" + invitingUsr.NickName + " has posted a new topic</h1>";
}
else
{
usrMail.Subject = invitingUsr.NickName + " invites you to: \"" + this.SubjectSnip(40) + "\"";
usrMail.Body += "<h1>" + invitingUsr.NickName + " invites you to a topic</h1>";
}
usrMail.Body += "<p>The subject is: \"" + this.Subject + "\"</p>";
usrMail.Body += "<p>To read " + invitingUsr.HisString(false) + " message, check out the <a href=\"[LOGIN]\">topic page</a>.</p>";
usrMail.Body += "<p>If you want to stop " + invitingUsr.HimString(false) + " inviting you to topics, click the <i>Stop " + invitingUsr.NickName + " inviting me to chat topics</i> button on <a href=\"[LOGIN(" + invitingUsr.Url() + ")]\">" + invitingUsr.HisString(false) + " profile page</a>.</p>";
usrMail.TemplateType = Mailer.TemplateTypes.AnotherSiteUser;
usrMail.RedirectUrl = this.UrlDiscussion();
usrMail.UsrRecipient = u;
//usrMail.Bulk=usInvites.Count>5;
usrMail.Bulk = false; // This is interesting... if people are invited by email, they should get the invite really...
usrMail.Inbox = true;
usrMail.Send();
}
catch (Exception ex) { Global.Log("1d3726bf-0715-4404-9059-4e53ca9e3dc5", ex); }
//try
//{
// if (u.IsLoggedOn && u.DateTimeLastPageRequest > DateTime.Now.AddMinutes(-5))
// {
// XmlDocument xmlDoc = new XmlDocument();
// XmlNode n = xmlDoc.CreateElement("privateMessageAlert");
// n.AddAttribute("nickName", invitingUsr.NickNameSafe);
// n.AddAttribute("stmu", invitingUsr.StmuParams);
// n.AddAttribute("usrK", invitingUsr.K.ToString());
// if (invitingUsr.HasPic)
// n.AddAttribute("pic", invitingUsr.Pic.ToString());
// else
// n.AddAttribute("pic", "0");
// n.AddAttribute("k", this.K.ToString());
// if (postedComment == null)
// {
// n.InnerText = this.Url();
// }
// else
// {
// n.InnerText = postedComment.Url(this);
// }
// Chat.SendChatItem(ItemType.Invite, n, DateTime.Now.Ticks, u.K, Guid.NewGuid());
// }
//}
//catch (Exception ex) { Global.Log("2902fd82-e8a4-49c2-9e33-ccfca01ca1f9", ex); }
}
#endregion
}
}
}
}
if (joinChatRoom)
{
Guid room = this.GetRoomSpec().Guid;
Chat.JoinRoom(room, addedThreadUsrsUsrKs.ToArray());
}
return count;
}