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.
procedure TForm1.FormCreate(Sender: TObject);var i:integer;begin stringGrid1.ColCount:=7; stringGrid1.RowCount:=4; stringGrid1.Cols[0].Add('SEANS'); for i:=1 to 7 do stringGrid1.Cols[i].Add(inttostr(i)); stringGrid1.Rows[1].Add('BAŞLAMA'); stringGrid1.Rows[2].Add('ARA'); stringGrid1.Rows[3].Add('BİTİŞ');end;procedure TForm1.Button1Click(Sender: TObject);var time1:TDateTime; st,dk,sn,sl:word; dkkalan,ilky,ikinciy,x:word; stformat:string;begin if Edit1.Text='' then begin showmessage('Filmin başlama saatini girmelisiniz.'); Edit1.SetFocus; exit; end; if Edit2.Text='' then begin showmessage('Filmin ilk yarısını dakika olarak girmelisiniz.'); Edit2.SetFocus; exit; end; if Edit3.Text='' then begin showmessage('Filmin ikinci yarısını dakika olarak girmelisiniz.'); Edit3.SetFocus; exit; end; ilky:=strtoint(Edit2.Text); ikinciy:=strtoint(Edit3.Text); //----------------------------------------------------------------------- //cells[1,1] 1. seans başlama saati stringGrid1.Cells[1,1]:=Edit1.Text; //cells[1,2] 1. seans ara time1:=strtoDateTime(stringGrid1.Cells[1,1]); decodetime(time1,st,dk,sn,sl); x:=dk+ilky; if (x>=0) and (x<60) then begin st:=st; dk:=x; end else if x=60 then begin st:=st+1; dk:=0; end else if (x>60) and (x<120) then begin st:=st+1; dk:=Abs(x-60); end else if x=120 then begin st:=st+2; dk:=0; end else if (x>120) and (x<180) then begin st:=st+2; dk:=Abs(x-120); end; //st ifadesi 24 ve üzerinde ise ayarla if st=24 then st:=0; if st=25 then st:=1; if st=26 then st:=2; if st=27 then st:=3; if st=28 then st:=4; if st in [0..9] then stformat:='0'+inttostr(st) else stformat:=inttostr(st); //dakikayı iki basamaklı notasyonda ayarla if (dk in [0..9]) then stringGrid1.Cells[1,2]:=stformat+':'+'0'+inttostr(dk) else stringGrid1.Cells[1,2]:=stformat+':'+inttostr(dk); //cells[1,3] 1.seans ikinci yarı time1:=strtoDateTime(stringGrid1.Cells[1,2]); decodetime(time1,st,dk,sn,sl); x:=dk+ikinciy; if (x>=0) and (x<60) then begin st:=st; dk:=x; end else if x=60 then begin st:=st+1; dk:=0; end else if (x>60) and (x<120) then begin st:=st+1; dk:=Abs(x-60); end else if x=120 then begin st:=st+2; dk:=0; end else if (x>120) and (x<180) then begin st:=st+2; dk:=Abs(x-120); end; //st ifadesi 24 ve üzerinde ise ayarla if st=24 then st:=0; if st=25 then st:=1; if st=26 then st:=2; if st=27 then st:=3; if st=28 then st:=4; if st in [0..9] then stformat:='0'+inttostr(st) else stformat:=inttostr(st); //dakikayı iki basamaklı notasyonda ayarla if (dk in [0..9]) then stringGrid1.Cells[1,3]:=stformat+':'+'0'+inttostr(dk) else stringGrid1.Cells[1,3]:=stformat+':'+inttostr(dk); //--------------------------------------------------------------------------- //cells[2,1] 2. seans başlama saati stringGrid1.Cells[2,1]:=stringGrid1.Cells[1,3]; //cells[2,2] 2. seans ara time1:=strtoDateTime(stringGrid1.Cells[2,1]); decodetime(time1,st,dk,sn,sl); x:=dk+ilky; if (x>=0) and (x<60) then begin st:=st; dk:=x; end else if x=60 then begin st:=st+1; dk:=0; end else if (x>60) and (x<120) then begin st:=st+1; dk:=Abs(x-60); end else if x=120 then begin st:=st+2; dk:=0; end else if (x>120) and (x<180) then begin st:=st+2; dk:=Abs(x-120); end; //st ifadesi 24 ve üzerinde ise ayarla if st=24 then st:=0; if st=25 then st:=1; if st=26 then st:=2; if st=27 then st:=3; if st=28 then st:=4; if st in [0..9] then stformat:='0'+inttostr(st) else stformat:=inttostr(st); //dakikayı iki basamaklı notasyonda ayarla if (dk in [0..9]) then stringGrid1.Cells[2,2]:=stformat+':'+'0'+inttostr(dk) else stringGrid1.Cells[2,2]:=stformat+':'+inttostr(dk); //cells[2,3] 2. seans ikinci yarı time1:=strtoDateTime(stringGrid1.Cells[2,2]); decodetime(time1,st,dk,sn,sl); x:=dk+ikinciy; if (x>=0) and (x<60) then begin st:=st; dk:=x; end else if x=60 then begin st:=st+1; dk:=0; end else if (x>60) and (x<120) then begin st:=st+1; dk:=Abs(x-60); end else if x=120 then begin st:=st+2; dk:=0; end else if (x>120) and (x<180) then begin st:=st+2; dk:=Abs(x-120); end; //st ifadesi 24 ve üzerinde ise ayarla if st=24 then st:=0; if st=25 then st:=1; if st=26 then st:=2; if st=27 then st:=3; if st=28 then st:=4; if st in [0..9] then stformat:='0'+inttostr(st) else stformat:=inttostr(st); //dakikayı iki basamaklı notasyonda ayarla if (dk in [0..9]) then stringGrid1.Cells[2,3]:=stformat+':'+'0'+inttostr(dk) else stringGrid1.Cells[2,3]:=stformat+':'+inttostr(dk); //--------------------------------------------------------------------------- //cells[3,1] 3. seans başlama saati stringGrid1.Cells[3,1]:=stringGrid1.Cells[2,3]; //cells[3,2] 3. seans ara time1:=strtoDateTime(stringGrid1.Cells[3,1]); decodetime(time1,st,dk,sn,sl); x:=dk+ilky; if (x>=0) and (x<60) then begin st:=st; dk:=x; end else if x=60 then begin st:=st+1; dk:=0; end else if (x>60) and (x<120) then begin st:=st+1; dk:=Abs(x-60); end else if x=120 then begin st:=st+2; dk:=0; end else if (x>120) and (x<180) then begin st:=st+2; dk:=Abs(x-120); end; //st ifadesi 24 ve üzerinde ise ayarla if st=24 then st:=0; if st=25 then st:=1; if st=26 then st:=2; if st=27 then st:=3; if st=28 then st:=4; if st in [0..9] then stformat:='0'+inttostr(st) else stformat:=inttostr(st); //dakikayı iki basamaklı notasyonda ayarla if (dk in [0..9]) then stringGrid1.Cells[3,2]:=stformat+':'+'0'+inttostr(dk) else stringGrid1.Cells[3,2]:=stformat+':'+inttostr(dk); //cells[3,3] 3. seans ikinci yarı time1:=strtoDateTime(stringGrid1.Cells[3,2]); decodetime(time1,st,dk,sn,sl); x:=dk+ikinciy; if (x>=0) and (x<60) then begin st:=st; dk:=x; end else if x=60 then begin st:=st+1; dk:=0; end else if (x>60) and (x<120) then begin st:=st+1; dk:=Abs(x-60); end else if x=120 then begin st:=st+2; dk:=0; end else if (x>120) and (x<180) then begin st:=st+2; dk:=Abs(x-120); end; //st ifadesi 24 ve üzerinde ise ayarla if st=24 then st:=0; if st=25 then st:=1; if st=26 then st:=2; if st=27 then st:=3; if st=28 then st:=4; if st in [0..9] then stformat:='0'+inttostr(st) else stformat:=inttostr(st); //dakikayı iki basamaklı notasyonda ayarla} if (dk in [0..9]) then stringGrid1.Cells[3,3]:=stformat+':'+'0'+inttostr(dk) else stringGrid1.Cells[3,3]:=stformat+':'+inttostr(dk); //--------------------------------------------------------------------------- //cells[4,1] 4. seans başlama saati stringGrid1.Cells[4,1]:=stringGrid1.Cells[3,3]; //cells[4,2] 4. seans ara time1:=strtoDateTime(stringGrid1.Cells[4,1]); decodetime(time1,st,dk,sn,sl); x:=dk+ilky; if (x>=0) and (x<60) then begin st:=st; dk:=x; end else if x=60 then begin st:=st+1; dk:=0; end else if (x>60) and (x<120) then begin st:=st+1; dk:=Abs(x-60); end else if x=120 then begin st:=st+2; dk:=0; end else if (x>120) and (x<180) then begin st:=st+2; dk:=Abs(x-120); end; //st ifadesi 24 ve üzerinde ise ayarla if st=24 then st:=0; if st=25 then st:=1; if st=26 then st:=2; if st=27 then st:=3; if st=28 then st:=4; if st in [0..9] then stformat:='0'+inttostr(st) else stformat:=inttostr(st); //dakikayı iki basamaklı notasyonda ayarla if (dk in [0..9]) then stringGrid1.Cells[4,2]:=stformat+':'+'0'+inttostr(dk) else stringGrid1.Cells[4,2]:=stformat+':'+inttostr(dk); //cells[4,3] 4. seans ikinci yarı time1:=strtoDateTime(stringGrid1.Cells[4,2]); decodetime(time1,st,dk,sn,sl); x:=dk+ikinciy; if (x>=0) and (x<60) then begin st:=st; dk:=x; end else if x=60 then begin st:=st+1; dk:=0; end else if (x>60) and (x<120) then begin st:=st+1; dk:=Abs(x-60); end else if x=120 then begin st:=st+2; dk:=0; end else if (x>120) and (x<180) then begin st:=st+2; dk:=Abs(x-120); end; //st ifadesi 24 ve üzerinde ise ayarla if st=24 then st:=0; if st=25 then st:=1; if st=26 then st:=2; if st=27 then st:=3; if st=28 then st:=4; if st in [0..9] then stformat:='0'+inttostr(st) else stformat:=inttostr(st); //dakikayı iki basamaklı notasyonda ayarla if (dk in [0..9]) then stringGrid1.Cells[4,3]:=stformat+':'+'0'+inttostr(dk) else stringGrid1.Cells[4,3]:=stformat+':'+inttostr(dk); //--------------------------------------------------------------------------- //cells[5,1] 5. seans başlama saati stringGrid1.Cells[5,1]:=stringGrid1.Cells[4,3]; //cells[5,2] 5. seans ara time1:=strtoDateTime(stringGrid1.Cells[5,1]); decodetime(time1,st,dk,sn,sl); x:=dk+ilky; if (x>=0) and (x<60) then begin st:=st; dk:=x; end else if x=60 then begin st:=st+1; dk:=0; end else if (x>60) and (x<120) then begin st:=st+1; dk:=Abs(x-60); end else if x=120 then begin st:=st+2; dk:=0; end else if (x>120) and (x<180) then begin st:=st+2; dk:=Abs(x-120); end; //st ifadesi 24 ve üzerinde ise ayarla if st=24 then st:=0; if st=25 then st:=1; if st=26 then st:=2; if st=27 then st:=3; if st=28 then st:=4; if st in [0..9] then stformat:='0'+inttostr(st) else stformat:=inttostr(st); //dakikayı iki basamaklı notasyonda ayarla if (dk in [0..9]) then stringGrid1.Cells[5,2]:=stformat+':'+'0'+inttostr(dk) else stringGrid1.Cells[5,2]:=stformat+':'+inttostr(dk); //cells[5,3] 5. seans ikinci yarı time1:=strtoDateTime(stringGrid1.Cells[5,2]); decodetime(time1,st,dk,sn,sl); x:=dk+ikinciy; if (x>=0) and (x<60) then begin st:=st; dk:=x; end else if x=60 then begin st:=st+1; dk:=0; end else if (x>60) and (x<120) then begin st:=st+1; dk:=Abs(x-60); end else if x=120 then begin st:=st+2; dk:=0; end else if (x>120) and (x<180) then begin st:=st+2; dk:=Abs(x-120); end; //st ifadesi 24 ve üzerinde ise ayarla if st=24 then st:=0; if st=25 then st:=1; if st=26 then st:=2; if st=27 then st:=3; if st=28 then st:=4; if st in [0..9] then stformat:='0'+inttostr(st) else stformat:=inttostr(st); //dakikayı iki basamaklı notasyonda ayarla if (dk in [0..9]) then stringGrid1.Cells[5,3]:=stformat+':'+'0'+inttostr(dk) else stringGrid1.Cells[5,3]:=stformat+':'+inttostr(dk); //--------------------------------------------------------------------------- //cells[6,1] 6. seans başlama saati stringGrid1.Cells[6,1]:=stringGrid1.Cells[5,3]; //cells[6,2] 6. seans ara time1:=strtoDateTime(stringGrid1.Cells[6,1]); decodetime(time1,st,dk,sn,sl); x:=dk+ilky; if (x>=0) and (x<60) then begin st:=st; dk:=x; end else if x=60 then begin st:=st+1; dk:=0; end else if (x>60) and (x<120) then begin st:=st+1; dk:=Abs(x-60); end else if x=120 then begin st:=st+2; dk:=0; end else if (x>120) and (x<180) then begin st:=st+2; dk:=Abs(x-120); end; //st ifadesi 24 ve üzerinde ise ayarla if st=24 then st:=0; if st=25 then st:=1; if st=26 then st:=2; if st=27 then st:=3; if st=28 then st:=4; if st in [0..9] then stformat:='0'+inttostr(st) else stformat:=inttostr(st); //dakikayı iki basamaklı notasyonda ayarla if (dk in [0..9]) then stringGrid1.Cells[6,2]:=stformat+':'+'0'+inttostr(dk) else stringGrid1.Cells[6,2]:=stformat+':'+inttostr(dk); //cells[6,3] 6. seans ikinci yarı time1:=strtoDateTime(stringGrid1.Cells[6,2]); decodetime(time1,st,dk,sn,sl); x:=dk+ikinciy; if (x>=0) and (x<60) then begin st:=st; dk:=x; end else if x=60 then begin st:=st+1; dk:=0; end else if (x>60) and (x<120) then begin st:=st+1; dk:=Abs(x-60); end else if x=120 then begin st:=st+2; dk:=0; end else if (x>120) and (x<180) then begin st:=st+2; dk:=Abs(x-120); end; //st ifadesi 24 ve üzerinde ise ayarla if st=24 then st:=0; if st=25 then st:=1; if st=26 then st:=2; if st=27 then st:=3; if st=28 then st:=4; if st in [0..9] then stformat:='0'+inttostr(st) else stformat:=inttostr(st); //dakikayı iki basamaklı notasyonda ayarla if (dk in [0..9]) then stringGrid1.Cells[6,3]:=stformat+':'+'0'+inttostr(dk) else stringGrid1.Cells[6,3]:=stformat+':'+inttostr(dk);end;
procedure TForm1.m11Click(Sender: TObject);var i,j,LeftCell,TopCell : Integer; BottomCell, RightCell : Integer; TextBuf : String; SysClip : TClipBoard;begin SysClip := TClipBoard.Create; //trap the Control-C or Control-c keys // if (Shift = [ssCtrl]) and ((Key = 67) or (Key = 99)) then begin //get the coordinates of the selected region of the grid LeftCell := StringGrid1.Selection.Left; TopCell := StringGrid1.Selection.Top; BottomCell := StringGrid1.Selection.Bottom; RightCell := StringGrid1.Selection.Right; //The variable TextBuf is used to hold the information that will to to the clipboard TextBuf := ''; //for all of the selected cells, copy the contents to //TextBuf and separate lines by returns and cells by tabs for i := TopCell to BottomCell do begin for j := LeftCell to RightCell do begin if j = LeftCell then TextBuf := TextBuf + StringGrid1.Cells[j,i] else TextBuf := TextBuf + #09 + StringGrid1.Cells[j,i]; end; TextBuf := TextBuf + #13#10; end; //Now move the contents of TextBuf to the windows clipboard SysClip.AsText := TextBuf; //destroy the clipboard object , this does not affect //the contents in the Windows clipboard SysClip.Destroy; //end;end;