ksskinmessages.pas

来自「小区水费管理系统源代码水费收费管理系统 水费收费管理系统」· PAS 代码 · 共 128 行

PAS
128
字号
{==============================================================================

  SkinEngine's Message
  Copyright (C) 2000-2002 by Evgeny Kryukov
  Copyright (C) 2002 by DKJ
  All rights reserved

  All conTeThements of this file and all other files included in this archive
  are Copyright (C) 2002 Evgeny Kryukov. Use and/or distribution of
  them requires acceptance of the License Agreement.

  See License.txt for licence information

  $Id: KsSkinMessages.pas,v 1.1.1.1 2002/08/05 12:12:13 Evgeny Exp $

===============================================================================}

unit ksskinmessages;

{$I se_define.inc}
{$T-,W-,X+,P+}

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls, StdCtrls, Buttons, se_controls, KsSkinVersion, KsSkinObjects,
  KsSkinSource, KsSkinEngine;

type

{ TSeSkinMessage }

  TSeSkinMessage = class(TSeCustomMessage)
  private
    FSkinEngine: TSeSkinEngine;
    function GetVersion: TSeSkinVersion;
    procedure SetVersion(const Value: TSeSkinVersion);
    procedure SetSkinEngine(const Value: TSeSkinEngine);
  protected
    function CreateButton(Owner: TComponent): TSeCustomButton; override;
    function CreateEdit(Owner: TComponent): TSeCustomEdit; override;
    function CreateForm(Owner: TComponent): TSeCustomForm; override;
    function CreateLabel(Owner: TComponent): TSeCustomLabel; override;
    function CreateCheckBox(Owner: TComponent): TSeCustomCheckBox; override;
    { VCL protected  }
    procedure Notification(AComponent: TComponent; Operation: TOperation); override;
  public
    { Public declarations }
    constructor Create(AOwner: TComponent); override;
  published
    property SkinEngine: TSeSkinEngine read FSkinEngine write SetSkinEngine;
    property Version: TSeSkinVersion read GetVersion write SetVersion
      stored false;
  end;

implementation {===============================================================}

uses KsSkinButtons, KsSkinForms, KsSkinEdits, KsSkinCheckBoxs, KsSkinLabels;

{ TSeSkinMessage }

constructor TSeSkinMessage.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
end;

function TSeSkinMessage.CreateButton(Owner: TComponent): TSeCustomButton;
begin
  Result := TSeSkinButton.Create(Owner);
  if Owner is TWinControl then
    Result.Parent := Owner as TWinControl;
  (Result as TSeSkinButton).SkinEngine := FSkinEngine;
end;

function TSeSkinMessage.CreateEdit(Owner: TComponent): TSeCustomEdit;
begin
  Result := TSeSkinEdit.Create(Owner);
  if Owner is TWinControl then
    Result.Parent := Owner as TWinControl;
  (Result as TSeSkinEdit).SkinEngine := FSkinEngine;
end;

function TSeSkinMessage.CreateForm(Owner: TComponent): TSeCustomForm;
begin
  Result := TSeSkinForm.Create(Owner);
  (Result as TSeSkinForm).SkinEngine := FSkinEngine;
end;

function TSeSkinMessage.CreateLabel(Owner: TComponent): TSeCustomLabel;
begin
  Result := TSeSkinLabel.Create(Owner);
  (Result as TSeSkinLabel).SkinEngine := FSkinEngine;
end;

function TSeSkinMessage.CreateCheckBox(
  Owner: TComponent): TSeCustomCheckBox;
begin
  Result := TSeSkinCheckBox.Create(Owner);
  (Result as TSeSkinCheckBox).SkinEngine := FSkinEngine;
end;

procedure TSeSkinMessage.Notification(AComponent: TComponent;
  Operation: TOperation);
begin
  inherited;
  if (Operation = opRemove) and (AComponent = FSkinEngine) then
    SkinEngine := nil;
end;

function TSeSkinMessage.GetVersion: TSeSkinVersion;
begin
  Result := sSeSkinVersion;
end;

procedure TSeSkinMessage.SetSkinEngine(const Value: TSeSkinEngine);
begin
  FSkinEngine := Value;
end;

procedure TSeSkinMessage.SetVersion(const Value: TSeSkinVersion);
begin
end;

end.


⌨️ 快捷键说明

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