Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Delphi Éè¼ÆÄ£Ê½£º¡¶HeadFirstÉè¼ÆÄ£Ê½¡·Delphi7´úÂë

1. ¸´ÔÓµÄ×Óϵͳ
unit uSubObject;

interface

type

{ TAmplifierÓëTTuner£¬TCDPlayer£¬TDVDPlayerÏ໥ÒÀÀµ¡£ }
{ ÔÚTTunerµÈµÄ¼òµ¥ÊµÏÖʱÓò»µ½¶ÔTAmplifierµÄÒýÓ㬠}
{ µ«ÏÖʵÉú»îÖоÍÓ¦¸ÃÈÃTAmplifierÌṩ·þÎñ£¬ËùÒÔÕâÀï±£ÁôÁË¡£ }
{ TProjector¶ÔTDVDPlayerµÄÒýÓÃÒ²ÊÇͬÑùµÀÀí¡£ }
{ ǰÖÃTAmplifierÒ²¿ÉÒÔ£¬°ÑTAmplifierµÄÉùÃ÷·ÅÔÚTTunerµÈÉùÃ÷µÄºóÃæ }

TTuner = class;
TCDPlayer = class;
TDVDPlayer = class;

TAmplifier = class(TObject)
private
FTuner: TTuner;
FCD : TCDPlayer;
FDVD: TDVDPlayer;
FDescription: String;
public
constructor Create(aDescription: String);
procedure Open;
procedure Off;
procedure SetStereoSound;
procedure SetSurroundSound;
procedure SetVolume(aLevel: Integer);
procedure SetTuner (aTuner: TTuner);
procedure SetCD (aCD : TCDPlayer);
procedure SetDVD(aDVD: TDVDPlayer);
function ToString: String;
end;

TTuner = class(TObject)
private
FAmplifier: TAmplifier;
FDescription: String;
FFrequency: Double;
public
constructor Create(aDescription: String; aAmplifier: TAmplifier);
procedure Open;
procedure Off;
procedure SetAm;
procedure SetFm;
procedure SetFrequency(aFrequency: Double);
function ToString: String;
end;

TCDPlayer = class(TObject)
private
FAmplifier: TAmplifier;
FDescription: String;
FCurrentTrack: Integer;
FTitle: String;
public
constructor Create(aDescription: String; aAmplifier: TAmplifier);
procedure Open;
procedure Off;
procedure Eject;
procedure Play(aTitle: String ); overload;
procedure Play(aTrack: Integer); overload;
procedure Stop;
procedure Pause;
function ToString: String;
end;

TDVDPlayer = class(TObject)
private
FAmplifier: TAmplifier;
FDescription:


Ïà¹ØÎĵµ£º

DelphiͼÏñ´¦Àí

    ÉèÖÃͼÏñ¹Ø¼üÑÕÉ«£¬Ê¹Í¼ÏñµÄijÖÖ»òij¸ö·¶Î§µÄÑÕÉ«³ÉΪ͸Ã÷É«£¬ÊÇͼƬºÏ³É¡¢¶¯»­ÏÔʾÖо­³£ÓõÄͼÏñ´¦ÀíÊֶΡ£ÏÂÃæÊÇʵÏÖ´úÂ룺
¹ý³Ì¶¨Ò壺
// ÉèÖÃÉ«¼ü£¨Í¸Ã÷·¶Î§£©¡£colorLow µÍÉ«¼üÖµ; colorHigh ¸ßÉ«¼üÖµ
// µ±ÏñËØA¡¢R¡¢G¡¢Bֵͬʱ´óÓÚµÈÓÚcolorLowºÍСÓÚµÈÓÚcolorHighʱΪ͸Ã÷É«
procedu ......

delphi 2010 fastMM ÄÚ´æÐ¹Â¶Ê¹Ó÷½·¨

Delphi2010¼¯³ÉÁËfastMM£¬Õâ»Ø´ó¼Òµ÷ÊÔ³ÌÐòÊǵÄʱºò¿ÉÒÔ·½±ãµØ¼ì²éÄÚ´æÐ¹Â¶ÁË¡£
ʹÓ÷½·¨ÈçÏ£º
ÔÚprojectÖУ¬Ìí¼ÓÒ»ÐÐ ReportMemoryLeaksOnShutdown := DebugHook<>0;
DebugHook<>0 Ä¿µÄÊDZ£Ö¤µ¥¶ÀÔËÐÐexeÎļþ²»»áµ¯³öÄÚ´æÐ¹Â¶¿ò£¬Ô´Âë¿ÉÒÔ²»ÓÃ×¢Ê͵ô´ËÐÐ
program Project1;
uses
  Forms,
  ......

delphi Êý¾Ý¿â ÔÓÊÕ¡£

      µ±È»Óû§ÒªÏëͨ¹ýÊý¾Ýä¯ÀÀ²¿¼þ±à¼­ÐÞ¸ÄÊý¾Ý¿â±íÖеļǼ×Ö¶Îʱ£¬»¹ÒªÊܵ½ÆäËüÒòËØµÄÖÆÔ¼¡£³ýÁËÊý¾Ýä¯ÀÀ²¿¼þ±¾ÉíµÄReadOnlyÊôÐÔÉèÖÃΪFalseÍ⣬»¹ÒªÉèÖÃÆäÏàÓ¦µÄ×ֶβ¿¼þºÍÊý¾Ý¼¯²¿¼þµÄCanModifyÊôÐÔTrueÐÔ£»ÉèÖÃTDataSource²¿¼þµÄAutoEditÊôÐÔΪTrue£¬Èç¹ûÊý¾Ý¿â±íÊÇSQLÊý¾Ý¿â·þÎñÆ÷ÖеÄÊý¾ ......

Delphi Éè¼ÆÄ£Ê½£º¡¶HeadFirstÉè¼ÆÄ£Ê½¡·Delphi7´úÂë

      ÈÝÆ÷µÄÖ÷ÒªÖ°ÔðÓÐÁ½¸ö£º´æ·ÅÔªËØºÍä¯ÀÀÔªËØ¡£¸ù¾Ýµ¥Ò»Ö°ÔðÔ­Ôò£¨SRP£©Òª½«¶þÕß·Ö¿ª£¬ÓÚÊǽ«ä¯ÀÀ¹¦ÄÜ´ò°ü·â×°¾ÍÓÐÁ˵ü´úÆ÷¡£
      Óõü´úÆ÷·â×°¶Ô¶¯Ì¬Êý×éµÄ±éÀú£º
1.ÈÝÆ÷ÖеÄÔªËØÀà
{¡¶HeadFirstÉè¼ÆÄ£Ê½¡·Ö®µü´úÆ÷ģʽ }
{ ÈÝÆ÷ÖеÄÔªËØÀà ......

Delphi Éè¼ÆÄ£Ê½£º¡¶HeadFirstÉè¼ÆÄ£Ê½¡·Delphi7´úÂë

 1.²ßÂÔÀà
{¡¶HeadFirstÉè¼ÆÄ£Ê½¡·Ö®²ßÂÔģʽ }
{ ±¾µ¥ÔªÖеÄÀàΪ²ßÂÔÀà }
{ ±àÒ빤¾ß: Delphi7.0 }
{ E-Mail : xshlife@163.com }

unit uStrategy;

interface

type
{·ÉÐнӿڣ¬¼°ÆäʵÏÖÀà }

IFlyBehavior = Interface(IInterface)
procedure Fly;
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ