Browse Source

Delete: dangling files

Herman Schoenfeld 7 years ago
parent
commit
fc58e3db29
2 changed files with 0 additions and 227 deletions
  1. 0 49
      Units/Forms/UGrids.pas
  2. 0 178
      Units/Utils/UCommonUI.pas

+ 0 - 49
Units/Forms/UGrids.pas

@@ -1,49 +0,0 @@
-unit UGrids;
-
-{$mode delphi}
-
-interface
-
-uses
-  Classes, SysUtils, UAccounts, UVisualGrid, UCommonUI, UCommon;
-
-type
-
-  TMyAccountDataSource = class(TComponent, IDataSource)
-    public
-      function FetchPage(constref AParams: TPageFetchParams; var ADataTable: TDataTable): TPageFetchResult;
-      function GetSearchCapabilities: TSearchCapabilities;
-  end;
-
-
-implementation
-
-uses UWallet,  UUserInterface;
-
-function TMyAccountDataSource.FetchPage(constref AParams: TPageFetchParams; var ADataTable: TDataTable): TPageFetchResult;
-var
-  key : Integer;
-  i : Integer;
-  accountsByKeys : TOrderedAccountKeysList;
-begin
-  ADataTable.Columns := TTableColumns.Create('Account', 'Key', 'Name', 'Balance');
-
-  accountsByKeys := TOrderedAccountKeysList.Create(TUserInterface.Node.Bank.SafeBox,false);
-
-  for key := 0 to TWallet.Keys.Count - 1 do begin
-//    accountsByKeys.AddAccountKey(TAccountKey(TWallet.Keys.Key[i]));
-  end;
-
-end;
-
-function TMyAccountDataSource.GetSearchCapabilities: TSearchCapabilities;
-begin
-   Result :=  TSearchCapabilities.Create(
-     TSearchCapability.From('Account', SORTABLE_NUMERIC_FILTER),
-     TSearchCapability.From('Balance', SORTABLE_NUMERIC_FILTER)
-   );
-end;
-
-
-end.
-

+ 0 - 178
Units/Utils/UCommonUI.pas

@@ -1,178 +0,0 @@
-{
-  Copyright (c) 2017 Sphere 10 Software
-
-  Common unit usable across all tiers.
-
-  Distributed under the MIT software license, see the accompanying file LICENSE
-  or visit http://www.opensource.org/licenses/mit-license.php.
-
-  Acknowledgements:
-    Herman Schoenfeld
-}
-
-unit UCommonUI;
-
-{$mode delphi}
-
-interface
-
-uses
-  Classes, SysUtils, Forms, Controls,ExtCtrls,  Graphics, Generics.Collections, Generics.Defaults, syncobjs;
-
-type
-  TApplicationForm = class(TForm)
-    private
-      FActivatedCount : UInt32;
-      FActivateFirstTime : TNotifyEvent;
-      FDestroyed : TNotifyEvent;
-      FCloseAction : TCloseAction;
-      procedure NotifyActivateFirstTime;
-      procedure NotifyDestroyed;
-    protected
-      FUILock : syncobjs.TCriticalSection;
-      procedure DoCreate; override;
-      procedure Activate; override;
-      procedure ActivateFirstTime; virtual;
-      procedure DoClose(var CloseAction: TCloseAction); override;
-      procedure DoDestroy; override;
-      procedure DoDestroyed; virtual;
-    published
-      property CloseAction : TCloseAction read FCloseAction write FCloseAction;
-      property OnActivateFirstTime : TNotifyEvent read FActivateFirstTime write FActivateFirstTime;
-      property OnDestroyed : TNotifyEvent read FDestroyed write FDestroyed;
-    public
-      property ActivationCount : UInt32 read FActivatedCount;
-  end;
-
-  { TWinControlHelper }
-
-  TWinControlHelper = class helper for TWinControl
-    procedure RemoveAllControls(destroy : boolean);
-    procedure AddControlDockCenter(AControl: TWinControl);
-  end;
-
-  { TFormHelper }
-
-  TFormHelper = class helper for TForm
-  end;
-
-  { TImageHelper }
-
-  TImageHelper = class helper for TImage
-    procedure SetImageListPicture(AImageList: TImageList; AIndex : SizeInt);
-  end;
-
-
-implementation
-
-uses
-  lcl, FGL;
-
-{%region TApplicationForm}
-
-procedure TApplicationForm.DoCreate;
-begin
-  inherited;
-  FUILock := syncobjs.TCriticalSection.Create;
-  FActivatedCount := 0;
-  FCloseAction:=caHide;
-end;
-
-procedure TApplicationForm.Activate;
-begin
-  inherited;
-  inc(FActivatedCount);
-  if (FActivatedCount = 1) then
-    NotifyActivateFirstTime;
-end;
-
-procedure TApplicationForm.ActivateFirstTime;
-begin;
-end;
-
-procedure TApplicationForm.DoClose(var CloseAction: TCloseAction);
-begin
-  CloseAction := FCloseAction;
-end;
-
-procedure TApplicationForm.DoDestroy;
-begin
-  inherited;
-  FActivatedCount:=0;
-  FUILock.Destroy;
-  FUILock := nil;
-  NotifyDestroyed;
-end;
-
-procedure TApplicationForm.DoDestroyed;
-begin;
-end;
-
-procedure TApplicationForm.NotifyActivateFirstTime;
-begin
-  ActivateFirstTime;
-  if Assigned(FActivateFirstTime) then
-    FActivateFirstTime(Self);
-end;
-
-procedure TApplicationForm.NotifyDestroyed;
-begin
-  DoDestroyed;
-  if Assigned(FDestroyed) then
-    FDestroyed(Self);
-end;
-
-{%endregion}
-
-{%region TWinControlHelper}
-
-procedure TWinControlHelper.RemoveAllControls(destroy : boolean);
-var
-  control : TControl;
-begin
-  while self.ControlCount > 0 do begin
-    control := self.Controls[0];
-    self.RemoveControl(control);
-    if destroy then control.Destroy;
-  end;
-end;
-
-procedure TWinControlHelper.AddControlDockCenter(AControl: TWinControl);
-begin
-  if AControl.ClassType.InheritsFrom(TCustomForm) then begin
-    with TCustomForm(AControl) do begin
-      // Needed to avoid infinite WMSize loop
-      Constraints.MinHeight := 0;
-      Constraints.MaxHeight := 0;
-      Constraints.MinWidth := 0;
-      Constraints.MaxWidth := 0;
-      Anchors := [akTop, akLeft, akRight, akBottom];
-    end;
-  end;
-
-  with AControl do begin
-    Align := alClient;
-    Parent := Self;
-    Show;
-  end;
-end;
-
-{%endregion}
-
-{%region TFormHelper}
-
-
-{%endregion}
-
-{%region TImageHelper}
-
-procedure TImageHelper.SetImageListPicture(AImageList: TImageList; AIndex : SizeInt);
-begin
-  AImageList.GetBitmap(AIndex, Self.Picture.Bitmap);
-end;
-
-{%endregion}
-
-end.
-
-