unit SQLEditForm_SRC;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TSQLEditForm = class(TForm)
    Memo1: TMemo;
    SaveSQLBtn: TButton;
    LoadSQLBtn: TButton;
    ProcessBtn: TButton;
    OpenDialog1: TOpenDialog;
    SaveDialog1: TSaveDialog;
    procedure SaveSQLBtnClick(Sender: TObject);
    procedure LoadSQLBtnClick(Sender: TObject);
    procedure ProcessBtnClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  SQLEditForm: TSQLEditForm;

implementation

{$R *.dfm}

procedure TSQLEditForm.SaveSQLBtnClick(Sender: TObject);
begin
if SaveDialog1.Execute then
   Memo1.Lines.SaveToFile(SaveDialog1.FileName);
end;

procedure TSQLEditForm.LoadSQLBtnClick(Sender: TObject);
begin
if OpenDialog1.Execute then
   Memo1.Lines.LoadFromFile(OpenDialog1.FileName);
end;

procedure TSQLEditForm.ProcessBtnClick(Sender: TObject);
begin
if memo1.Text = '' then
   begin
   Showmessage('Could not process empty expression!');
   ModalResult := mrNone;
   end
end;

end.
