亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? compmain.pas

?? 一個delphi下使用的壓縮組件 TCompress Component Set V8
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
procedure TForm1.CMethodClick(Sender: TObject);
begin
  CDBIMage1.CompressionMethod := getCompressionMethod;
  CDBMemo1.CompressionMethod := getCompressionMethod;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
 Application.HelpFile:='COMPRESS.HLP';
 fileList := TStringList.create; { keeps track of our archive files for display etc. }
 SendMessage(ListBox1.handle,LB_SetHorizontalExtent,300,LongInt(0));
 saveCompressionMethod := -1; { see Listbox1.click }
 showfiles; { show files in archive (if any)... }
{$IFNDEF CLR}
 try
 {$IFDEF VER140}
   DL.Directory := '\Program Files\Borland\Delphi6\IMAGES\BACKGRND';
 {$ENDIF}
 {$IFDEF VER150}
   DL.Directory := '\Program Files\Borland\Delphi7\IMAGES\BACKGRND';
 {$ENDIF}
 except on EInOutError do ; { nowt, let it default }
 end;
{$ENDIF}

 try Table1.Active := True;
     DataSource1.Edit;
 except
  on EDBEngineError do
     showmessage('The BLOB compression portion of this demonstration'+#13+
                 'requires that the DBDEMOS alias be set up and pointing'+#13+
                 'to the BIOLIFE.DB table in \DELPHI\DEMOS\DATA.'+#13+#13+
                 '-- as this is not currently the case, the BLOB demonstration'+#13+
                 'is disabled.');
  on EUnrecognizedCompressionMethod do
     showmessage('Your BIOLIFE database appears to have been compressed with'+#13+
                 'a custom compression method which cannot be recognised.'+#13+
                 'Please revert to an uncompressed backup of BIOLIFE.*');
 end; {try }

 if not Table1.Active then { something went wrong... }
 begin
     CDBImage1.visible:=False;
     CDBMemo1.visible:=False;
     DBNavigator1.visible:=False;
     Memo1.visible:=False;
     Memo2.visible := True;
 end;
 CMethodClick(self);  { get default compression for our database controls }

end;

function TForm1.GetDir: string; { called below and in GetDummyFileName }
begin
  Result := DL.Directory;
  if Copy(Result,Length(Result),1)<>'\' then { not already \'d? }
    Result := Result+'\';
end;

procedure TForm1.archivefileChange(Sender: TObject);
begin
  showfiles;
end;

function TForm1.getCompressionMethod: TCompressionMethod;
begin
   result := coNone; { default }
   case CMethod.ItemIndex of
     1: result := coRLE;
     2: result := coLZH;
     3: result := coLZH5;
   end;
end;

procedure TForm1.DLDragOver(Sender, Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);
begin
  accept := True;
  if ((Sender is TDirectoryListBox) and (Source is TFileListBox)) or
     (Source=Trashcan) then
        accept := False; { fair enough? }
end;

procedure TForm1.archivefileDragOver(Sender, Source: TObject; X,
  Y: Integer; State: TDragState; var Accept: Boolean);
begin
  accept := True; { but... }
  if ((Source is TGroupBox) and not (Sender is TGroupBox)) or
         (((Sender is TEdit)or (Sender is TGroupBox)) and (Source is TListBox)) or { not from our OWN list }
           (Source=Trashcan) then
     accept := False;
end;

{ Used to create 'work' filenames for saving images and memos
  from the database into our archive or to disk... }
function TForm1.GetDummyFilename(generatefrom: string; ext: string): string;
begin
  if (generatefrom='Image') or (generateFrom='') then
     generatefrom:='image';
  result := Getdir+generatefrom+'.'+ext;
end;

function Confirmfilename(filename: String; archiving: Boolean): Boolean;
begin
  Result := True; { default for archiving }
  if (not Archiving) and
     (MessageDlg('Save to '+filename+'?', mtConfirmation,[mbYes, mbNo], 0)<>id_Yes) then
     Result := False;
end;

{ The handler for dropping things on the file list or archive list }
procedure TForm1.handleDropField(Source: TObject; archivetoo: Boolean);
var filename: String;
begin
  filename := ''; { in case it is NOT one of those below... }
  if Source is TCDBMemo then
  begin
     filename := GetDummyFilename(Fishname.Text,'TXT');
     if not confirmFilename(filename,archivetoo) then exit;
     if ArchiveToo then { V3.0 -- save directly into archive -- no temp file }
     begin
       SaveDirectToArchive((Source as TCDBMemo).Field,filename);
       exit;
     end else
       CDBMemo1.Lines.SaveToFile(filename); { save to directory }
  end else if Source is TCDBImage then
  begin
     filename := GetDummyFilename(Fishname.Text,'BMP');
     if not confirmFilename(filename,Archivetoo) then exit;
     if ArchiveToo then { V3.0 -- save directly into archive -- no temp file }
     begin
       SaveDirectToArchive((Source as TCDBImage).Field,filename);
       exit;
     end else
        CDBImage1.Picture.Bitmap.SaveToFile(filename); { save to directory }
  end
  else
   if Source = Image1 then
  begin
     filename := GetDummyFilename('Image','BMP');
     if not confirmFilename(filename,Archivetoo) then exit;
     Image1.Picture.Bitmap.SaveToFile(filename);
  end;
  if (filename<>'') and (ArchiveToo) then
      CompressOneFile(filename);
end;

{ new in V3.0, this routine APPENDS a blob to the archive, after first making
  sure something of the same name is not already there. While this is fast,
  in a working situation it would be tidier with a DeleteFiles call to remove
  any prior copy of the blob first...
}
procedure TForm1.SaveDirectToArchive(Source: TField; filename: string);
var bs: TCBlobstream; { for compressing into the archive: may need to auto-EXPAND first, hence TCBlobstream... }
begin
  filename :=ExtractFileName(filename);
  if FileList.Indexof(filename) >=0 then
  begin
    showmessage(filename+' is already in the archive -- please delete it first');
    exit; { to automate the deletion, we could just use the Compress1.DeleteFiles method }
  end;
  bs := TCBlobstream.Create(Source as TCBlobField,bmRead); { we're going to read the (expanded) field contents) }
  try
     if Source is TCGraphicField then { sorry about this, but we have to skip a graphic header which Delphi stores }
        bs.seek(8,soFromBeginning);  { in blob bitmaps, but which DON'T belong in BMP files -- this very hardwired
                                     code assumes it is there, and skips it }

     Screen.cursor := crHourGlass;
     disableDragMode;
     Compress1.CompressStreamToArchive(ArchiveFile.Text,bs, { and append/compress them to the archive... }
                                      filename,getCompressionMethod);
  finally
     enableDragMode;
     Screen.cursor := crDefault;
     bs.free;
  end;
  showinfo(Compress1);
  showfiles;
end;

procedure TForm1.archivefileDragDrop(Sender, Source: TObject; X,
  Y: Integer);
begin
  if Source is TFileListBox then
     CompressFiles
  else
    HandleDropField(Source, True); { save to temp file AND archive... }
end;

procedure TForm1.DLDragDrop(Sender, Source: TObject; X, Y: Integer);
begin
  if Source=Sender then exit; { seems reasonable, and IS necessary }
  if Source is TListBox then
    ExpandDelete(cmExpand,False) { selected archive files }
  else if Source=ArchiveGroup then
     ExpandDelete(cmExpand,True) { all archived files }
  else
    HandleDropField(Source, False); { save field to a file }
  FL.Update; { get up to date... }
end;
procedure TForm1.TrashcanDragDrop(Sender, Source: TObject; X, Y: Integer);
var count: Integer;
    tempBitmap: TBitMap; { just to get an empty one }
begin
  if Source is TListBox then
    ExpandDelete(cmDelete,False)
  else if Source=ArchiveGroup then
     ExpandDelete(cmDelete,True) { all files }
     { and strictly speaking, should now delete the archive if it is
       empty, but I'll leave that as an exercise... }
  else if Source is TFileListBox then { delete some or all... }
  begin
     for count:=0 to FL.Items.count-1 do
        if FL.selected[count] and
           (MessageDlg('Delete '+GetDir+FL.Items[count],mtConfirmation,[mbYes,mbNo],0)=id_Yes) then
           SysUtils.DeleteFile(GetDir+FL.Items[count]);
     FL.Update;
  end
  else if (Source is TCDBMemo) and
              (MessageDlg('Cut to clipboard?',mtConfirmation,[mbYes,mbNo],0)=id_Yes) then
  begin
     CDBMemo1.SelectAll;
     CDBMemo1.cutToClipboard { safer than .clear, for demo purposes }
  end
  else if (Source is TCDBImage) and
            (MessageDlg('Cut to clipboard?',mtConfirmation,[mbYes,mbNo],0)=id_Yes) then
      CDBImage1.cutToClipboard { not quite a delete, but just for example... }
  else if Source=Image1 then
  begin
     tempBitMap := TBitMap.Create;
     try
        Image1.Picture.Bitmap.Assign(tempBitMap);
        Image1.visible := False;
        Memo1.visible := True
     finally
        tempBitMap.free;
     end;
  end;


end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
  Compress1.FreeFileList(FileList); { free list and any file information objects in it }
  FileList.free;
end;


procedure TForm1.ListBox1Click(Sender: TObject);
var cfinfo: TCompressedFileInfo;
    compmethod, percentageval: Integer;
begin
  if listBox1.ItemIndex >=0 then
  begin
     CMethod.Color := ShowFileInfoColor; { make it clear we are showing off a bit... }
     Percentage.Color := ShowFileInfoColor;
     Time.Color := ShowFileInfoColor;
     TimeLabel.Caption := 'Full Size:';

     cfinfo:=TCompressedFileinfo(FileList.objects[listBox1.ItemIndex]); { how to get at the other stuff... }
     if cfinfo.Fullsize>0 then
     begin
       if cfinfo.Fullsize>100000 then { makes safe for files >20Mb actually }
         Percentageval := cfinfo.CompressedSize div (cfinfo.Fullsize div 100)
       else
         Percentageval := 100*cfinfo.CompressedSize div cfinfo.Fullsize;
       Percentage.caption:=IntToStr(100-percentageval)+'%'
     end else
       Percentage.caption:='(empty)';
     if cfinfo.locked then
        Percentage.caption := Percentage.caption + ' (locked)';
     Time.caption:= IntToStr((512+cfinfo.Fullsize) div 1024)+' Kb';
     if saveCompressionMethod <0 then
        savecompressionMethod :=cMethod.ItemIndex;
     compMethod :=Integer(cfinfo.CompressedMode);
     if compMethod = 4 then
         compMethod := 3; { force LZH5 to show up as the third box }
     cMethod.ItemIndex :=compMethod;
  end;
end;

procedure TForm1.ResetFileInfo;
begin
  if saveCompressionMethod <0 then exit;
  cMethod.ItemIndex:=savecompressionMethod;
  saveCompressionMethod := -1;
  CMethod.Color := clBtnFace;
  Percentage.Color := clWindow;
  Time.Color := clWindow;
  TimeLabel.Caption := 'Time:';
  showInfo(Compress1); { get the right stuff too... }
  Time.Caption:=''; { but this is meaningless at this point... }
end;


procedure TForm1.Table1AfterPost(DataSet: TDataset);
begin
  Showinfo(Compress1);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ShowMessage('Drag && Drop at will: compression/expansion'+#13+
  'is automatic.'+#13+#13+
  'Uses TCompress, TCDBMemo and TCDBImage.'+#13+#13+
  'Component Registration and License: $US79'+#13+
  'See registration form in Help or:'+#13+
  'Fax +64-3-384-5138   Email: admin@webcentre.co.nz');
end;

procedure TForm1.FLClick(Sender: TObject);
begin
  ResetFileInfo;
end;

{ Example of OnCheckFile user interface handling routine
  Note that the V2.5 TargetPath property frequently obviates the need
  for any Expand handler, but we've kept it anyway for your
  info. Also, you could Set the MakeDirectories property if
  the target path's should be created if required.
}
procedure TForm1.Compress1CheckFile(var filepath: String;
  mode: TCProcessMode);
var modestr: String;
  dlg: Integer;
begin
  case mode of
     cmExpand: begin
                 modestr := 'Expand';
                 filepath:=Getdir+extractfilename(filepath); { go where we should }
               end;
     cmCompress: begin
                    modestr := 'Compress';
                    filepath:={Getdir+}extractfilename(filepath); { use GetDir if you want full path... }
                 end;
     cmDelete: modestr := 'Delete';
  end;
  showInfo(Compress1);
  Screen.cursor := crDefault; { in case this is second call in a sequence }
  dlg := MessageDlg(modestr+' '+filepath+'?', mtConfirmation,[mbYes, mbNo, mbCancel], 0);
  case dlg of
     id_No: filepath :=CompressSkipFlag; { flag 'not this one'}
     id_Cancel: filepath :=CompressNoMoreFlag; { flag 'no more!' }
     id_Yes: Screen.Cursor := crHourGlass; { for operation itself }
  end;
end;


procedure TForm1.Panel1Click(Sender: TObject);
begin
ResetFileInfo;
end;

procedure TForm1.FormClick(Sender: TObject);
begin
ResetFileInfo;
end;

procedure TForm1.GroupBox1Click(Sender: TObject);
begin
ResetFileInfo;
end;

procedure TForm1.TrashcanDragOver(Sender, Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);
begin
  accept := True;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Application.HelpJump('1050');
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
Application.HelpJump('1030');
end;

{ V3.03 -- disable dragging temporarily while compression
  is in progress, because otherwise it is *possible* (tho unlikely)
  to request a second compression before the first has finished,
  i.e. code is made non-re-entrant via the user interface.
  Not a problem with threads, just the fact that trying
  to add two files to the same archive at the same time is bad karma!
}
procedure TForm1.disableDragMode;
begin
  Fl.dragMode := dmManual;
  CDBMemo1.dragMode := dmManual;
  CDBImage1.dragMode := dmManual;
  ArchiveGroup.dragMode := dmManual;
  ListBox1.dragMode := dmManual;
end;

procedure TForm1.enableDragMode;
begin
  Fl.dragMode := dmAutomatic;
  CDBMemo1.dragMode := dmAutomatic;
  CDBImage1.dragMode := dmAutomatic;
  ArchiveGroup.dragMode := dmAutomatic;
  ListBox1.dragMode := dmAutomatic;
end;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久综合狠狠综合久久| 中文字幕的久久| 中文字幕精品一区二区精品绿巨人| 亚洲人成精品久久久久| 国产一区二区在线视频| 欧美三级中文字幕在线观看| 亚洲国产精品v| 极品美女销魂一区二区三区| 欧美优质美女网站| 国产精品久久网站| 国产福利视频一区二区三区| 日韩视频免费观看高清在线视频| 亚洲图片欧美色图| 一本大道av一区二区在线播放| 国产亚洲一区二区在线观看| 免费人成网站在线观看欧美高清| 欧美私人免费视频| 一区二区三区在线免费观看| 92精品国产成人观看免费| 国产亚洲婷婷免费| 国产乱码精品一区二区三区忘忧草 | 欧美激情中文字幕| 国产在线精品一区二区三区不卡 | 男女性色大片免费观看一区二区 | 欧美国产精品专区| 老司机精品视频导航| 日韩欧美一区二区视频| 青青草一区二区三区| 欧美福利视频一区| 日韩精品一二三四| 日韩精品一区二区三区中文不卡| 日韩成人一区二区| 精品成人a区在线观看| 国产美女精品在线| 国产精品免费视频一区| 成人激情小说网站| 亚洲欧洲综合另类| 欧美美女bb生活片| 蜜桃在线一区二区三区| 精品国产精品网麻豆系列| 国产一区二区三区免费看| 久久亚洲一级片| 成人精品国产福利| 亚洲男人的天堂在线观看| 欧美日韩视频专区在线播放| 日本成人超碰在线观看| 久久色.com| www.成人网.com| 亚洲午夜国产一区99re久久| 欧美一区二区在线免费观看| 国产精品综合av一区二区国产馆| 国产精品情趣视频| 在线观看视频一区二区| 久久se精品一区二区| 中文字幕欧美激情| 欧美天堂一区二区三区| 国产一区二区三区视频在线播放| 中文字幕亚洲成人| 欧美日韩成人综合天天影院| 国产精品18久久久| 亚洲乱码一区二区三区在线观看| 欧美三片在线视频观看| 国产成a人无v码亚洲福利| 亚洲精品乱码久久久久| 日韩你懂的在线观看| 99精品久久99久久久久| 日本美女一区二区三区| 国产精品萝li| 欧美成人官网二区| 色狠狠色噜噜噜综合网| 国产原创一区二区| 亚洲大尺度视频在线观看| 国产日韩欧美综合在线| 欧美日韩国产影片| www.亚洲色图.com| 国产一区视频在线看| 亚洲精品欧美专区| 精品国产百合女同互慰| 欧洲另类一二三四区| 国产91精品在线观看| 日本va欧美va精品发布| √…a在线天堂一区| 久久免费偷拍视频| 欧美一级高清片| 在线免费观看不卡av| 成人精品免费网站| 国产美女一区二区三区| 另类小说一区二区三区| 性久久久久久久久| 亚洲精品成人在线| 亚洲色图欧洲色图婷婷| 亚洲国产成人私人影院tom | 国产精品 欧美精品| 精品影院一区二区久久久| 亚洲综合成人在线| 亚洲精品美国一| 亚洲免费高清视频在线| 国产精品久久影院| 国产精品美女久久久久久| 久久免费午夜影院| 久久精品亚洲乱码伦伦中文| 欧美大片在线观看| 欧美成va人片在线观看| 欧美一区二区三区视频免费| 欧美视频日韩视频在线观看| 色综合久久久久久久久久久| 99精品欧美一区| 色国产精品一区在线观看| 色哟哟亚洲精品| 色婷婷激情一区二区三区| 一本大道av伊人久久综合| 色婷婷综合久久久| 欧美伊人久久久久久午夜久久久久| 在线欧美日韩精品| 欧美日韩二区三区| 日韩一级欧美一级| 精品国产123| 国产精品久久久久久妇女6080| 亚洲人一二三区| 一区二区三区欧美在线观看| 亚洲成人免费在线观看| 免费成人美女在线观看.| 美女被吸乳得到大胸91| 久久精品国产一区二区| 国产激情一区二区三区四区| av电影在线观看完整版一区二区| 91亚洲大成网污www| 91国产福利在线| 7799精品视频| 久久人人97超碰com| 中文字幕精品—区二区四季| 亚洲人成网站在线| 午夜成人免费视频| 韩国毛片一区二区三区| 99久久精品一区| 欧美妇女性影城| 国产日产欧美一区二区视频| 日韩理论片网站| 秋霞午夜鲁丝一区二区老狼| 国产美女久久久久| 在线免费观看日本欧美| 精品国产亚洲一区二区三区在线观看| 久久久久亚洲蜜桃| 一区二区三区在线免费播放| 香蕉加勒比综合久久| 国产在线视频不卡二| 色婷婷国产精品久久包臀| 欧美电影免费观看高清完整版在线观看 | 国产麻豆视频精品| 欧美在线一区二区| 日韩免费观看2025年上映的电影| 国产精品久久久久久久久图文区| 亚洲高清在线视频| 成人精品gif动图一区| 日韩一区二区三区在线| 国产精品免费久久| 视频一区在线视频| 不卡影院免费观看| 精品国产免费久久| 亚洲国产精品一区二区久久恐怖片| 韩国av一区二区三区四区| 在线观看日韩av先锋影音电影院| 久久嫩草精品久久久久| 婷婷综合在线观看| 91亚洲永久精品| 久久综合色婷婷| 视频一区二区中文字幕| 99这里都是精品| 久久久久久久精| 日本中文字幕一区二区视频| 91啪亚洲精品| 国产精品视频一区二区三区不卡| 人妖欧美一区二区| 欧美图片一区二区三区| 1024精品合集| 高清不卡一区二区| www日韩大片| 免费观看一级特黄欧美大片| 欧美性极品少妇| 一区二区视频在线看| 成人动漫精品一区二区| 久久综合色婷婷| 精品在线播放午夜| 日韩欧美视频在线| 美女视频黄 久久| 欧美精品18+| 婷婷成人激情在线网| 欧美日韩国产精品自在自线| 一区二区三区成人| 一本久久综合亚洲鲁鲁五月天| 专区另类欧美日韩| 91丨porny丨户外露出| 国产精品免费视频一区| 成人黄色免费短视频| 国产欧美日韩视频一区二区| 粉嫩一区二区三区在线看| 国产欧美在线观看一区| 国产成a人亚洲精品| 中文字幕一区二区三区不卡| 成人午夜大片免费观看|