2 SINIF FİNAL SORULARI
İSİMLER131256004 OSMAN KOCAK
131256058 BURAK ASLANLI
131256016 HAKAN SEN
131256051 WAFA AHMET
131256045 SELCUK BAGLIMI
131256039 OMER ZORLU
131256010 ERAY DEMIR
131256037 OSMAN AYTEKIR
131256056 OSMAN GONDER
121256045 MUHAMMED GUNARI
131256025 KADIR BOLEKLI
111256020 MEHMET ALTINTAS
131256049 YUSUF KOCAK
121256011 OGUZ OZSARI
NOTLAR
NOTLAR
131256004 40
131256058 45
131256016 47
131256051 41
131256045 63
131256039 89
131256010 65
131256037 78
131256056 21
121256045 11
131256025 36
111256020 96
131256049 45
121256011 48


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;
namespace _1_soru
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private string[] birleştir(string[] isimim, string[] notlarım)
{
for (int i = 0; i < y; i++)
{
if (isimim[i]!=""&¬larım[i]!="")
{
string[] isimler = isimim[i].Split(' ');
string[] notlar = notlarım[i].Split(' ');
if (notlar[0]==isimler[0])
{
yaz.WriteLine(notlar[0] + " " + isimler[1] +" "+isimler[2]+" " + notlar[1]);
}
}
}
yaz.Close();
return isim;
}
string[] isim = new string[454];
string[] not = new string[454];
int y = 0;
StreamWriter yaz;
string yer = "";
private void button1_Click(object sender, EventArgs e)
{
openFileDialog1.Title = "isim dosyasını seç bn enes";
openFileDialog1.ShowDialog();
StreamReader isim1 = new StreamReader(openFileDialog1.FileName);
openFileDialog1.Title = "no dosyasını seç bn enes";
openFileDialog1.ShowDialog();
StreamReader no1 = new StreamReader(openFileDialog1.FileName);
saveFileDialog1.Title = "kayıt edeceginz yer bn enes";
saveFileDialog1.ShowDialog();
yaz = new StreamWriter(saveFileDialog1.FileName + ".txt");
yer = saveFileDialog1.FileName + ".txt";
while (isim1.EndOfStream==false)
{
string isimsatır = isim1.ReadLine();
string nosatır = no1.ReadLine();
isim[y] = isimsatır;
not[y] = nosatır;
y++;
}
birleştir(isim, not);
}
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar==13)
{
listBox1.Items.Clear();
StreamReader oku = new StreamReader(yer);
while (oku.EndOfStream==false)
{
string satır = oku.ReadLine();
string[] par = satır.Split(' ');
if (textBox1.Text==par[1])
{
listBox1.Items.Add(satır);
}
}
}
}
private void textBox2_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)
{
listBox1.Items.Clear();
StreamReader oku = new StreamReader(yer);
while (oku.EndOfStream == false)
{
string satır = oku.ReadLine();
string[] par = satır.Split(' ');
if (textBox2.Text == par[2])
{
listBox1.Items.Add(satır);
}
}
}
}
private void textBox3_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)
{
listBox1.Items.Clear();
StreamReader oku = new StreamReader(yer);
while (oku.EndOfStream == false)
{
string satır = oku.ReadLine();
string[] par = satır.Split(' ');
if (textBox3.Text == par[0])
{
listBox1.Items.Add(satır);
}
}
}
}
private void textBox4_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)
{
listBox1.Items.Clear();
StreamReader oku = new StreamReader(yer);
while (oku.EndOfStream == false)
{
string satır = oku.ReadLine();
string[] par = satır.Split(' ');
if (Convert.ToInt16(textBox4.Text)<=Convert.ToInt16(par[3]))
{
listBox1.Items.Add(satır);
}
}
}
}
}
}