-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathqEdit.pas
More file actions
58 lines (48 loc) · 1.26 KB
/
qEdit.pas
File metadata and controls
58 lines (48 loc) · 1.26 KB
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
unit qEdit;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, Forms,
StdCtrls;
type
TEditServer = class(TForm)
Desc: TEdit;
Label1: TLabel;
Label2: TLabel;
Host: TEdit;
Port: TEdit;
Label3: TLabel;
Label4: TLabel;
Pass: TEdit;
Save: TButton;
Cancel: TButton;
procedure SaveClick(Sender: TObject);
procedure CancelClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
EditServer: TEditServer;
implementation
uses qSettins, qIRCMain, qSettings;
{$R *.DFM}
procedure TEditServer.SaveClick(Sender: TObject);
var
I: Integer;
begin
If (Desc.Text = '') Then Begin Beep; Desc.SetFocus; Exit; End;
If (Host.Text = '') Then Begin Beep; Host.SetFocus; Exit; End;
If (Port.Text = '') Then Begin Beep; Port.SetFocus; Exit; End;
I := Settins.Server.ItemIndex;
Settins.Server.Items[I] := Desc.Text;
IRCMain.ServerList.Strings[I] := Desc.Text + #255 + Host.Text + #255 + Port.Text + #255 + Pass.Text;
Settins.Server.ItemIndex := I;
IRCMain.UpdateSvrBox(Settins.Server.ItemIndex);
Settins.CloseEdit;
end;
procedure TEditServer.CancelClick(Sender: TObject);
begin
Settins.CloseEdit;
end;
end.