Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.
If not a=0 then begin
If (a<=b) and (a<=c) and (a<=d) and (a<=e) and (a<=g) then
richeditWriteOKcursor:=true;
end;
If ( a = 0) or ( b = 0) or ( c = 0) or ( d = 0) or ( e = 0) then exit;
If (a<=b) and (a<=c) and (a<=d) and (a<=e) and (a<=g) then
richeditWriteOKcursor:=true;
if not ( a = 0) then
if ( ( b = 0) or ( c = 0) or ( d = 0) or ( e = 0)) or
( ( a <= b) and ( a <= c) and ( a <= d) and ( a <= e)) then
richeditWriteOKcursor:=true;
end;
if not ( a = 0) then
if ( ( b = 0) and ( c = 0) and ( d = 0) and ( e = 0)) or
( ( a <= b) and ( a <= c) and ( a <= d) and ( a <= e)) then
richeditWriteOKcursor:=true;
if not ( a = 0) then
richeditWriteOKcursor := ( ( b = 0) and ( c = 0) and ( d = 0) and ( e = 0)) or ( ( a <= b) and ( a <= c) and ( a <= d) and ( a <= e))
if not ( a = 0) then
if ( ( b <> 0) and ( a <= b)) or
( ( c <> 0) and ( a <= c)) or
( ( d <> 0) and ( a <= d)) or
( ( e <> 0) and ( a <= e)) or
( ( g <> 0) and ( a <= g)) then
richeditWriteOKcursor := true;
if not ( a = 0) then
if ( ( b <> 0) and ( a > b)) or
( ( c <> 0) and ( a > c)) or
( ( d <> 0) and ( a > d)) or
( ( e <> 0) and ( a > e)) or
( ( g <> 0) and ( a > g)) then
richeditWriteOKcursor := true;
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Shape1: TShape;
Button1: TButton;
a: TLabel;
b: TLabel;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
richeditWriteOKcursor :bool;
a,b,c,d,e,g,min: integer;
implementation
{$R *.dfm}
procedure Adjust(val : integer);
begin
if Min = 0 then
min := val
else
if val < min then
min := val;
end;
procedure MeEvent();
begin
a:=strtoint(form1.edit1.text);
b:=strtoint(form1.edit2.text);
c:=strtoint(form1.edit3.text);
richeditWriteOKcursor := false;
If a <> 0 then begin
min := 0;
Adjust(a);
Adjust(b);
Adjust(c);
{min will only be zero if all are zero}
If (min <> 0) and (a <= min) then
richeditWriteOKcursor:=true;
if richeditWriteOKcursor then form1.Shape1.Brush.Color:=clgreen else form1.Shape1.Brush.Color:=clred;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
MeEvent();
end;
end.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
EditA: TEdit;
EditB: TEdit;
EditC: TEdit;
Shape1: TShape;
Button1: TButton;
lblA: TLabel;
lblB: TLabel;
lblC: TLabel;
procedure Button1Click(Sender: TObject);
private
FRicheditWriteOKcursor :bool;
public
end;
var
Form1: TForm1;
implementation
uses Math;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
const BrushColors: Array[Boolean] of TColor = (clRed , clGreen); // clRed = False, clGreen = True
var a, b, c, x: integer;
begin
a := strtoint(editA.text);
b := strtoint(editB.text);
c := strtoint(editC.text);
x := min(a, ifthen(b>0, b, a));
x := min(x, ifthen(c>0, c, x));
FRicheditWriteOKcursor := (x > 0) and (a = x);
Shape1.Brush.Color := BrushColors[FRicheditWriteOKcursor];
end;
end.
Open in new window