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