/
roEnter.pas
59 lines (47 loc) · 943 Bytes
/
roEnter.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
unit roEnter;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, roDockWin, StdCtrls;
type
TEnterDock = class(TDockWin)
procedure FormShow(Sender: TObject);
procedure ComKeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
EnterDock: TEnterDock;
implementation
uses roMain, roConWin;
{$R *.dfm}
procedure TEnterDock.FormShow(Sender: TObject);
begin
inherited;
Com.SetFocus;
end;
procedure TEnterDock.ComKeyPress(Sender: TObject; var Key: Char);
var
f:TForm;
begin
inherited;
case Key of
#9:
begin
//Com.Text:=Com.Text+'/';
//DO COMPLETION!!!
Key:=#0;
end;
#13:
begin
//enter!
f:=MainWin.ActiveMDIChild;
if f is TConnectionWin then (f as TConnectionWin).DoCommand(Com.Text);
Com.SelectAll;
Key:=#0;
end;
end;
end;
end.