sk8eer_boi Posted April 3, 2011 Share Posted April 3, 2011 program Şöyle olacak acıldığı zaman iki seçenek gelecek bunlar tabiki de ingilizceden türkçeye yada Türkçeden ingilizceye olacak herhangi birine tıklandığında form2 açılacak ve combobox lar görülecek.bunlarda 1. combobox da harfi seçeceğiz 2. combobox da kelimeyi ve seçilen kelimenin cevirisi textbox a aktıralacak. en kısa zamanda yaredımlarınızı bekliyoruz Quote Link to comment Share on other sites More sharing options...
mucit41 Posted April 3, 2011 Share Posted April 3, 2011 [center][quote]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.OleDb; namespace sozlukodev { public partial class Form1 : Form { public Form1() { InitializeComponent(); } OleDbConnection sozluk = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\Sözlük\\sozluk.mdb;Persist Security Info=False"); private void Form1_Load(object sender, EventArgs e) { this.MaximizeBox = false; this.CancelButton = button4; this.AcceptButton = button1; textBox1.Focus(); radioButton1.Checked = true; toolTip1.SetToolTip(button1, "Ara"); toolTip1.SetToolTip(button2, "Ekle"); toolTip1.SetToolTip(button3, "Hakkinda"); toolTip1.SetToolTip(button4, "Çikis"); } private void button1_Click(object sender, EventArgs e) { string metin2; metin2 = textBox1.Text; if (metin2.Length <= 0) { errorProvider1.SetError(textBox1, "Kelime Giriniz..."); textBox1.Focus(); return; } else { errorProvider1.Clear(); } if (radioButton1.Checked) { OleDbDataAdapter sozlukdata = new OleDbDataAdapter("select * from turkce where kelime='" + textBox1.Text + "' ", sozluk); DataTable sozluktablo = new DataTable(); sozlukdata.Fill(sozluktablo); DataSet sozlukset = new DataSet(); sozlukset.Tables.Add(sozluktablo); bindingSource1.DataSource = sozlukset; bindingSource1.DataMember = sozlukset.Tables[0].TableName; string metin; metin = textBox1.Text; int numara = bindingSource1.Find("kelime", metin); if (numara >= 0) { bindingSource1.Position = numara; dataGridView1.DataSource = bindingSource1; DataRowView aktifkayit = (DataRowView)bindingSource1.Current; string kelime = aktifkayit["kelime"].ToString(); string anlam = aktifkayit["anlam"].ToString(); label1.Text = kelime; label2.Text = anlam; } textBox1.Clear(); textBox1.Focus(); } else { OleDbDataAdapter sozlukdata = new OleDbDataAdapter("select * from ingilizce where kelime='" + textBox1.Text + "' ", sozluk); DataTable sozluktablo = new DataTable(); sozlukdata.Fill(sozluktablo); DataSet sozlukset = new DataSet(); sozlukset.Tables.Add(sozluktablo); bindingSource1.DataSource = sozlukset; bindingSource1.DataMember = sozlukset.Tables[0].TableName; string metin; metin = textBox1.Text; int numara = bindingSource1.Find("kelime", metin); if (numara >= 0) { bindingSource1.Position = numara; dataGridView1.DataSource = bindingSource1; DataRowView aktifkayit = (DataRowView)bindingSource1.Current; string kelime = aktifkayit["kelime"].ToString(); string anlam = aktifkayit["anlam"].ToString(); label1.Text = kelime; label2.Text = anlam; } textBox1.Clear(); textBox1.Focus(); } } private void textBox1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { textBox1.Text = ""; textBox1.Focus(); } } private void textBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { if (radioButton1.Checked) { OleDbDataAdapter sozlukdata = new OleDbDataAdapter("select * from turkce where kelime='" + textBox1.Text + "' ", sozluk); DataTable sozluktablo = new DataTable(); sozlukdata.Fill(sozluktablo); DataSet sozlukset = new DataSet(); sozlukset.Tables.Add(sozluktablo); bindingSource1.DataSource = sozlukset; bindingSource1.DataMember = sozlukset.Tables[0].TableName; string metin; metin = textBox1.Text; int numara = bindingSource1.Find("kelime", metin); if (numara >= 0) { bindingSource1.Position = numara; dataGridView1.DataSource = bindingSource1; DataRowView aktifkayit = (DataRowView)bindingSource1.Current; string kelime = aktifkayit["kelime"].ToString(); string anlam = aktifkayit["anlam"].ToString(); label1.Text = kelime; label2.Text = anlam; } textBox1.Clear(); textBox1.Focus(); } if (radioButton2.Checked) { OleDbDataAdapter sozlukdata = new OleDbDataAdapter("select * from ingilizce where kelime='" + textBox1.Text + "' ", sozluk); DataTable sozluktablo = new DataTable(); sozlukdata.Fill(sozluktablo); DataSet sozlukset = new DataSet(); sozlukset.Tables.Add(sozluktablo); bindingSource1.DataSource = sozlukset; bindingSource1.DataMember = sozlukset.Tables[0].TableName; string metin; metin = textBox1.Text; int numara = bindingSource1.Find("kelime", metin); if (numara >= 0) { bindingSource1.Position = numara; dataGridView1.DataSource = bindingSource1; DataRowView aktifkayit = (DataRowView)bindingSource1.Current; string kelime = aktifkayit["kelime"].ToString(); string anlam = aktifkayit["anlam"].ToString(); label1.Text = kelime; label2.Text = anlam; } textBox1.Clear(); textBox1.Focus(); } } } private void button2_Click(object sender, EventArgs e) { Form2 f2 = new Form2(); f2.ShowDialog(); } private void button4_Click(object sender, EventArgs e) { Application.Exit(); } private void button3_Click(object sender, EventArgs e) { hakkinda f3 = new hakkinda(); f3.ShowDialog(); } private void kelimeEkleToolStripMenuItem_Click(object sender, EventArgs e) { Form2 f2 = new Form2(); f2.ShowDialog(); } private void türkçeIngilizceToolStripMenuItem_Click(object sender, EventArgs e) { radioButton1.Checked = true; } private void ingilizceTürkçeToolStripMenuItem_Click(object sender, EventArgs e) { radioButton2.Checked = true; } private void programHakkToolStripMenuItem_Click(object sender, EventArgs e) { hakkinda f3 = new hakkinda(); f3.Show(); } } } [/quote][/center] [center][size="4"][color="#0000FF"][b]Konu alıntıdır belki bu kodlar işine yarar bir şey yapmak istiyorsan.[/b][/color][/size][/center] Quote Link to comment Share on other sites More sharing options...
sk8eer_boi Posted April 3, 2011 Author Share Posted April 3, 2011 bunu winrar arşivi olarak koyamaz mısınız Quote Link to comment Share on other sites More sharing options...
pc-se7en Posted April 3, 2011 Share Posted April 3, 2011 [quote name='sk8eer_boi' date='03 April 2011 - 05:52 ' timestamp='1301809977' post='986709'] bunu winrar arşivi olarak koyamaz mısınız [/quote] O kodları winrar arşivi olarak nasıl sıkıştırsın En kolay yolu sen script kodunu al programa yapıştır Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.