⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showinterface.pas

📁 基于DELPHI的图片浏览系统设计与实现
💻 PAS
字号:
unit ShowInterface;

interface
uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
IShowPic = interface
   ['{B8492167-329A-4794-BDC9-14EDF2921DF6}']
    function GetInstance(const f: string): TPersistent;
end;

type
IFactory = interface
   ['{F902C251-4139-4502-BAA3-E54F25819A6B}']
   function CreateShowPic: IShowPic;
end;

TShowGif = class(TInterfacedObject, IShowPic)
   function GetInstance(const f: string): TPersistent;
end;

TShowGifFactory = class(TInterfacedObject, IFactory)
   function CreateShowPic: IShowPic;
end;
{
type
TShowJpeg = class(TInterfacedObject, IShowPic)
   function GetInstance: TObject;
end;

type
TShowBmp = class(TInterfacedObject, IShowPic)
   function GetInstance: TObject;
end;

type
TShowPng = class(TInterfacedObject, IShowPic)
   function GetInstance: TObject;
end;
 }
type
TShowCommom = class(TInterfacedObject, IShowPic)
   function GetInstance(const f: string): TPersistent;
end;

implementation

uses GIFImage;

{ TShowCommom }

function TShowCommom.GetInstance(const f: string): TPersistent;
begin
   //
end;

function TShowGif.GetInstance(const f: string): TPersistent;
var
a:Tgifimage;
begin
  a:= Tgifimage.Create;
  a.LoadFromFile(f);
  Result := a;
end;

function TShowGifFactory.CreateShowPic: IShowPic;
begin
   Result := TShowGif.Create;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -