fmsongproperties.pas

来自「Delphi的另一款钢琴软件」· PAS 代码 · 共 67 行

PAS
67
字号
unit fmSongProperties;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ComCtrls, Buttons, Mask, Grids, ImgList;

type
  TSongPropertiesForm = class(TForm)
    btnOk: TBitBtn;
    btnCancel: TBitBtn;
    PageControl1: TPageControl;
    tsGeneral: TTabSheet;
    tsTimeSig: TTabSheet;
    tsKeySignatures: TTabSheet;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    edFormat: TEdit;
    Label4: TLabel;
    edNumberOfTracks: TEdit;
    edResolution: TEdit;
    btnHelp: TBitBtn;
    GroupBox1: TGroupBox;
    btnInsertTimeSignature: TBitBtn;
    btnEditTimeSignature: TBitBtn;
    btnDeleteTimeSignature: TBitBtn;
    GroupBox2: TGroupBox;
    btnInsertKeySignature: TBitBtn;
    btnEditKeySignature: TBitBtn;
    btnDeleteKeySignature: TBitBtn;
    ImageList1: TImageList;
    lvTimeSignatures: TListView;
    lvKeySignatures: TListView;
    procedure FormShow(Sender: TObject);
  private
    procedure UpdateSignatureButtons;
    { Private declarations }
  public
    { Public declarations }
  end;

var
  SongPropertiesForm: TSongPropertiesForm;

implementation

{$R *.DFM}

procedure TSongPropertiesForm.FormShow(Sender: TObject);
begin
  UpdateSignatureButtons;
end;

procedure TSongPropertiesForm.UpdateSignatureButtons;
var
  enableIt : boolean;
begin
  enableIt := lvTimeSignatures.Selected <> Nil;
  btnEditTimeSignature.Enabled := enableIt;
  btnDeleteTimeSignature.Enabled := enableIt;
end;


end.

⌨️ 快捷键说明

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