Esempio n. 1
0
        private void buttonSendIM_Click(object sender, EventArgs e)
        {
            if (BuddyId == -1)
            {
                return;
            }

            // get buddy data form _buddyId
            CBuddyRecord buddy = CBuddyList.getInstance()[BuddyId];

            if (buddy != null)
            {
                // Invoke SIP stack wrapper function to send message
                SensipResources.Messenger.sendMessage(buddy.Number, textBoxChatInput.Text);

                richTextBoxChatHistory.Text += "(me) " + DateTime.Now;

                //Font orgfnt = richTextBoxChatHistory.Font;
                //Font fnt = new Font("Microsoft Sans Serif",16,FontStyle.Bold);
                //richTextBoxChatHistory.Font = fnt;
                richTextBoxChatHistory.Text += ": " + textBoxChatInput.Text;
                //richTextBoxChatHistory.Font = orgfnt;
                richTextBoxChatHistory.Text += Environment.NewLine;

                textBoxChatInput.Clear();
            }
        }
Esempio n. 2
0
        private void buttonOk_Click(object sender, EventArgs e)
        {
            CBuddyRecord record;

            if (BuddyId >= 0)
            {
                record = CBuddyList.getInstance().getRecord(BuddyId);
                CBuddyList.getInstance().deleteRecord(BuddyId);
            }
            else
            {
                if (textBoxNumber.Text.Length == 0)
                {
                    return;
                }

                record = new CBuddyRecord();
            }
            record.FirstName = textBoxName.Text;
            //record.LastName = _lname.Caption;
            record.Number          = textBoxNumber.Text;
            record.PresenceEnabled = checkBoxPresence.Checked;

            CBuddyList.getInstance().addRecord(record);
            CBuddyList.getInstance().save();

            Close();
        }
Esempio n. 3
0
        private void ChatForm_Shown(object sender, EventArgs e)
        {
            // get buddy data form _buddyId
            CBuddyRecord buddy = CBuddyList.getInstance()[BuddyId];

            if (buddy != null)
            {
                tabPageChat.Text = "Chat with " + buddy.FirstName;
            }
            else
            {
                tabPageChat.Text = "Chat with " + BuddyName;
            }
        }
Esempio n. 4
0
        private void BuddyForm_Activated(object sender, EventArgs e)
        {
            CBuddyRecord record = CBuddyList.getInstance().getRecord(BuddyId);

            if (record == null)
            {
                return;
            }

            textBoxName.Text = record.FirstName;
            //textBoxName.Caption = record.LastName;
            textBoxNumber.Text = record.Number;

            checkBoxPresence.Checked = record.PresenceEnabled;
        }