⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clocktime.pas

📁 上传个考勤系统,希望别人也能用.该代码只能算初级的东东,软件代码复用性不高,重复代码比较多.唯一感觉有点取鉴的可能就是端口和dll的连接,还有线程的使用,本想改一改,但是手头没有考勤机了,对应考勤机是
💻 PAS
字号:
unit ClockTime;

interface

uses
  Windows, SysUtils, Classes, Graphics, Controls, Forms,
  StdCtrls, Mask, PrjConst;

type
  TdlgClockTime = class(TForm)
    meBegin: TMaskEdit;
    Label1: TLabel;
    Label2: TLabel;
    meEnd: TMaskEdit;
    btnOK: TButton;
    btnCancel: TButton;
    Label3: TLabel;
    procedure meBeginExit(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    function Execute: Boolean;
  end;

var
  dlgClockTime: TdlgClockTime;

implementation

uses timeclock, Functions;

{$R *.DFM}
function TdlgClockTime.Execute: Boolean;
begin
  if not Assigned(dlgClockTime) then
    dlgClockTime:=TdlgClockTime.Create(Application);
  with dlgClockTime do
  begin
    Result:=dlgClockTime.ShowModal=mrOK;
  end;
end;

procedure TdlgClockTime.meBeginExit(Sender: TObject);
begin
  with Sender as TCustomEdit do
  begin
    try
      if MyStrToTime(Text)>1 then
        Raise Exception.Create(SEANEOyENEIHhMmO);
    except
      if CanFocus then SetFocus;
      Raise;
    end;
  end;
end;

end.

⌨️ 快捷键说明

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