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

📄 profilemanager.cs

📁 破解的飞信源代码
💻 CS
字号:
namespace Imps.Client.Pc.UIContactList
{
    using Imps.Client;
    using Imps.Client.Core;
    using Imps.Client.Pc;
    using Imps.Client.Resource;
    using System;
    using System.Drawing;
    using System.Reflection;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    public class ProfileManager : IProfileManager
    {
        private ProfileNavCategory[] _categories;
        private Imps.Client.Core.Contact _contact;
        private IFrameworkWindow _frameworkWnd;
        private static Image _updateImage;
        private const string updateImgFileName = "update.gif";

        public ProfileManager(IFrameworkWindow framework, Imps.Client.Core.Contact contact)
        {
            this._frameworkWnd = framework;
            this._contact = contact;
        }

        public static void AddStar<T>(Control owner, System.Drawing.Point location, ContactInfoItem<T> item, StarConfirmHandler callBack)
        {
        }

        private void buildCategory()
        {
            Imps.Client.Core.User currentUser = this._frameworkWnd.AccountManager.CurrentUser;
            UserAccountStatus status = (currentUser == null) ? UserAccountStatus.None : currentUser.Status;
            if (status == UserAccountStatus.Logon)
            {
                this._categories = new ProfileNavCategory[1];
                ProfileNavItem[] items = new ProfileNavItem[3];
                this._categories[0] = new ProfileNavCategory(StringTable.ContactProfile.Detail, items);
                items[0] = new ProfileNavItem(this, StringTable.ContactProfile.KeyBasic, StringTable.ContactProfile.Basic, typeof(BasicProfilieControl));
                items[1] = new ProfileNavItem(this, StringTable.ContactProfile.KeyExtend, StringTable.ContactProfile.Extend, typeof(Imps.Client.Pc.UIContactList.ExtendInfoControl));
                items[2] = new ProfileNavItem(this, StringTable.ContactProfile.KeyPermissionSettring, StringTable.ContactProfile.PermissionSetting, typeof(PermissionControl));
            }
        }

        public IProfileControl CreateProfileControl(ProfileNavItem oi)
        {
            IProfileControl control;
            ConstructorInfo constructor = oi.ControlType.GetConstructor(new Type[] { typeof(IFrameworkWindow), typeof(Imps.Client.Core.Contact) });
            if (constructor == null)
            {
                control = (IProfileControl) Activator.CreateInstance(oi.ControlType);
            }
            else
            {
                control = (IProfileControl) constructor.Invoke(new object[] { this._frameworkWnd, this._contact });
            }
            control.ControlLoad();
            control.UpdateData(false);
            Control control2 = control.Control;
            control2.Location = new System.Drawing.Point(0, 0);
            control2.Anchor = AnchorStyles.Left | AnchorStyles.Top;
            control2.BackColor = Color.Transparent;
            control2.Visible = true;
            return control;
        }

        public ProfileNavCategory[] Categories
        {
            get
            {
                if ((this._frameworkWnd.AccountManager.CurrentUser.Status != UserAccountStatus.Logon) && (this._frameworkWnd.AccountManager.CurrentUser.Status != UserAccountStatus.OfflineLogon))
                {
                    return null;
                }
                if (this._categories == null)
                {
                    this._categories = new ProfileNavCategory[1];
                    ProfileNavItem[] items = new ProfileNavItem[3];
                    this._categories[0] = new ProfileNavCategory(StringTable.ContactProfile.Detail, items);
                    items[0] = new ProfileNavItem(this, StringTable.ContactProfile.KeyBasic, StringTable.ContactProfile.Basic, typeof(BasicProfilieControl));
                    items[1] = new ProfileNavItem(this, StringTable.ContactProfile.KeyExtend, StringTable.ContactProfile.Extend, typeof(Imps.Client.Pc.UIContactList.ExtendInfoControl));
                    items[2] = new ProfileNavItem(this, StringTable.ContactProfile.KeyPermissionSettring, StringTable.ContactProfile.PermissionSetting, typeof(PermissionControl));
                }
                return this._categories;
            }
        }

        public delegate void StarConfirmHandler();
    }
}

⌨️ 快捷键说明

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