📄 logicselectedfrm.pas
字号:
unit logicSelectedFrm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ExtCtrls;
type
TFormSelectLogic = class(TForm)
Panel2: TPanel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Panel1: TPanel;
Label1: TLabel;
cbLogic: TComboBox;
EdtCount: TEdit;
procedure EdtCountKeyPress(Sender: TObject; var Key: Char);
procedure EdtCountChange(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
class function ShowSelectLogic(var sLogic: string): Boolean;
end;
implementation
{$R *.dfm}
procedure TFormSelectLogic.EdtCountKeyPress(Sender: TObject;
var Key: Char);
begin
if not (Key in ['0'..'9', #8]) then Key := #0;
end;
class function TFormSelectLogic.ShowSelectLogic(
var sLogic: string): Boolean;
begin
Result := False;
with TFormSelectLogic.Create(nil) do
try
cbLogic.ItemIndex := 0;
EdtCount.Text := '0';
if ShowModal = MROK then
begin
Result := True;
sLogic := cbLogic.Text + EdtCount.Text;
end;
finally
end;
end;
procedure TFormSelectLogic.EdtCountChange(Sender: TObject);
begin
if Trim(EdtCount.Text) = '' then EdtCount.Text := '0';
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -