1. Knight Online Sunucu Vps Knight Online Sunucuları Oyun Sunucuları Game Hosting Knight Online 1886 Pvp Sunucu knight 1886 server kiralama,1886 server,knight vps kiralama,knight vps kirala,knight bilişim,knight online vps kiralama,knight online vps kirala,knight sunucu firması,knight vps server,knight servers,knight server kiralama,Knight Online 1886 Vps Kiralama Knight Online 1299 Pvp Sunucu Paketleri knight vps kiralama,knight vps kirala,knight bilişim,knight online vps kiralama,knight online vps kirala,knight sunucu firması,knight vps server,knight servers,knight server kiralama,Knight Online 1299 Vps Kiralama Metin 2 Sunucu Kiralama 2017
    Uyarıyı kapat

kod

'Game Hosting' forumunda Stein tarafından 11 Tem 2019 tarihinde açılan konu

  1. Stein

    Stein Administrator Site Yetkilisi

    Katılım:
    31 Eki 2015
    Mesaj:
    54
    Alınan Beğeniler:
    0
    Ödül Puanları:
    6
    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 WindowsFormsApplication8
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }

    private void buttonKaydet_Click(object sender, EventArgs e)
    {
    listBoxAdı.Items.Add(textBoxAdı.Text);
    listBoxSoyad.Items.Add(textBoxSoyadı.Text);
    listBoxNumara.Items.Add(textBoxNumara.Text);
    kaydet();
    }
    void kaydet()
    {

    FileStream fsadı = new FileStream("c:/böte/adı.txt", FileMode.Create, FileAccess.Write);
    StreamWriter swadı = new StreamWriter(fsadı);
    for (int i = 0; i < listBoxAdı.Items.Count; i++)
    {

    swadı.WriteLine(listBoxAdı.Items.ToString());
    }
    swadı.Close();

    fsadı.Close();



    FileStream fssoyadı = new FileStream("c:/böte/soyadı.txt", FileMode.Create, FileAccess.Write);
    StreamWriter swsoyadı = new StreamWriter(fssoyadı);
    for (int j = 0; j < listBoxSoyad.Items.Count; j++)
    {
    swsoyadı.WriteLine(listBoxSoyad.Items[j].ToString());
    }
    swsoyadı.Close();

    fssoyadı.Close();






    FileStream fsnumara = new FileStream("c:/böte/numara.txt", FileMode.Create, FileAccess.Write);
    StreamWriter swnumara = new StreamWriter(fsnumara);
    for (int s = 0; s < listBoxNumara.Items.Count; s++)
    {

    swnumara.WriteLine(listBoxNumara.Items.ToString());
    }
    swnumara.Close();

    fsnumara.Close();
    }

    private void Form1_Load(object sender, EventArgs e)
    {
    FileStream fsadıal = new FileStream("c:/böte/adı.txt", FileMode.Open, FileAccess.Read);
    StreamReader swadıal = new StreamReader(fsadıal);
    string adı = swadıal.ReadLine();
    while (adı !=null)
    {
    listBoxAdı.Items.Add(adı);
    adı = swadıal.ReadLine();

    }
    swadıal.Close();
    fsadıal.Close();

    FileStream fssoyadıal=new FileStream("c:/böte/soyadı.txt", FileMode.Open, FileAccess.Read);
    StreamReader swsoyadıal = new StreamReader(fssoyadıal);
    string soyadı = swsoyadıal.ReadLine();
    while (soyadı != null)
    {
    listBoxSoyad.Items.Add(soyadı);
    soyadı = swsoyadıal.ReadLine();
    }

    swsoyadıal.Close();
    fssoyadıal.Close();
    FileStream fsnumaraal = new FileStream("c:/böte/numara.txt", FileMode.Open, FileAccess.Read);
    StreamReader swnumaraal = new StreamReader(fsnumaraal);
    string numara = swnumaraal.ReadLine();
    while (numara != null)
    {
    listBoxNumara.Items.Add(numara);
    numara = swnumaraal.ReadLine();

    }
    swnumaraal.Close();
    fsnumaraal.Close();
    }

    private void listBoxAdı_SelectedIndexChanged(object sender, EventArgs e)
    {
    listBoxSoyad.SelectedIndex = listBoxAdı.SelectedIndex;
    listBoxNumara.SelectedIndex = listBoxAdı.SelectedIndex;

    }

    private void buttonSil_Click(object sender, EventArgs e)
    {
    int a = listBoxAdı.SelectedIndex;
    listBoxAdı.Items.RemoveAt(a);
    listBoxNumara.Items.RemoveAt(a);
    listBoxSoyad.Items.RemoveAt(a);
    kaydet();
    }

    private void buttonAra_Click(object sender, EventArgs e)
    {
    int say = listBoxAdı.FindStringExact(textBoxAdı.Text);
    if (say < 0)
    {
    MessageBox.Show("bulunamadı");
    }
    else
    listBoxAdı.SelectedIndex=say;
    }

    private void buttonGuncelle_Click(object sender, EventArgs e)
    {
    int a = listBoxAdı.SelectedIndex;
    listBoxAdı.Items[a] = textBoxAdı.Text;
    listBoxNumara.Items[a] = textBoxNumara.Text;
    listBoxSoyad.Items[a] = textBoxSoyadı.Text;
    }
    }
    }
     

Bu Sayfayı Paylaş