uinterface.pas
来自「观察者模式delphi实例实现,同时注意软件的设计」· PAS 代码 · 共 42 行
PAS
42 行
unit uInterface;
interface
uses
Windows, Messages, SysUtils, Graphics, Forms, Dialogs, Controls, classes;
type
//属性描述
TPhotoProp = record
Name:string;
Desc:string;
Data:TDateTime;
Size:Integer;
end;
//通知接口
//由photoMgr发送有关照片变更的消息通知界面组件。
//通知的内容
//增加,删除,刷新,属性变化
IPhotoNotify = interface
function SelPhoto(const photoID:Integer):Boolean;
function NewPhoto(const photoID:Integer):Boolean;
function DelPhoto(const photoID:Integer):Boolean;
function Refresh():Boolean;
function PropChange(const photoID:Integer):Boolean;
end;
{------------------------------------------------------------------------------}
//实现PhotoMgr接口
//由PhotoMgr类来实现
IPhotoMgr = interface
function GetPhotoCount(var Count:Integer):Boolean;
function GetPhotoID(const idx:Integer; var PhotoID:Integer):Boolean;
function GetSelPhotoID(var PhotoID:Integer):Boolean;
function GetPhotoPorp(const photoID:Integer;var PhotoProp:TPhotoProp):Boolean;
function GetBmp(const PhotoID:Integer;var bmp:TBitmap):Boolean;
end;
implementation
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?