sabuory FireBuzZ TeaM
Medals : Posts : 308 Emtiaz : 40111 Thanked : 135 Join date : 2013-07-18 Age : 31 Job/Hobbies : Bikar Asl : human 21 gilan My Mood :
| Subject: Source simple id cheker Wed Sep 04, 2013 5:20 am | |
| - Code:
-
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using agsXMPP; using System.IO;
namespace id_cheker { public partial class Form1 : Form { public Form1() { InitializeComponent(); } public List<agsXMPP.XmppClientConnection> human = new List<agsXMPP.XmppClientConnection>(); public string[] a; private void Form1_Load(object sender, EventArgs e) { CheckForIllegalCrossThreadCalls = false; }
private void button1_Click(object sender, EventArgs e) { string[] ids = textBox1.Text.Split('#'); for (int i = ids.GetLowerBound(0); i <= ids.GetUpperBound(0); i++) { human.Add(new agsXMPP.XmppClientConnection { Server = "nimbuzz.com", ConnectServer = "o.nimbuzz.com" }); human[i].OnLogin += new ObjectHandler(logged); human[i].OnAuthError += new XmppElementHandler(failed); human[i].Open(ids[i], textBox2.Text, "Sabuory@n.c"); } } private void logged(object sender) { listBox1.Items.Add(((agsXMPP.XmppClientConnection)sender).MyJID.User);// id haye salem } private void failed(object sender, agsXMPP.Xml.Dom.Element e) { listBox2.Items.Add(((agsXMPP.XmppClientConnection)sender).MyJID.User);// id haye na salem }
private void button2_Click(object sender, EventArgs e)// az id haye ke login shodan o saleman back up migire { SaveFileDialog Save = new SaveFileDialog(); Save.f.i.l.t.e.r = "Text (*.txt)|*.txt"; if (Save.ShowDialog() == DialogResult.OK) { using (StreamWriter ss = new StreamWriter(Save.FileName)) { foreach (object ite in listBox1.Items) { ss.Write(ite.ToString() + "#"); } } } }
private void button3_Click(object sender, EventArgs e)// age qablan az id haiy ke make karde bashin o toye text box bashe mitoin ba in open file file ro entekhab karde va dakhel text box qarar bedin { OpenFileDialog a = new OpenFileDialog(); a.f.i.l.t.e.r = "Text File|*.txt"; string b = a.ShowDialog().ToString(); if (b == "OK") { StreamReader wr = File.OpenText(a.FileName); textBox1.Text = wr.ReadToEnd(); wr.Close(); } } } }
|
|