【delphi开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了delphi开源代码-InputNo.pas的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
unit InputNo;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ModalForm, StdCtrls, Menus, MoveImageButton, LabelButton,
ComCtrls, ToolWin, ExtCtrls;
type
TInputNoForm = class(TMyModalForm)
Label1: TLabel;
edtInputNo: TEdit;
procedure edtInputNoKeyPress(Sender: TObject; var Key: Char);
procedure MIBtnOKClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
InputNoForm: TInputNoForm;
implementation
uses data;
{$R *.dfm}
procedure TInputNoForm.edtInputNoKeyPress(Sender: TObject; var Key: Char);
begin
inherited;
if Key=#13 then
begin
Key:=#0;
MIBtnOKClick(MIBtnOK);
end;
end;
procedure TInputNoForm.MIBtnOKClick(Sender: TObject);
var
Upline:TUpline;
begin
inherited;
// 学生上机
Upline.FStuNo:=Trim(edtInputNo.Text);
if Upline.FStuNo<>'' then
begin
DM.UpLine(Upline);
if (Upline.FReturnInfo ='上机成功')and
(Upline.FPrepTime < DM.SysSetup.FMinTime) then
ShowMessage('你只剩下'+inttostr(Upline.FPrepTime)+'分钟机时,请注意充值!');
ShowMessage(Upline.FReturnInfo);
if Upline.FReturnInfo ='上机成功' then
ModalResult:=mrOK;
end;
end;
procedure TInputNoForm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
inherited;
Action:=caFree;
end;
end.
上一篇:
input1.pas
下一篇:
Function GetIp(IP) 获得ip asp