?? mcountunit.~pas
字號:
unit MCountUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Spin, StdCtrls;
type
TMCount = class(TForm)
LabelName: TLabel;
LabelPrice: TLabel;
LabelAmount: TLabel;
GoodName: TEdit;
Count: TButton;
Tariff: TMemo;
Price: TSpinEdit;
Amount: TSpinEdit;
procedure CountClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MCount: TMCount;
implementation
{$R *.dfm}
procedure TMCount.CountClick(Sender: TObject);
begin
if(Price.Value<=0)and(Amount.Value<=0)and(GoodName.Text='') then
showmessage('輸入有錯誤!')
else begin
tariff.Lines.Add('品名:'+GoodName.Text);
tariff.Lines.Add('單價:'+intToStr(Price.Value));
tariff.Lines.Add('數量:'+intToStr(Amount.Value));
tariff.Lines.Add('貨款:'+intToStr(Price.Value*Amount.Value));
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -