Changeset 13 for trunk/OnlinePlayers.pas


Ignore:
Timestamp:
Nov 27, 2009, 8:36:34 AM (15 years ago)
Author:
george
Message:
  • Opraveno: Všechny odkazy na starý web wow.zdechov.net opraveny na aktuální www.heroesoffantasy.cz.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/OnlinePlayers.pas

    r7 r13  
    7979  FriendSoundFile: string;
    8080  LockOnlineAddres: Boolean = True;
    81   LockAddres: string = 'http://wow.zdechov.net/stat/stat.xml';
     81  LockAddres: string = HoFOnlineListURL;
    8282
    8383  ColumnIndexSoft: integer = 0;
     
    186186        StateIndex := StrToInt(sRace) - 1;
    187187      end;
    188       //zjišťování přátel a zobrazení
     188      // Zjišťování přátel a zobrazení
    189189      for i:=0 to length(Friends) - 1 do begin
    190190        if GetLowerString(sName) = GetLowerString(Friends[i]) then begin
     
    203203    until ANode = nil;
    204204
    205     Label1.Caption := IntToStr(ListView1.Items.Count+1);
     205    Label1.Caption := IntToStr(ListView1.Items.Count + 1);
    206206    if LockOnlineAddres then begin
    207207      Form1.CoolTrayIcon1.Hint := IntToStr(ListView1.Items.Count + 1)+' hráčů';
     
    229229
    230230
    231   //zjišťování zda se připojil nový přítel
    232   if FirstDownload = false then begin
     231  // Zjišťování, zda se připojil nový přítel
     232  if FirstDownload = False then begin
    233233    if ListView2.Items.Count > length(OldOnlineFriend) then begin
    234234      if BeepAfterNewFriend then
     
    255255var
    256256  reg: TRegistry;
    257   i, count: integer;
     257  i, Count: integer;
    258258begin
    259259  Reg := TRegistry.Create;
    260260  try
    261     // načítání pozice formuláře
    262     if Reg.OpenKey(R+'FormOnlinePlayers', False) then begin
     261    // Načítání pozice formuláře
     262    if Reg.OpenKey(R + 'FormOnlinePlayers', False) then begin
    263263      Top := Reg.ReadInteger('Top');
    264264      Left := Reg.ReadInteger('Left');
     
    292292    end;
    293293
    294     if Reg.OpenKey(R+'Friends', False) then begin
    295       count := Reg.ReadInteger('Count');
    296       SetLength(Friends,count);
    297       for i:=0 to count-1 do begin
    298         Friends[i] := Reg.ReadString('Friend'+IntToStr(i));
     294    if Reg.OpenKey(R + 'Friends', False) then begin
     295      Count := Reg.ReadInteger('Count');
     296      SetLength(Friends, Count);
     297      for i:=0 to Count - 1 do begin
     298        Friends[i] := Reg.ReadString('Friend' + IntToStr(i));
    299299      end;
    300300    end;
     
    391391  case ColumnIndexSoft of
    392392    1:begin
    393         if StrToInt(ListView1.Items[0].SubItems[0]) > StrToInt(ListView1.Items[ListView1.Items.count-1].SubItems[0]) then
    394           Compare := -OrderNumber(Item1, Item2,Compare)
     393        if StrToInt(ListView1.Items[0].SubItems[0]) > StrToInt(ListView1.Items[ListView1.Items.count - 1].SubItems[0]) then
     394          Compare := -OrderNumber(Item1, Item2, Compare)
    395395        else
    396           Compare := OrderNumber(Item1, Item2,Compare);
     396          Compare := OrderNumber(Item1, Item2, Compare);
    397397      end;
    398398    2:begin
    399       if AnsiCompareText(ListView1.Items[0].SubItems[1], ListView1.Items[ListView1.Items.count-1].SubItems[1]) = -1 then
    400         Compare := OrderMap(Item1, Item2,Compare)
     399      if AnsiCompareText(ListView1.Items[0].SubItems[1], ListView1.Items[ListView1.Items.count - 1].SubItems[1]) = -1 then
     400        Compare := OrderMap(Item1, Item2, Compare)
    401401      else
    402         Compare := -OrderMap(Item1, Item2,Compare);
     402        Compare := -OrderMap(Item1, Item2, Compare);
    403403      end;
    404404    3:begin
    405       if AnsiCompareText(ListView1.Items[0].SubItems[2], ListView1.Items[ListView1.Items.count-1].SubItems[2]) = -1 then
    406         Compare := OrderZone(Item1, Item2,Compare)
     405      if AnsiCompareText(ListView1.Items[0].SubItems[2], ListView1.Items[ListView1.Items.count - 1].SubItems[2]) = -1 then
     406        Compare := OrderZone(Item1, Item2, Compare)
    407407      else
    408         Compare := -OrderZone(Item1, Item2,Compare);
     408        Compare := -OrderZone(Item1, Item2, Compare);
    409409      end;
    410410  else
    411411    if AnsiCompareText(ListView1.Items[0].Caption, ListView1.Items[ListView1.Items.count-1].Caption) = -1 then
    412       Compare := Order(Item1, Item2,Compare)
     412      Compare := Order(Item1, Item2, Compare)
    413413    else
    414       Compare := -Order(Item1, Item2,Compare);
     414      Compare := -Order(Item1, Item2, Compare);
    415415  end;
    416416end;
     
    784784  if Assigned(ListView1.Selected) then begin
    785785    if IsStringInArray(ListView1.Selected.Caption,Friends) then begin
    786       SetLength(Friends,length(Friends)+1);
    787       Friends[length(Friends)-1] := ListView1.Selected.Caption;
     786      SetLength(Friends,length(Friends) + 1);
     787      Friends[length(Friends) - 1] := ListView1.Selected.Caption;
    788788      with ListView2.Items.Add do begin
    789789        Caption := ListView1.Selected.Caption;
     
    812812  if DragDown then begin
    813813    GetCursorPos(Position);
    814     if Position.y-Top-Panel2.Height < Height-38 then
    815       Panel2.Top := Position.Y-Top-Panel2.Height-16
     814    if Position.Y - Top - Panel2.Height < Height - 38 then
     815      Panel2.Top := Position.Y - Top - Panel2.Height - 16
    816816    else
    817       Panel2.Top := Height-35;
     817      Panel2.Top := Height - 35;
    818818    DrawForm;
    819819  end;
     
    828828procedure TForm5.DrawForm;
    829829begin
    830   ListView1.Height := Panel2.Top-20;
    831   ListView2.Top := Panel2.Top+Panel2.Height;
    832   ListView2.Height := Height-Panel2.Top-Panel2.Height-20;
     830  ListView1.Height := Panel2.Top - 20;
     831  ListView2.Top := Panel2.Top + Panel2.Height;
     832  ListView2.Height := Height - Panel2.Top - Panel2.Height - 20;
    833833
    834834end;
     
    841841begin
    842842  NewFriend := True;
    843   for i:=0 to length(ArrayOfString)-1 do begin
     843  for i := 0 to length(ArrayOfString) - 1 do begin
    844844    if (GetLowerString(Find) = GetLowerString(ArrayOfString[i])) then
    845       NewFriend := false;
     845      NewFriend := False;
    846846  end;
    847847
     
    884884  YetWas := False;
    885885  if Assigned(ListView2.Selected) then begin
    886     for i:=0 to High(Friends) do begin
     886    for i := 0 to High(Friends) do begin
    887887      if YetWas then
    888         Friends[i-1] := Friends[i];
     888        Friends[i - 1] := Friends[i];
    889889
    890890      if (GetLowerString(Friends[i]) = GetLowerString(ListView2.Selected.Caption)) then
    891891        YetWas := true;
    892892    end;
    893     SetLength(Friends,Length(Friends)-1);
     893    SetLength(Friends, Length(Friends) - 1);
    894894    ListView2.Selected.Delete;
    895895  end;
     
    901901  MousePos: TPoint;
    902902begin
    903   if Assigned(ListView2.GetItemAt(x,y)) and (Button = mbRight) then begin
     903  if Assigned(ListView2.GetItemAt(x, y)) and (Button = mbRight) then begin
    904904    GetCursorPos(MousePos);
    905     PopupMenu3.Popup(MousePos.X,MousePos.y);
     905    PopupMenu3.Popup(MousePos.X, MousePos.y);
    906906  end;
    907907end;
Note: See TracChangeset for help on using the changeset viewer.