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(); }