Einzelnen Beitrag anzeigen

Benutzerbild von Sir Rufo
Sir Rufo

Registriert seit: 5. Jan 2005
Ort: Stadthagen
9.454 Beiträge
 
Delphi 10 Seattle Enterprise
 
#14

AW: konzeptionelle Gedanken optische Darstellung Stammbaum

  Alt 5. Aug 2015, 17:49
Wenn ich mir das Bild so anschaue, dann kann man die Daten zu dieser Anzeige hiermit abbilden (die Bilder habe ich jetzt mal weggelassen):
Delphi-Quellcode:
unit Unit2;

interface

uses
  System.Generics.Collections;

type
  TLocationDateTime = record
    Location: string;
    Timestamp: TDateTime;
  end;

  TPersonViewModel = class
  private
    FID: TGUID;
    FLastName: string;
    FFirstName: string;
    FBorn: TLocationDateTime;
    FDied: TLocationDateTime;
  public
    property ID: TGUID read FID write FID;
    property LastName: string read FLastName;
    property FirstName: string read FFirstName;
    property Born: TLocationDateTime read FBorn;
    property Died: TLocationDateTime read FDied;
  end;

  TParentViewModel = class( TPersonViewModel )
  private
    FFather: TPersonViewModel;
    FMother: TPersonViewModel;
  public
    property Father: TPersonViewModel read FFather;
    property Mother: TPersonViewModel read FMother;
  end;

  TChildViewModel = class( TPersonViewModel )
  private
    FEngagedTo: TList<TPersonViewModel>;
  public
    property EngagedTo: TList<TPersonViewModel> read FEngagedTo;
  end;

  TRelationViewModel = class( TPersonViewModel )
  private
    FChildren: TList<TChildViewModel>;
  public
    property Children: TList<TChildViewModel> read FChildren;
  end;

  TSelectedPersonViewModel = class( TPersonViewModel )
  private
    FFather: TParentViewModel;
    FMother: TParentViewModel;
    FRelations: TList<TRelationViewModel>;
    FSiblings: TList<TChildViewModel>;
  public
    property Father: TParentViewModel read FFather;
    property Mother: TParentViewModel read FMother;
    property Siblings: TList<TChildViewModel> read FSiblings;
    property Relations: TList<TRelationViewModel> read FRelations;
  end;

implementation

end.
Kaum macht man's richtig - schon funktioniert's
Zertifikat: Sir Rufo (Fingerprint: ‎ea 0a 4c 14 0d b6 3a a4 c1 c5 b9 dc 90 9d f0 e9 de 13 da 60)
  Mit Zitat antworten Zitat