📄 unitfrmlrgetdata.pas
字号:
unit UnitfrmLRGetData;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,UnitLinearRegress, ExtCtrls,unitFP;
type
TfrmLRGetData = class(TForm)
Button1: TButton;
Button2: TButton;
Panel1: TPanel;
GroupBox1: TGroupBox;
Label7: TLabel;
Label6: TLabel;
ComboBox6: TComboBox;
ComboBox5: TComboBox;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmLRGetData: TfrmLRGetData;
implementation
uses UnitAuto;
{$R *.dfm}
procedure TfrmLRGetData.Button1Click(Sender: TObject);
var
strData :string;
Fd1,Fd2 :string;
begin
if Application.FindComponent('frmLR')=nil then
Application.CreateForm(TfrmLR, frmLR);
try
//get data
if self.RadioButton2.Checked then
begin
Fd1:=self.ComboBox6.Text;
Fd2:=self.ComboBox5.Text;
strData:='';
frmMain.DBGridDataOld.DataSource.DataSet:=nil;
ClientDataSetDataOld.First;
while not (ClientDataSetDataOld.Eof) do
begin
strData:=strData+ClientDataSetDataOld.fieldByName(Fd1).asString
+'='+ClientDataSetDataOld.fieldByName(Fd2).asString+#13+#10;
ClientDataSetDataOld.Next;
end;
ClientDataSetDataOld.First;
frmMain.DBGridDataOld.DataSource.DataSet:=ClientDataSetDataOld;
frmLR.VLE_Data.Strings.Text:=strData;
end;
except
end;
self.Close;
frmLR.ShowModal;
end;
procedure TfrmLRGetData.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Action:=cafree;
end;
procedure TfrmLRGetData.Button2Click(Sender: TObject);
begin
self.Close;
end;
procedure TfrmLRGetData.FormCreate(Sender: TObject);
var
i :integer;
str :string;
begin
str:='';
for i:=0 to DataLength-1 do
begin
str:=str+'d'+inttostr(i)+#13+#10;
end;
self.ComboBox6.Items.Text:=str;
self.ComboBox5.Items.Text:=str;
str:='';
self.ComboBox6.ItemIndex:=0;
self.ComboBox5.ItemIndex:=1;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -