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

📄 contactmanager.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 3 页
字号:
                        Imps.Client.Core.Contact contact2 = this._user.ContactList.FindOrCreateContact(contactUri, null);
                        if (contact2.Uri.IsVodafoneUri)
                        {
                            vodafone = new ProfileFormVodafone(this._frameworkWnd, contact2);
                            if (handler2 == null)
                            {
                                handler2 = new FormClosedEventHandler(this, (IntPtr) this.<ShowContactDetail>b__5);
                            }
                            vodafone.add_FormClosed(handler2);
                            this.ProfileFormsVodafone.Add(text, vodafone);
                        }
                    }
                    if (vodafone.Visible)
                    {
                        vodafone.BringToFront();
                        vodafone.Activate();
                    }
                    else
                    {
                        Form form3 = owner as Form;
                        if (form3 == null)
                        {
                            form3 = (Form) this._frameworkWnd;
                        }
                        vodafone.ShowProfile(form3);
                    }
                }
            }
        }

        public void ShowContactPermission(IWin32Window owner, IicUri uri)
        {
            FormClosedEventHandler handler = null;
            if (uri.IsValid)
            {
                ProfileForm form;
                string text = uri.Raw.ToLower();
                if (this.ProfileForms.TryGetValue(text, ref form) && !form.IsHandleCreated)
                {
                    this.ProfileForms.Remove(text);
                    form = null;
                }
                if (form == null)
                {
                    Imps.Client.Core.Contact contact = this._user.ContactList.FindOrCreateContact(uri.Raw, null);
                    form = new ProfileForm(this._frameworkWnd, contact);
                    if (handler == null)
                    {
                        handler = new FormClosedEventHandler(this, (IntPtr) this.<ShowContactPermission>b__e);
                    }
                    form.add_FormClosed(handler);
                    this.ProfileForms.Add(text, form);
                }
                form.ShowProfile(owner, StringTable.ContactProfile.KeyPermissionSettring);
                if (form.Visible)
                {
                    form.BringToFront();
                    form.Activate();
                }
                else
                {
                    Form form2 = owner as Form;
                    if (form2 == null)
                    {
                        form2 = (Form) this._frameworkWnd;
                    }
                    form.Location = form2.PointToScreen(form2.ClientRectangle.Location);
                    form.ShowProfile(form2);
                }
            }
        }

        public void ShowGroupCreateWindow(IWin32Window owner)
        {
            <>c__DisplayClassc classc;
            if (owner == null)
            {
                owner = this._frameworkWnd.MainWindow;
            }
            AsyncBizOperation op = new AsyncBizOperation();
            ContactGroupForm form = new ContactGroupForm(this._frameworkWnd, null, op);
            op.ImpsError += new EventHandler<ImpsErrorEventArgs>(classc, (IntPtr) this.<ShowGroupCreateWindow>b__a);
            op.Successed += delegate (object sender, EventArgs e) {
                this._contactListControl.SetWizardForceDisplayGroup(true);
            };
            ControlHelper.ShowDialogCenterOnParent(form, owner, true);
        }

        public void ShowGroupDeleteWindow(int? groupId)
        {
            if (groupId.get_HasValue())
            {
                Imps.Client.Core.ContactGroup group = this._user.ContactList.Groups[groupId] as Imps.Client.Core.ContactGroup;
                if (group != null)
                {
                    if (group.Contacts.Count > 0)
                    {
                        this._frameworkWnd.UnifiedMessageBox.ShowInfo(StringTable.ContactGroup.MsgCannotDelelte_HasContacts);
                    }
                    else if (((this._user.ContactList.Groups[-1] != null) && (this._user.ContactList.Groups.Count == 2)) || ((this._user.ContactList.Groups[-1] == null) && (this._user.ContactList.Groups.Count == 1)))
                    {
                        this._frameworkWnd.UnifiedMessageBox.ShowInfo(StringTable.ContactGroup.MsgCannotDelelte_OnlyOne);
                    }
                    else
                    {
                        group.AsyncDelete(new AsyncBizOperation());
                    }
                }
            }
        }

        public void ShowGroupEditWindow(int? groupId)
        {
            if (groupId.get_HasValue())
            {
                AsyncBizOperation op = new AsyncBizOperation();
                op.ImpsError += new EventHandler<ImpsErrorEventArgs>(this, (IntPtr) this.<ShowGroupEditWindow>b__8);
                op.Successed += delegate (object sender, EventArgs e) {
                    this._contactListControl.SetWizardForceDisplayGroup(true);
                };
                ContactGroupForm form = new ContactGroupForm(this._frameworkWnd, groupId, op);
                ControlHelper.ShowDialogCenterOnParent(form, this._frameworkWnd.MainWindow, true);
            }
        }

        public void ShowInviteIICWindow(string mobileNo)
        {
            InviteIICForm innerInviteIICFForm = this.GetInnerInviteIICFForm(mobileNo);
            innerInviteIICFForm.Location = this._frameworkWnd.MainWindow.PointToScreen(this._frameworkWnd.MainWindow.ClientRectangle.Location);
            ControlHelper.ShowFormCenterOnParent(innerInviteIICFForm, this._frameworkWnd.MainWindow);
        }

        public void ShowMatchWindow()
        {
            this._frameworkWnd.NavigateToTab("BuddyMatch", string.Empty);
        }

        public void ShowRadomMatchWindow()
        {
            this._frameworkWnd.NavigateToTab("BuddyMatch", "status=1");
        }

        public void ShowSendSmsToMeWindow()
        {
        }

        public bool TryAddContactGroup(string name, out int? groupId)
        {
            groupId = 1;
            return true;
        }

        public Control ContactListControl
        {
            get
            {
                if ((this._contactListControl == null) || this._contactListControl.IsDisposed)
                {
                    this._contactListControl = new Imps.Client.Pc.UIContactList.ContactListControl(this._frameworkWnd);
                }
                return this._contactListControl;
            }
        }

        private SendRequestForm InnerSendRequestFrom
        {
            get
            {
                EventHandler handler = null;
                if ((this._sendRequestForm == null) || this._sendRequestForm.IsDisposed)
                {
                    this._sendRequestForm = new SendRequestForm(this._frameworkWnd);
                    if (handler == null)
                    {
                        handler = delegate {
                            this._sendRequestForm = null;
                        };
                    }
                    this._sendRequestForm.Disposed += handler;
                }
                return this._sendRequestForm;
            }
        }

        public ToolStripMenuItem MenuItem
        {
            get
            {
                return this._menuItem;
            }
        }

        public ToolStripItem[] OperationMenuItems
        {
            get
            {
                this.BuildOperationMenuItems();
                return this._menuItemsOperation;
            }
        }

        private Dictionary<string, ProfileForm> ProfileForms
        {
            get
            {
                if (this._profileForms == null)
                {
                    this._profileForms = new Dictionary<string, ProfileForm>();
                }
                return this._profileForms;
            }
        }

        private Dictionary<string, ProfileFormVodafone> ProfileFormsVodafone
        {
            get
            {
                if (this._profileFormsVodafone == null)
                {
                    this._profileFormsVodafone = new Dictionary<string, ProfileFormVodafone>();
                }
                return this._profileFormsVodafone;
            }
        }

        public Control ToolbarControl
        {
            get
            {
                if ((this._toolbar == null) || this._toolbar.IsDisposed)
                {
                    this._toolbar = new BListControlToolbar();
                    this._toolbar.SearchTextBox.EmptyTextTip = StringTable.Contact.ContactSearchEmptyText;
                    this._toolbar.Dock = DockStyle.Top;
                }
                return this._toolbar;
            }
        }
    }
}

⌨️ 快捷键说明

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