»
| | | | | |

» , : |
    
    
         Delphi
  [ ]
» " " «


<< >>

: paradise, KMA
  

Sephiroth



Delphi 5.0, - , . : Delphi. , . ! - , Unit1.pas .
: http://kreedgallery.narod.ru/buttonquestion.gif
:http://kreedgallery.narod.ru/NewButtonProject.rar

: N/A | : N/A | : 23 2005 15:51 | IP
nevr



. , , , , ;-)

unit Unit1;

interface

uses
 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
 StdCtrls, ExtCtrls, Menus,Math;

type
 TForm1 = class(TForm)
   RadioGroup1: TRadioGroup;
   Edit1: TEdit;
   Label1: TLabel;
   Edit2: TEdit;
   Edit3: TEdit;
   Label2: TLabel;
   Label3: TLabel;
   RadioGroup2: TRadioGroup;
   Memo1: TMemo;
   MainMenu1: TMainMenu;
   N1: TMenuItem;
   N2: TMenuItem;
   N3: TMenuItem;
   N4: TMenuItem;
   N5: TMenuItem;
   procedure FormCreate(Sender: TObject);
   procedure N2Click(Sender: TObject);

 private
   { Private declarations }
 public
   { Public declarations }
 end;

var
 Form1: TForm1;

implementation



{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
begin
Edit1.text:=' ';
Edit2.text:=' ';
end;

procedure TForm1.N2Click(Sender: TObject);
var x,p,a: integer;
begin
x:=strtoint(Edit1.Text);
p:=strtoint(Edit2.Text);
Case RadioGroup1.ItemIndex of
0:
 Case RadioGroup2.ItemIndex of
  0:
  begin
   if x>abs(p) then
   begin
    a:=round(power((2*sin(x)),1/3)+3*power(p,2));
    Edit3.Text:=IntToStr(a)
   end else
   begin
    Edit3.Text:=' !!!';
   end;
  end;
  1:
  begin
   if (x<abs(p)) and (x>3) then
   begin
    a:=round(abs(sin(x)-p));
    Edit3.Text:=IntToStr(a)
   end else
   begin
    Edit3.Text:=' !!!';
   end;
  end;
  2:
  begin
   if x=abs(p)  then
   begin
    a:=round(sqr(abs(sin(x)-p)));
    Edit3.Text:=IntToStr(a)
   end else
   begin
    Edit3.Text:=' !!!';
   end;
  end;
 end;
1:
Case RadioGroup2.ItemIndex of
  0:
  begin
   if x>abs(p) then
   begin
    a:=round(power((2*sqr(x)),1/3)+3*power(p,2));
    Edit3.Text:=IntToStr(a)
   end else
   begin
    Edit3.Text:=' !!!';
   end;
  end;
  1:
  begin
   if (x<abs(p)) and (x>3) then
   begin
    a:=round(abs(sqr(x)-p));
    Edit3.Text:=IntToStr(a)
   end else
   begin
    Edit3.Text:=' !!!';
   end;
  end;
  2:
  begin
   if x=abs(p)  then
   begin
    a:=round(sqr(abs(sqr(x)-p)));
    Edit3.Text:=IntToStr(a)
   end else
   begin
    Edit3.Text:=' !!!';
   end;
  end;
 end;
2:
Case RadioGroup2.ItemIndex of
  0:
  begin
   if x>abs(p) then
   begin
    a:=round(power((2*exp(x)),1/3)+3*power(p,2));
    Edit3.Text:=IntToStr(a)
   end else
   begin
    Edit3.Text:=' !!!';
   end;
  end;
  1:
  begin
   if (x<abs(p)) and (x>3) then
   begin
    a:=round(abs(exp(x)-p));
    Edit3.Text:=IntToStr(a)
   end else
   begin
    Edit3.Text:=' !!!';
   end;
  end;
  2:
  begin
   if x=abs(p)  then
   begin
    a:=round(sqr(abs(exp(x)-p)));
    Edit3.Text:=IntToStr(a)
   end else
   begin
    Edit3.Text:=' !!!';
   end;
  end;
 end;
end;
end;

end.

: N/A | : N/A | : 24 2005 20:09 | IP
TERRATOR




! .
.
:
1) , , .
2)
3) . . .

:

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, Grids, ValEdit, ExtCtrls;

type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
ListBox1: TListBox;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
LabeledEdit1: TLabeledEdit;
LabeledEdit2: TLabeledEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
gf,tel:array[1..10000] of string;
fl:text;

implementation

{$R *.dfm}


procedure TForm1.Button1Click(Sender: TObject);
var
i,j:integer; ad:array[1..10000] of integer;
begin
// gf
gf[1]='&#192;&#237;&#242;&#238;&#237;&#238;&#226;';
gf[2]='&#202;&#238;&#235;&#238;&#236;&#238;&#233;&#246;&#229;&#226;';
gf[3]='&#207;&#229;&#242;&#240;&#238;&#226;';
gf[4]='&#204;&#224;&#242;&#226;&#229;&#229;&#226;';
gf[5]='&#192;&#226;&#228;&#229;&#229;&#226;&#224;';
gf[6]='&#205;&#238;&#226;&#232;&#234;&#238;&#226;';
gf[7]='&#209;&#236;&#232;&#240;&#237;&#238;&#226;&#224;';
gf[8]='&#210;&#229;&#241;&#235;&#254;&#234;';
gf[9]='&#204;&#224;&#227;&#224;&#240;&#251;&#247;';
gf[10]='&#210;&#232;&#240;&#224;&#237;&#238;&#226;';
gf[11]='&#204;&#224;&#241;&#235;&#254;&#234;';
gf[12]='&#197;&#240;&#229;&#236;&#229;&#229;&#226;';
gf[13]='&#202;&#238;&#241;&#238;&#226;';
gf[14]='&#208;&#229;&#231;&#237;&#232;&#247;&#229;&#237;&#234;&#238;';
gf[15]='&#197;&#240;&#236;&#224;&#234;&#238;&#226;&#224;';
// tel  
tel[1]='273214';
tel[2]='273782';
tel[3]='274821';
tel[4]='278625';
tel[5]='278254';
tel[6]='271631';
tel[7]='273216';
tel[8]='277937';
tel[9]='272167';
tel[10]='273699';
tel[11]='271398';
tel[12]='275891';
tel[13]='271564';
tel[14]='271547';
tel[15]='275326';
for i:=1 to 15 do begin
Listbox1.Items.Add(gf[ i ]+^I+tel[ i ]);
end;
assignfile(fl,'a.txt');
rewrite(fl);
for i:=1 to 15 do begin
writeln(fl,'':1,gf[ i ],'':1,tel[ i ]);
end;
closefile(fl);
labeledEdit1.SetFocus;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
if closequery then close;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
listbox1.Items.Clear;
end;



procedure TForm1.Button5Click(Sender: TObject);
var i:integer;
begin
listbox1.Sorted:=true;
assignfile(fl,'b.txt');
rewrite(fl);
for i:=1 to 15 do begin
writeln(fl,'':1,gf[ i ],'':1,tel[ i ]);
end;
closefile(fl);
end;

procedure TForm1.Button4Click(Sender: TObject);
var
gf,tel:array[1..10000] of string;
k,i:integer; rd:string;
begin
If listbox1.Sorted = false then begin
assignfile(fl,'a.txt');
reset(fl);
for i:=1 to 15 do begin
readln(fl,gf[ i ]);
readln(fl,tel[ i ]);
end;
for i:=1 to 15 do begin
if tel[ i ] = LabeledEdit1.Text
then begin
k:=i;
LabeledEdit2.Text:=gf[k];
listbox1.Selected[k-1]:=true;
end;
end;
closefile(fl);
end
else begin
AssignFile(fl,'b.txt');
reset(fl);
for i:=1 to 15 do begin
readln(fl,gf[ i ]);
readln(fl,tel[ i ]);
end;
for i:=1 to 15 do begin
if tel[ i ] = LabeledEdit1.Text
then begin
k:=i;
LabeledEdit2.Text:=gf[k];
listbox1.Selected[k-1]:=true;
end;
end;
closefile(fl);
end;
end;
end.


( TERRATOR 8 . 2009 0:22)


( TERRATOR 8 . 2009 0:24)

: 4 | : 2009 | : 8 . 2009 0:20 | IP
Trash91



:
  .


: 1 | : 2010 | : 25 . 2010 23:45 | IP

,


<< >>

© Ikonboard.com