File: addtracker.pas

package info (click to toggle)
transgui 5.0.1-5.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 3,792 kB
  • sloc: pascal: 40,152; makefile: 2,294; cs: 347; perl: 347; lisp: 347; sh: 84
file content (58 lines) | stat: -rw-r--r-- 1,117 bytes parent folder | download | duplicates (4)
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 AddTracker;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, ButtonPanel, StdCtrls, ExtCtrls, BaseForm;

resourcestring
  STrackerProps = 'Tracker properties';
  SNoTracker = 'No tracker URL was specified.';

type

  { TAddTrackerForm }

  TAddTrackerForm = class(TBaseForm)
    Buttons: TButtonPanel;
    edTracker: TEdit;
    Panel1: TPanel;
    txTrackerURL: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure OKButtonClick(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end; 

implementation

uses main;

{ TAddTrackerForm }

procedure TAddTrackerForm.OKButtonClick(Sender: TObject);
begin
  edTracker.Text:=Trim(edTracker.Text);
  if edTracker.Text = '' then begin
    edTracker.SetFocus;
    MessageDlg(SNoTracker, mtError, [mbOK], 0);
    exit;
  end;
  ModalResult:=mrOk;
end;

procedure TAddTrackerForm.FormCreate(Sender: TObject);
begin
  Buttons.OKButton.ModalResult:=mrNone;
  Buttons.OKButton.OnClick:=@OKButtonClick;
end;

initialization
  {$I addtracker.lrs}

end.