-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnitLookInOOB.pas
77 lines (64 loc) · 1.45 KB
/
UnitLookInOOB.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
unit UnitLookInOOB;
{$IFDEF FPC}
{$MODE Delphi}
{$ENDIF}
interface
uses
{$IFnDEF FPC}
Windows,
{$ELSE}
LCLIntf, LCLType, LMessages,
{$ENDIF}
Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Grids;
type
T_FormLookInOOB = class(TForm)
StringGridLook: TStringGrid;
procedure FormResize(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
_FormLookInOOB: T_FormLookInOOB;
implementation
uses UnitSplashSolverMin;
{$IFnDEF FPC}
{$R *.frm}
{$ELSE}
{$R *.frm}
{$ENDIF}
procedure T_FormLookInOOB.FormResize(Sender: TObject);
var
I: integer;
begin
if (StringGridLook.ColCount=2) then
StringGridLook.ColWidths[1]:= StringGridLook.Width-15
else
for I:=0 to StringGridLook.ColCount-1 do
StringGridLook.ColWidths[I]:= StringGridLook.Width div (StringGridLook.ColCount+1);
end;
procedure T_FormLookInOOB.FormCreate(Sender: TObject);
var
I: integer;
begin
for I:=0 to StringGridLook.RowCount-1 do
StringGridLook.Cells[0,I]:=IntToStr(I+1);
end;
procedure T_FormLookInOOB.FormKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (Key=VK_ESCAPE ) then
Close;
end;
procedure T_FormLookInOOB.FormShow(Sender: TObject);
begin
if _FormSplashSolver.Visible then
_FormSplashSolver.Hide;
end;
end.