Subversion Repositories jumper

Rev

Rev 9 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9 Rev 21
1
unit History;
1
unit History;
2
 
2
 
3
interface
3
interface
4
 
4
 
5
uses
5
uses
6
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
6
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7
  Dialogs, StdCtrls;
7
  Dialogs, StdCtrls;
8
 
8
 
9
type
9
type
10
  THistoryForm = class(TForm)
10
  THistoryForm = class(TForm)
11
    JumpMemo: TMemo;
11
    JumpMemo: TMemo;
12
    SaveBtn: TButton;
12
    SaveBtn: TButton;
13
    CloseBtn: TButton;
13
    CloseBtn: TButton;
14
    JumpSaveDialog: TSaveDialog;
14
    JumpSaveDialog: TSaveDialog;
15
    procedure CloseBtnClick(Sender: TObject);
15
    procedure CloseBtnClick(Sender: TObject);
16
    procedure SaveBtnClick(Sender: TObject);
16
    procedure SaveBtnClick(Sender: TObject);
17
  end;
17
  end;
18
 
18
 
19
var
19
var
20
  HistoryForm: THistoryForm;
20
  HistoryForm: THistoryForm;
21
 
21
 
22
implementation
22
implementation
23
 
23
 
24
{$R *.dfm}
24
{$R *.dfm}
25
 
25
 
26
uses
26
uses
27
  Constants;
27
  Constants;
28
 
28
 
29
procedure THistoryForm.CloseBtnClick(Sender: TObject);
29
procedure THistoryForm.CloseBtnClick(Sender: TObject);
30
begin
30
begin
31
  Close();
31
  Close();
32
end;
32
end;
33
 
33
 
34
procedure THistoryForm.SaveBtnClick(Sender: TObject);
34
procedure THistoryForm.SaveBtnClick(Sender: TObject);
-
 
35
resourcestring
-
 
36
  LNG_SAVED = 'History successfully saved!';
35
begin
37
begin
36
  if JumpSaveDialog.Execute then
38
  if JumpSaveDialog.Execute then
37
  begin
39
  begin
38
    JumpMemo.Lines.SaveToFile(JumpSaveDialog.FileName);
40
    JumpMemo.Lines.SaveToFile(JumpSaveDialog.FileName);
39
    MessageDlg(LNG_SAVED, mtInformation, [mbOk], 0);
41
    MessageDlg(LNG_SAVED, mtInformation, [mbOk], 0);
40
  end;
42
  end;
41
end;
43
end;
42
 
44
 
43
end.
45
end.
44
 
46