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