unit DogCompDataUnit;

interface

uses
  TDogCompUnit, Windows, Messages, SysUtils, Variants, Classes, Graphics,
  Controls, Forms,
  Dialogs, Menus, StdCtrls, ComCtrls, Buttons, ExtCtrls;

type
  TfrmDogEntryData = class(TForm)
    MainMenu: TMainMenu;
    Data1: TMenuItem;
    mnuLoadDataFile: TMenuItem;
    pnlTop: TPanel;
    imgLeft: TImage;
    imgRight: TImage;
    bttPrior: TBitBtn;
    Label1: TLabel;
    bttNext: TBitBtn;
    redDogData: TRichEdit;
    lblDogCodeName: TLabel;
    Winner1: TMenuItem;
    procedure mnuLoadDataFileClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure bttPriorClick(Sender: TObject);
    procedure bttNextClick(Sender: TObject);
    procedure Winner1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
    arrOneLine: array of string;
    myDataFileList: TStringList;
    IndexNum: Integer;
    procedure RecordMoved;
  public
    { Public declarations }


  end;

var
  frmDogEntryData: TfrmDogEntryData;

implementation

{$R *.dfm}
//==============================================================================
procedure TfrmDogEntryData.RecordMoved;
begin
  redDogData.Lines.Clear;
  redDogData.Paragraph.TabCount := 2;
  redDogData.Paragraph.Tab[0] := 100;
  // 2.2.7.1


  (*remove coment brackets of the next 6 lines when you get to this part*)
  {lblDogCodeName.Caption := oneDogObj.GetEntryCode + '  ' + oneDogObj.GetNsmeOfDog;
  redDogData.Lines.Add('Date of Birth: ' +#9 + oneDogObj.getDogSDOB);
  redDogData.Lines.Add('Age of Dog in days: '+#9  + IntToStr(oneDogObj.getDogDayAge));
  redDogData.Lines.Add('Confrimation Score: '+#9  + IntToStr(oneDogObj.GetConforamtion));
  redDogData.Lines.Add('Temprament Score: '+#9  + IntToStr(oneDogObj.GetTemprament));
  redDogData.Lines.Add('Obediance Score : '+#9 + IntToStr(oneDogObj.GetObediance));}

  // 2.2.7.2


  // 2.2.7.3
  

end;
//==============================================================================
procedure TfrmDogEntryData.Winner1Click(Sender: TObject);
// 2.2.9
// Determining  and displaying the dog with the highest score
var
  sWinDog: string;
  iWinScore: Integer;
begin
  //2.2.8
  
end;
//==============================================================================
procedure TfrmDogEntryData.bttNextClick(Sender: TObject);
begin
  // Given Code
{ if IndexNum < myDataFileList.Count - 1 then }{TStringList}
  if IndexNum < high(arrOneLine) then
  begin
    Inc(IndexNum);
    RecordMoved;
  end;
end;
//==============================================================================
procedure TfrmDogEntryData.bttPriorClick(Sender: TObject);
begin
  // Given Code
  if IndexNum > 0 then
  begin
    Dec(IndexNum);
    RecordMoved;
  end;
end;
//==============================================================================
procedure TfrmDogEntryData.FormCreate(Sender: TObject);
begin
  // 2.2.6 
end;
//==============================================================================
procedure TfrmDogEntryData.FormShow(Sender: TObject);
begin
  // 2.2.2

end;
//==============================================================================
procedure TfrmDogEntryData.mnuLoadDataFileClick(Sender: TObject);
var
  myFile: textFile;
  sOneLine: string;
  iCount: integer;

begin
  SetLength(arrOneLine, 1);
  iCount := 0;
  // 2.2.3
  SetLength(arrOneLine, iCount);

  // 2.2.4
  
  RecordMoved;
end;
//==============================================================================
end.

