procedure ComboBox1Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
ElektKursInf: TElektKursInf;
fil1,fil:textfile;
implementation
uses Unit44, Unit1, Unit3, Unit5;
{$R *.DFM}
procedure TElektKursInf.Exit1Click(Sender: TObject);
begin
ElektKursInf.Hide;
zagl.close;
procedure TElektKursInf.FormClose(Sender: TObject;
var Action: TCloseAction);
zagl.Close;
procedure TElektKursInf.FormShow(Sender: TObject);
var i,j:integer;s0,s,s2,k:string;
assignfile(fil,'bd\path1.txt');
reset(fil);
s:='';
while not eof(fil) do
readln(fil,s);
s0:=s;
closefile(fil);
assignfile(fil,'bd\path.txt');
Listbox1.Clear;
Listbox1.Items.Add(s0+s);
assignfile(fil,'bd\themes.txt');
Listbox3.Clear;
Listbox3.Items.Add(s);
Label3.Caption:='Здравствуйте, '+zagl.Edit1.Text+'. Вы работаете с учебным курсом "Компьютерные сети"'; //ComboBox1.ItemIndex := 0;
assignfile(fil1,'bd\result.txt');
reset(fil1);
while not eof(fil1) do
readln(fil1,s2);
for i:=1 to length(s2) do begin
if (s2[i] = '*') then begin
if s=zagl.Edit1.Text then begin
j:=i+1;
while s2[j]<>'#' do begin
if s2[j]='&' then k:=s2[j+1];
j:=j+1;
s:=s+s2[i];
closefile(fil1);
{showmessage(k);}
if k='1' then begin
listbox2.items.Add(listbox3.Items.Strings[1]);
if k='2' then begin
listbox2.items.Add(listbox3.Items.Strings[2]);
if k='3' then begin
listbox2.items.Add(listbox3.Items.Strings[3]);
if k='4' then begin
listbox2.items.Add(listbox3.Items.Strings[4]);
if k='5' then begin
listbox2.items.Add(listbox3.Items.Strings[5]);
if k='6' then begin
listbox2.items.Add(listbox3.Items.Strings[6]);
if k='7' then begin
listbox2.items.Add(listbox3.Items.Strings[7]);
listbox2.ItemIndex:=0;
procedure TElektKursInf.ComboBox1Change(Sender: TObject);
{with ClientElektKurs do
while not EOF do
ListBox2.items.add(FieldByName('Kurs').AsString);
next;
end;}
procedure TElektKursInf.Button1Click(Sender: TObject);
ListBox1.ItemIndex:=ListBox2.ItemIndex;
Form37.WebBrowser1.Navigate(ListBox1.Items.Strings[ListBox1.ItemIndex]);
//Form37.ComboBox1.Text:=ListBox1.Items.Strings[ListBox1.ItemIndex];
Form37.ToolButton2.Enabled:=false;
Form37.ToolButton3.Enabled:=false;
Form37.Show;
Button1.Enabled:=false;
Label3.Caption:='';
//ElektKursInf.Hide;
procedure TElektKursInf.Button2Click(Sender: TObject);
Form3.Show;
procedure TElektKursInf.Button3Click(Sender: TObject);
Form5.Show;
end.
3. Модули статистики по группам и индивидуально
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids;
type
TForm3 = class(TForm)
StringGrid1: TStringGrid;
procedure FormShow(Sender: TObject);
procedure StringGrid1Click(Sender: TObject);
Form3: TForm3;
s,s2:string;
fil1:textfile;
i,j:integer;
{$R *.dfm}
procedure TForm3.FormShow(Sender: TObject);
var s0:double;
StringGrid1.Cells[0,0]:='Логин';
StringGrid1.Cells[1,0]:='Время обучения(мин.)';
StringGrid1.Cells[2,0]:='Количество пройденных тем';
StringGrid1.Cells[3,0]:='Количество баллов';assignfile(fil1,'bd\result.txt');
i:=1;
for j:=1 to length(s2) do begin
if s2[j]='*' then begin
StringGrid1.Cells[0,i]:=s;
continue;
if s2[j]='&' then begin
s0:=strtofloat(s)/60000;
StringGrid1.Cells[1,i]:=floattostr(s0);
if s2[j]='$' then begin
StringGrid1.Cells[2,i]:=s;
if s2[j]='#' then begin
StringGrid1.Cells[3,i]:=s;
s:=s+s2[j];
i:=i+1;
StringGrid1.RowCount:=i;
unit Unit5;
Dialogs, Grids;
TForm5 = class(TForm)
Form5: TForm5;
s,s1,s2,s3:string;
uses Unit1;
procedure TForm5.FormShow(Sender: TObject);
StringGrid1.Cells[0,0]:='1 тема';
StringGrid1.Cells[1,0]:='2 тема';
StringGrid1.Cells[2,0]:='3 тема';
StringGrid1.Cells[3,0]:='4 тема';
StringGrid1.Cells[4,0]:='5 тема';
StringGrid1.Cells[5,0]:='6 тема';
StringGrid1.Cells[6,0]:='7 тема';
assignfile(fil1,'bd\result1.txt');
s3:='';
Страницы: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12