HamBook – Rev 10

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

namespace Configuration
{
    public class SerialPortTimeout : INotifyPropertyChanged
    {
        private int _read = 100;
        private int _write = 100;

        public int Read
        {
            get => _read;
            set
            {
                if (value == _read)
                {
                    return;
                }

                _read = value;
                OnPropertyChanged();
            }
        }

        public int Write
        {
            get => _write;
            set
            {
                if (value == _write)
                {
                    return;
                }

                _write = value;
                OnPropertyChanged();
            }
        }


        public SerialPortTimeout()
        {
        }

        public event PropertyChangedEventHandler PropertyChanged;

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