program rd;

uses
  Forms,
  MainUnit in 'Forms\MainUnit.pas' {MainForm},
  DataUnit in 'Units\DataUnit.pas' {SQL_DM: TDataModule},
  BeginUnit in 'Units\BeginUnit.pas' {BeginForm},
  ConstUnit in 'Units\ConstUnit.pas',
  D2XXUnit in 'Units\D2XXUnit.pas',
  DeviceRD in 'Units\DeviceRD.pas',
  device_thread in 'Units\device_thread.pas',
  IzmUnit in 'Forms\IzmUnit.pas' {IzmForm},
  AdminUnit in 'Forms\AdminUnit.pas' {AdminForm},
  AboutUnit in 'Forms\AboutUnit.pas' {AboutBox},
  IzmGraphUnit in 'Units\IzmGraphUnit.pas' {IzmGraphFrame: TFrame},
  MultiInstUnit in 'Units\MultiInstUnit.pas',
  class_patinet in 'Classes\class_patinet.pas',
  user_types in 'Classes\user_types.pas',
  check_user_data in 'Units\check_user_data.pas',
  class_measure in 'Classes\class_measure.pas',
  class_values in 'Classes\class_values.pas',
  class_source in 'Classes\class_source.pas',
  class_model in 'Classes\class_model.pas',
  class_param in 'Classes\class_param.pas',
  class_point in 'Classes\class_point.pas',
  class_rd_image in 'Classes\class_rd_image.pas',
  class_UI_values in 'Classes\class_UI_values.pas',
  class_counted_values in 'Classes\class_counted_values.pas',
  class_diagnoz in 'Classes\class_diagnoz.pas',
  class_basics in 'Classes\class_basics.pas';

const
  UniqueString = 'RDProject';
    {Может быть любое слово. Желательно латинскими буквами.}

{$E exe}

{$R *.res}

begin

  if init_mutex(UniqueString) then
      begin
        Application.Initialize;
        //Application.MainFormOnTaskbar := True;
        Application.Title := 'RD Project';
        Application.CreateForm(TMainForm, MainForm);
  Application.CreateForm(TSQL_DM, SQL_DM);
  Application.CreateForm(TBeginForm, BeginForm);
  Application.CreateForm(TIzmForm, IzmForm);
  Application.CreateForm(TAdminForm, AdminForm);
  Application.CreateForm(TAboutBox, AboutBox);
  Application.Run;
        //Application.BringToFront;
      end
      else begin
      Show_mes;
      
        exit; {Выходим до инициализации, если мьютекс уже есть}
      end;
        
end.
