Главная Случайная страница Контакты | Мы поможем в написании вашей работы! | ||
|
Программный документ «Текст программы» разработан для программного продукта «Методическое пособие «Беларусь – мая Айчына». В данном приложении будет приведен только основной модуль разработанной программы.
Программный документ включает в себя следующие блоки:
- ввод данных;
- просмотр данных;
- обработка результатов теста.
Приложение представлено на 15 листах.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, OleCtrls, SHDocVw, Buttons, jpeg, ExtCtrls;
type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
N9: TMenuItem;
N10: TMenuItem;
N12: TMenuItem;
N13: TMenuItem;
N16: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N20: TMenuItem;
N21: TMenuItem;
N22: TMenuItem;
N23: TMenuItem;
N24: TMenuItem;
N15: TMenuItem;
N19: TMenuItem;
N25: TMenuItem;
N26: TMenuItem;
N27: TMenuItem;
N28: TMenuItem;
N29: TMenuItem;
N30: TMenuItem;
N31: TMenuItem;
N32: TMenuItem;
N33: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
N37: TMenuItem;
N38: TMenuItem;
N39: TMenuItem;
N40: TMenuItem;
N41: TMenuItem;
N42: TMenuItem;
N43: TMenuItem;
N44: TMenuItem;
N11: TMenuItem;
Image1: TImage;
procedure N2Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure N17Click(Sender: TObject);
procedure N18Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N6Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure N8Click(Sender: TObject);
procedure N9Click(Sender: TObject);
procedure N13Click(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N25Click(Sender: TObject);
procedure N15Click(Sender: TObject);
procedure N20Click(Sender: TObject);
procedure N21Click(Sender: TObject);
procedure N22Click(Sender: TObject);
procedure N23Click(Sender: TObject);
procedure N24Click(Sender: TObject);
procedure N26Click(Sender: TObject);
procedure N27Click(Sender: TObject);
procedure N28Click(Sender: TObject);
procedure N29Click(Sender: TObject);
procedure N30Click(Sender: TObject);
procedure N31Click(Sender: TObject);
procedure N32Click(Sender: TObject);
procedure N33Click(Sender: TObject);
procedure N34Click(Sender: TObject);
procedure N35Click(Sender: TObject);
procedure N36Click(Sender: TObject);
procedure N37Click(Sender: TObject);
procedure N38Click(Sender: TObject);
procedure N39Click(Sender: TObject);
procedure N40Click(Sender: TObject);
procedure N41Click(Sender: TObject);
procedure N42Click(Sender: TObject);
procedure N44Click(Sender: TObject);
procedure N11Click(Sender: TObject);
private { Private declarations }
public { Public declarations }
end;
var
Form1: TForm1;
f:textfile;
implementation
uses Unit2, Unit3;
{$R *.dfm}
procedure TForm1.N2Click(Sender: TObject);
begin
Form2.Visible:=true;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/о%20беларуси/Основные%20факты%20о%20Беларуси.htm'); end;
procedure TForm1.N16Click(Sender: TObject);
begin
Form2.Visible:=true;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/о%20беларуси/Государственный%20герб%20.htm'); end;
procedure TForm1.N17Click(Sender: TObject);
begin
Form2.Visible:=true;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/о%20беларуси/Государственный%20флаг.htm'); end;
procedure TForm1.N18Click(Sender: TObject);
begin
Form2.Visible:=true;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/о%20беларуси/Государственный%20гимн.htm'); end;
procedure TForm1.N5Click(Sender: TObject);
begin
Form2.Visible:=true;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/о%20беларуси/История%20Беларуси.htm'); end;
procedure TForm1.N6Click(Sender: TObject);
begin
Form2.Visible:=true;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/о%20беларуси/Природа%20Беларуси%20уникальна.htm'); end;
procedure TForm1.N7Click(Sender: TObject);
begin
Form2.Visible:=true;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/о%20беларуси/Климат%20и%20погода%20в%20Беларуси.htm'); end;
procedure TForm1.N8Click(Sender: TObject);
begin
Form2.Visible:=true;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/о%20беларуси/Население%20Беларуси.htm'); end;
procedure TForm1.N9Click(Sender: TObject);
begin
Form2.Visible:=true;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/о%20беларуси/Религии%20в%20Беларуси.htm'); end;
procedure TForm1.N13Click(Sender: TObject);
begin
Form2.Visible:=true;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/о%20беларуси/Спорт%20в%20Беларуси.htm'); end;
procedure TForm1.N10Click(Sender: TObject);
begin
Form2.Visible:=true;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/о%20беларуси/Белорусские%20традиции.htm'); end;
procedure TForm1.N12Click(Sender: TObject);
begin
Form2.Visible:=true;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/о%20беларуси/Кухня%20в%20Беларуси.htm'); end;
procedure TForm1.N25Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/География%20беларуси/Где%20расположена%20Беларусь.htm'); end;
procedure TForm1.N15Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/География%20беларуси/Минская%20область.htm'); end;
procedure TForm1.N20Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/География%20беларуси/Гомельская%20область.htm'); end;
procedure TForm1.N21Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/География%20беларуси/Гродненская%20область.htm'); end;
procedure TForm1.N22Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/География%20беларуси/Брестская%20область.htm'); end;
procedure TForm1.N23Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/География%20беларуси/Витебская%20область.htm'); end;
procedure TForm1.N24Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/География%20беларуси/Могилевская%20область.htm'); end;
procedure TForm1.N26Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Ветковский%20музей%20народного%20творчества.htm'); end;
procedure TForm1.N27Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Церковь%20Параскевы%20Пятницы.htm'); end;
procedure TForm1.N28Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Всё%20больше%20привлекает%20внимание%20туристов%20и%20паломников%20церковь.htm'); end;
procedure TForm1.N29Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Гомельский%20областной%20краеведческий%20музей.htm'); end;
procedure TForm1.N30Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Дворец%20Конисского.htm'); end;
procedure TForm1.N31Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Каменецкая%20вежа%20располагается%20на%20высоком%20холме%20рядом%20с%20полноводной%20когда.htm'); end;
procedure TForm1.N32Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Дворец%20Бутримовича.htm'); end;
procedure TForm1.N33Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Костёл%20Пресвятой%20Троицы.htm'); end;
procedure TForm1.N34Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Костёл%20Пресвятой%20Троицы2.htm'); end;
procedure TForm1.N35Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Мирский%20замок.htm'); end;
procedure TForm1.N36Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Могилевские%20Борисоглебские%20церкви.htm'); end;
procedure TForm1.N37Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Могилевский%20костел%20кармелитов.htm'); end;
procedure TForm1.N38Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Могилевский%20областной%20Драматический%20театр.htm'); end;
procedure TForm1.N39Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Могилевский%20поземельно.htm'); end;
procedure TForm1.N40Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Несвижский%20замок.htm'); end;
procedure TForm1.N41Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/Николаевская%20церковь.htm'); end;
procedure TForm1.N42Click(Sender: TObject);
begin
Form2.Show;
Form2.WebBrowser1.Navigate('file://localhost/D:/Практикам%20технологическая%202011/делаю%20щас/Практикам%20технологическая%202011/проект/Места%20и%20памятники%20Беларусии/никольский%20сабор.htm'); end;
procedure TForm1.N44Click(Sender: TObject);
begin
Assignfile(f,'Rez.txt');
Append(f);
Writeln(f,'Беларусь и её символика');
CloseFile(f);
Form3.Show;
end;
procedure TForm1.N11Click(Sender: TObject);
var h:HWND;
begin
h:=FindWindow('HH Parent','Справка');
if h=0 then WinExec('hh.exe Spr.chm',SW_RESTORE)
else
begin
ShowWindow(h,SW_RESTORE);
Windows.SetForegroundWindow(h);
end;end;end.
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, SHDocVw;
type
TForm2 = class(TForm)
WebBrowser1: TWebBrowser;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
end.
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons;
type
TForm3 = class(TForm)
Label3: TLabel;
Label4: TLabel;
BitBtn1: TBitBtn;
Edit1: TEdit;
Edit2: TEdit;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
s,s1:string;
f:textfile;
implementation
uses Unit4;
{$R *.dfm}
procedure TForm3.BitBtn1Click(Sender: TObject);
begin
if ((Edit1.Text) = '') or((Edit2.Text) = '') then MessageDlg('Неверный ввод!', mtWarning,[mbOk],0) else begin
Assignfile(f,'Rez.txt');
Append(f);
Writeln(f,Edit1.text);
Writeln(f,Edit2.text);
CloseFile(f);
Form4.Show;
Form3.Hide;
end;
end;
end.
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls;
type
TForm4 = class(TForm)
GroupBox5: TGroupBox;
RadioButton40: TRadioButton;
RadioButton41: TRadioButton;
RadioButton42: TRadioButton;
RadioButton43: TRadioButton;
GroupBox6: TGroupBox;
RadioButton36: TRadioButton;
RadioButton37: TRadioButton;
RadioButton38: TRadioButton;
RadioButton39: TRadioButton;
GroupBox7: TGroupBox;
RadioButton32: TRadioButton;
RadioButton33: TRadioButton;
RadioButton34: TRadioButton;
RadioButton35: TRadioButton;
GroupBox8: TGroupBox;
RadioButton28: TRadioButton;
RadioButton29: TRadioButton;
RadioButton30: TRadioButton;
RadioButton31: TRadioButton;
GroupBox9: TGroupBox;
RadioButton24: TRadioButton;
RadioButton25: TRadioButton;
RadioButton26: TRadioButton;
RadioButton27: TRadioButton;
GroupBox10: TGroupBox;
RadioButton21: TRadioButton;
RadioButton22: TRadioButton;
RadioButton23: TRadioButton;
RadioButton44: TRadioButton;
GroupBox11: TGroupBox;
RadioButton17: TRadioButton;
RadioButton18: TRadioButton;
RadioButton19: TRadioButton;
RadioButton20: TRadioButton;
RadioButton45: TRadioButton;
GroupBox12: TGroupBox;
RadioButton13: TRadioButton;
RadioButton14: TRadioButton;
RadioButton15: TRadioButton;
RadioButton16: TRadioButton;
GroupBox13: TGroupBox;
RadioButton9: TRadioButton;
RadioButton10: TRadioButton;
RadioButton11: TRadioButton;
RadioButton12: TRadioButton;
GroupBox14: TGroupBox;
RadioButton5: TRadioButton;
RadioButton6: TRadioButton;
RadioButton7: TRadioButton;
RadioButton8: TRadioButton;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Button7: TButton;
Button8: TButton;
Button9: TButton;
Button10: TButton;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure Button10Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
var flag:integer;
f:textfile;
implementation
{$R *.dfm}
procedure TForm4.Button10Click(Sender: TObject);
begin
Button10.Enabled:=true;
if RadioButton8.Checked=true then
flag:=flag+1;
if Button10.Enabled=true then
GroupBox14.Visible:=false;
Button10.Visible:=false;
end;
procedure TForm4.FormCreate(Sender: TObject);
begin
flag:=0;
end;
procedure TForm4.Button9Click(Sender: TObject);
begin
if RadioButton10.Checked=true then
flag:=flag+1;
if Button9.Enabled=true then
GroupBox13.Visible:=false;
Button9.Visible:=false;
end;
procedure TForm4.Button8Click(Sender: TObject);
begin
if RadioButton14.Checked=true then
flag:=flag+1;
if Button8.Enabled=true then
GroupBox12.Visible:=false;
Button8.Visible:=false;
end;
procedure TForm4.Button7Click(Sender: TObject);
begin
if RadioButton7.Checked=true then
flag:=flag+1;
if Button7.Enabled=true then
GroupBox11.Visible:=false;
Button7.Visible:=false;
end;
procedure TForm4.Button6Click(Sender: TObject);
begin
if RadioButton21.Checked=true then
flag:=flag+1;
if Button6.Enabled=true then
GroupBox10.Visible:=false;
Button6.Visible:=false;
end;
procedure TForm4.Button5Click(Sender: TObject);
begin
if RadioButton26.Checked=true then
flag:=flag+1;
if Button5.Enabled=true then
GroupBox9.Visible:=false;
Button5.Visible:=false;
end;
procedure TForm4.Button4Click(Sender: TObject);
begin
if RadioButton29.Checked=true then
flag:=flag+1;
if Button4.Enabled=true then
GroupBox8.Visible:=false;
Button4.Visible:=false;
end;
procedure TForm4.Button3Click(Sender: TObject);
begin
if RadioButton32.Checked=true then
flag:=flag+1;
if Button3.Enabled=true then
GroupBox7.Visible:=false;
Button3.Visible:=false;
end;
procedure TForm4.Button2Click(Sender: TObject);
begin
if RadioButton39.Checked=true then
flag:=flag+1;
if Button2.Enabled=true then
GroupBox6.Visible:=false;
Button2.Visible:=false;
end;
procedure TForm4.Button1Click(Sender: TObject);
begin
if RadioButton41.Checked=true then
flag:=flag+1;
if Button1.Enabled=true then
GroupBox5.Visible:=false;
Button1.Visible:=false;
ShowMessage('Тест пройден!!! Правильных ответов '+ inttostr(flag));
GroupBox5.Visible:=true;
GroupBox6.Visible:=true;
GroupBox7.Visible:=true;
GroupBox8.Visible:=true;
GroupBox9.Visible:=true;
GroupBox10.Visible:=true;
GroupBox11.Visible:=true;
GroupBox12.Visible:=true;
GroupBox13.Visible:=true;
GroupBox14.Visible:=true;
Button1.Visible:=true;
Button2.Visible:=true;
Button3.Visible:=true;
Button4.Visible:=true;
Button5.Visible:=true;
Button6.Visible:=true;
Button7.Visible:=true;
Button8.Visible:=true;
Button9.Visible:=true;
Button10.Visible:=true;
Assignfile(f,'Rez.txt');
Append(f);
Writeln(f,inttostr(flag)+' Правильных ответов из 10 ');
CloseFile(f);
end;
procedure TForm4.BitBtn1Click(Sender: TObject);
begin
GroupBox5.Visible:=true;
GroupBox6.Visible:=true;
GroupBox7.Visible:=true;
GroupBox8.Visible:=true;
GroupBox9.Visible:=true;
GroupBox10.Visible:=true;
GroupBox11.Visible:=true;
GroupBox12.Visible:=true;
GroupBox13.Visible:=true;
GroupBox14.Visible:=true;
Button1.Visible:=true;
Button2.Visible:=true;
Button3.Visible:=true;
Button4.Visible:=true;
Button5.Visible:=true;
Button6.Visible:=true;
Button7.Visible:=true;
Button8.Visible:=true;
Button9.Visible:=true;
Button10.Visible:=true;
end;
end.
Дата публикования: 2015-10-09; Прочитано: 262 | Нарушение авторского права страницы | Мы поможем в написании вашей работы!