You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
unit u_MyThread;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Classes;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
TMyThread = class(TThread)
|
|
|
|
|
private
|
|
|
|
|
FOptype: string;
|
|
|
|
|
FMailQueNo: string;
|
|
|
|
|
FFlag: Boolean;
|
|
|
|
|
procedure SetOptype(const Value: string);
|
|
|
|
|
procedure SetMailQueNo(const Value: string);
|
|
|
|
|
|
|
|
|
|
function Myfun(qno:string):Boolean; // ԭ<><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽ<EFBFBD><DDBD><EFBFBD> TMyThread<61><64>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>
|
|
|
|
|
protected
|
|
|
|
|
procedure Execute; override;
|
|
|
|
|
public
|
|
|
|
|
property Optype: string read FOptype write SetOptype;
|
|
|
|
|
property MailQueNo: string read FMailQueNo write SetMailQueNo;
|
|
|
|
|
property MyFunRetVal: Boolean read FFlag default False;
|
|
|
|
|
constructor Create(qno:string );
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
u_tree_main;
|
|
|
|
|
|
|
|
|
|
function TMyThread.Myfun;
|
|
|
|
|
begin
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>UI<55>Ĺ<EFBFBD><C4B9><EFBFBD>
|
|
|
|
|
frm_tree_main.sendmailBatch(MailQueNo);
|
|
|
|
|
FFlag := True;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
constructor TMyThread.Create(qno:string );
|
|
|
|
|
begin
|
|
|
|
|
inherited Create(True);
|
|
|
|
|
Self.FreeOnTerminate := True;
|
|
|
|
|
MailQueNo:=qno;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TMyThread.Execute;
|
|
|
|
|
begin
|
|
|
|
|
// <20>ò<EFBFBD><C3B2><EFBFBD>UI<55>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD>Ż<EFBFBD><C5BB><EFBFBD><EFBFBD>߳<EFBFBD><DFB3><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD>ѱ<EFBFBD>֤ͬ<D6A4><CDAC>
|
|
|
|
|
//Synchronize(Myfun);
|
|
|
|
|
FFlag := Myfun(FMailQueNo);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TMyThread.SetMailQueNo(const Value: string);
|
|
|
|
|
begin
|
|
|
|
|
FMailQueNo := Value;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TMyThread.SetOptype(const Value: string);
|
|
|
|
|
begin
|
|
|
|
|
FOptype := Value;
|
|
|
|
|
end;
|
|
|
|
|
end.
|