unit UnitMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, ExtCtrls;
type
TFormMain =
class(TForm)
Panel_Main: TPanel;
Panel_Navi: TPanel;
Rich_Quelle: TRichEdit;
Rich_Ziel: TRichEdit;
Btn_Close: TButton;
OpenDlg: TOpenDialog;
SaveDlg: TSaveDialog;
Btn_Open: TButton;
Btn_Save: TButton;
Btn_Kopie: TButton;
procedure Btn_CloseClick(Sender: TObject);
procedure Btn_OpenClick(Sender: TObject);
procedure Btn_SaveClick(Sender: TObject);
procedure Btn_KopieClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
FormMain: TFormMain;
implementation
{$R *.dfm}
procedure TFormMain.Btn_CloseClick(Sender: TObject);
begin
Close;
end;
procedure TFormMain.Btn_OpenClick(Sender: TObject);
begin
If Not OpenDlg.Execute
Then Exit;
Rich_Quelle.Lines.LoadFromFile(OpenDlg.FileName);
end;
procedure TFormMain.Btn_SaveClick(Sender: TObject);
begin
If Not SaveDlg.Execute
Then Exit;
Rich_Ziel.Lines.SaveToFile(SaveDlg.FileName);
end;
procedure TFormMain.Btn_KopieClick(Sender: TObject);
Var
S : TMemoryStream;
begin
S := TMemorystream.Create;
Try
Rich_Quelle.Lines.SaveToStream(S);
S.Position := 0;
Rich_Ziel.Lines.LoadFromStream(S);
Finally
S.Free;
End;
end;
end.