Приложение Г (Программное средство оценки надежности АСО объектов повышенной защищенности)
Описание файла
Файл "Приложение Г" внутри архива находится в следующих папках: Программное средство оценки надежности АСО объектов повышенной защищенности, Плакаты и чертежи. Документ из архива "Программное средство оценки надежности АСО объектов повышенной защищенности", который расположен в категории "". Всё это находится в предмете "дипломы и вкр" из 12 семестр (4 семестр магистратуры), которые можно найти в файловом архиве МПУ. Не смотря на прямую связь этого архива с МПУ, его также можно найти и в других разделах. Архив можно найти в разделе "остальное", в предмете "дипломы" в общих файлах.
Онлайн просмотр документа "Приложение Г"
Текст из документа "Приложение Г"
129
Приложение Г
(справочное)
Листинг программы автоматизированного определения надежности системы охраны объектов повышенной защищенности
Модуль 1
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit2.h"
#include "Unit1.h"
#include "SysUtils.hpp"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
Form1->Visible=false;
Form2->Visible=true;
Timer1->Enabled=false;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TRichEdit *RichEdit1;
TTimer *Timer1;
void __fastcall Timer1Timer(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
модуль 2
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "Unit2.h"
#include "SysUtils.hpp"
#include "Unit3.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::FormClose(TObject *Sender, TCloseAction &Action)
{
Application->Terminate();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::BitBtn1Click(TObject *Sender)
{
Form2->Visible=false;
Form3->Visible=true;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef Unit2H
#define Unit2H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TForm2 : public TForm
{
__published: // IDE-managed Components
TLabeledEdit *LabeledEdit1;
TBitBtn *BitBtn1;
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall BitBtn1Click(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm2(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm2 *Form2;
//---------------------------------------------------------------------------
#endif
модуль 3
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit2.h"
#include "Unit3.h"
#include "SysUtils.hpp"
#include "Unit4.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm3 *Form3;
int e1,e2,e3,e4,e5,e6,e7,e8,i;
//---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm3::FormClose(TObject *Sender, TCloseAction &Action)
{
Application->Terminate();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::CheckBox1MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (CheckBox1->Checked)
{Edit1->Visible=false;
Label1->Visible=false;
Edit1->Clear();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::CheckBox1MouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (CheckBox1->Checked)
{Edit1->Visible=true;
Label1->Visible=true;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::CheckBox2MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (CheckBox2->Checked)
{Edit2->Visible=false;
Label2->Visible=false;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::CheckBox2MouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (CheckBox2->Checked)
{Edit2->Visible=true;
Label2->Visible=true;
Edit2->Clear(); }
}
//---------------------------------------------------------------------------
void __fastcall TForm3::CheckBox3MouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (CheckBox3->Checked)
{Edit3->Visible=true;
Label3->Visible=true;
Edit3->Clear();}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::CheckBox3MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (CheckBox3->Checked)
{Edit3->Visible=false;
Label3->Visible=false;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::CheckBox5MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (CheckBox5->Checked)
{Edit4->Visible=false;
Label4->Visible=false;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::CheckBox5MouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (CheckBox5->Checked)
{Edit4->Visible=true;
Label4->Visible=true;
Edit4->Clear();}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::CheckBox8MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (CheckBox8->Checked)
{Edit5->Visible=false;
Label5->Visible=false;
Edit6->Visible=false;
Label6->Visible=false;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::CheckBox8MouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (CheckBox8->Checked)
{Edit5->Visible=true;
Label5->Visible=true;
Edit6->Visible=true;
Label6->Visible=true;
Edit5->Clear();
Edit6->Clear();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::CheckBox9MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (CheckBox9->Checked)
{Edit7->Visible=false;
Label7->Visible=false;
Edit8->Visible=false;
Label8->Visible=false;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::CheckBox9MouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (CheckBox9->Checked)
{Edit7->Visible=true;
Label7->Visible=true;
Edit8->Visible=true;
Label8->Visible=true;
Edit7->Clear();
Edit8->Clear();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::N5Click(TObject *Sender)
{
Application->Terminate();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::BitBtn1Click(TObject *Sender)
{ // -----------
Form4->Label1->Visible=false; Form4->Edit1->Visible=false;
Form4->Label2->Visible=false; Form4->Edit2->Visible=false;
Form4->Label3->Visible=false; Form4->Edit3->Visible=false;
if (CheckBox1->Checked){
try
{
e1=StrToInt(Edit1->Text);
if (e1==1) {Form4->Label1->Enabled=true; Form4->Edit1->Enabled=true;
Form4->Label1->Visible=true; Form4->Edit1->Visible=true;}
if (e1==2) {Form4->Label1->Enabled=true; Form4->Edit1->Enabled=true;
Form4->Label1->Visible=true; Form4->Edit1->Visible=true;
Form4->Label2->Enabled=true; Form4->Edit2->Enabled=true;
Form4->Label2->Visible=true; Form4->Edit2->Visible=true;}
if (e1==3) {Form4->Label1->Enabled=true; Form4->Edit1->Enabled=true;
Form4->Label1->Visible=true; Form4->Edit1->Visible=true;
Form4->Label2->Enabled=true; Form4->Edit2->Enabled=true;
Form4->Label2->Visible=true; Form4->Edit2->Visible=true;
Form4->Label3->Enabled=true; Form4->Edit3->Enabled=true;
Form4->Label3->Visible=true; Form4->Edit3->Visible=true;}
Form4->Visible=true;
Form3->Visible=false;
}
catch(EConvertError&)
{
Application->MessageBox("Вы ввели ошибочное число, повторите ввод",MB_OK);
} }
//-----------
Form4->Label4->Visible=false; Form4->Edit4->Visible=false;
Form4->Label5->Visible=false; Form4->Edit5->Visible=false;
if (CheckBox2->Checked){
try
{
e2=StrToInt(Edit2->Text);
if (e2==1) {Form4->Label4->Enabled=true; Form4->Edit4->Enabled=true;
Form4->Label4->Visible=true; Form4->Edit4->Visible=true;}
if (e2==2) {Form4->Label4->Enabled=true; Form4->Edit4->Enabled=true;
Form4->Label4->Visible=true; Form4->Edit4->Visible=true;
Form4->Label5->Enabled=true; Form4->Edit5->Enabled=true;
Form4->Label5->Visible=true; Form4->Edit5->Visible=true;}
Form4->Visible=true;
Form3->Visible=false;
}
catch(EConvertError&)
{
Application->MessageBox("Вы ввели ошибочное число, повторите ввод",MB_OK);
} }