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

📄 thd.pas

📁 初学DELPHI编写的“奖学金评定系统”
💻 PAS
字号:
unit Thd;

interface

uses
  Classes;

type
  TThd = class(TThread)
  private
    { Private declarations }
  protected
    procedure Execute; override;
    function exec(): boolean;virtual;abstract;
  public
    constructor create();
  end;

  TXueJiCL = class(TThd)
  protected
    function exec(): boolean;override;
  end;

  TChengJiCL = class(TThd)
  protected
    function exec(): boolean;override;
  end;

  TdyzhCLAuto = class(TThd)
  protected
    function exec(): boolean;override;
  end;

  TAddData = class(TThd)
  protected
    function exec(): boolean;override;
  end;

  TOutput = class(TThd)
  protected
    function exec(): boolean;override;
  end;

implementation

uses zhUnit, useDLL;

procedure TThd.Execute;
begin
  exec();
end;

constructor TThd.create();
begin
  freeonterminate:= true;
  inherited create(false);
end;

function TChengJiCL.exec(): boolean;
begin
  with mainform do begin
      label2.caption:= '成绩信息录入中';
      update;
    if ChengJiCL() then begin
      if terminated then
        exit;

      label2.caption:= '成绩信息录入完毕';
      update;
    end;
  end;
end;

function TXueJiCL.exec(): boolean;
begin
  XueJiCL();
  {
  with mainform do begin
    label2.caption:= '学籍信息录入中';
    update;

    if XueJiCL() then begin
      if terminated then
        exit;
      label2.caption:= '学籍信息录入完毕';
      update;
    end;
  end;
  }
end;

function TdyzhCLAuto.exec(): boolean;
begin
  with mainform do begin
      label2.caption:= '得分信息录入中';
      update;
    if dyzhCLAuto() then begin
      if terminated then
        exit;
      label2.caption:= '得分信息录入完毕';
      update;
    end;
  end;
end;

function TAddData.exec(): boolean;
begin
  with mainform do begin
      label2.caption:= '正在综合处理成绩';
      update;
    if AddData() then begin
      if terminated then
        exit;
      label2.caption:= '所有成绩信息输入完成';
      update;
    end;
  end;
end;

function TOutput.exec(): boolean;
begin
  with mainform do begin
      label2.caption:= '正在输出成绩';
      update;
    if Output() then begin
      label2.caption:= '成绩信息输出完成';
      update;
    end;
  end;
end;

end.     

⌨️ 快捷键说明

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