оптимизон от нейронки, доделал автоматические действия, добавил глобальный лог, сделал реконекты к ДА

This commit is contained in:
PC1\PTyTb
2025-08-08 14:57:56 +03:00
parent 1936c9c9c0
commit 71cdcc9909
23 changed files with 721 additions and 249 deletions
+27 -2
View File
@@ -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;