program HC4;

{%ToDo 'HC4.todo'}

  uses
  AddOrEditGraph in 'graph-related\AddOrEditGraph.pas' {fmAddOrEditGraph},
  BoardManager in 'BoardManager.pas' {fmBoardManager},
  Dashboard in 'Dashboard.pas' {fmDashboard},
  DataSetToTabDelimitedFile in '..\..\..\components\DataSetToTabDelimitedFile\DataSetToTabDelimitedFile.pas',
  eFrames in 'eFrames.pas' {fmeFrames},
  Extremes2 in 'Extremes2.pas' {fmExtremes2},
  FixPhotocell in 'FixPhotocell.pas' {fmFixPhotocell},
  Forms,
  GenericGraph3 in 'graph-related\GenericGraph3.pas',
  GlobalDump in 'GlobalDump.pas' {fmGlobalDump},
  GraphAnnualTemps in 'graph-related\GraphAnnualTemps.pas' {fmAnnualTemps},
  GraphManager2 in 'graph-related\GraphManager2.pas' {fmGraphManager},
  GraphOutsideGrouped in 'graph-related\GraphOutsideGrouped.pas' {fmGroupedOutsideGraph},
  GraphSeries3 in 'graph-related\GraphSeries3.pas',
  GraphWind in 'graph-related\GraphWind.pas' {fmGraphWind},
  HC3DM in 'HC3DM.pas' {dmHC3: TDataModule},
  HC4Main in 'HC4Main.pas' {fmHC4Main},
  HC3Utilities in 'HC3Utilities.pas',
  IndoorInstruments in 'IndoorInstruments.pas' {fmIndoorSensors},
  LabelAdjuster in '..\..\..\components\utilities\LabelAdjuster.pas',
  LogManager in 'LogManager.pas' {fmLogManager},
  MadExcept,
  MadListHardware,
  MadListModules,
  MadListProcesses,
  MyConsts in '..\..\..\components\utilities\MyConsts.pas',
  MyUtils {NotAlreadyRunning},
  NoteManager in 'NoteManager.pas' {fmNoteManager},
  ObservedAndWM in 'ObservedAndWM.pas',
  OutdoorInstruments in 'OutdoorInstruments.pas' {fmOutdoorInstruments},
  PickDateRange in 'PickDateRange.pas' {fmPickDateRange},
  RelayManager in 'RelayManager.pas' {fmRelayManager},
  ScaleManager in '..\..\..\components\utilities\ScaleManager.pas',
  SelectPrinter in 'SelectPrinter.pas' {fmSelectPrinter},
  SensorDevice in 'table-specific\SensorDevice.pas',
  SensorManager in 'SensorManager.pas' {fmSensorManager},
  SerialManager in 'SerialManager.pas',
  SimulatedSensor in 'table-specific\SimulatedSensor.pas' {fmSimulatedSensor},
  Splash in 'Splash.pas' {fmSplash},
  SummaryManager in 'SummaryManager.pas' {fmSummaryManager},
  table_generic in 'table-specific\table_generic.pas',
  table_generic_helper in 'table-specific\table_generic_helper.pas',
  table_OnOff in 'table-specific\table_OnOff.pas',
  table_Pond in 'table-specific\table_Pond.pas',
  table_Rain in 'table-specific\table_Rain.pas',
  TableManager in 'table-specific\TableManager.pas' {fmTableManager},
  table_Light in 'table-specific\table_Light.pas',
  table_Thermostats in 'table-specific\table_Thermostats.pas',
  VC0706 in 'table-specific\VC0706.pas' {fmVC0706},
  WeatherThisDate in 'WeatherThisDate.pas' {fmWeatherThisDate};

{$R *.res}

  begin
    if NotAlreadyRunning('2024-11-24 1102', 'Home Control 4') then
      begin (* start this instance *)
        fmSplash := tfmSplash.Create(Application);
        try     (* must get rid of splash form *)
          fmSplash.Show;
          fmSplash.Update;
          Application.Initialize;
          fmSplash.StatusUpdate('Creating data module....');
            Application.CreateForm(TdmHC3, dmHC3);
          fmSplash.StatusUpdate('Creating main form....');
            Application.CreateForm(tfmHC4Main,             fmHC4Main);
          fmSplash.StatusUpdate('Creating infrastructure ....');
            Application.CreateForm(tfmPickDateRange,       fmPickDateRange);
            Application.CreateForm(tfmBoardManager,        fmBoardManager);
            Application.CreateForm(tfmDashboard,           fmDashboard);
            Application.CreateForm(TfmFixPhotocell,        fmFixPhotocell);
            Application.CreateForm(TfmeFrames,             fmeFrames);
            Application.CreateForm(tfmExtremes2,           fmExtremes2);
            Application.CreateForm(TfmGlobalDump,          fmGlobalDump);
            Application.CreateForm(tfmIndoorSensors,       fmIndoorSensors);
            Application.CreateForm(tfmLogManager,          fmLogManager);
            Application.CreateForm(tfmNoteManager,         fmNoteManager);
            Application.CreateForm(tfmOutdoorInstruments,  fmOutdoorInstruments);
            Application.CreateForm(tfmSelectPrinter,       fmSelectPrinter);
            Application.CreateForm(tfmRelayManager,        fmRelayManager);
            Application.CreateForm(tfmSensorManager,       fmSensorManager);
            Application.CreateForm(TfmSimulatedSensor,     fmSimulatedSensor);
            Application.CreateForm(tfmSummaryManager,      fmSummaryManager);
            Application.CreateForm(tfmTableManager,        fmTableManager);
            Application.CreateForm(tfmVC0706,              fmVC0706);
            Application.CreateForm(tfmWeatherThisDate,     fmWeatherThisDate);
          fmSplash.StatusUpdate('Creating graph-related forms....');
            Application.CreateForm(TfmGraphManager,        fmGraphManager);
            Application.CreateForm(TfmAddOrEditGraph,      fmAddOrEditGraph);
            Application.CreateForm(tfmAnnualTemps,         fmAnnualTemps);
            Application.CreateForm(tfmGraphManager,        fmGraphManager);
            Application.CreateForm(tfmGraphWind,           fmGraphWind);
            Application.CreateForm(tfmGroupedOutsideGraph, fmGroupedOutsideGraph);
        finally (* must get rid of splash form *)
          fmSplash.Release
        end     (* must get rid of splash form *);

        Application.Run
      end   (* start this instance *)
  end.
