public void getReqvireItems() { var relaysItems = new List <RelaysItem>(); if (this.RevardProperty != null) { //Мин. уровень relaysItems.Add( new RelaysItem { BorderColorProperty = StaticMetods.GetLevelReqBorderColor( this.PersProperty.PersLevelProperty, this.RevardProperty.NeedLevelProperty), ElementToolTipProperty = "Минимальный уровень персонажа", IdProperty = "уровень", PictureProperty = StaticMetods.getImagePropertyFromImage(Pers.LevelImageProperty), ReqvirementTextProperty = ">= " + this.RevardProperty.NeedLevelProperty }); // Золото Brush goldBorder = this.PersProperty.GoldProperty >= RevardProperty.CostProperty ? Brushes.Green : Brushes.Red; relaysItems.Add( new RelaysItem { BorderColorProperty = goldBorder, ElementToolTipProperty = "Золото >= " + RevardProperty.CostProperty, IdProperty = "gold", PictureProperty = StaticMetods.getImagePropertyFromImage(Pers.GoldImageProperty), ReqvirementTextProperty = ">= " + this.RevardProperty.CostProperty }); // Характеристики foreach (var needCharact in RevardProperty.NeedCharacts) { Brush chaBorder = needCharact.ValueProperty >= needCharact.CharactProperty.ValueProperty ? Brushes.Green : Brushes.Red; relaysItems.Add( new RelaysItem { BorderColorProperty = chaBorder, ElementToolTipProperty = "Характеристика ''" + needCharact.CharactProperty.NameOfProperty + "''" + " >= " + needCharact.ValueProperty, IdProperty = needCharact.CharactProperty.GUID, PictureProperty = StaticMetods.getImagePropertyFromImage( needCharact.CharactProperty.ImageProperty), ReqvirementTextProperty = ">= " + needCharact.ValueProperty }); } // скиллы foreach (var needAb in RevardProperty.AbilityNeeds) { Brush chaBorder = needAb.ValueProperty >= needAb.AbilProperty.ValueProperty ? Brushes.Green : Brushes.Red; relaysItems.Add( new RelaysItem { BorderColorProperty = chaBorder, ElementToolTipProperty = "Навык ''" + needAb.AbilProperty.NameOfProperty + "''" + " >= " + needAb.ValueProperty, IdProperty = needAb.AbilProperty.GUID, PictureProperty = needAb.AbilProperty.PictureProperty, ReqvirementTextProperty = ">= " + needAb.ValueProperty }); } // Квесты foreach (var needQwest in RevardProperty.NeedQwests) { Brush chaBorder = needQwest.IsDoneProperty ? Brushes.Green : Brushes.Red; relaysItems.Add( new RelaysItem { BorderColorProperty = chaBorder, ElementToolTipProperty = "Квест ''" + needQwest.NameOfProperty + "''" + " должен быть выполнен", IdProperty = needQwest.GUID, PictureProperty = needQwest.PictureProperty, ReqvirementTextProperty = "выполнен" }); } } ReqvireItemsVm.RelaysItemsesProperty = relaysItems; }