12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- 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));
- }
- }
- }
- }
-
- }
|