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); }
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 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 static void Main() { Tuple <string, string> token = LoginClient.Login("Nacle", "10judge02"); PonyboxClient client = new PonyboxClient(); client.Connect(token); Console.ReadLine(); }
public void initCB(string json, long count) { clients = new PonyboxClient[count]; for (long i = 0; i < count; i++) { clients[i] = new PonyboxClient(); //clients[i].LoadUser(json); clients[i].LoadChatbox(false); clients[i].SocketConnectionStateChanged += onSocketConnectionStateChanged; } }
public void Startup() { LoginView v = new LoginView(); v.ShowDialog(); Tuple<string, string> token = v.data; this.client = new PonyboxClient(); this.client.OnChannelJoinedCallback = (c) => UpdateMessages(c); this.client.OnMessagesUpdatedCallback = (c) => UpdateMessages(c); this.client.Connect(token); }
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(); }