HamBook – Rev 38

Subversion Repositories:
Rev:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace HamBook.Radios.Generic
{
    public class MemoryChannel : IEquatable<MemoryChannel>
    {
        private string _currentLocation = string.Empty;
        private int _frequency = 0;
        private ClarifierDirection _clarifierDirection = new ClarifierDirection();
        private int _clarifierOffset = 0;
        private bool _clar = false;
        private MemoryRadioMode _memoryRadioMode = new MemoryRadioMode();
        private CtcssMode _ctcssMode = new CtcssMode();
        private RadioPhase _phase = new RadioPhase();
        private bool _tag = false;
        private string _text = string.Empty;

        public string CurrentLocation { get => _currentLocation; set => _currentLocation = value; }

        public int Frequency { get => _frequency; set => _frequency = value; }

        public ClarifierDirection ClarifierDirection { get => _clarifierDirection; set => _clarifierDirection = value; }

        public int ClarifierOffset { get => _clarifierOffset; set => _clarifierOffset = value; }

        public bool Clar { get => _clar; set => _clar = value; }

        public MemoryRadioMode MemoryRadioMode { get => _memoryRadioMode; set => _memoryRadioMode = value; }

        public CtcssMode CtcssMode { get => _ctcssMode; set => _ctcssMode = value; }

        public RadioPhase Phase { get => _phase; set => _phase = value; }

        public bool Tag { get => _tag; set => _tag = value; }

        public string Text { get => _text; set => _text = value; }

        public MemoryChannel()
        {
        }

        public bool Equals(MemoryChannel other)
        {
            return CurrentLocation == other.CurrentLocation &&
                Frequency == other.Frequency &&
                ClarifierDirection.Direction == other.ClarifierDirection.Direction &&
                ClarifierOffset == other.ClarifierOffset &&
                Clar == other.Clar &&
                MemoryRadioMode.Mode == other.MemoryRadioMode.Mode &&
                CtcssMode.Mode == other.CtcssMode.Mode &&
                Phase.Phase == other.Phase.Phase &&
                Tag == other.Tag &&
                Text == other.Text;
        }
    }
}