HamBook – Rev 16

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>
    {
        public string CurrentLocation { get; set; }

        public int Frequency { get; set; }

        public ClarifierDirection ClarifierDirection { get; set; }

        public int ClarifierOffset { get; set; }

        public bool Clar { get; set; }

        public MemoryRadioMode MemoryRadioMode { get; set; }

        public CtcssMode CtcssMode { get; set; }

        public RadioPhase Phase { get; set; }

        public bool Tag { get; set; }

        public string Text { get; set; }

        public MemoryChannel() 
        { 
        }

        public MemoryChannel(MemoryChannel memoryChannel)
        {
            CurrentLocation = memoryChannel.CurrentLocation;
            Frequency = memoryChannel.Frequency;
            ClarifierDirection= memoryChannel.ClarifierDirection;
            Clar = memoryChannel.Clar;
            MemoryRadioMode = memoryChannel.MemoryRadioMode;
            CtcssMode = memoryChannel.CtcssMode;
            Phase = memoryChannel.Phase;
            Tag = memoryChannel.Tag;
            Text = memoryChannel.Text;
        }

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