Changeset 7 for trunk/Main.pas


Ignore:
Timestamp:
May 15, 2009, 9:49:54 AM (15 years ago)
Author:
george
Message:
  • Přesunuto: Komponenty do kořenové složky. Jsou nezávislé na verzi programu.
  • Přesunuto: Obrázky ze složky image do podsložky trunk.
  • Opraveno: Hledán přes AoWoW přesměrováno na web wowprekladu.
  • Opraveno: Prodleva při zobrazení okna seznamu hráčů při spuštění programu. Samotné načítání obsahu okna má být v OnFormShow namísto OnFormCreate, kde jsou pouze inicializace proměnných.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        22HoFclient.dsk
        33HoFclient.~dsk
         4*.dcu
  • trunk/Main.pas

    r6 r7  
    1818  DefaultRSSChannel = 'http://wow.zdechov.net/rss.php?category=articles';
    1919  OldRSSChannel = 'http://wow.zdechov.net/rss.php';
     20  AoWoWSearchURL = 'http://wowpreklad.zdechov.net/aowow/?search=';
     21  HoFOnlineListURL = 'http://wow.zdechov.net/stat/stat.xml';
     22  ProjectHomepage = 'http://wow.zdechov.net/?page=client/';
    2023
    2124type
     
    183186    procedure Zkoprovatfonty1Click(Sender: TObject);
    184187    procedure FormDestroy(Sender: TObject);
     188    procedure FormShow(Sender: TObject);
    185189  private
    186190    { Private declarations }
     
    340344        Servers[0].Name := 'Heroes of Fantasy';
    341345        Servers[0].Address := 'wow.zdechov.net';
    342         Servers[0].OnlinePlayersAddress := 'http://wow.zdechov.net/stat/stat.xml';
     346        Servers[0].OnlinePlayersAddress := HoFOnlineListURL;
    343347        Servers[0].ExeFile := GetWoWExeFile;
    344348        Servers[0].Image := '1';
     
    365369procedure TForm1.FormCreate(Sender: TObject);
    366370begin
    367   Vlakno := TVlakno.Create(True);
     371  Timer4.Enabled := False;
     372  //Vlakno := TVlakno.Create(True);
    368373
    369374  // Načítání nastavení a vypsání
     
    378383
    379384  // ostatní
    380   Form1.Caption := Form1.Caption+' '+ApplicationVersion;
     385  Form1.Caption := Form1.Caption + ' ' + ApplicationVersion;
    381386  SystemParametersInfo(SPI_GETWORKAREA, 0, @Desktop, 0);
    382387  InitRichEditURLDetection(RichEdit1);
     
    433438  NewMenuItem.Caption := '-';
    434439
    435   for I:= 0 to HIGh(servers) do begin
     440  for I:= 0 to High(Servers) do begin
    436441    NewMenuItem := TMenuItem.Create(PopupMenu1); // create the new item
    437442    PopupMenu1.Items.Insert(0, NewMenuItem);// add it to the Popupmenu
    438     NewMenuItem.Caption := servers[i].Name;
     443    NewMenuItem.Caption := Servers[i].Name;
    439444    NewMenuItem.Tag := I;
    440445    NewMenuItem.OnClick := PopupMenuItemsClick;// assign it an event handler
     
    619624begin
    620625  If ReallyYes('Smazat všechny servery?') then begin
    621     SetLength(Servers,0);
     626    SetLength(Servers, 0);
    622627    WriteImages;
    623628    WriteServers;
     
    10331038    Name := 'Heroes of Fantasy';
    10341039    Address := 'wow.zdechov.net';
    1035     OnlinePlayersAddress := 'http://wow.zdechov.net/stat/stat.xml';
     1040    OnlinePlayersAddress := HoFOnlineListURL;
    10361041    ExeFile := GetWoWExeFile;
    10371042    Image := '1';
     
    10791084begin
    10801085  GetCursorPos(Position);
    1081   x := Position.X-Form1.left-6;
    1082   y := Position.Y-Form1.top-52;
     1086  x := Position.X-Form1.left - 6;
     1087  y := Position.Y-Form1.top - 52;
    10831088  if Assigned(ListView1.GetItemAt(x,y)) then begin
    10841089    Form7.Left := Position.X;
     
    11041109    NewVersionInt := StrToInt(NewVersion);
    11051110  except
    1106       StatusBar1.SimpleText := 'Chyba spojení s serverem';
     1111      StatusBar1.SimpleText := 'Chyba spojení se serverem';
    11071112      NewVersionInt := 0;
    11081113  end;
     
    11231128procedure TForm1.ShowWeb;
    11241129begin
    1125   ShellExecute(Handle, 'open', PChar('http://wow.zdechov.net/?page=client/'), nil, nil, SW_SHOWNORMAL);
     1130  ShellExecute(Handle, 'open', PChar(ProjectHomepage), nil, nil, SW_SHOWNORMAL);
    11261131end;
    11271132
     
    11381143    ShellExecute(Handle, 'open', PChar(ExtractFileDir(Application.ExeName)+'\NÁPOVĚDA.HLP'), nil, nil, SW_SHOWNORMAL);
    11391144  end else begin
    1140     ShowMessage('Nápověda nalezena!');
    1141     StatusBar1.SimpleText := 'Nápověda nalezena!';
     1145    ShowMessage('Nápověda nenalezena!');
     1146    StatusBar1.SimpleText := 'Nápověda nenalezena!';
    11421147  end;
    11431148end;
     
    13971402procedure TForm1.Image4Click(Sender: TObject);
    13981403begin
    1399   //http://wow.zdechov.net/db/index.php?id=questy&find=Hledat&q=test
    1400   OpenSearchURL('http://wow.zdechov.net/databaze/?search=');
     1404  OpenSearchURL(AoWoWSearchURL);
    14011405end;
    14021406
     
    14761480
    14771481  inherited;
    1478 
    14791482end;
    14801483
     
    15441547begin
    15451548  DrawForm;
     1549end;
     1550
     1551procedure TForm1.FormShow(Sender: TObject);
     1552begin
     1553  if OnlineHri1.Checked then Form5.Show;
     1554  if Aktuality1.Checked then Form6.Show;
    15461555end;
    15471556
Note: See TracChangeset for help on using the changeset viewer.