Explorar o código

CodingFrom ListView设置颜色的数组下标出错

lqq %!s(int64=9) %!d(string=hai) anos
pai
achega
a83f5fa708
Modificáronse 4 ficheiros con 5 adicións e 10 borrados
  1. 1 1
      Client/Group/GroupProtocols.pas
  2. 1 5
      Client/Lxtalk.dproj
  3. BIN=BIN
      Client/Lxtalk.res
  4. 3 4
      Log/CodingFrom.pas

+ 1 - 1
Client/Group/GroupProtocols.pas

@@ -82,7 +82,7 @@ begin
   FProtocols.AddObject(MEMBER_REPLY_P2P, TMemberReplyP.Create(AClient));
 
 //  FProtocols.AddObject(MESSAGE_SAY_REQUEST, TBaseProcess.Create(nil));
-  FProtocols.AddObject(MESSAGE_SAY_RESPONSE, TBaseProcess.Create(AClient));
+//  FProtocols.AddObject(MESSAGE_SAY_RESPONSE, TBaseProcess.Create(AClient));
   FProtocols.AddObject(MESSAGE_SAY_BROADCAST, TMessageBroadcast.Create(AClient));
   FProtocols.AddObject(MESSAGE_OFFLINE_RESPONSE, TOfflineMessageResponse.Create(AClient));
 

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 5
Client/Lxtalk.dproj


BIN=BIN
Client/Lxtalk.res


+ 3 - 4
Log/CodingFrom.pas

@@ -69,14 +69,13 @@ end;
 
 procedure TCodingLoggerForm.lv1AdvancedCustomDrawItem(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage; var DefaultDraw: Boolean);
 begin
-  if SameText(Item.SubItems[2], 'error') then
+  if (Item.SubItems.Count < 3) then
+    Exit;
+  if (SameText(Item.SubItems[2], 'error')) then
   begin
     Sender.Canvas.Brush.Color := $0000FF;
     Sender.Canvas.Font.Color := clWhite;
   end
-  else
-
-
 end;
 
 end.