Changeset 4


Ignore:
Timestamp:
May 15, 2009, 9:08:00 AM (15 years ago)
Author:
george
Message:
  • Upraveno: Nyní určeno pro novější verzi Delphi zdarma Turbo Delphi.
  • Opraveno: Odkaz na RSS kanál aktualit webu.
  • Opraveno: Odkaz na web projektu.
  • Opraveno: Chyby uvolňování paměti při práci s bitmapami. Použití Assign namísto := a následně Free.
  • Upraveno: Zakomentovány odkazy na uzavřenou komponentu WinSkin. Nejsou dostupné zdrojové kódy, nelze doinstalovat správně do Turbo Delphi.
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • /

    • Property svn:ignore set to
      *.dcu
      HoFclient.dsk
      HoFclient.exe
      *.~dsk
  • HoFclient.dpr

    r2 r4  
    1717
    1818begin
     19  {$WARN SYMBOL_PLATFORM OFF}
     20  ReportMemoryLeaksOnShutdown := DebugHook <> 0;
     21  {$WARN SYMBOL_PLATFORM ON}
    1922  Application.Initialize;
    2023  Application.CreateForm(TForm1, Form1);
  • ImportZWebu.dfm

    r1 r4  
    5858  end
    5959  object IdHTTP1: TIdHTTP
    60     MaxLineAction = maException
    61     ReadTimeout = 0
    6260    AllowCookies = True
    6361    ProxyParams.BasicAuthentication = False
  • Main.dfm

    r1 r4  
    22  Left = 334
    33  Top = 74
    4   Width = 356
    5   Height = 231
    64  Caption = 'Heroes of Fantasy - Client'
     5  ClientHeight = 254
     6  ClientWidth = 389
    77  Color = clBtnFace
    88  Font.Charset = DEFAULT_CHARSET
     
    1515  OnCloseQuery = FormCloseQuery
    1616  OnCreate = FormCreate
     17  OnDestroy = FormDestroy
    1718  OnResize = FormResize
    1819  DesignSize = (
    19     348
    20     177)
     20    389
     21    254)
    2122  PixelsPerInch = 96
    2223  TextHeight = 13
    2324  object Label1: TLabel
    24     Left = 241
     25    Left = 282
    2526    Top = 4
    2627    Width = 5
     
    3334    Font.Style = [fsBold]
    3435    ParentFont = False
     36    ExplicitLeft = 241
    3537  end
    3638  object Label2: TLabel
    37     Left = 241
     39    Left = 282
    3840    Top = 20
    3941    Width = 3
    4042    Height = 13
    4143    Anchors = [akTop, akRight]
     44    ExplicitLeft = 241
    4245  end
    4346  object StatusBar1: TStatusBar
    4447    Left = 162
    45     Top = 158
    46     Width = 186
     48    Top = 215
     49    Width = 227
    4750    Height = 19
    4851    Align = alNone
     
    5356  object Panel1: TPanel
    5457    Left = 0
    55     Top = 158
     58    Top = 215
    5659    Width = 161
    5760    Height = 19
     
    394397  end
    395398  object RichEdit1: TRichEdit
    396     Left = 241
     399    Left = 282
    397400    Top = 36
    398401    Width = 105
    399     Height = 101
     402    Height = 158
    400403    Anchors = [akTop, akRight, akBottom]
    401404    BorderStyle = bsNone
     
    415418  end
    416419  object Button1: TButton
    417     Left = 299
    418     Top = 140
     420    Left = 340
     421    Top = 197
    419422    Width = 46
    420423    Height = 17
     
    428431    Left = 0
    429432    Top = 0
    430     Width = 228
    431     Height = 158
     433    Width = 269
     434    Height = 215
    432435    Hint =
    433436      'Poklep'#225'n'#237'm se p'#345'ipoj'#237'te na dan'#253' server, uk'#225'z'#225'n'#237'm zobraz'#237'te infor' +
     
    447450        Width = 120
    448451      end>
    449     Items.Data = {
    450       6B0000000100000001000000FFFFFFFFFFFFFFFF020000000000000011486572
    451       6F6573206F662046616E746173790F776F772E7A646563686F762E6E65742863
    452       3A5C50726F6772616D2046696C65735C576F726C644F6657617263726166745C
    453       776F772E657865FFFFFFFF}
    454452    LargeImages = ImageList32
    455453    ReadOnly = True
     
    465463  end
    466464  object Panel2: TPanel
    467     Left = 227
     465    Left = 268
    468466    Top = 0
    469467    Width = 9
    470     Height = 158
     468    Height = 215
    471469    Cursor = crHSplit
    472470    Hint = 'K schov'#225'n'#237' detajl'#367' p'#345'et'#225'hn'#283'te k prav'#233'mu okraji'
     
    817815    end
    818816  end
    819   object SkinData1: TSkinData
    820     Active = False
    821     DisableTag = 99
    822     SkinControls = [xcMainMenu, xcPopupMenu, xcToolbar, xcControlbar, xcCombo, xcCheckBox, xcRadioButton, xcProgress, xcScrollbar, xcEdit, xcButton, xcBitBtn, xcSpeedButton, xcSpin, xcPanel, xcGroupBox, xcStatusBar, xcTab, xcTrackBar, xcSystemMenu]
    823     Options = [xoPreview, xoToolbarBK]
    824     Skin3rd.Strings = (
    825       'TCategoryButtons=scrollbar'
    826       'TPngBitBtn=pngbitbtn'
    827       'TVirtualStringTree=scrollbar'
    828       'TVirtualDrawTree=scrollbar'
    829       'TTBXDockablePanel=Panel'
    830       'TAdvPanelGroup=scrollbar'
    831       'TComboboxex=combobox'
    832       'TRxSpeedButton=speedbutton'
    833       'THTMLViewer=scrollbar'
    834       'TDBCtrlGrid=scrollbar'
    835       'TfrSpeedButton=speedbutton'
    836       'TfrTBButton=speedbutton'
    837       'TControlBar=Panel'
    838       'TTBDock=Panel'
    839       'TTBToolbar=Panel'
    840       'TImageEnMView=scrollbar'
    841       'TImageEnView=scrollbar'
    842       'TAdvMemo=scrollbar'
    843       'TDBAdvMemo=scrollbar'
    844       'TcxDBLookupComboBox=combobox'
    845       'TcxDBComboBox=combobox'
    846       'TcxDBDateEdit=combobox'
    847       'TcxDBImageComboBox=combobox'
    848       'TcxDBCalcEdit=combobox'
    849       'TcxDBBlobEdit=combobox'
    850       'TcxDBPopupEdit=combobox'
    851       'TcxDBFontNameComboBox=combobox'
    852       'TcxDBShellComboBox=combobox'
    853       'TRxLookupEdit=combobox'
    854       'TRxDBLookupCombo=combobox'
    855       'TRzGroup=panel'
    856       'TRzButton=button'
    857       'TRzBitbtn=bitbtn'
    858       'TRzMenuButton=menubtn'
    859       'TRzCheckGroup=CheckGroup'
    860       'TRzRadioGroup=Radiogroup'
    861       'TRzButtonEdit=Edit'
    862       'TRzDBRadioGroup=Radiogroup'
    863       'TRzDBRadioButton=Radiobutton'
    864       'TRzDateTimeEdit=combobox'
    865       'TRzColorEdit=combobox'
    866       'TRzDateTimePicker=combobox'
    867       'TRzDBDateTimeEdit=combobox'
    868       'TRzDbColorEdit=combobox'
    869       'TRzDBDateTimePicker=combobox'
    870       'TLMDButton=bitbtn'
    871       'TLMDGroupBox=Groupbox'
    872       'TDBCheckboxEh=Checkbox'
    873       'TDBCheckboxEh=Checkbox'
    874       'TLMDCHECKBOX=Checkbox'
    875       'TLMDDBCHECKBOX=Checkbox'
    876       'TLMDRadiobutton=Radiobutton'
    877       'TLMDCalculator=panel'
    878       'TLMDGROUPBOX=Panel'
    879       'TLMDSIMPLEPANEL=Panel'
    880       'TLMDDBCalendar=Panel'
    881       'TLMDButtonPanel=Panel'
    882       'TLMDLMDCalculator=Panel'
    883       'TLMDHeaderPanel=Panel'
    884       'TLMDTechnicalLine=Panel'
    885       'TLMDLMDClock=Panel'
    886       'TLMDTrackbar=panel'
    887       'TLMDListCombobox=combobox'
    888       'TLMDCheckListCombobox=combobox'
    889       'TLMDHeaderListCombobox=combobox'
    890       'TLMDImageCombobox=combobox'
    891       'TLMDColorCombobox=combobox'
    892       'TLMDFontCombobox=combobox'
    893       'TLMDFontSizeCombobox=combobox'
    894       'TLMDFontSizeCombobox=combobox'
    895       'TLMDPrinterCombobox=combobox'
    896       'TLMDDriveCombobox=combobox'
    897       'TLMDCalculatorComboBox=combobox'
    898       'TLMDTrackBarComboBox=combobox'
    899       'TLMDCalendarComboBox=combobox'
    900       'TLMDTreeComboBox=combobox'
    901       'TLMDRADIOGROUP=radiogroup'
    902       'TLMDCheckGroup=CheckGroup'
    903       'TLMDDBRADIOGROUP=radiogroup'
    904       'TLMDDBCheckGroup=CheckGroup'
    905       'TLMDCalculatorEdit=edit'
    906       'TLMDEDIT=Edit'
    907       'TLMDMASKEDIT=Edit'
    908       'TLMDBROWSEEDIT=Edit'
    909       'TLMDEXTSPINEDIT=Edit'
    910       'TLMDCALENDAREDIT=Edit'
    911       'TLMDFILEOPENEDIT=Edit'
    912       'TLMDFILESAVEEDIT=Edit'
    913       'TLMDCOLOREDIT=Edit'
    914       'TLMDDBEDIT=Edit'
    915       'TLMDDBMASKEDIT=Edit'
    916       'TLMDDBEXTSPINEDIT=Edit'
    917       'TLMDDBSPINEDIT=Edit'
    918       'TLMDDBEDITDBLookup=Edit'
    919       'TLMDEDITDBLookup=Edit'
    920       'TDBLookupCombobox=Combobox'
    921       'TWWDBCombobox=Combobox'
    922       'TWWDBLookupCombo=Combobox'
    923       'TWWDBCombobox=Combobox'
    924       'TWWKeyCombo=Combobox'
    925       'TWWTempKeyCombo=combobox'
    926       'TWWDBDateTimePicker=Combobox'
    927       'TWWRADIOGROUP=radiogroup'
    928       'TWWDBEDIT=Edit'
    929       'TcxButton=bitbtn'
    930       'TcxDBRadioGroup=radiogroup'
    931       'TcxRadioGroup=radiogroup'
    932       'TcxGroupbox=groupbox'
    933       'TOVCPICTUREFIELD=Edit'
    934       'TOVCDBPICTUREFIELD=Edit'
    935       'TOVCSLIDEREDIT=Edit'
    936       'TOVCDBSLIDEREDIT=Edit'
    937       'TOVCSIMPLEFIELD=Edit'
    938       'TOVCDBSIMPLEFIELD=Edit'
    939       'TO32DBFLEXEDIT=Edit'
    940       'TOVCNUMERICFIELD=Edit'
    941       'TOVCDBNUMERICFIELD=Edit')
    942     SkinStore = '(none)'
    943     SkinFormtype = sfMainform
    944     Version = '4.04.04.11'
    945     MenuUpdate = True
    946     MenuMerge = False
    947     Left = 10
    948     Top = 10
    949     SkinStream = {00000000}
    950   end
    951817  object ImageList16default: TImageList
    952818    Left = 40
    953819    Top = 72
    954820    Bitmap = {
    955       494C010102000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
     821      494C010102000300040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
    956822      0000000000003600000028000000400000001000000001002000000000000010
    957823      00000000000000000000000000000000000000000000F2F2F200E9E7E400DFDB
     
    1098964    Top = 72
    1099965    Bitmap = {
    1100       494C010102000400040020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
     966      494C010102000300040020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
    1101967      0000000000003600000028000000800000002000000001002000000000000040
    1102968      0000000000000000000000000000000000000000000000000000F2F2F200F1F1
     
    16531519  end
    16541520  object IdHTTP1: TIdHTTP
    1655     MaxLineAction = maException
    1656     ReadTimeout = 0
    16571521    AllowCookies = True
    16581522    ProxyParams.BasicAuthentication = False
    16591523    ProxyParams.ProxyPort = 0
    16601524    Request.ContentLength = -1
    1661     Request.ContentRangeEnd = 0
    1662     Request.ContentRangeStart = 0
    16631525    Request.ContentType = 'text/html'
    16641526    Request.Accept = 'text/html, */*'
     
    16841546  object IdIcmpClient1: TIdIcmpClient
    16851547    ReceiveTimeout = 3000
     1548    Protocol = 1
     1549    ProtocolIPv6 = 58
     1550    IPVersion = Id_IPv4
     1551    PacketSize = 1024
    16861552    OnReply = IdIcmpClient1Reply
    16871553    Left = 48
  • Main.pas

    r2 r4  
    66  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    77  Dialogs, StdCtrls, Menus, ImgList, ComCtrls, XPMan, CoolTrayIcon, Registry, ShellApi,
    8   WinSkinData, ExtCtrls, xmldom, XMLIntf, msxmldom, XMLDoc,
     8  //WinSkinData,
     9  ExtCtrls, xmldom, XMLIntf, msxmldom, XMLDoc,
    910  IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, RichEdit,
    1011  IdRawBase, IdRawClient, IdIcmpClient, MPlayer;
     12
     13const
     14  ApplicationVersion = '3.3';
     15  ApplicationRevision = 5;
     16  R = '\Software\maronsoft\Heroes of Fantasy client pack\';
     17  UpdateInfoFile = 'http://wow.zdechov.net/client/aktualizace.txt';
     18  DefaultRSSChannel = 'http://wow.zdechov.net/rss.php?category=articles';
     19  OldRSSChannel = 'http://wow.zdechov.net/rss.php';
    1120
    1221type
     
    2332  protected
    2433    procedure Execute; override;
    25   end;
    26 
    27 type
     34    procedure Update;
     35  end;
     36
     37  TServer = record
     38    Name: string;
     39    Address: string;
     40    ExeFile: string;
     41    Image: string;
     42    Description: string;
     43    OnlinePlayersAddress: string;
     44  end;
     45
    2846  TForm1 = class(TForm)
    2947    MainMenu1: TMainMenu;
     
    5674    Editovatoznaen2: TMenuItem;
    5775    Smazat1: TMenuItem;
    58     SkinData1: TSkinData;
    5976    ImageList16default: TImageList;
    6077    ImageList32default: TImageList;
     
    165182    procedure Importzwowstatusnet2Click(Sender: TObject);
    166183    procedure Zkoprovatfonty1Click(Sender: TObject);
     184    procedure FormDestroy(Sender: TObject);
    167185  private
    168186    { Private declarations }
     
    177195
    178196    // veřejné proměné
    179     Servers: array of record
    180       Name: string;
    181       Address: string;
    182       ExeFile: string;
    183       Image: string;
    184       Description: string;
    185       OnlinePlayersAddress: string;
    186     end;
     197    Servers: array of TServer;
    187198
    188199    //obecné procedury
     
    217228  end;
    218229
    219 const
    220   ApplicationVersion = '3.2';
    221   ApplicationRevision = 5;
    222   R = '\Software\maronsoft\Heroes of Fantasy client pack\';
    223   UpdateInfoFile = 'http://wow.zdechov.net/client/aktualizace.txt';
    224 
    225230var
    226231  Form1: TForm1;
     
    235240  ShowDetails: Boolean = False;
    236241 // MakePing: boolean = True;
    237   RSSAddress: string = 'http://wow.zdechov.net/rss.php';
     242  RSSAddress: string;
    238243  CopyFonts: Boolean = True;
    239244
     
    247252  Desktop: TRect;
    248253
    249   // veřejné přoměné
    250   vlakno: TVlakno;
     254  Vlakno: TVlakno;
    251255
    252256implementation
     
    361365procedure TForm1.FormCreate(Sender: TObject);
    362366begin
    363   //Načítání nastavení a vypsání
     367  Vlakno := TVlakno.Create(True);
     368
     369  // Načítání nastavení a vypsání
    364370  LoadRegOptions;
    365371  LoadRegServers;
     
    367373  WriteServers;
    368374
    369   //Akce na záhladě nastavení
     375  // Akce na záhladě nastavení
    370376  if StartMinimalize then
    371377    Application.ShowMainForm := False;
    372378
    373   //ostatní
     379  // ostatní
    374380  Form1.Caption := Form1.Caption+' '+ApplicationVersion;
    375381  SystemParametersInfo(SPI_GETWORKAREA, 0, @Desktop, 0);
    376382  InitRichEditURLDetection(RichEdit1);
    377383
    378   //zjištění aktualizace
     384  // zjištění aktualizace
    379385  if UpdateApplication then
    380386    if NeedUpdate then
    381387      ProcedureUpdateApplication;
     388end;
     389
     390procedure TForm1.FormDestroy(Sender: TObject);
     391begin
     392  Vlakno.WaitFor;
     393  Vlakno.Free;
    382394end;
    383395
     
    450462  MyTextFile: TextFile;
    451463begin
     464  try
    452465    AssignFile(MyTextFile, ExtractFileDir(Servers[SeverIndex].ExeFile)+'\realmlist.wtf');
    453466    Rewrite(MyTextFile);
     
    466479    if AfterWoWStartMinimalize then
    467480      Application.Minimize;
     481  except
     482    raise Exception.Create('Nepodařilo se spustit hru pro připojení k serveru ' + Servers[SeverIndex].Name + '.');
     483  end;
    468484end;
    469485
     
    485501  Form4.Edit3.Text := GetWoWExeFile;
    486502  BitMap := TBitmap.Create;
    487   ImageList32default.GetBitmap(0,BitMap);
    488   Form4.Image1.Picture.Graphic := BitMap;
     503  ImageList32default.GetBitmap(0, BitMap);
     504  Form4.Image1.Picture.Graphic.Assign(BitMap);
     505  BitMap.Free;
    489506end;
    490507
     
    530547        if FileExists(Servers[i].Image) then begin
    531548          BitMap.LoadFromFile(Servers[i].Image);
    532           ResizeBitmap(BitMap,BitMap2,32,32);
    533           ImageList32.Add(BitMap2,nil);
    534           ResizeBitmap(BitMap2,BitMap,16,16);
    535           ImageList16.Add(BitMap,nil);
     549          ResizeBitmap(BitMap, BitMap2, 32, 32);
     550          ImageList32.Add(BitMap2, nil);
     551          ResizeBitmap(BitMap2,BitMap, 16, 16);
     552          ImageList16.Add(BitMap, nil);
    536553        end;
    537554      end else begin                             //todo dodělat pro ikony
    538555      end;
    539556    end;
     557    Bitmap.Free;
     558    Bitmap2.Free;
    540559  end;
    541560end;
     
    558577      if ImageFile = '1' then begin
    559578        BitMap := TBitmap.Create;
    560         ImageList32default.GetBitmap(1,BitMap);
    561         Form4.Image1.Picture.Graphic := BitMap;
     579        ImageList32default.GetBitmap(1, BitMap);
     580        Form4.Image1.Picture.Graphic.Assign(BitMap);
     581        BitMap.Free;
    562582      end else begin
    563583        if FileExists(ImageFile) then begin
     
    568588        BitMap := TBitmap.Create;
    569589        Form1.ImageList32default.GetBitmap(0,BitMap);
    570         Form4.Image1.Picture.Graphic := BitMap;
     590        Form4.Image1.Picture.Graphic.Assign(Bitmap);
     591        BitMap.Free;
    571592    end;
    572593  end;
     
    654675      ShowDetails := Reg.ReadBool('ShowDetails');
    655676      if reg.ValueExists('RSSAddress') then RSSAddress := Reg.ReadString('RSSAddress');
     677      if RSSAddress = OldRSSChannel then RSSAddress := DefaultRSSChannel; // Přesměrování na novou adresu RSS
     678     
    656679      if reg.ValueExists('Ping') then Timer4.Enabled := Reg.ReadBool('Ping');
    657680    end;
     
    665688    //skiny
    666689    if Reg.OpenKey(R+'CheckBox3', False) then begin
    667       SkinData1.Active := Reg.ReadBool('Boolean');
     690      //SkinData1.Active := Reg.ReadBool('Boolean');
    668691    end;
    669692    if Reg.OpenKey(R+'skiny', False) then begin
    670693      if reg.ValueExists('skiny') then begin
    671         SkinData1.SkinFile := Reg.ReadString('Skiny');
     694        //SkinData1.SkinFile := Reg.ReadString('Skiny');
    672695      end else
    673         SkinData1.Active := False;
     696        //SkinData1.Active := False;
    674697    end;
    675698
     
    807830    //skiny
    808831    if Reg.OpenKey(R+'CheckBox3', True) then begin
    809       Reg.WriteBool('Boolean',SkinData1.Active);
     832      //Reg.WriteBool('Boolean',SkinData1.Active);
    810833    end;
    811834    if Reg.OpenKey(R+'skiny', True) then begin
    812         Reg.WriteString('Skiny',SkinData1.SkinFile);
     835        //Reg.WriteString('Skiny',SkinData1.SkinFile);
    813836    end;
    814837
     
    10071030begin
    10081031  SetLength(Servers,length(Servers)+1);
    1009 
    1010         Servers[length(Servers)-1].Name := 'Heroes of Fantasy';
    1011         Servers[length(Servers)-1].Address := 'wow.zdechov.net';
    1012         Servers[length(Servers)-1].OnlinePlayersAddress := 'http://wow.zdechov.net/stat/stat.xml';
    1013         Servers[length(Servers)-1].ExeFile := GetWoWExeFile;
    1014         Servers[length(Servers)-1].Image := '1';
    1015         Servers[length(Servers)-1].Description := 'Heroes of Fantasy - Free server'+chr(13)+chr(10)+' 2x XP'+chr(13)+chr(10)+'web: http://wow.zdechov.net/'+chr(13)+chr(10)+'reamlist: wow.zdechov.net';
     1032  with Servers[length(Servers) - 1] do begin
     1033    Name := 'Heroes of Fantasy';
     1034    Address := 'wow.zdechov.net';
     1035    OnlinePlayersAddress := 'http://wow.zdechov.net/stat/stat.xml';
     1036    ExeFile := GetWoWExeFile;
     1037    Image := '1';
     1038    Description := 'Heroes of Fantasy - Free server'+chr(13)+chr(10)+' 2x XP'+chr(13)+chr(10)+'web: http://wow.zdechov.net/'+chr(13)+chr(10)+'realmlist: wow.zdechov.net';
     1039  end;
    10161040  WriteImages;
    10171041  WriteServers;
     
    10991123procedure TForm1.ShowWeb;
    11001124begin
    1101   ShellExecute(Handle, 'open', PChar('http://wow.zdechov.net/client/'), nil, nil, SW_SHOWNORMAL);
     1125  ShellExecute(Handle, 'open', PChar('http://wow.zdechov.net/?page=client/'), nil, nil, SW_SHOWNORMAL);
    11021126end;
    11031127
     
    14961520  const AReplyStatus: TReplyStatus);
    14971521begin
    1498     if AReplyStatus.MsRoundTripTime > IdIcmpClient1.ReceiveTimeout then begin
    1499       Label2.Caption := 'Ofline';
     1522    if AReplyStatus.MsRoundTripTime > Cardinal(IdIcmpClient1.ReceiveTimeout) then begin
     1523      Label2.Caption := 'Offline';
    15001524      Label2.Font.Color := clRed;
    15011525    end else begin
     
    15041528        Label2.Caption := 'Odezva: <1 ms'
    15051529      else
    1506         Label2.Caption := 'Odezva: '+IntToStr(AReplyStatus.MsRoundTripTime)+'  ms';
    1507     end;
    1508 end;
    1509 
    1510 { TVlakno }
    1511 
    1512 procedure TVlakno.Execute;
    1513 begin
    1514   if Form1.IdIcmpClient1.Host <> '' then begin
    1515         try
    1516           Form1.IdIcmpClient1.Ping;
    1517         except
    1518           Form1.Label2.Caption := 'Ofline';
    1519           Form1.Label2.Font.Color := clRed;
    1520         end;
    1521   end;
     1530        Label2.Caption := 'Odezva: ' + IntToStr(AReplyStatus.MsRoundTripTime) + '  ms';
     1531    end;
    15221532end;
    15231533
    15241534procedure TForm1.Timer4Timer(Sender: TObject);
    15251535begin
    1526          // vlakno.Terminate;
    15271536  Timer4.Interval := 4000;
    1528   Vlakno := TVlakno.Create(true);
    1529   vlakno.Resume;
    1530          // vlakno.Execute;
    1531 
     1537  Vlakno.Free;
     1538  Vlakno := TVlakno.Create(True);
     1539  Vlakno.Resume;
     1540  Vlakno.WaitFor;
    15321541end;
    15331542
     
    16391648end;
    16401649
     1650{ TVlakno }
     1651
     1652procedure TVlakno.Execute;
     1653begin
     1654  if Form1.IdIcmpClient1.Host <> '' then
     1655    try
     1656      Form1.IdIcmpClient1.Ping;
     1657    except
     1658      Synchronize(Update);
     1659    end;
     1660end;
     1661
     1662procedure TVlakno.Update;
     1663begin
     1664  Form1.Label2.Caption := 'Offline';
     1665  Form1.Label2.Font.Color := clRed;
     1666end;
     1667
    16411668end.
  • News.dfm

    r1 r4  
    22  Left = 334
    33  Top = 304
    4   Width = 356
    5   Height = 373
    64  BorderStyle = bsSizeToolWin
    75  Caption = 'Aktuality - Heroes Of Fantasy'
     6  ClientHeight = 347
     7  ClientWidth = 348
    88  Color = clBtnFace
    99  Font.Charset = DEFAULT_CHARSET
     
    1818  DesignSize = (
    1919    348
    20     339)
     20    347)
    2121  PixelsPerInch = 96
    2222  TextHeight = 13
     
    8282    Top = 48
    8383    Bitmap = {
    84       494C010102000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
     84      494C010102000300040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
    8585      0000000000003600000028000000400000001000000001002000000000000010
    8686      0000000000000000000000000000000000000000000000000000000000000000
  • News.pas

    r1 r4  
    178178  XMLDocument1.Active:=True;
    179179
    180   ANode := XMLDocument1.DocumentElement.ChildNodes.First.ChildNodes.FindNode('item') ;
    181 
     180  ANode := XMLDocument1.DocumentElement.ChildNodes.First.ChildNodes.FindNode('item');
    182181  repeat
    183182    STitle := ANode.ChildNodes['title'].Text;
     
    195194  until ANode = nil;
    196195
     196  HaveNewNews := False;
    197197  if Length(News) = 0 then begin
    198198    SetLength(News,length(NewNews));
     
    204204    end;
    205205  end else begin
    206     for i:=0 to length(NewNews)-1 do begin
     206    for i := 0 to length(NewNews) - 1 do begin
    207207      if News[i].pubDate = NewNews[i].pubDate then begin
    208208
     
    347347
    348348    //ukládání velikosti panelů a zobrazení
     349    i := 0;
    349350    if Reg.OpenKey(R+'Newsdisplay', True) then begin
    350351      if ListView1.ViewStyle = vsIcon then
  • Options.dfm

    r1 r4  
    22  Left = 396
    33  Top = 139
    4   Width = 416
    5   Height = 385
    64  Caption = 'Nastaveni'
     5  ClientHeight = 351
     6  ClientWidth = 408
    77  Color = clBtnFace
    88  Font.Charset = DEFAULT_CHARSET
     
    6868    object TabSheet1: TTabSheet
    6969      Caption = 'Nastaven'#237' programu'
     70      ExplicitLeft = 0
     71      ExplicitTop = 0
     72      ExplicitWidth = 0
     73      ExplicitHeight = 0
    7074      object CheckBox1: TCheckBox
    7175        Left = 16
     
    137141      Caption = 'Online hr'#225#269'i'
    138142      ImageIndex = 1
     143      ExplicitLeft = 0
     144      ExplicitTop = 0
     145      ExplicitWidth = 0
     146      ExplicitHeight = 0
    139147      object Label3: TLabel
    140148        Left = 240
     
    390398      Caption = 'Aktuality'
    391399      ImageIndex = 2
     400      ExplicitLeft = 0
     401      ExplicitTop = 0
     402      ExplicitWidth = 0
     403      ExplicitHeight = 0
    392404      object Label1: TLabel
    393405        Left = 16
     
    553565      Caption = 'Skiny'
    554566      ImageIndex = 3
     567      ExplicitLeft = 0
     568      ExplicitTop = 0
     569      ExplicitWidth = 0
     570      ExplicitHeight = 0
    555571      object Button3: TButton
    556572        Left = 294
     
    592608      Caption = 'Servery'
    593609      ImageIndex = 4
     610      ExplicitLeft = 0
     611      ExplicitTop = 0
     612      ExplicitWidth = 0
     613      ExplicitHeight = 0
    594614      object CheckBox10: TCheckBox
    595615        Left = 16
  • Options.pas

    r1 r4  
    135135  end;
    136136  CheckBox5.Checked := UpdateApplication;
    137   CheckBox3.Checked := Form1.SkinData1.Active;
    138   Edit1.Text := Form1.SkinData1.SkinFile;
     137  //CheckBox3.Checked := Form1.SkinData1.Active;
     138  //Edit1.Text := Form1.SkinData1.SkinFile;
    139139  CheckBox10.Checked := ShowDetails;
    140140  CheckBox4.Checked := Form1.Timer4.Enabled;
     
    207207  AfterWoWStartMinimalize := RadioButton1.Checked;
    208208  UpdateApplication := CheckBox5.Checked;
    209   Form1.SkinData1.Active := CheckBox3.Checked;
     209  //Form1.SkinData1.Active := CheckBox3.Checked;
    210210  ShowDetails := CheckBox10.Checked;
    211211  Form1.Timer4.Enabled := CheckBox4.Checked;
     
    266266    Edit1.Enabled := False;
    267267    Button3.Enabled := False;
    268     Form1.SkinData1.Active := False;
     268    //Form1.SkinData1.Active := False;
    269269  end else begin
    270270    Edit1.Enabled := True;
    271271    Button3.Enabled := True;
    272     Form1.SkinData1.Active := True;
     272    //Form1.SkinData1.Active := True;
    273273  end;
    274274end;
     
    283283  if OpenDialog1.Execute then begin
    284284    Edit1.Text:= OpenDialog1.FileName;
    285     Form1.SkinData1.SkinFile := Edit1.Text;
    286     Form1.SkinData1.Active := False;
    287     Form1.SkinData1.Active := True;
     285    //Form1.SkinData1.SkinFile := Edit1.Text;
     286    //Form1.SkinData1.Active := False;
     287    //Form1.SkinData1.Active := True;
    288288  end;
    289289end;
     
    465465  RSSAddress := 'http://wow.zdechov.net/rss.php';
    466466  Form1.CoolTrayIcon1.MinimizeToTray := True;
    467   Form1.SkinData1.Active := False;
     467  //Form1.SkinData1.Active := False;
    468468  Form1.Timer4.Enabled := True;
    469469
Note: See TracChangeset for help on using the changeset viewer.