Модуль "Мое меню" (часть 2) - ReadMyMenu

Рубрика: Исходники
Среда, 21 апреля 2010 г.
Просмотров: 250
последняя версия: 3.0.9 build 961 beta
от 07 декабря 2007 г.
procedure TfrmP2K_MyMenu.ReadMyMenu;
var
  frmProgress: TfrmProgress;
  res: boolean;
  xSize: integer;
begin
  if not Form1.IsP2KConnected then exit;

  Screen.Cursor:= crHourGlass;
  frmProgress:= TfrmProgress.Create(Self);
  frmProgress.AdvProgressBar2.Visible:= false;
  frmProgress.GradientLabel2.Visible:= false;
  frmProgress.GradientLabel1.Caption:= p2k_mymenu_m_text_01;
  frmProgress.Show;
  frmProgress.Update;
  try
    // my menu
    GetMyMenu(xMyMenu, xMyMenuLink, frmProgress);
    FillList(xMyMenu, xMyMenuLink);
    // прочитать web shortcuts из файла
    // DL_DB_BKMR_RECORDS
    res:= false;
    // get webshortcut type
    // через div определить размер записи
    xWebShortCutType:= GetShortcutType(frmProgress, xSize);
    case xWebShortCutType of
      0 : begin
            res:= GetWebShortcuts(xSize, xWebShortcuts, frmProgress);
            if res then FillList2(xWebShortcuts);
          end;
      1 : begin
            res:= GetWebShortcuts(xSize, xWebShortcuts2, frmProgress);
            if res then FillList2(xWebShortcuts2);
          end;  
    end;
  finally
    frmProgress.Free;
    Screen.Cursor:= crDefault;
  end;
end;
Rambler's Top100