ИСХОДНЫЕ КОДЫ ПРОГРАММЫ
Б.1 Содержание файла Project1.dpr
program Project1;
uses
Forms,
Windows,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2},
Unit3 in 'Unit3.pas' {Form3},
Unit4 in 'Unit4.pas' {fmChoose},
Unit5 in 'Unit5.pas' {fmChooseT3},
Unit6 in 'Unit6.pas' {fmVar};
var hwnd : THandle;
{$R *.res}
begin
// Ищем хендл окна
hwnd := FindWindow(nil, 'Обучающая система проектирования электромеханических следящих систем');
if hwnd = 0 then // Если не запущено, то запускаем
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
Application.CreateForm(TForm3, Form3);
Application.CreateForm(TfmChoose, fmChoose);
Application.CreateForm(TfmChooseT3, fmChooseT3);
Application.CreateForm(TfmVar, fmVar);
Application.Run;
end
else begin
Application.MessageBox('Приложение уже запущено!','Внимание!', MB_OK or MB_ICONERROR);
SetForegroundWindow(hwnd)
end;
end.
Б.2 Содержание файла Unit1.pas
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, jpeg, ExtCtrls, StdCtrls, DB, DBTables, Grids, DBGrids,
TeEngine, Series, TeeProcs, Chart, Math, ShellAPI, DBCtrls, Buttons,IniFiles;
type
TForm1 = class(TForm)
PageControl1: TPageControl;
StartSheet: TTabSheet;
TabSheet5: TTabSheet;
Image1: TImage;
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Edit7: TEdit;
Edit8: TEdit;
Edit9: TEdit;
Edit10: TEdit;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
BaseSheet: TTabSheet;
Bevel1: TBevel;
Label14: TLabel;
Label15: TLabel;
Label18: TLabel;
DBGrid1: TDBGrid;
RedSheet: TTabSheet;
SensorSheet: TTabSheet;
LahSheet: TTabSheet;
EngineGrid: TStringGrid;
Label20: TLabel;
GroupBox1: TGroupBox;
PeredGrid: TStringGrid;
Label25: TLabel;
Label24: TLabel;
Edit15: TEdit;
UpDown1: TUpDown;
Label26: TLabel;
DiameterGrid: TStringGrid;
GroupBox2: TGroupBox;
Edit16: TEdit;
Button5: TButton;
Edit17: TEdit;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Edit19: TEdit;
Label30: TLabel;
Button6: TButton;
Edit18: TEdit;
ShemeSheet: TTabSheet;
SensorGrid: TStringGrid;
Label16: TLabel;
PageControl2: TPageControl;
TabSheet1: TTabSheet;
LAX: TChart;
LineSeries1: TLineSeries;
TabSheet3: TTabSheet;
Panel1: TPanel;
Series2: TLineSeries;
Series3: TLineSeries;
Series4: TLineSeries;
Series5: TLineSeries;
Series6: TLineSeries;
Series7: TLineSeries;
Series8: TLineSeries;
Image2: TImage;
Label40: TLabel;
Button2: TButton;
Series10: TLineSeries;
Series11: TLineSeries;
Series12: TLineSeries;
Series13: TLineSeries;
Series1: TLineSeries;
Series9: TLineSeries;
Button7: TButton;
Button8: TButton;
PageControl3: TPageControl;
TabSheet2: TTabSheet;
TabSheet4: TTabSheet;
DMImage: TImage;
DMGrid: TStringGrid;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
UImage: TImage;
SpeedButton3: TSpeedButton;
SpeedButton4: TSpeedButton;
UGrid: TStringGrid;
Label17: TLabel;
Label19: TLabel;
Label44: TLabel;
Label45: TLabel;
Label46: TLabel;
Label47: TLabel;
Label48: TLabel;
Label49: TLabel;
Label51: TLabel;
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.