оптимизон от нейронки, доделал автоматические действия, добавил глобальный лог, сделал реконекты к ДА
This commit is contained in:
+27
-2
@@ -76,6 +76,7 @@ type
|
||||
listTimer: TArray<TListTimer>;
|
||||
listBanWords: TArray<TBanWord>;
|
||||
listCounters: TArray<TCounter>;
|
||||
destructor Destroy; override;
|
||||
procedure UpdateGridFromArray;
|
||||
procedure initTimers;
|
||||
end;
|
||||
@@ -138,12 +139,16 @@ var
|
||||
rx: TRegExpr;
|
||||
begin
|
||||
rx := TRegExpr.Create;
|
||||
try
|
||||
rx.InputString := edtBanWordsCheck.text;
|
||||
rx.Expression := edtBanWords.text;
|
||||
if rx.Exec then
|
||||
lBanWordsCheck.text := 'åñòü áàíâîðä'
|
||||
else
|
||||
lBanWordsCheck.text := 'íåò áàíâîðäà';
|
||||
finally
|
||||
rx.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrAutoActions.btnBanWordsDelClick(Sender: TObject);
|
||||
@@ -322,7 +327,8 @@ begin
|
||||
if Assigned(FTimerList[SelectedRow]) then
|
||||
begin
|
||||
FTimerList[SelectedRow].StopT;
|
||||
FTimerList[SelectedRow].TerminateAndDestroy; // Ìåòîä äëÿ îñòàíîâêè ïîòîêà
|
||||
FTimerList[SelectedRow].Terminate; // Ìåòîä äëÿ îñòàíîâêè ïîòîêà
|
||||
FTimerList[SelectedRow].Free;
|
||||
FTimerList.Delete(SelectedRow); // Óäàëÿåì èç ñïèñêà ñ àâòîóíè÷òîæåíèåì
|
||||
end;
|
||||
end;
|
||||
@@ -334,6 +340,26 @@ begin
|
||||
DB.SaveRecordArray<TListTimer>('listTimer', listTimer);
|
||||
end;
|
||||
|
||||
destructor TfrAutoActions.Destroy;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
if Assigned(FTimerList) then
|
||||
begin
|
||||
for i := FTimerList.Count - 1 downto 0 do
|
||||
begin
|
||||
if Assigned(FTimerList[i]) then
|
||||
begin
|
||||
FTimerList[i].StopT;
|
||||
FTimerList[i].Terminate;
|
||||
FTimerList[i].Free;
|
||||
end;
|
||||
end;
|
||||
FreeAndNil(FTimerList);
|
||||
end;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TfrAutoActions.initTimers;
|
||||
var
|
||||
I: Integer;
|
||||
@@ -369,7 +395,6 @@ begin
|
||||
edtCounterName.text := sgCounter.Cells[0, Row];
|
||||
edtCounterTrigger.text := sgCounter.Cells[1, Row];
|
||||
edtCounterCount.text := sgCounter.Cells[2, Row];
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrAutoActions.sgTimersCellClick(const Column: TColumn;
|
||||
|
||||
Reference in New Issue
Block a user