|
|
@@ -2000,7 +2000,9 @@ begin
|
|
|
end;
|
|
|
{将消息内容显示在WebBrowser中}
|
|
|
//------------------------------------------------------------------------------
|
|
|
-
procedure TTalkingForm.AddMessageToWebBrowser(SenderID: string; SenderName, FontStr, MessageStr: string; SendDateTime: TDateTime; IsEncry: Boolean; ShowSendFailed: Boolean = False; IsHistory: Boolean = False);
|
|
|
+
|
|
|
+
|
|
|
+procedure TTalkingForm.AddMessageToWebBrowser(SenderID: string; SenderName, FontStr, MessageStr: string; SendDateTime: TDateTime; IsEncry: Boolean; ShowSendFailed: Boolean = False; IsHistory: Boolean = False);
|
|
|
var
|
|
|
MsgContent, HexString, HTML, SenderColor: string;
|
|
|
TextFont: TFont;
|
|
|
@@ -2012,10 +2014,10 @@ begin
|
|
|
StringToFont(FontStr, TextFont);
|
|
|
MsgContent := FilterHTMLCode(SenderName, MainForm.AllowURL);
|
|
|
if Category = tcTeam then
|
|
|
- MsgContent := MsgContent + '(<a href="OpenRightMenu,' + SenderId + '">' + Copy(SenderId, Pos('-', SenderId) + 1, Length(SenderId)) + '</a>)';
|
|
|
+ MsgContent := MsgContent + '(<a href="OpenRightMenu,' + SenderId + '">' + Copy(SenderId, Pos('-', SenderId) + 1, Length(SenderId)) + '</a>)';
|
|
|
|
|
|
if CompareDate(Now, SendDateTime) = EqualsValue then
|
|
|
- MsgContent := MsgContent + ' ' + TimeToStr(SendDateTime)
|
|
|
+ MsgContent := MsgContent + ' ' + TimeToStr(SendDateTime)
|
|
|
else
|
|
|
MsgContent := MsgContent + ' ' + DateTimeToStr(SendDateTime);
|
|
|
|
|
|
@@ -2023,13 +2025,13 @@ begin
|
|
|
MsgContent := MsgContent + '(发送消息超时)'
|
|
|
else if (not AnsiSameText(SenderID, MainForm.RealICQClient.LoginName)) and (not IsHistory) then
|
|
|
MsgContent := MsgContent + ' <a href="about:blankAddToWebRemark://_' + ID + '" title="添加至备忘录"><img src="' + ExtractFilePath(Application.ExeName) + Action_Paste_GIF + '" width="16" height="16" hspace="1" align="absBottom" border="0"></a><br>';
|
|
|
-
|
|
|
+
|
|
|
if not IsHistory then
|
|
|
begin
|
|
|
if AnsiSameText(SenderID, FReceiver) then
|
|
|
SenderColor := '#009900'
|
|
|
else
|
|
|
- SenderColor := '#0000FF';
|
|
|
+ SenderColor := '#0000FF';
|
|
|
end
|
|
|
else
|
|
|
SenderColor := '#686868';
|
|
|
@@ -2040,8 +2042,10 @@ begin
|
|
|
//设置字体
|
|
|
HTML := HTML + ';font-family:' + TextFont.Name;
|
|
|
HexString := IntToHex(TextFont.Color, 6); //获取颜色的16进制格式
|
|
|
-
HTML := HTML + ';color:#' + Copy(HexString, 5, 2) + Copy(HexString, 3, 2) + Copy(HexString, 1, 2); //将BGR颜色转换为RGB颜色
|
|
|
-
HTML := HTML + ';font-size:' + IntToStr(TextFont.Size) + 'pt';
|
|
|
+
|
|
|
+ HTML := HTML + ';color:#' + Copy(HexString, 5, 2) + Copy(HexString, 3, 2) + Copy(HexString, 1, 2); //将BGR颜色转换为RGB颜色
|
|
|
+
|
|
|
+ HTML := HTML + ';font-size:' + IntToStr(TextFont.Size) + 'pt';
|
|
|
if fsBold in TextFont.Style then
|
|
|
HTML := HTML + ';font-weight:bold';
|
|
|
if fsItalic in TextFont.Style then
|
|
|
@@ -2062,18 +2066,20 @@ begin
|
|
|
else
|
|
|
begin
|
|
|
MsgContent := FilterHTMLCode(MessageStr, MainForm.AllowURL); //过滤HTML代码
|
|
|
-
GetFaces(Self, SenderID, MsgContent, not (IsHistory or ShowSendFailed));
|
|
|
+
|
|
|
+ GetFaces(Self, SenderID, MsgContent, not (IsHistory or ShowSendFailed));
|
|
|
end;
|
|
|
//如果对方和自己的语言版本相同,则不要进行转换
|
|
|
//此处的代码,应该要移到存储消息记录到数据库之前
|
|
|
//if 自己是简体版 and 对方是繁体版 then MsgContent := BIG5toGB(MsgContent);
|
|
|
//if 自己是繁体版 and 对方是简体版 then MsgContent := GBtoBIG5(MsgContent);
|
|
|
|
|
|
+
|
|
|
HTML := HTML + '"><span id="' + ID + '">' + MsgContent + '</span> </DIV>';
|
|
|
InsertHTML(WebBrowser, HTML);
|
|
|
-end;
|
|
|
-
|
|
|
-procedure TTalkingForm.AddMessageToWebBrowserTop(SenderID: string; SenderName, FontStr, MessageStr: string; SendDateTime: TDateTime; IsEncry: Boolean; ShowSendFailed: Boolean = False; IsHistory: Boolean = False);
|
|
|
+end;
|
|
|
+
|
|
|
+procedure TTalkingForm.AddMessageToWebBrowserTop(SenderID: string; SenderName, FontStr, MessageStr: string; SendDateTime: TDateTime; IsEncry: Boolean; ShowSendFailed: Boolean = False; IsHistory: Boolean = False);
|
|
|
var
|
|
|
MsgContent, HexString, HTML, SenderColor: string;
|
|
|
TextFont: TFont;
|
|
|
@@ -2085,10 +2091,10 @@ begin
|
|
|
StringToFont(FontStr, TextFont);
|
|
|
MsgContent := FilterHTMLCode(SenderName, MainForm.AllowURL);
|
|
|
if Category = tcTeam then
|
|
|
- MsgContent := MsgContent + '(<a href="OpenRightMenu,' + SenderId + '">' + Copy(SenderId, Pos('-', SenderId) + 1, Length(SenderId)) + '</a>)';
|
|
|
+ MsgContent := MsgContent + '(<a href="OpenRightMenu,' + SenderId + '">' + Copy(SenderId, Pos('-', SenderId) + 1, Length(SenderId)) + '</a>)';
|
|
|
|
|
|
if CompareDate(Now, SendDateTime) = EqualsValue then
|
|
|
- MsgContent := MsgContent + ' ' + TimeToStr(SendDateTime)
|
|
|
+ MsgContent := MsgContent + ' ' + TimeToStr(SendDateTime)
|
|
|
else
|
|
|
MsgContent := MsgContent + ' ' + DateTimeToStr(SendDateTime);
|
|
|
|
|
|
@@ -2096,13 +2102,13 @@ begin
|
|
|
MsgContent := MsgContent + '(发送消息超时)'
|
|
|
else if (not AnsiSameText(SenderID, MainForm.RealICQClient.LoginName)) and (not IsHistory) then
|
|
|
MsgContent := MsgContent + ' <a href="about:blankAddToWebRemark://_' + ID + '" title="添加至备忘录"><img src="' + ExtractFilePath(Application.ExeName) + Action_Paste_GIF + '" width="16" height="16" hspace="1" align="absBottom" border="0"></a><br>';
|
|
|
-
|
|
|
+
|
|
|
if not IsHistory then
|
|
|
begin
|
|
|
if AnsiSameText(SenderID, FReceiver) then
|
|
|
SenderColor := '#009900'
|
|
|
else
|
|
|
- SenderColor := '#0000FF';
|
|
|
+ SenderColor := '#0000FF';
|
|
|
end
|
|
|
else
|
|
|
SenderColor := '#686868';
|
|
|
@@ -2113,8 +2119,10 @@ begin
|
|
|
//设置字体
|
|
|
HTML := HTML + ';font-family:' + TextFont.Name;
|
|
|
HexString := IntToHex(TextFont.Color, 6); //获取颜色的16进制格式
|
|
|
-
HTML := HTML + ';color:#' + Copy(HexString, 5, 2) + Copy(HexString, 3, 2) + Copy(HexString, 1, 2); //将BGR颜色转换为RGB颜色
|
|
|
-
HTML := HTML + ';font-size:' + IntToStr(TextFont.Size) + 'pt';
|
|
|
+
|
|
|
+ HTML := HTML + ';color:#' + Copy(HexString, 5, 2) + Copy(HexString, 3, 2) + Copy(HexString, 1, 2); //将BGR颜色转换为RGB颜色
|
|
|
+
|
|
|
+ HTML := HTML + ';font-size:' + IntToStr(TextFont.Size) + 'pt';
|
|
|
if fsBold in TextFont.Style then
|
|
|
HTML := HTML + ';font-weight:bold';
|
|
|
if fsItalic in TextFont.Style then
|
|
|
@@ -2135,13 +2143,15 @@ begin
|
|
|
else
|
|
|
begin
|
|
|
MsgContent := FilterHTMLCode(MessageStr, MainForm.AllowURL); //过滤HTML代码
|
|
|
-
GetFaces(Self, SenderID, MsgContent, not (IsHistory or ShowSendFailed));
|
|
|
+
|
|
|
+ GetFaces(Self, SenderID, MsgContent, not (IsHistory or ShowSendFailed));
|
|
|
end;
|
|
|
//如果对方和自己的语言版本相同,则不要进行转换
|
|
|
//此处的代码,应该要移到存储消息记录到数据库之前
|
|
|
//if 自己是简体版 and 对方是繁体版 then MsgContent := BIG5toGB(MsgContent);
|
|
|
//if 自己是繁体版 and 对方是简体版 then MsgContent := GBtoBIG5(MsgContent);
|
|
|
|
|
|
+
|
|
|
HTML := HTML + '"><span id="' + ID + '">' + MsgContent + '</span> </DIV>';
|
|
|
InsertHTMLTop(WebBrowser, HTML);
|
|
|
end;
|
|
|
@@ -2782,46 +2792,49 @@ begin
|
|
|
TalkingForms.Add(Self);
|
|
|
ImagesList := TList.Create;
|
|
|
DoubleBuffered := True;
|
|
|
- pnlClient.DoubleBuffered := True;
|
|
|
- pnlToolBar.DoubleBuffered := True;
|
|
|
+// pnlClient.DoubleBuffered := True;
|
|
|
+// pnlToolBar.DoubleBuffered := True;
|
|
|
//pnlMenu.DoubleBuffered := True;
|
|
|
|
|
|
|
|
|
-
|
|
|
- pnlUserInformation.DoubleBuffered := True;
|
|
|
- pnlTalkingArea.DoubleBuffered := True;
|
|
|
- pnlInputer.DoubleBuffered := True;
|
|
|
- pnlDisplayer.DoubleBuffered := True;
|
|
|
- pnlMyInfo.DoubleBuffered := True;
|
|
|
- pnlYourInfo.DoubleBuffered := True;
|
|
|
- pnlHint.DoubleBuffered := True;
|
|
|
- pnlForWebBrowser.DoubleBuffered := True;
|
|
|
- tsMyHeadImage.DoubleBuffered := True;
|
|
|
- tsYourHeadImage.DoubleBuffered := True;
|
|
|
- btSend.DoubleBuffered := True;
|
|
|
- WebBrowser.DoubleBuffered := False;
|
|
|
- tsYourVideo.DoubleBuffered := True;
|
|
|
- tsMyVideo.DoubleBuffered := True;
|
|
|
- ImgYourVideo.Parent.DoubleBuffered := True;
|
|
|
+ for iLoop := 0 to Self.ControlCount - 1 do
|
|
|
+ if Self.Controls[iLoop] is TWinControl then
|
|
|
+ (Self.Controls[iLoop] as TWinControl).DoubleBuffered := True;
|
|
|
+
|
|
|
+// pnlUserInformation.DoubleBuffered := True;
|
|
|
+// pnlTalkingArea.DoubleBuffered := True;
|
|
|
+// pnlInputer.DoubleBuffered := True;
|
|
|
+// pnlDisplayer.DoubleBuffered := True;
|
|
|
+// pnlMyInfo.DoubleBuffered := True;
|
|
|
+// pnlYourInfo.DoubleBuffered := True;
|
|
|
+// pnlHint.DoubleBuffered := True;
|
|
|
+// pnlForWebBrowser.DoubleBuffered := True;
|
|
|
+// tsMyHeadImage.DoubleBuffered := True;
|
|
|
+// tsYourHeadImage.DoubleBuffered := True;
|
|
|
+// btSend.DoubleBuffered := True;
|
|
|
+// WebBrowser.DoubleBuffered := False;
|
|
|
+// tsYourVideo.DoubleBuffered := True;
|
|
|
+// tsMyVideo.DoubleBuffered := True;
|
|
|
+// ImgYourVideo.Parent.DoubleBuffered := True;
|
|
|
//ImgYourVideoBorder.Parent.DoubleBuffered := True;
|
|
|
|
|
|
|
|
|
|
|
|
- ImgMyVideo.Parent.DoubleBuffered := True;
|
|
|
+// ImgMyVideo.Parent.DoubleBuffered := True;
|
|
|
//ImgMyVideoBorder.Parent.DoubleBuffered := True;
|
|
|
|
|
|
|
|
|
|
|
|
- pnlForActionToolBar.DoubleBuffered := True;
|
|
|
- pnlInputeBack.DoubleBuffered := True;
|
|
|
- RichEdInputer.DoubleBuffered := True;
|
|
|
+// pnlForActionToolBar.DoubleBuffered := True;
|
|
|
+// pnlInputeBack.DoubleBuffered := True;
|
|
|
+// RichEdInputer.DoubleBuffered := True;
|
|
|
TTalkFormController.GetController.ChangeStyle(Self);
|
|
|
for iLoop := 0 to RichEdInputer.ControlCount - 1 do
|
|
|
begin
|
|
|
if RichEdInputer.Controls[iLoop] is TWinControl then
|
|
|
TWinControl(RichEdInputer.Controls[iLoop]).DoubleBuffered := True;
|
|
|
end;
|
|
|
- RichEdInputer.Parent.DoubleBuffered := True;
|
|
|
+// RichEdInputer.Parent.DoubleBuffered := True;
|
|
|
//pnlSendButtonBack.DoubleBuffered := True;
|
|
|
|
|
|
|
|
|
@@ -5015,7 +5028,7 @@ begin
|
|
|
|
|
|
AddMessageToWebBrowserTop(FRealICQUser.LoginName, SenderName, MessageSearchResult.Font, AMessageStr, MessageSearchResult.SendDateTime, MessageSearchResult.IsEncryMessage, False, False);
|
|
|
end;
|
|
|
- if MessageList.Count > 0 then
|
|
|
+ if MessageList.Count > 0 then
|
|
|
FMaxID := TMessageSearchResult(MessageList[MessageList.Count - 1]).ID;
|
|
|
|
|
|
TRealICQUtility.FreeList(MessageList);
|