summaryrefslogtreecommitdiff
path: root/orig/pq/Login.pas
blob: 70d9460f295f442ec28b53351d5c7ac905305e26 (plain)
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
unit Login;

interface

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

type
  TLoginForm = class(TForm)
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Login: TButton;
    Button1: TButton;
    GroupBox2: TGroupBox;
    LabeledEdit1: TLabeledEdit;
    LabeledEdit2: TLabeledEdit;
    Label3: TLabel;
    GroupBox3: TGroupBox;
    Account: TLabeledEdit;
    Password: TLabeledEdit;
    Label4: TLabel;
    procedure Label2Click(Sender: TObject);
    procedure AccountChange(Sender: TObject);
    procedure LoginClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  LoginForm: TLoginForm;

implementation

uses ShellAPI, Main, NewGuy, SelServ;

{$R *.dfm}

procedure TLoginForm.Label2Click(Sender: TObject);
begin
	ShellExecute(GetDesktopWindow(), 'open', PChar(TLabel(Sender).Caption), nil, '', SW_SHOW);
end;

procedure TLoginForm.AccountChange(Sender: TObject);
begin
  Login.Enabled := (Account.Text <> '') and (Password.Text <> '');
end;

procedure TLoginForm.LoginClick(Sender: TObject);
begin
  MainForm.SetLogin(Account.Text);
  MainForm.SetPassword(Password.Text);
  if ServerSelectForm.Go then
    ModalResult := mrOk;
end;

end.