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

📄 profileform.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 2 页
字号:
namespace Imps.Client.Pc.UIContactList
{
    using Imps.Client;
    using Imps.Client.Core;
    using Imps.Client.Pc;
    using Imps.Client.Pc.BizControls;
    using Imps.Client.Pc.Controls;
    using Imps.Client.Resource;
    using Imps.Client.Utils;
    using Imps.Common;
    using Imps.Utils;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class ProfileForm : XIMDialog
    {
        private Imps.Client.Core.Contact _contact;
        private IFrameworkWindow _host;
        private ProfileManager _manager;
        private Dictionary<int, ProfileNavItem> _profileNavItems;
        private Imps.Client.Core.User _user;
        private XButton btnCancel;
        private XButton btnOk;
        private IContainer components;
        private XLabel labelMobileNo;
        private XLabel labelSID;
        private headiconlist_drawer m_headicon_list_drawer = new headiconlist_drawer();
        private listbox_widget_t<headicon> m_personal_options = new listbox_widget_t<headicon>();
        private Panel pnlContainer;
        private Panel pnlOptions;
        private Panel pnlTop;
        private XTextBox tbMobileNo;
        private XTextBox tbSid;
        private XBorderControl xRectLabel1;

        public ProfileForm(IFrameworkWindow host, Imps.Client.Core.Contact contact)
        {
            this._host = host;
            this._contact = contact;
            this._user = this._host.AccountManager.CurrentUser;
            this.m_headicon_list_drawer.show_focus = false;
            this.m_headicon_list_drawer.stretch_textarea = true;
            this.m_personal_options.Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.m_personal_options.Location = new System.Drawing.Point(5, 8);
            this.m_personal_options.Name = "m_personal_options";
            this.m_personal_options.Size = new Size(0x70, 400);
            this.m_personal_options.TabIndex = 4;
            this.m_personal_options.SelectedIndexChanged += new EventHandler(this.lbItems_SelectedIndexChanged);
            this.m_personal_options.SelectedIndexChanging += new listbox_widget.cancel_select_event_handler(this.OnSelectingOption);
            this.m_personal_options.drawer = this.m_headicon_list_drawer;
            this.m_personal_options.BorderStyle = BorderStyle.None;
            this.InitializeComponent();
            this.pnlContainer.Controls.Add(this.m_personal_options);
            this.pnlContainer.Controls.SetChildIndex(this.m_personal_options, 0);
            if (this._host.AccountManager.CurrentUser.Status == UserAccountStatus.OfflineLogon)
            {
                this.pnlOptions.Enabled = false;
            }
            if (((this._contact is Imps.Client.Core.ChatFriend) || (this._contact is Stranger)) || !this._user.ContactList.Contacts.Contains(this._contact))
            {
                this.btnOk.Visible = false;
                this.btnCancel.Text = StringTable.Common.Button_Close;
            }
            this._manager = new ProfileManager(host, contact);
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            base.Close();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.InnerUpdateOptionsControl(true))
                {
                    base.Close();
                }
            }
            catch (Exception exception)
            {
                this._host.UnifiedMessageBox.ShowError(this, exception.Message);
            }
        }

        private void CurrentUser_StatusChanged(object sender, UserSatusChangedEventArgs e)
        {
            UiErrorHelper.HandEventSafely(this._host, delegate {
                if (this.Visible)
                {
                    switch (e.NewStatus)
                    {
                        case UserAccountStatus.Logon:
                        case UserAccountStatus.Logoff:
                            this.Close();
                            return;

                        case UserAccountStatus.Logouting:
                            return;
                    }
                }
            });
        }

        private void displayContactInfo()
        {
            if (string.IsNullOrEmpty(this._contact.PersonalInfo.MobileNo))
            {
                if (!string.IsNullOrEmpty(this._contact.Uri.MobileNo))
                {
                    this.tbMobileNo.Text = this._contact.Uri.MobileNo;
                }
                else
                {
                    this.tbMobileNo.Text = string.Empty;
                }
            }
            else
            {
                this.tbMobileNo.Text = this._contact.PersonalInfo.MobileNo;
            }
            if (this._contact.Uri.Sid != 0)
            {
                this.tbSid.Text = this._contact.Uri.Sid.ToString();
            }
            this.updateText(this._contact.DisplayName);
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.pnlOptions = new Panel();
            this.btnCancel = new XButton();
            this.btnOk = new XButton();
            this.pnlTop = new Panel();
            this.tbMobileNo = new XTextBox();
            this.tbSid = new XTextBox();
            this.labelSID = new XLabel();
            this.labelMobileNo = new XLabel();
            this.pnlContainer = new Panel();
            this.xRectLabel1 = new XBorderControl();
            this.pnlTop.SuspendLayout();
            this.pnlContainer.SuspendLayout();
            base.SuspendLayout();
            this.pnlOptions.BackColor = Color.Transparent;
            this.pnlOptions.Location = new System.Drawing.Point(0x7f, 0x27);
            this.pnlOptions.Name = "pnlOptions";
            this.pnlOptions.Size = new Size(370, 0x194);
            this.pnlOptions.TabIndex = 1;
            this.btnCancel.AutoArrangementX = true;
            this.btnCancel.AutoSizeToImage = false;
            this.btnCancel.BackColor = Color.Transparent;
            this.btnCancel.BackgroundImageDisable = null;
            this.btnCancel.BackgroundImageDown = null;
            this.btnCancel.BackgroundImageHover = null;
            this.btnCancel.ChangeSkin = true;
            this.btnCancel.DialogResult = DialogResult.Cancel;
            this.btnCancel.Location = new System.Drawing.Point(0x19c, 0x1c8);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new Size(0x4b, 0x17);
            this.btnCancel.TabIndex = 3;
            this.btnCancel.Text = "取消";
            this.btnCancel.set_UseVisualStyleBackColor(false);
            this.btnCancel.Click += new EventHandler(this.btnCancel_Click);
            this.btnOk.AutoArrangementX = true;
            this.btnOk.AutoSizeToImage = false;
            this.btnOk.BackColor = Color.Transparent;
            this.btnOk.BackgroundImageDisable = null;
            this.btnOk.BackgroundImageDown = null;
            this.btnOk.BackgroundImageHover = null;
            this.btnOk.ChangeSkin = true;
            this.btnOk.DialogResult = DialogResult.OK;
            this.btnOk.Location = new System.Drawing.Point(0x14b, 0x1c8);
            this.btnOk.Name = "btnOk";
            this.btnOk.Size = new Size(0x4b, 0x17);
            this.btnOk.TabIndex = 2;
            this.btnOk.Text = "确定";
            this.btnOk.set_UseVisualStyleBackColor(false);
            this.btnOk.Click += new EventHandler(this.btnOk_Click);
            this.pnlTop.BackColor = Color.Transparent;
            this.pnlTop.Controls.Add(this.tbMobileNo);
            this.pnlTop.Controls.Add(this.tbSid);
            this.pnlTop.Controls.Add(this.labelSID);
            this.pnlTop.Controls.Add(this.labelMobileNo);
            this.pnlTop.Location = new System.Drawing.Point(0x7f, 3);
            this.pnlTop.Name = "pnlTop";
            this.pnlTop.Size = new Size(370, 0x26);
            this.pnlTop.TabIndex = 0;
            this.tbMobileNo.Anchor = AnchorStyles.None;
            this.tbMobileNo.BackColor = Color.FromArgb(240, 240, 240);
            this.tbMobileNo.BorderStyle = BorderStyle.FixedSingle;
            this.tbMobileNo.EmptyTextTip = "";
            this.tbMobileNo.EmptyTextTipColor = Color.DarkGray;
            this.tbMobileNo.Location = new System.Drawing.Point(0x4b, 13);
            this.tbMobileNo.Name = "tbMobileNo";
            this.tbMobileNo.Size = new Size(100, 20);
            this.tbMobileNo.TabIndex = 1;
            this.tbMobileNo.TextChanged += new EventHandler(this.tbMobileNo_TextChanged);
            this.tbSid.Anchor = AnchorStyles.None;
            this.tbSid.BackColor = Color.FromArgb(240, 240, 240);
            this.tbSid.BorderStyle = BorderStyle.FixedSingle;
            this.tbSid.EmptyTextTip = "";
            this.tbSid.EmptyTextTipColor = Color.DarkGray;
            this.tbSid.Location = new System.Drawing.Point(0xfd, 13);
            this.tbSid.Name = "tbSid";
            this.tbSid.Size = new Size(100, 20);
            this.tbSid.TabIndex = 3;
            this.labelSID.set_AutoSize(true);
            this.labelSID.BorderColor = Color.Empty;
            this.labelSID.ButtonBorderStyle = ButtonBorderStyle.None;
            this.labelSID.Location = new System.Drawing.Point(0xce, 0x10);
            this.labelSID.Name = "labelSID";
            this.labelSID.Size = new Size(0x2e, 13);
            this.labelSID.TabIndex = 2;
            this.labelSID.Text = "飞信号:";
            this.labelMobileNo.Anchor = AnchorStyles.None;
            this.labelMobileNo.set_AutoSize(true);
            this.labelMobileNo.BorderColor = Color.Empty;
            this.labelMobileNo.ButtonBorderStyle = ButtonBorderStyle.None;
            this.labelMobileNo.Location = new System.Drawing.Point(0x10, 0x10);
            this.labelMobileNo.Name = "labelMobileNo";
            this.labelMobileNo.Size = new Size(0x3a, 13);
            this.labelMobileNo.TabIndex = 0;
            this.labelMobileNo.Text = "手机号码:";
            this.pnlContainer.BackColor = Color.Transparent;
            this.pnlContainer.Controls.Add(this.xRectLabel1);
            this.pnlContainer.Controls.Add(this.pnlOptions);
            this.pnlContainer.Controls.Add(this.pnlTop);
            this.pnlContainer.Location = new System.Drawing.Point(3, 3);
            this.pnlContainer.Name = "pnlContainer";
            this.pnlContainer.Size = new Size(0x1fa, 0x1c1);
            this.pnlContainer.TabIndex = 0;
            this.xRectLabel1.BackColor = Color.White;
            this.xRectLabel1.BorderColor = Color.Silver;
            this.xRectLabel1.Location = new System.Drawing.Point(0x22, 0x7e);
            this.xRectLabel1.Name = "xRectLabel1";
            this.xRectLabel1.Size = new Size(0x45, 0x58);
            this.xRectLabel1.TabIndex = 0;
            base.AcceptButton = this.btnOk;
            base.set_AutoScaleDimensions(new SizeF(6f, 13f));
            base.set_AutoScaleMode(1);
            base.BaseHeight = 0x200;
            base.BaseWidth = 510;
            base.CancelButton = this.btnCancel;
            base.ClientSize = new Size(0x1f8, 480);
            base.Controls.Add(this.pnlContainer);
            base.Controls.Add(this.btnOk);
            base.Controls.Add(this.btnCancel);
            base.DisplayLocation = new System.Drawing.Point(0x12, 30);
            base.MinimizeBox = false;
            base.Name = "ProfileForm";
            base.set_Padding(new Padding(3));
            base.StartPosition = FormStartPosition.Manual;
            base.Load += new EventHandler(this.ProfileForm_Load);
            this.pnlTop.ResumeLayout(false);
            this.pnlTop.PerformLayout();
            this.pnlContainer.ResumeLayout(false);
            base.ResumeLayout(false);
            base.KeyPreview = true;
        }

        private int InnerFindOcpByName(string name)
        {
            Dictionary<int, ProfileNavItem>.Enumerator enumerator = this._profileNavItems.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {

⌨️ 快捷键说明

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