unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, MPlayer, StdCtrls, ComCtrls, StdActns, ActnList, ImgList,
ActnMan, ActnCtrls, ToolWin, ActnMenus, Buttons, ListActns, ExtActns;
type
TForm1 =
class(TForm)
RichEdit1: TRichEdit;
MonthCalendar1: TMonthCalendar;
ActionMainMenuBar1: TActionMainMenuBar;
ActionManager1: TActionManager;
ImageList1: TImageList;
DateiSpeichern: TAction;
StatusBar1: TStatusBar;
FileOpen1: TFileOpen;
FileSaveAs1: TFileSaveAs;
FilePrintSetup1: TFilePrintSetup;
FileExit1: TFileExit;
EditCut1: TEditCut;
EditCopy1: TEditCopy;
EditPaste1: TEditPaste;
EditSelectAll1: TEditSelectAll;
EditUndo1: TEditUndo;
EditDelete1: TEditDelete;
DateiNeu: TAction;
HelpInfo: TAction;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton;
SpeedButton4: TSpeedButton;
SpeedButton5: TSpeedButton;
SpeedButton6: TSpeedButton;
SpeedButton7: TSpeedButton;
SpeedButton8: TSpeedButton;
SpeedButton9: TSpeedButton;
SpeedButton10: TSpeedButton;
PrintDlg1: TPrintDlg;
SpeedButton11: TSpeedButton;
SpeedButton12: TSpeedButton;
PsYcoPlay: TMediaPlayer;
SpeedButton13: TSpeedButton;
FileOpen3: TFileOpen;
procedure DateiNeuExecute(Sender: TObject);
procedure FileOpen1Accept(Sender: TObject);
procedure DateiSpeichernExecute(Sender: TObject);
procedure FileSaveAs1BeforeExecute(Sender: TObject);
procedure FileSaveAs1Accept(Sender: TObject);
procedure HelpInfoExecute(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
FileName:
String;
end;
var
Form1: TForm1;
implementation
uses Info;
{$R *.dfm}
procedure TForm1.DateiNeuExecute(Sender: TObject);
begin
RichEdit1.Clear;
FileName := '
NoName.txt';
StatusBar1.Panels[0].Text := FileName;
end;
procedure TForm1.FileOpen1Accept(Sender: TObject);
begin
RichEdit1.Lines.LoadFromFile(FileOpen1.Dialog.FileName);
FileName := FileOpen1.Dialog.FileName;
StatusBar1.Panels[0].Text := FileName;
end;
procedure TForm1.DateiSpeichernExecute(Sender: TObject);
begin
If (FileName = '
NoName.txt')
then
FileSaveAs1.Execute
else
RichEdit1.Lines.SaveToFile(FileName);
end;
procedure TForm1.FileSaveAs1BeforeExecute(Sender: TObject);
begin
FileSaveAs1.Dialog.InitialDir := ExtractFilePath(FileName);
end;
procedure TForm1.FileSaveAs1Accept(Sender: TObject);
begin
RichEdit1.Lines.SaveToFile(FileSaveAs1.Dialog.FileName);
FileName := FileSaveAs1.Dialog.FileName;
StatusBar1.Panels[0].Text := FileName;
end;
procedure TForm1.HelpInfoExecute(Sender: TObject);
begin
AboutBox.ShowModal;
end;
end.