⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conversationparticipant.cs

📁 破解的飞信源代码
💻 CS
字号:
namespace Imps.Client.Core
{
    using Imps.Common;
    using System;

    public class ConversationParticipant
    {
        private bool _block;
        private Imps.Client.Core.Contact _contact;
        private Dialog _dialog;
        private ParticipantState _state;
        private DateTime _stateTime;

        public ConversationParticipant(Imps.Client.Core.Contact contact, Dialog dialog)
        {
            this._contact = contact;
            this._dialog = dialog;
            if (contact != null)
            {
                this._contact.TypeChanged += new EventHandler<ContactTypeChangedEventArgs>(this, (IntPtr) this._contact_TypeChanged);
                dialog.Closed += new EventHandler(this.dialog_Closed);
            }
        }

        private void _contact_TypeChanged(object sender, ContactTypeChangedEventArgs e)
        {
            this._contact.TypeChanged -= new EventHandler<ContactTypeChangedEventArgs>(this, (IntPtr) this._contact_TypeChanged);
            this._contact = e.NewContactInstance;
            this._contact.TypeChanged += new EventHandler<ContactTypeChangedEventArgs>(this, (IntPtr) this._contact_TypeChanged);
            if (MainPresenceHelper.IsOnline(this._contact.Presence.MainPresence) && (this._dialog.Status == DialogStatus.None))
            {
                this._dialog.Status = DialogStatus.Inviting;
                this._dialog.AsyncSendInvite();
            }
        }

        private void dialog_Closed(object sender, EventArgs e)
        {
            this._contact.TypeChanged -= new EventHandler<ContactTypeChangedEventArgs>(this, (IntPtr) this._contact_TypeChanged);
            this._dialog.Closed -= new EventHandler(this.dialog_Closed);
            this._contact.TypeChanged -= new EventHandler<ContactTypeChangedEventArgs>(this, (IntPtr) this._contact_TypeChanged);
        }

        public Imps.Client.Core.Contact Contact
        {
            get
            {
                return this._contact;
            }
        }

        public Dialog OwnerDialog
        {
            get
            {
                return this._dialog;
            }
            internal set
            {
                this._dialog = value;
            }
        }

        public ParticipantState State
        {
            get
            {
                return this._state;
            }
            set
            {
                ParticipantState state = this._state;
                this._state = value;
                if (state != this._state)
                {
                    this._dialog.RaiseParticipantStateChange(new ParticipantEventArgs(this));
                }
                this._stateTime = DateTime.Now;
            }
        }

        public DateTime StateTime
        {
            get
            {
                return this._stateTime;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -