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

Рубрика: Исходники
Среда, 21 апреля 2010 г.
Просмотров: 187
последняя версия: 3.0.9 build 961 beta
от 07 декабря 2007 г.
procedure TfrmP2K_MyMenu.DeleteWebShortCuts;
var
  idx, i, j: integer;
  tmp: string;
begin
  if spSkinListView2.SelCount < 1 then exit;
  Screen.Cursor:= crHourGlass;

  try
  idx:= integer(spSkinListView2.Selected.Data);
  case xWebShortCutType of
    0: begin
          xWebShortcuts[idx].AllowDelete:= $00;
          xWebShortcuts[idx].Visible:= $00;
          xWebShortcuts[idx].x2:= $00;
          xWebShortcuts[idx].xType:= $00;
          FillMemory(@xWebShortcuts[idx].Url, 1024, 0);
          FillMemory(@xWebShortcuts[idx].Name, 52, 0);
       end;
    1: begin
          xWebShortcuts2[idx].AllowDelete:= $00;
          xWebShortcuts2[idx].Visible:= $00;
          xWebShortcuts2[idx].x2:= $00;
          xWebShortcuts2[idx].xType:= $00;
          FillMemory(@xWebShortcuts2[idx].Url, 2052, 0);
          FillMemory(@xWebShortcuts2[idx].Name, 52, 0);
       end;
  end;
  spSkinListView2.Selected.Destroy;
  case xWebShortCutType of
    0: WebShortcuts_applyChanges(xWebShortcuts);
    1: WebShortcuts_applyChanges(xWebShortcuts2);
  end;    
  finally
    Screen.Cursor:= crDefault;
  end;
end;
Rambler's Top100