📄 privatemessageinfo.cs
字号:
namespace ASPNET.StarterKit.Communities.PrivateMessages
{
using System;
/// <summary>
/// Summary description for MessageFormatInfo.
/// </summary>
public class PrivateMessageInfo
{
string senderUserName = String.Empty;
string recipientFullName = String.Empty;
string recipientUsername = String.Empty;
string editProfileLink = String.Empty;
string contentSubject = String.Empty;
string replyLink = String.Empty;
string bodyText = String.Empty;
string from = String.Empty;
string to = String.Empty;
public string To
{
get {return to;}
}
public string From
{
get {return from;}
}
public string BodyText
{
get {return bodyText;}
}
public string SenderUserName
{
get {return senderUserName;}
}
public string RecipientFullName
{
get {return recipientFullName;}
}
public string RecipientUsername
{
get {return recipientUsername;}
}
public string EditProfileLink
{
get {return editProfileLink;}
}
public string ContentSubject
{
get {return contentSubject;}
}
public string ReplyLink
{
get {return replyLink;}
}
public PrivateMessageInfo(string Subject, string Body, ProfileInfo Sender, ProfileInfo Recipient, bool IncludeSenderPrivateEmail)
{
this.contentSubject = Subject;
string baseUrl = CommunityGlobals.ResolveAbsoluteUrl(CommunityGlobals.AppPath);
this.editProfileLink = baseUrl + "/Users_EditProfile.aspx";
this.recipientUsername = Recipient.Username;
this.recipientFullName = Recipient.FirstName + " " + Recipient.LastName;
this.replyLink = baseUrl + "/SendPrivateMessage.aspx?recipient=" + System.Web.HttpContext.Current.Server.UrlEncode(Sender.Username) + "&subject=" + System.Web.HttpContext.Current.Server.UrlEncode("Re: " + Subject);
this.senderUserName = Sender.Username;
this.bodyText = Body;
if(IncludeSenderPrivateEmail)
{
this.from = Sender.Email;
}
else
{
this.from = "notify@" + CommunityGlobals.PrimaryDomain;
}
this.to = Recipient.Email;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -