unit U_TSOKNO;

interface

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

type
  TfrmTSOKNO = class(TForm)
    Panel11: TPanel;
    TBOK: TSpeedButton;
    TBNO: TSpeedButton;
    TSLab: TLabel;
    TBQD: TSpeedButton;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure TBOKClick(Sender: TObject);
    procedure TBNOClick(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure TBQDClick(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    OKNOFlag, TSStr: string;
    retbol: Boolean
  end;

var
  frmTSOKNO: TfrmTSOKNO;

implementation

{$R *.dfm}

procedure TfrmTSOKNO.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caFree;
end;

procedure TfrmTSOKNO.TBOKClick(Sender: TObject);
begin
  retbol := True;
  ModalResult := 1;
end;

procedure TfrmTSOKNO.TBNOClick(Sender: TObject);
begin
  retbol := False;
  ModalResult := 1;
end;

procedure TfrmTSOKNO.FormDestroy(Sender: TObject);
begin
  frmTSOKNO := nil;
end;

procedure TfrmTSOKNO.TBQDClick(Sender: TObject);
begin
  retbol := False;
  ModalResult := 1;
end;

procedure TfrmTSOKNO.FormShow(Sender: TObject);
begin
  if OKNOFlag = 'Ρ‘Τρ' then
  begin
    TBOK.Visible := True;
    TBNO.Visible := True;
    TBQD.Visible := False;
  end
  else if OKNOFlag = 'ΜαΚΎ' then
  begin
    TBOK.Visible := False;
    TBNO.Visible := False;
    TBQD.Visible := True;
  end;
  TSLab.Caption := TSStr;
  if Length(TSStr) < 20 then
  begin
    TSLab.Font.Size := 25;
  end;
end;

end.

