Автор работы: Пользователь скрыл имя, 20 Ноября 2010 в 12:31, Не определен
Лабораторная работа
Form1.Memo1.color:=
for i:=0 to 5 do
Memo1.Lines.Delete(
end;
Memo1.Modified := false;
end;
end;
procedure TForm1.N5Click(Sender: TObject);
begin
if SaveDialog1.FilterIndex=1 then begin
SaveDialog1.DefaultExt:='txt';
end
else if SaveDialog1.FilterIndex=2 then begin
SaveDialog1.DefaultExt:='doc';
end;
If SaveDialog1.Execute then
begin
form1.Memo1.Modified:=
form1.Memo1.Lines.
Form1.Caption:=
IniFile:=TInifile.
with IniFile do begin
WriteInteger('Main','
WriteInteger('Main','
WriteString('Main','
WriteInteger('Main','
end;
with IniFile do
WriteInteger('Main','
end;
end;
procedure TForm1.N4Click(Sender: TObject);
begin
If form1.SaveDialog1.FileName <> '' then
begin
form1.Memo1.Lines.
Form1.Caption:=
form1.Memo1.Modified:=
if Form1.SaveDialog1.FileName<>'' then
IniFile:=TInifile.
else
IniFile:=TInifile.Create(
with IniFile, Form1.Memo1.Font do begin
WriteInteger('Main','
WriteInteger('Main','
WriteString('Main','
WriteInteger('Main','
end;
with IniFile do
WriteInteger('Main','
end
else
if form1.OpenDialog1.FileName<>'' then
begin
form1.Memo1.Lines.
Form1.Caption:=
form1.Memo1.Modified:=
IniFile:=TInifile.
with IniFile, Form1.Memo1.Font do begin
WriteInteger('Main','
WriteInteger('Main','
WriteString('Main','
WriteInteger('Main','
end;
with IniFile do
WriteInteger('Main','
end
else
N5Click(Sender);
end;
procedure TForm1.N2Click(Sender: TObject);
var a:integer;
begin
if form1.Memo1.Modified=true then
begin
a:=Application.
if a=6 then
begin
N4Click(Sender);
Form1.Memo1.Lines.
Form1.SaveDialog1.
Form1.OpenDialog1.
Form1.Caption:='
end
else
if a=7 then
begin
Form1.Memo1.Lines.
Form1.SaveDialog1.
Form1.OpenDialog1.
Form1.Caption:='
end
end
else
begin
Form1.Memo1.Lines.
Form1.SaveDialog1.
Form1.OpenDialog1.
Form1.Caption:='
end
end;
procedure TForm1.N6Click(Sender: TObject);
var a:integer;
begin
if Form1.Memo1.Modified=true then
begin
a:=Application.
if a=6 then
N4Click(Sender)
else if a=7 then
Form1.Close;
end
else Form1.Close;
end;
procedure TForm1.N8Click(Sender: TObject);
begin
if Form1.FontDialog1.Execute then
Form1.Memo1.Font:=
end;
procedure
TForm1.SpeedButton1Click(
begin
N2Click(sender);
end;
procedure
TForm1.SpeedButton2Click(
begin
N3Click(Sender);
end;
procedure
TForm1.SpeedButton3Click(
begin
N4Click(Sender);
end;
procedure
TForm1.SpeedButton4Click(
begin
N5Click(Sender);
end;
procedure
TForm1.SpeedButton5Click(
begin
N6Click(Sender);
end;
procedure TForm1.N11Click(Sender: TObject);
begin
If Form1.ColorDialog1.Execute then
Form1.Memo1.Color:=
end;
procedure TForm1.N10Click(Sender: TObject);
begin
If Form1.ColorDialog1.Execute then
Form1.Memo1.Font.Color:
end;
procedure TForm1.FormResize(Sender: TObject);
begin
Memo1.Height:=Form1.
Memo1.Width:=Form1.
end;
procedure
TForm1.ToolButton1Click(
begin
N2Click(Sender);
end;
procedure
TForm1.ToolButton2Click(
begin
N3Click(Sender);
end;
procedure
TForm1.ToolButton3Click(
begin
N4Click(Sender);
end;
procedure
TForm1.ToolButton4Click(
begin
N5Click(Sender);
end;
procedure
TForm1.ToolButton5Click(
begin
N6Click(Sender);
end;
procedure TForm1.N21Click(Sender: TObject);
begin
Memo1.CutToClipboard;
end;
procedure TForm1.N22Click(Sender: TObject);
begin
Memo1.CopyToClipboard;
end;
procedure TForm1.N23Click(Sender: TObject);
begin
Memo1.
end;
procedure TForm1.N24Click(Sender: TObject);
begin
Memo1.ClearSelection;
end;
procedure
TForm1.ToolButton6Click(
begin
N20Click(Sender);
end;
procedure
TForm1.ToolButton7Click(
begin
N21Click(Sender);
end;
procedure
TForm1.ToolButton8Click(
begin
N22Click(Sender);
end;
procedure
TForm1.ToolButton9Click(
begin
N23Click(Sender);
end;
procedure
TForm1.ToolButton10Click(
begin
N24Click(Sender);
end;
procedure TForm1.N20Click(Sender: TObject);
begin
Memo1.SelectAll
end;
procedure
TForm1.ToolButton12Click(
begin
Form1.Memo1.Alignment:=
end;
procedure
TForm1.ToolButton13Click(
begin
Form1.Memo1.Alignment:=
end;
procedure
TForm1.ToolButton14Click(
begin
Form1.Memo1.Alignment:=
end;
procedure
TForm1.ToolButton16Click(
begin
N10Click(Sender);
end;
procedure
TForm1.ToolButton17Click(
begin
N11Click(Sender);
end;
procedure
TForm1.ToolButton11Click(
begin
with Memo1 do
if HandleAllocated then SendMessage(Handle, EM_UNDO, 0, 0);
end;
procedure TForm1.N13Click(Sender: TObject);
begin
Form1.N13.Tag:=Form1.
if (Form1.N13.Tag mod 2)<>0 then
panel1.Visible:=false
else panel1.Visible:=true;
end;
procedure TForm1.N14Click(Sender: TObject);