Exemplo n.º 1
0
 public SessionTabItem(InstanceAnswerPro.Core.ContactSession session)
 {
     this.imMessageList   = new ArrayList();
     this._contactSession = session;
     this.buddyField      = ComponentManager.GetBuddyListBuilder().FindOrCreateBuddy(session.Uin, true);
     this._contactSession.MessageReceived       = (EventHandler <ContactMessageReceivedEventArgs>)Delegate.Combine(this._contactSession.MessageReceived, new EventHandler <ContactMessageReceivedEventArgs>(this.OnContactMessageReceived));
     this._contactSession.InfoMessageReceived   = (EventHandler <InfoMessageReceivedEventArgs>)Delegate.Combine(this._contactSession.InfoMessageReceived, new EventHandler <InfoMessageReceivedEventArgs>(this.OnInfoMessageReceived));
     this._contactSession.SendMessageCompleted += new EventHandler <CommandKeyedCallbackArgs <MessagePack> >(this.session_SendMessageCompleted);
 }
Exemplo n.º 2
0
 public SessionTabItem(InstanceAnswerPro.Core.ContactSession session)
 {
     this.imMessageList = new ArrayList();
     this._contactSession = session;
     this.buddyField = ComponentManager.GetBuddyListBuilder().FindOrCreateBuddy(session.Uin, true);
     this._contactSession.MessageReceived = (EventHandler<ContactMessageReceivedEventArgs>)Delegate.Combine(this._contactSession.MessageReceived, new EventHandler<ContactMessageReceivedEventArgs>(this.OnContactMessageReceived));
     this._contactSession.InfoMessageReceived = (EventHandler<InfoMessageReceivedEventArgs>)Delegate.Combine(this._contactSession.InfoMessageReceived, new EventHandler<InfoMessageReceivedEventArgs>(this.OnInfoMessageReceived));
     this._contactSession.SendMessageCompleted += new EventHandler<CommandKeyedCallbackArgs<MessagePack>>(this.session_SendMessageCompleted);
 }
Exemplo n.º 3
0
        public void AddMsg(InstanceAnswerPro.Core.Buddy sender, DateTime time, MessagePack messagePack)
        {
            IMMessage message = new IMMessage(sender, time, messagePack);

            this.imMessageList.Add(message);
            if (this.MessageAdded != null)
            {
                this.MessageAdded(this, null);
            }
        }
Exemplo n.º 4
0
 public void ReceiveMessage(InfoMessage infoMessage)
 {
     try
     {
         InstanceAnswerPro.Core.Buddy sender = ComponentManager.GetBuddyListBuilder().FindOrCreateBuddy(infoMessage.Uin, true);
         if (sender != null)
         {
             this.AddMsg(sender, infoMessage.Time, infoMessage.MessagePack);
         }
     }
     catch (Exception)
     {
     }
 }
Exemplo n.º 5
0
 public SessionTabItem(InstanceAnswerPro.Core.Buddy buddy)
 {
     this.imMessageList = new ArrayList();
     this.buddyField    = buddy;
     this._isPreviw     = true;
 }
Exemplo n.º 6
0
 public SessionTabItem(InstanceAnswerPro.Core.Buddy buddy)
 {
     this.imMessageList = new ArrayList();
     this.buddyField = buddy;
     this._isPreviw = true;
 }