| Line | |
|---|
| 1 | unit SrcScanner;
|
|---|
| 2 |
|
|---|
| 3 | interface
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|---|
| 7 | Dialogs, StdCtrls, Buttons, ExtCtrls, ComCtrls;
|
|---|
| 8 |
|
|---|
| 9 | type
|
|---|
| 10 | TForm1 = class(TForm)
|
|---|
| 11 | Panel1: TPanel;
|
|---|
| 12 | Splitter1: TSplitter;
|
|---|
| 13 | Panel2: TPanel;
|
|---|
| 14 | Panel4: TPanel;
|
|---|
| 15 | Panel5: TPanel;
|
|---|
| 16 | Panel3: TPanel;
|
|---|
| 17 | Panel6: TPanel;
|
|---|
| 18 | SaveButton: TBitBtn;
|
|---|
| 19 | OpenButton: TBitBtn;
|
|---|
| 20 | NextButton: TBitBtn;
|
|---|
| 21 | PrevButton: TBitBtn;
|
|---|
| 22 | OpenDialog1: TOpenDialog;
|
|---|
| 23 | NewEdit: TRichEdit;
|
|---|
| 24 | OrigEdit: TRichEdit;
|
|---|
| 25 | procedure OpenButtonClick(Sender: TObject);
|
|---|
| 26 | private
|
|---|
| 27 | { Private declarations }
|
|---|
| 28 | procedure OpenInputFile(FileName: String);
|
|---|
| 29 | procedure CloseCurFiles;
|
|---|
| 30 | public
|
|---|
| 31 | { Public declarations }
|
|---|
| 32 | end;
|
|---|
| 33 |
|
|---|
| 34 | var
|
|---|
| 35 | Form1: TForm1;
|
|---|
| 36 |
|
|---|
| 37 | implementation
|
|---|
| 38 |
|
|---|
| 39 | {$R *.dfm}
|
|---|
| 40 |
|
|---|
| 41 | procedure TForm1.OpenButtonClick(Sender: TObject);
|
|---|
| 42 | begin
|
|---|
| 43 | if OpenDialog1.Execute then begin
|
|---|
| 44 | OpenInputFile(OpenDialog1.FileName);
|
|---|
| 45 | end;
|
|---|
| 46 | end;
|
|---|
| 47 |
|
|---|
| 48 | procedure TForm1.OpenInputFile(FileName: String);
|
|---|
| 49 | begin
|
|---|
| 50 | CloseCurFiles;
|
|---|
| 51 | OrigEdit.Lines.LoadFromFile(FileName); //does a clear first
|
|---|
| 52 |
|
|---|
| 53 | end;
|
|---|
| 54 |
|
|---|
| 55 | procedure TForm1.CloseCurFiles;
|
|---|
| 56 | begin
|
|---|
| 57 | //check if should be saved.
|
|---|
| 58 |
|
|---|
| 59 | end;
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 | end.
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.