?? mythread.pas
字號:
unit MyThread;
interface
uses
Classes,Dialogs,windows,SysUtils;
type
LightAllBoxThread = Class (TThread)
// public
// constructor Create(CreateSuspended: Boolean);
protected
procedure Execute; override;
end;
implementation
uses
TestControl;
{ LightAllBoxThread }
procedure LightAllBoxThread.Execute;
var
i,j:integer;
begin
inherited;
for i:=0 to 15 do
begin
for j:=0 to Form1.FUnitMaxNumber-1 do
begin
if (Self.Terminated=True) then
begin
break;
end;
if not (Form1.FCabinetControler.LighterStoreUnit(Form1.ComboBoxCabinet.ItemIndex,
i,j)) then
begin
// ShowMessage('點亮失敗');
break;
end;
Sleep(1000);
end;
end;
Form1.ButtonQuery.Enabled:=True;
Form1.ButtonOpenOneBox.Enabled:=True;
Form1.ButtonOpenAllBox.Enabled:=True;
Form1.ButtonStopLightAllUnit.Enabled:=False;
Form1.ButtonLightOneUnit.Enabled:=True;
Form1.ButtonLightOneBox.Enabled:=True;
Form1.ButtonQuery.Enabled:=True;
Form1.ButtonLightAllUnit.Enabled:=True;
Form1.ButtonStopLightAllUnit.Enabled:=False;
Form1.ButtonStopLightOneBox.Enabled:=False;
Form1.ButtonOpenAllBox.Enabled:=True;
// ShowMessage('點亮所有抽屜的所有單元結束');
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -