Toasts – Rev 55

Subversion Repositories:
Rev:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using Toasts.Annotations;

namespace Toasts
{
    public class ToastDisplayData : INotifyPropertyChanged
    {
        private string _userAgent;
        private string _title;
        private string _body;
        private bool _enableChime;
        private byte[] _chime;
        private int _lingerTime;
        private Image _image;
        private string _content;
        private float _contentHeight;
        private Point _pinPoint;
        private bool _enablePin;
        private Proxy _proxy;

        public string Title
        {
            get => _title;
            set
            {
                if (value == _title) return;
                _title = value;
                OnPropertyChanged();
            }
        }

        public string Body
        {
            get => _body;
            set
            {
                if (value == _body) return;
                _body = value;
                OnPropertyChanged();
            }
        }

        public float ContentHeight
        {
            get => _contentHeight;
            set
            {
                if (value == _contentHeight) return;
                _contentHeight = value;
                OnPropertyChanged();
            }
        }

        public string UserAgent
        {
            get => _userAgent;
            set
            {
                if (value == _userAgent) return;
                _userAgent = value;
                OnPropertyChanged();
            }
        }

        public bool EnableChime
        {
            get => _enableChime;
            set
            {
                if (value == _enableChime) return;
                _enableChime = value;
                OnPropertyChanged();
            }
        }

        public byte[] Chime
        {
            get => _chime;
            set
            {
                if (Equals(value, _chime)) return;
                _chime = value;
                OnPropertyChanged();
            }
        }

        public int LingerTime
        {
            get => _lingerTime;
            set
            {
                if (value == _lingerTime) return;
                _lingerTime = value;
                OnPropertyChanged();
            }
        }

        public Image Image
        {
            get => _image;
            set
            {
                if (Equals(value, _image)) return;
                _image = value;
                OnPropertyChanged();
            }
        }

        public string Content
        {
            get => _content;
            set
            {
                if (value == _content) return;
                _content = value;
                OnPropertyChanged();
            }
        }

        public Point PinPoint
        {
            get => _pinPoint;
            set
            {
                if (value == _pinPoint) return;

                _pinPoint = value;
                OnPropertyChanged();
            }
        }

        public bool EnablePin
        {
            get => _enablePin;
            set
            {
                if (value == _enablePin) return;

                _enablePin = value;
                OnPropertyChanged();
            }
        }

        public Proxy Proxy
        {
            get => _proxy;
            set
            {
                if (Equals(value, _proxy)) return;
                _proxy = value;
                OnPropertyChanged();
            }
        }

        [UsedImplicitly]
        public ToastDisplayData()
        {

        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}