12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using Avalonia.Media;
- using Avalonia.Media.Imaging;
- using Avalonia.Platform;
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- namespace TourAgent.Models
- {
- public partial class Tourss
- {
- public Avalonia.Media.Imaging.Bitmap GetPic
- {
- get
- {
- Avalonia.Media.Imaging.Bitmap pic = null;
- try
- {
- pic = new Avalonia.Media.Imaging.Bitmap($"Pictures/{Name}.jpg");
- return pic;
- }
- catch
- {
- pic = new Avalonia.Media.Imaging.Bitmap("Pictures/pic.png");
- return pic;
- }
- }
- }
- public string GetActual
- {
- get
- {
- if (IsActual[0] == true)
- {
- return "Актуален";
- }
- else
- {
- return "Не актуален";
- }
- }
- }
- public SolidColorBrush GetColor
- {
- 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));
- }
- }
- }
- }
- }
|