Skip to content

Commit

Permalink
unit refactoring to expose only 1 unit
Browse files Browse the repository at this point in the history
  • Loading branch information
spinettaro committed Dec 1, 2019
1 parent 84c8bc4 commit a293fce
Show file tree
Hide file tree
Showing 31 changed files with 2,092 additions and 732 deletions.
9 changes: 7 additions & 2 deletions samples/AccessRemoteData/AccessRemoteData.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<BT_BuildType>Debug</BT_BuildType>
Expand Down Expand Up @@ -434,8 +438,9 @@
<Source Name="MainSource">AccessRemoteData.dpr</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k230.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp230.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\DataExplorerDBXPluginEnt260.bpl">DBExpress Enterprise Data Explorer Integration</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k260.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Platforms>
Expand Down
Binary file modified samples/AccessRemoteData/AccessRemoteData.res
Binary file not shown.
5 changes: 3 additions & 2 deletions samples/AccessRemoteData/BOsU.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
interface

uses
EventBus.Subscribers, EventBus.Commons;

EventBus;

type

Expand Down Expand Up @@ -34,7 +35,7 @@ TOnLoginEvent = class(TObject)
implementation

uses
System.Classes, EventBus;
System.Classes;

{ TLoginDTO }

Expand Down
4 changes: 2 additions & 2 deletions samples/AccessRemoteData/MainFMX.fmx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ object HeaderFooterForm: THeaderFooterForm
TabOrder = 0
Hint = 'Username'
Size.Width = 308.013977050781300000
Size.Height = 32.608428955078130000
Size.Height = 32.000000000000000000
Size.PlatformDefault = False
TextPrompt = 'Username...'
end
Expand All @@ -137,7 +137,7 @@ object HeaderFooterForm: THeaderFooterForm
TabOrder = 1
Password = True
Size.Width = 308.013977050781300000
Size.Height = 32.608428955078130000
Size.Height = 32.000000000000000000
Size.PlatformDefault = False
TextPrompt = 'Password...'
end
Expand Down
6 changes: 3 additions & 3 deletions samples/AccessRemoteData/MainFMX.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface
System.SysUtils, System.Types, System.UITypes, System.Classes,
System.Variants, FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms,
FMX.Dialogs, FMX.StdCtrls, FMX.Controls.Presentation, FMX.Layouts,
FMX.Objects, FMX.Edit, FMX.TabControl, BOsU, EventBus.Commons;
FMX.Objects, FMX.Edit, FMX.TabControl, BOsU, EventBus;

type
THeaderFooterForm = class(TForm)
Expand Down Expand Up @@ -41,7 +41,7 @@ THeaderFooterForm = class(TForm)
implementation

uses
EventBus, ServicesU;
ServicesU;

{$R *.fmx}

Expand All @@ -62,7 +62,7 @@ procedure THeaderFooterForm.FormCreate(Sender: TObject);
begin
TabControl1.ActiveTab := TabItem1;
// register subscribers
TEventBus.GetDefault.RegisterSubscriber(Self);
GlobalEventBus.RegisterSubscriber(Self);
end;

procedure THeaderFooterForm.OnAfterLogin(AEvent: TOnLoginEvent);
Expand Down
2 changes: 1 addition & 1 deletion samples/AccessRemoteData/ServicesU.pas
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ procedure TAccessRemoteDataProxy.DoLogin(aLoginDTO: TLoginDTO);
begin
// simulate an http request for 5 seconds
TThread.Sleep(3000);
TEventBus.GetDefault.Post(TOnLoginEvent.Create(true, 'Login ok'));
GlobalEventBus.Post(TOnLoginEvent.Create(true, 'Login ok'));
aLoginDTO.Free;
end);

Expand Down
4 changes: 3 additions & 1 deletion samples/Analytics/Analytics.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ program Analytics;

uses
Vcl.Forms,
MainFormU in 'MainFormU.pas' {Form6},
MainFormU in 'MainFormU.pas' {Form6} ,
BOU in 'BOU.pas',
LogginFormU in 'LogginFormU.pas' {FormLogger};

{$R *.res}

begin
ReportMemoryLeaksOnShutdown := True;
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm6, Form6);
Application.CreateForm(TFormLogger, FormLogger);
Application.Run;

end.

0 comments on commit a293fce

Please sign in to comment.