Пример #1
0
        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);
        }
Пример #2
0
        //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);
            }
        }
Пример #3
0
 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();
     }
 }
Пример #4
0
 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();
 }
Пример #5
0
 private void LoginButtonClick(object sender, EventArgs e)
 {
     LoginButton.Text    = @"Wait";
     LoginButton.Enabled = false;
     PimMessageHandler.Login(UsernameTextBox.Text, PasswordTextBox.Text, SuccessfulLogin, AuthenticationFailed);
 }