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

📄 userinfo.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 3 页
字号:
                                    continue;
                                }
                                case "primary-email":
                                {
                                    int.TryParse(attribute.Value, ref num);
                                    this.PrimaryEmail = (ProposedData<short>) ((short) num);
                                    continue;
                                }
                                case "company":
                                {
                                    this.Company = (ProposedData<string>) attribute.Value;
                                    continue;
                                }
                                case "company-website":
                                {
                                    this.CompanyWebsite = (ProposedData<string>) attribute.Value;
                                    continue;
                                }
                                case "score-save-date":
                                {
                                    try
                                    {
                                        if (!DateTime.TryParse(attribute.Value, ref nullBirthDate))
                                        {
                                            nullBirthDate = new DateTime(0x76c, 1, 1);
                                        }
                                    }
                                    catch
                                    {
                                        nullBirthDate = new DateTime(0x76c, 1, 1);
                                    }
                                    this.Owner.ScoreInfo._saveDate = nullBirthDate;
                                    continue;
                                }
                                case "level-score":
                                {
                                    int.TryParse(attribute.Value, ref num);
                                    this.Owner.ScoreInfo._levelScore = new int?((int) ((ProposedData<int>) num));
                                    continue;
                                }
                                case "level":
                                {
                                    int.TryParse(attribute.Value, ref num);
                                    this.Owner.ScoreInfo._scoreLevel = new int?((int) ((ProposedData<int>) num));
                                    continue;
                                }
                                case "value":
                                {
                                    int.TryParse(attribute.Value, ref num);
                                    this.Owner.ScoreInfo._scoreVale = new int?((int) ((ProposedData<int>) num));
                                    continue;
                                }
                            }
                        }
                        base.Version = XmlHelper.ReadXmlAttributeString(personalNode, "version", true);
                    }
                    finally
                    {
                        suspender.Dispose();
                    }
                }
            }
        }

        internal void RetrieveInfo_FinalResponseReceived(object sender, SipResponseReceivedEventArgs e)
        {
            PersistentDelegate save = null;
            AsyncBizOperation op = e.Response.Request.Context as AsyncBizOperation;
            try
            {
                string xml = e.Response.Message.Body.Trim();
                if (xml.Length > 0)
                {
                    XmlDocument document = new XmlDocument();
                    document.LoadXml(xml);
                    foreach (XmlNode node in document.DocumentElement.ChildNodes)
                    {
                        switch (node.Name)
                        {
                            case "config":
                            {
                                this.OwnerUser.Configuration.LoadUserSetting(document.DocumentElement);
                                continue;
                            }
                            case "services":
                            {
                                if (node.Attributes.Count > 0)
                                {
                                    string text2 = XmlHelper.ReadXmlAttributeString(node, "version", true);
                                    if (text2 != this.OwnerUser.ServiceVersion)
                                    {
                                        this.OwnerUser.LoadServicesNode(node);
                                        this.OwnerUser.ServiceVersion = text2;
                                        if (save == null)
                                        {
                                            save = delegate (XmlNode node) {
                                                XmlHelper.SetNodeAttribute(node, "version", this.OwnerUser.ServiceVersion);
                                                node.InnerXml = this.OwnerUser.ToServiceNodeXml();
                                            };
                                        }
                                        this.OwnerUser.PersistentManager.SaveSubscribedServiceInfos(save);
                                    }
                                }
                                continue;
                            }
                            case "personal":
                                break;

                            default:
                            {
                                continue;
                            }
                        }
                        if ((node.Attributes.Count > 0) && (XmlHelper.ReadXmlAttributeString(node, "version", true) != base.Version))
                        {
                            this.LoadPersonalXmlNode(node);
                            this.OwnerUser.PersistentManager.SaveUserInfo(new PersistentDelegate(this.SaveToXmlNode));
                        }
                    }
                }
                User.TryCallReceiveMessageOnOp(op);
            }
            catch (Exception exception)
            {
                ErrorHelper.HandleException(exception);
            }
        }

        internal void SaveToXmlNode(XmlNode node)
        {
            if (node != null)
            {
                lock (base.SyncRoot)
                {
                    if (!string.IsNullOrEmpty(base.Version))
                    {
                        XmlHelper.SetNodeAttribute(node, "version", base.Version);
                        XmlHelper.SetNodeAttribute(node, "mobile-no", base.MobileNo);
                        XmlHelper.SetNodeAttribute(node, "nickname", this.Nickname.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "name", this.Name.OriginalValue);
                        XmlHelper.SetNodeAttributeInt32(node, "gender", this.Gender.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "birth-date", this.BirthDate.OriginalValue.ToString("yyyy-MM-dd"));
                        XmlHelper.SetNodeAttributeBool(node, "birthday-valid", this.IsBirthdayValid.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "nation", this.UserNationality.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "province", this.Province.OriginalValue);
                        XmlHelper.SetNodeAttributeInt32(node, "city", this.City.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "impresa", this.MoodPhrase.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "profile", this.Notes.OriginalValue);
                        XmlHelper.SetNodeAttributeInt32(node, "lunar-animal", this.LunarAnimal.OriginalValue);
                        XmlHelper.SetNodeAttributeInt32(node, "horoscope", this.Horoscope.OriginalValue);
                        XmlHelper.SetNodeAttributeInt32(node, "blood-type", this.BloodType.OriginalValue);
                        XmlHelper.SetNodeAttributeInt32(node, "occupation", this.Occupation.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "portrait-crc", base.PortraitCrc);
                        XmlHelper.SetNodeAttribute(node, "job-title", this.JobTitle.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "home-phone", this.HomePhone.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "work-phone", this.WorkPhone.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "other-phone", this.OtherPhone.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "personal-email", this.PersonalEmail.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "work-email", this.WorkEmail.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "other-email", this.OtherEmail.OriginalValue);
                        XmlHelper.SetNodeAttributeInt32(node, "primary-email", this.PrimaryEmail.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "company", this.Company.OriginalValue);
                        XmlHelper.SetNodeAttribute(node, "company-website", this.CompanyWebsite.OriginalValue);
                        if (this._owner.ScoreInfo.ScoreValue != 0)
                        {
                            XmlHelper.SetNodeAttribute(node, "value", this._owner.ScoreInfo.ScoreValue.ToString());
                        }
                        if (this._owner.ScoreInfo.ScoreLevel != 0)
                        {
                            XmlHelper.SetNodeAttribute(node, "level", this._owner.ScoreInfo.ScoreLevel.ToString());
                        }
                        if (this._owner.ScoreInfo.LevelScore != 0)
                        {
                            XmlHelper.SetNodeAttribute(node, "level-score", this._owner.ScoreInfo.LevelScore.ToString());
                        }
                        XmlHelper.SetNodeAttribute(node, "score-save-date", this._owner.ScoreInfo.CacheSaveDate.ToString());
                    }
                }
            }
        }

        public int Age
        {
            get
            {
                ProposedData<DateTime> birthDate = this.BirthDate;
                if ((birthDate != null) && (birthDate.Value > PersonalInfoBase.NullBirthDate))
                {
                    return ImpsHelper.BirthdayToAge(birthDate.Value, User.ServerTime);
                }
                return 0;
            }
        }

        public ProposedData<DateTime> BirthDate
        {
            get
            {
                return base.InnerGetPropertyValue<ProposedData<DateTime>>("birth-date", new ProposedData<DateTime>(PersonalInfoBase.NullBirthDate));
            }
            internal set
            {
                base.InnerSetPropertyValue<ProposedData<DateTime>>("birth-date", value);
            }
        }

        public ProposedData<Imps.Common.BloodType> BloodType
        {
            get
            {
                return base.InnerGetPropertyValue<ProposedData<Imps.Common.BloodType>>("blood-type");
            }
            internal set
            {
                base.InnerSetPropertyValue<ProposedData<Imps.Common.BloodType>>("blood-type", value);
            }
        }

        public ProposedData<int> City
        {
            get
            {
                return base.InnerGetPropertyValue<ProposedData<int>>("city");
            }
            internal set
            {
                base.InnerSetPropertyValue<ProposedData<int>>("city", value);
            }
        }

        public ProposedData<string> Company
        {
            get
            {
                return base.InnerGetPropertyValue<ProposedData<string>>("company");
            }
            internal set
            {
                base.InnerSetPropertyValue<ProposedData<string>>("company", value);
            }
        }

        public ProposedData<string> CompanyWebsite
        {
            get
            {
                return base.InnerGetPropertyValue<ProposedData<string>>("company-website");
            }
            internal set
            {
                base.InnerSetPropertyValue<ProposedData<string>>("company-website", value);
            }
        }

        public string CurrentPortraitFileName
        {
            get
            {
                return this._currentPortraitFileName;
            }
            set
            {
                this._currentPortraitFileName = value;
            }
        }

        public string DisplayName
        {
            get
            {
                string name = (string) this.Name;
                if (string.IsNullOrEmpty(name))
                {
                    name = (string) this.Nickname;
                }
                return name;
            }
        }

⌨️ 快捷键说明

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