private void MessageTextBoxTextChanged(object sender, EventArgs e) { Chatstate state = messageTextBox.TextLength == 0 ? Chatstate.inactive : Chatstate.composing; var currentTab = GetCurrentTab(); PimMessageHandler.SendChatState(state, currentTab.Buddy, currentTab.Resource, currentTab.CurrentThread); }
//public ChatForm(Buddy buddy, Message msg = null) //{ // PimMessageHandler.OnMessage += MessageReceived; // InitializeComponent(); // AddChat(buddy, msg); //} void SendEnteredText(object sender, EventArgs e) { if (messageTextBox.TextLength > 0) { var currentTab = GetCurrentTab(); PimMessageHandler.SendChatState(Chatstate.paused, currentTab.Buddy, currentTab.Resource, currentTab.CurrentThread); } }
private void MessageTextBoxKeyDown_HandleCtrlV() { if (Clipboard.ContainsImage()) { BuddyTab tab = GetCurrentTab(); PimMessageHandler.SendImage(tab.Buddy, Clipboard.GetImage(), AddImage); } else if (Clipboard.ContainsText()) { messageTextBox.Text += Clipboard.GetText(); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new LoginWindow()); if (PimMessageHandler.Authenticated) { Application.Run(new BuddyListForm()); } if (PimMessageHandler.Authenticated) { PimMessageHandler.Logout(); } Application.Exit(); }
private void LoginButtonClick(object sender, EventArgs e) { LoginButton.Text = @"Wait"; LoginButton.Enabled = false; PimMessageHandler.Login(UsernameTextBox.Text, PasswordTextBox.Text, SuccessfulLogin, AuthenticationFailed); }