该实例可以控制消息窗口的消息显示样式,弹出时的动画
/// <summary>
/// 弹出窗口
/// </summary>
sealed partial class PopuForm : Form {
string _sender = string.Empty;
DateTime _date = DateTime.Now;
string _content = string.Empty;
private WebBrowser txtMessage;
/// <summary>
/// 设置新的消息,更新所有消息的list
/// </summary>
public void SetNewMessages(string sender,DateTime date,string content) {
this._sender = sender;
this._date = date;
this._content = content;
}
/// <summary>
/// 弹出窗口
/// </summary>
/// <param name="messages"></param>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
public PopuForm(string sender, DateTime date, string content)
: base() {
InitializeComponent();
this._sender = sender;
this._date = date;
this._content = content;
}
//下面是可用的常量,根据不同的动画效果声明自己需要的
private const int AW_HOR_POSITIVE = 0x0001;//自左向右显示窗口,该