using Avalonia.Media; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace UPtur.Models { public partial class Tour { public Avalonia.Media.Imaging.Bitmap GetPic { get { Avalonia.Media.Imaging.Bitmap pic = null; try { pic = new Avalonia.Media.Imaging.Bitmap($"Assets/Pictures/{Name}.jpg"); return pic; } catch { pic = new Avalonia.Media.Imaging.Bitmap("Assets/Pictures/pic.png"); return pic; } } } public string Actual { get { if (IsActual[0] == true) { return "Актуален"; } else { return "Не актуален"; } } } public SolidColorBrush Color { get { if (IsActual[0] == true) { return new SolidColorBrush(Avalonia.Media.Color.FromRgb(10, 206, 76)); } else { return new SolidColorBrush(Avalonia.Media.Color.FromRgb(249, 0, 0)); } } } } }