C# Kodu:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;//Dosya İşlemleri
namespace WindowsFormsApplication19
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
timer1.Enabled = true;
timer2.Enabled = true;
GecmisBox.Visible = false;
}
private void YenileB_Click(object sender, EventArgs e)
{
Tarayici.Refresh();
}
private void Git_Click(object sender, EventArgs e)
{
Tarayici.Navigate(AdresCubugu.Text);
}
private void Geri_Click(object sender, EventArgs e)
{
Tarayici.GoBack();
}
private void Ileri_Click(object sender, EventArgs e)
{
Tarayici.GoForward();
}
private void Yenile_Click(object sender, EventArgs e)
{
Tarayici.Refresh();
}
private void AnaSayfa_Click(object sender, EventArgs e)
{
Tarayici.Navigate("https://www.google.com.tr/");
}
private void KirmiziB_Click(object sender, EventArgs e)
{
this.BackColor = Color.Red;
}
private void SariB_Click(object sender, EventArgs e)
{
this.BackColor = Color.Yellow;
}
private void YesilB_Click(object sender, EventArgs e)
{
this.BackColor = Color.Green;
}
private void MaviB_Click(object sender, EventArgs e)
{
this.BackColor = Color.Blue;
}
private void timer1_Tick(object sender, EventArgs e)
{
Tarih.Text = DateTime.Now.ToLongDateString();
Zaman.Text = DateTime.Now.ToLongTimeString();
}
private void çıkışToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void KaynakB_Click(object sender, EventArgs e)
{
MessageBox.Show(Tarayici.DocumentText);
}
private void Dur_Click(object sender, EventArgs e)
{
AdresCubugu.Clear();
}
private void Tarayici_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
AdresCubugu.Text = Tarayici.Url.ToString();
string ZamanAl = DateTime.Now.Day + "." + DateTime.Now.Month + "." + DateTime.Now.Year;
string Zaman2Al = DateTime.Now.Hour + ":" + DateTime.Now.Minute + ":" + DateTime.Now.Second;
FileStream DosyaIslemleri = new FileStream("Gecmis.txt",FileMode.Append);
StreamWriter Yaz = new StreamWriter(DosyaIslemleri);
Yaz.WriteLine(ZamanAl+" / "+Zaman2Al+" / "+Tarayici.Url);
Yaz.Close();
GecmisYukle();
}
private void timer2_Tick(object sender, EventArgs e)
{
toolStripStatusLabel1.Text = Tarayici.ReadyState.ToString();
}
private void GecmisYukle()
{
GecmisBox.Items.Clear();
StreamReader DosyaOku = new StreamReader("Gecmis.txt");
while (!DosyaOku.EndOfStream)
{
GecmisBox.Items.Add(DosyaOku.ReadLine());
}
DosyaOku.Close();
}
private void GecmisB_Click(object sender, EventArgs e)
{
}
private void GecmisGosterB_Click(object sender, EventArgs e)
{
GecmisYukle();
GecmisBox.Visible = true;
}
private void GecmisGizleB_Click(object sender, EventArgs e)
{
GecmisBox.Visible = false;
}
private void AdresCubugu_MouseClick(object sender, MouseEventArgs e)
{
AdresCubugu.Clear();
}
private void temizleToolStripMenuItem_Click(object sender, EventArgs e)
{
StreamWriter Dosya = new StreamWriter("Gecmis.txt");
Dosya.Write("");
Dosya.Close();
GecmisYukle();
}
private void WebTekno_Click(object sender, EventArgs e)
{
Tarayici.Navigate("http://www.webtekno.com/");
}
private void EnSonHaber_Click(object sender, EventArgs e)
{
Tarayici.Navigate("http://www.ensonhaber.com/");
}
private void DUWebSite_Click(object sender, EventArgs e)
{
Tarayici.Navigate("http://www.duzce.edu.tr/");
}
private void DUObs_Click(object sender, EventArgs e)
{
Tarayici.Navigate("https://obs.duzce.edu.tr/");
this.BackgroundImage = null;
}
private void Yandex_Click(object sender, EventArgs e)
{
Tarayici.Navigate("https://www.yandex.com.tr/");
}
private void YouTube_Click(object sender, EventArgs e)
{
Tarayici.Navigate("https://www.youtube.com/");
}
private void FaceBook_Click(object sender, EventArgs e)
{
Tarayici.Navigate("https://www.facebook.com/");
}
private void Twitter_Click(object sender, EventArgs e)
{
Tarayici.Navigate("https://twitter.com/");
}
private void Webrazzi_Click(object sender, EventArgs e)
{
Tarayici.Navigate("http://webrazzi.com/");
}
private void EDevlet_Click(object sender, EventArgs e)
{
Tarayici.Navigate("https://www.turkiye.gov.tr/");
}
private void MyNet_Click(object sender, EventArgs e)
{
Tarayici.Navigate("http://www.mynet.com/");
}
private void Microsoft_Click(object sender, EventArgs e)
{
Tarayici.Navigate("https://www.microsoft.com/tr-tr/");
}
private void beIn_Click(object sender, EventArgs e)
{
Tarayici.Navigate("http://tr.beinsports.com/");
}
private void Fanatik_Click(object sender, EventArgs e)
{
Tarayici.Navigate("http://www.fanatik.com.tr/");
}
private void GalataSaray_Click(object sender, EventArgs e)
{
Tarayici.Navigate("http://www.galatasaray.org/");
}
private void YemekSepeti_Click(object sender, EventArgs e)
{
Tarayici.Navigate("https://www.yemeksepeti.com/");
}
private void bgToolStripMenuItem_Click(object sender, EventArgs e)
{
this.BackgroundImage = Image.FromFile("image\\bg1.png");
}
private void arkaplan1ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.BackgroundImage = Image.FromFile("image\\bg2.jpg");
}
private void arkaplan3ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.BackgroundImage = Image.FromFile("image\\bg3.jpg");
}
private void sıfırlaToolStripMenuItem_Click(object sender, EventArgs e)
{
this.BackColor = Color.AntiqueWhite;
}
}
}
Hiç yorum yok :
Yorum Gönder