Class

TfrmSkinTests

Module

fSkinTest

Last Modified

7/15/2014 3:26:36 PM

Scope

Interfaced

Inherits from

TfrmPCEBaseMain

Declaration


TfrmSkinTests = class(TfrmPCEBaseMain)
  lblSkinResults: TLabel;
  lblDTRead: TLabel;
  lblReading: TLabel;
  lblDTGiven: TLabel;
  UpDnReading: TUpDown;
  EdtReading: TCaptionEdit;
  edtDtRead: TCaptionEdit;
  edtDTGiven: TCaptionEdit;
  cboSkinResults: TORComboBox;
  procedure cboSkinResultsChange(Sender: TObject);
  procedure EdtReadingChange(Sender: TObject);
  procedure edtDtReadChange(Sender: TObject);
  procedure edtDTGivenChange(Sender: TObject);
  procedure FormCreate(Sender: TObject);
  procedure UpDnReadingChanging(Sender: TObject;
    var AllowChange: Boolean);
private
protected
  procedure UpdateNewItemStr(var x: string); override;
  procedure UpdateControls; override;
public
end;

DFM Objects


frmSkinTests : TfrmSkinTests
 ├lblSkinResults : TLabel
 ├lblDTRead : TLabel
 ├lblReading : TLabel
 ├lblDTGiven : TLabel
 ├lblSection : TLabel
 ├btnOK : TBitBtn
 ├btnCancel : TBitBtn
 ├pnlGrid : TPanel
 │ ├lbGrid : TORListBox
 │ └hcGrid : THeaderControl
 ├edtComment : TCaptionEdit
 ├UpDnReading : TUpDown
 ├EdtReading : TCaptionEdit
 ├edtDtRead : TCaptionEdit
 ├edtDTGiven : TCaptionEdit
 ├cboSkinResults : TORComboBox
 ├btnRemove : TButton
 ├btnSelectAll : TButton
 ├pnlMain : TPanel
 │ ├lbxSection : TORListBox
 │ └pnlLeft : TPanel
 │   ├lbSection : TORListBox
 │   └btnOther : TButton
 └amgrMain : TVA508AccessibilityManager

Class Hierarchy


Class Fields

Name Type Scope Comments
cboSkinResults TORComboBox Public/Published -
edtDTGiven Simple (unknown) Public/Published -
edtDtRead Simple (unknown) Public/Published -
EdtReading Simple (unknown) Public/Published -
lblDTGiven TLabel Public/Published -
lblDTRead TLabel Public/Published -
lblReading TLabel Public/Published -
lblSkinResults TLabel Public/Published -
UpDnReading Simple (unknown) Public/Published -

Methods

Name Declaration Scope Comments
cboSkinResultsChange procedure cboSkinResultsChange(Sender: TObject); Public/Published -
edtDTGivenChange procedure edtDTGivenChange(Sender: TObject); Public/Published
Var
  DtRead: TFMDateTime;
  ASkinTest: TPCESkin;
begin
  inherited;
  if lstSkinSelect.ItemIndex < 0 then Exit;

  with lstSkinSelect do ASkinTest := TPCESkin(Items.Objects[ItemIndex]);
  DtRead := StrToFMDateTime(edtReading.text);
  with lstSkinSelect do if (ItemIndex > -1) then
  begin
    ASkinTest.DTRead := DTRead;
    Items[ItemIndex] := ASkinTest.ItemStr;
  end;
end;
edtDtReadChange procedure edtDtReadChange(Sender: TObject); Public/Published -
EdtReadingChange procedure EdtReadingChange(Sender: TObject); Public/Published
//Name:procedure TfrmSkinTests.EdtReadingChange(Sender: TObject);
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description:Change the reading assigned to the skin test.
///////////////////////////////////////////////////////////////////////////////
FormCreate procedure FormCreate(Sender: TObject); Public/Published
Var
  DtGiven: TFMDateTime;
  ASkinTest: TPCESkin;
begin
  inherited;
  if lstSkinSelect.ItemIndex < 0 then Exit;

  with lstSkinSelect do ASkinTest := TPCESkin(Items.Objects[ItemIndex]);
  DtGiven := StrToFMDateTime(edtDTGiven.text);
  with lstSkinSelect do if (ItemIndex > -1) then
  begin
    ASkinTest.DTGiven := DTGIven;
    Items[ItemIndex] := ASkinTest.ItemStr;
  end;
end;


procedure TfrmSkinTests.CheckSkinRules;
begin
  //Results must be between 0 and 40
  if StrToInt(EdtReading.Text) < 0 then EdtReading.text := '0';
  if StrToInt(EdtReading.Text) > 40 then EdtReading.text := '40';

(*  //if reading >10, result must be "positive"
  if (StrToInt(EdtReading.Text) > 9) and
    (CompareText(Piece(cboSkinResults.items[cboSkinResults.itemindex],U,1),'P') <> 0) then
    begin
      if (Piece(cboSkinResults.items[cboSkinResults.itemindex],U,1) = '@') then    // not selected
      begin
        cboSkinResults.SelectById('P');
      end
      else
      begin
        Show508Message('If the reading is over 9, the results are required to be positive.');
        cboSkinResults.SelectById('P');
       end;
    end;
end;
UpdateControls procedure UpdateControls; override; Protected -
UpdateNewItemStr procedure UpdateNewItemStr(var x: string); override; Protected -
UpDnReadingChanging procedure UpDnReadingChanging(Sender: TObject; var AllowChange: Boolean); Public/Published -

Referenced By (3)

Module (line) Referrer Type
fEncounterFrame (269) - Read
fSkinTest (36) frmSkinTests Read
fSkinTest (248) - Read