Hi i scare i have tmemo control to receive from serial port, but is not visible the content is in two tmemos
but one is for keep last result what i need to keep, generate chart but the problem is cheking if memo has a text "TEST DONE" but never found but when tmemo is visble find it and fire up DatasToChart(VMTerminal);
procedure TFormMain.OnDatasChart(Sender: TObject; var Str: string);
Var vv,lc:Integer;
begin
// Vmterminal.BeginUpdateBounds;
for lc:=0 to length(Str) do begin
vv:=ord(Str[lc]);
// VMTerminal.Text := VMterminal.Text+ '['+IntToSTr(vv)+']' + str[lc];
VMTerminal.Text := VMterminal.Text+ str[lc];
end;
for lc:=0 to VMTerminal.Lines.Count-1 do begin
if( VMTerminal.Lines[lc]='') then begin
VmTerminal.Lines.Delete(lc);
end;
end;
// Vmterminal.EndUpdateBounds;
if(AnsiContainsText(VMTerminal.Text,'Single cycle') ) then begin
if( (Chart1.Visible=false) and (Not AnsiContainsText(VMTerminal.Text,'MD')) and (not AnsiContainsText(VMTerminal.Text,'>'))) then begin
PanelChart.Height:=210;
PanelChart.Visible:=true;
PanelBtnsAcc.Visible:=false;
end;
end;
if( AnsiContainsText(VMTerminal.Text,'TEST DONE') and (PanelChart.Visible= true) and (AnsiContainsText(VMTerminal.Text,'>'))) then Begin
if(ChartCount <=10) then begin
DatasToChart(VMTerminal);
end else begin
ChartCount:=1;
DatasToChart(VMTerminal);
end;
chart1.Repaint;
end;
// Vmterminal.Text:= Trim(Vmterminal.Text);
ComTerm.SetFocus;
end;