Приложение. Исходный код системы (по модулям).

begin

Series1.AddXY(GrPar[i],GrPercent[i]);

end;

end;

if Sender=N21 then

begin

for j:=1 to Query1.RecordCount do

begin

parm[j]:=Query1.FieldValues['PARAM2'];

Query1.Next;

end;

ind:=-2*NumMarks;

for i:=1 to 4*NumI+1 do

begin

for j:=1 to Query1.RecordCount do

begin

if ind=parm[j] then per:=per+1;

end;

GrPar[i]:=ind;

GrPercent[i]:=per/Query1.RecordCount;

per:=0;

ind:=ind+1;

end;

Series1.Clear;

Chart1.BottomAxis.Title.Caption:='Параметр 2';

Chart1.BottomAxis.Minimum:=-2*NumMarks;

Chart1.BottomAxis.Maximum:=ind-1;

For i:=0 to 4*NumI+1 do

begin

Series1.AddXY(GrPar[i],GrPercent[i]);

end;

end;

if Sender=N31 then

begin

for j:=1 to Query1.RecordCount do

begin

parm[j]:=Query1.FieldValues['PARAM3'];

Query1.Next;

end;

ind:=-1*NumMarks;

for i:=1 to 2*NumI+1 do

begin

for j:=1 to Query1.RecordCount do

begin

if ind=parm[j] then per:=per+1;

end;

GrPar[i]:=ind;

GrPercent[i]:=per/Query1.RecordCount;

per:=0;

ind:=ind+1;

end;

Series1.Clear;

Chart1.BottomAxis.Title.Caption:='Параметр 3';

Chart1.BottomAxis.Minimum:=-1*NumMarks;

Chart1.BottomAxis.Maximum:=ind-1;

For i:=0 to 2*NumI+1 do

begin

Series1.AddXY(GrPar[i],GrPercent[i]);

end;

end;

if Sender=N1 then

begin

for j:=1 to Query1.RecordCount do

begin

parm[j]:=Query1.FieldValues['SUMMARK'];

Query1.Next;

end;

ind:=0;

for i:=1 to 6*NumI+1 do

begin

for j:=1 to Query1.RecordCount do

begin

if ind=parm[j] then per:=per+1;

end;

GrPar[i]:=ind;

GrPercent[i]:=per/Query1.RecordCount;

per:=0;

ind:=ind+1;

end;

Series1.Clear;

Chart1.BottomAxis.Title.Caption:='Суммарный балл';

Chart1.BottomAxis.Minimum:=0*NumMarks;

Chart1.BottomAxis.Maximum:=ind-1;

For i:=0 to 6*NumI+1 do

begin

Series1.AddXY(GrPar[i],GrPercent[i]);

end;

end;

Query1.First;

end;

procedure TForm5.N3Click(Sender: TObject);

begin

if ColorDialog1.Execute then

begin

Series1.SeriesColor:=ColorDialog1.Color;

end;

end;

procedure TForm5.N4Click(Sender: TObject);

begin

if ColorDialog1.Execute then

begin

Chart1.Gradient.EndColor:=ColorDialog1.Color;

Chart1.Gradient.StartColor:=clWhite;

end;

end;

end.

Модуль 6.

Код этого модуля отвечает за окно и сам процесс создания локальной базы данных.

unit Unit6;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, ExtCtrls, StdCtrls, Buttons, DB, DBTables;

type

TForm6 = class(TForm)

Panel1: TPanel;

BitBtn1: TBitBtn;

BitBtn2: TBitBtn;

Label1: TLabel;

Edit1: TEdit;

Label2: TLabel;

Edit2: TEdit;

Label3: TLabel;

procedure BitBtn1Click(Sender: TObject);

procedure BitBtn2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form6: TForm6;

implementation

uses Unit1;

{$R *.dfm}

procedure TForm6.BitBtn1Click(Sender: TObject);

begin

ModalResult:=mrNo;

end;

procedure TForm6.BitBtn2Click(Sender: TObject);

var

Comm:TStringList;

begin

try

with Form1.Table1 do begin

Active := False;

DatabaseName := 'Olymp';

TableType := ttParadox;

TableName := Edit1.Text;

if not Form1.Table1.Exists then begin

with FieldDefs do begin

Clear;

with AddFieldDef do begin

Name := 'Counter';

DataType := ftInteger;

Required := True;

end;

with AddFieldDef do begin

Name := 'FIO';

DataType := ftString;

Size := 25;

end;

with AddFieldDef do begin

Перейти на страницу: 1 2 3 4 5 6 7 8 9 10