public SimilalityData(IDOLDeviation deviation)
 {
     if (deviation != null)
     {
         var tikaiList = Model.IDOLDeviations.Where(x => x.HasScore())
                         .Similarity(deviation).OrderBy(x => x.Score).Where(x => x.Name != deviation.Name).Take(5);
         SimDatas = tikaiList.Select(x => new SimData(x.Name, x.Score)).ToList();
     }
 }
Beispiel #2
0
 public DetailDataViewModel(IDOLView idol, IDOLDeviation deviation)
 {
     Record  = new DetailData(idol, deviation);
     Records = new List <DetailData> {
         Record
     };
     index                = 0;
     BuckButtonEnabled    = new ReactiveProperty <bool>(false);
     ForwardButtonEnabled = new ReactiveProperty <bool>(false);
 }
Beispiel #3
0
        public DetailData(IDOLView idol, IDOLDeviation deviation)
        {
            if (idol is null)
            {
                return;
            }

            MasterIDOL = idol;
            var idolList = Model.IDOLList;

            if (deviation != null)
            {
                var tikaiList = Model.IDOLDeviations.Similarity(deviation).OrderBy(x => x.Score).Where(x => x.Name != deviation.Name).Take(5);
                SimDatas = tikaiList.Select(x => new SimData(x.Name, x.Score)).ToList();
            }

            IEnumerable <RankData> rankDatas()
            {
                yield return(new RankData(nameof(idol.Age), idol, deviation?.AgeScore, x => x.Age));

                yield return(new RankData(nameof(idol.Height), idol, deviation?.HeightScore, x => x.Height));

                yield return(new RankData(nameof(idol.Weight), idol, deviation?.WeightScore, x => x.Weight));

                yield return(new RankData(nameof(idol.Bust), idol, deviation?.BustScore, x => x.Bust));

                yield return(new RankData(nameof(idol.Waist), idol, deviation?.WaistScore, x => x.Waist));

                yield return(new RankData(nameof(idol.Hip), idol, deviation?.HipScore, x => x.Hip));

                yield return(new RankData(nameof(idol.BMI), idol, deviation?.BMIScore, x => x.BMI));

                yield return(new RankData(nameof(idol.Under), idol, deviation?.UnderScore, x => x.Under));

                yield return(new RankData(nameof(idol.Diffe), idol, deviation?.DiffScore, x => x.Diffe));
            }

            RankDatas = rankDatas().ToList();

            UnitList = Model.UnitList
                       .Where(x => x.Members.Any(y => MasterIDOL == y))
                       .Select(x => new UnitData()
            {
                Name = x.Name, Member = x.Members.Count
            }).ToList();
        }
Beispiel #4
0
            public QuizData(IDOLDeviation dev, IDOLView idol)
            {
                name      = dev.Name;
                phonethic = dev.Phonetic;
                Age       = dev.AgeScore;
                Height    = dev.HeightScore;
                Weight    = dev.WeightScore;
                Bust      = dev.BustScore;
                Waist     = dev.WaistScore;
                Hip       = dev.HipScore;
                Score     = Math.Round(300 / dev.TotalScore, 2, MidpointRounding.AwayFromZero);

                birthPlace = idol.BirthPlace;
                birthDay   = idol.BirthDay;
                blood      = idol.Blood;

                IsHint   = false;
                IsAnswer = false;
            }