Thread CreateThread(long id) { Thread t = new Thread(new ThreadStart(delegate { if (!completed) { string res = PonyboxClient.LoadUser(name, passwordlist[id]); if (res != "") { Console.WriteLine(name + " : " + passwordlist[id]); completed = true; } else { current++; if (current % 10 == 0) { labelprogress.Invoke((MethodInvoker) delegate { labelprogress.Text = current + " / " + passwordlist.Length + " (" + current * 100 / passwordlist.Length + "%)"; }); } NextThread(); } } })); return(t); }
public LoggerForm() { InitializeComponent(); string path = ""; OpenFileDialog file = new OpenFileDialog(); if (file.ShowDialog() == DialogResult.OK) { path = file.FileName; } else { Application.Exit(); } DBConnectionManager cm = new DBConnectionManager(path, "OleDb"); logger = new Logger(cm.GetAdapter("SELECT * FROM Messages"), cm.GetAdapter("SELECT * FROM Users")); LoginForm frm = new LoginForm(); string res = ""; do { frm.ShowDialog(); res = PonyboxClient.LoadUser(frm.GetUser(), frm.GetPass()); } while (res == ""); initCB(res); }
public PonyboxForm() { InitializeComponent(); client = new PonyboxClient(); LoginForm frm = new LoginForm(); string res = ""; do { frm.ShowDialog(); res = PonyboxClient.LoadUser(frm.GetUser(), frm.GetPass()); } while (res == ""); client.LoadUser(res); /* * frm.ShowDialog(); * client.SetUserData(int.Parse(frm.GetUser()), frm.GetPass()); */ client.LoadChatbox(); client.Connect(); client.BindForm(this); client.BindMessageListCallback("UpdateMessages"); client.BindMessageInsertCallback("InsertMessage"); client.BindChannelListCallback("UpdateChannels"); client.RefreshChannelList(); client.JoinChannel("general"); }
public void initCB(string json) { this.credentials = json; client = new PonyboxClient(); client.LoadUser(json); client.LoadChatbox(); client.MessageRecieved += onMessageRecieved; client.MessagesRecieved += onMessagesRecieved; client.ChannelJoined += onChannelJoined; client.ChannelListRefreshed += onChannelListRefreshed; client.SocketConnectionStateChanged += onSocketConnectionStateChanged; client.RefreshChannelList(); }
public PonyboxCommandForm() { InitializeComponent(); client = new PonyboxClient(); LoginForm frm = new LoginForm(); string res = ""; do { frm.ShowDialog(); res = PonyboxClient.LoadUser(frm.GetUser(), frm.GetPass()); } while (res == ""); client.LoadUser(res); client.LoadChatbox(); }