Delphi 2010 ve Delpi XE2 aynı pc üzerinde kullanımı!
Destek talebi(Lütfen oy verelim!)
Sitemiz üye alımına kapatılmıştır!
! CODEBANK 2012 !
İNDİRMEK&DETAYLI BİLGİ ALMAK İÇİN BURAYI TIKLAYINIZ.
0 Üye ve 1 Ziyaretçi konuyu incelemekte.
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, xmldom, XMLIntf, StdCtrls, msxmldom, XMLDoc, ExtCtrls, Grids;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; StringGrid1: TStringGrid; Timer1: TTimer; Button3: TButton; Button4: TButton; Button5: TButton; XMLDocument1: TXMLDocument; OpenDialog1: TOpenDialog; Button6: TButton; StringGrid2: TStringGrid; Label2: TLabel; Label1: TLabel; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure StringGrid1SelectCell(Sender: TObject; ACol, ARow: Integer; var CanSelect: Boolean); procedure Timer1Timer(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button5Click(Sender: TObject); procedure Button6Click(Sender: TObject); private { Private declarations } isim,alis,satis,balis,bsatis,euro:WideString; satir,sutun:integer; baslangic:IXMLNode; public { Public declarations } end;var Form1: TForm1; kontrol:integer=0;implementationuses Unit2, Unit3;{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);begin StringGrid1.colwidths[0]:=140; StringGrid1.Cells[0,0]:='Para Birimi'; StringGrid1.Cells[1,0]:='Alış Fiyatı'; StringGrid1.Cells[2,0]:='Satış Fiyatı'; StringGrid1.Cells[3,0]:='Banka Alış Fiyatı'; StringGrid1.Cells[4,0]:='Banka Satış Fiyatı'; StringGrid1.Cells[5,0]:='1 Euro Karşılığı'; StringGrid2.Cells[0,0]:='Altın Birimi'; StringGrid2.Cells[1,0]:='Alış Fiyatı'; StringGrid2.Cells[2,0]:='Alış Fiyatı'; Button1.Click; Button6.Click;end;procedure TForm1.Button1Click(Sender: TObject);var i:integer;begin if kontrol=0 then begin XMLDocument1.Active:=false; XMLDocument1.FileName:='http://www.tcmb.gov.tr/kurlar/today.xml'; XMLDocument1.Active:=true; end; i:=1; baslangic:=XMLDocument1.DocumentElement.ChildNodes .FindNode('Currency'); repeat isim:=baslangic.ChildNodes.Nodes['Isim'].Text; alis:=baslangic.ChildNodes.Nodes['ForexBuying'].Text; satis:=baslangic.ChildNodes.Nodes['ForexSelling'].Text; balis:=baslangic.ChildNodes.Nodes['BanknoteBuying'].Text; bsatis:=baslangic.ChildNodes.Nodes['BanknoteSelling'].Text; euro:=baslangic.ChildNodes.Nodes['CrossRateEuro'].Text; StringGrid1.Cells[0,i]:=isim; StringGrid1.Cells[1,i]:=alis; StringGrid1.Cells[2,i]:=satis; StringGrid1.Cells[3,i]:=balis; StringGrid1.Cells[4,i]:=bsatis; StringGrid1.Cells[5,i]:=euro; i:=i+1; baslangic:=baslangic.NextSibling; Until baslangic=nil;end;procedure TForm1.Button2Click(Sender: TObject);var ism,als,sati,bals,bsati,eur:string;begin ism:=StringGrid1.Cells[0,satir]; als:=StringGrid1.Cells[1,satir]; if (als='') and (bals='') then eur:=StringGrid1.Cells[5,satir]; sati:=StringGrid1.Cells[2,satir]; bals:=StringGrid1.Cells[3,satir]; bsati:=StringGrid1.Cells[4,satir]; form2:=TForm2.Create(Self); form2.Label1.Caption:='Alış : '+als; form2.Label2.Caption:='Satış : '+als; form2.Label3.Caption:='Banka Alış : '+bals; form2.Label4.Caption:='Banka Satış : '+bsati; form2.Showmodal; Form2.Free;end;procedure TForm1.StringGrid1SelectCell(Sender: TObject; ACol, ARow: Integer; var CanSelect: Boolean);begin satir:=Arow; sutun:=Acol;end;procedure TForm1.Timer1Timer(Sender: TObject);var gun:String;begin case DayOfWeek(Date) of 1: gun:='Pazar'; 2: gun:='Pazartesi'; 3: gun:='Salı'; 4: gun:='Çarşamba'; 5: gun:='Perşembe'; 6: gun:='Cuma'; 7: gun:='Cumartesi'; end; Form1.Caption:='Günlük Döviz / Altın Kurları Tarih: '+datetostr(date)+ ' - ' + Gun + ' ' + timetostr(time);end;procedure TForm1.Button3Click(Sender: TObject);begin XMLDocument1.SaveToFile('C:\'+datetostr(date)+'.xml');end;procedure TForm1.Button4Click(Sender: TObject);begin OpenDialog1.Execute; if Opendialog1.FileName<>'' then begin XMLDocument1.Active:=false; XMLDocument1.FileName:=OpenDialog1.FileName; XMLDocument1.Active:=true; kontrol:=1; Button1.Click; end;end;procedure TForm1.Button5Click(Sender: TObject);begin kontrol:=0; Button1.Click;end;procedure TForm1.Button6Click(Sender: TObject);var i:integer;begin if kontrol=0 then begin XMLDocument1.Active:=false; XMLDocument1.FileName:='http://xml.altinkaynak.com.tr/altin.xml'; XMLDocument1.Active:=true; end; i:=1; baslangic:=XMLDocument1.DocumentElement.ChildNodes .FindNode('DOVIZ'); repeat isim:=baslangic.ChildNodes.Nodes['ADI'].Text; if isim<>'Tarih' then begin alis:=baslangic.ChildNodes.Nodes['ALIS'].Text; satis:=baslangic.ChildNodes.Nodes['SATIS'].Text; StringGrid2.Cells[0,i]:=isim; StringGrid2.Cells[1,i]:=alis; StringGrid2.Cells[2,i]:=satis; i:=i+1; end; baslangic:=baslangic.NextSibling; Until baslangic=nil; end;end.