using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
using System.Drawing;

namespace EduNetworkBuilder
{
    [Serializable]
    public class VLANName
    {
        public int _ID = 0;
        [DisplayName("ID")]
        public int ID { get { return _ID; } set { _ID = value; } }

        public string _Name = "----";

        [DisplayName("Name")]
        public string Name { get { return _Name; } set { _Name = value; } }

        Color _Color = Color.Blue;
        [DisplayName("ColorString")]
        public string PacketColorString { get { return _Color.Name; } set { _Color = Color.FromName(value); } }
        public Color PacketColor {  get { return _Color; } set { _Color = value; } }

        public VLANName()
        {
        }

        public VLANName(int id, string name)
        {
            ID = id;
            Name = name;
            PacketColor = Color.Blue; //The default for everything
        }

        public VLANName(int id, string name, Color ColorForPacket)
        {
            ID = id;
            Name = name;
            _Color = ColorForPacket;
        }
        public bool Equals(VLANName CompareWith)
        {
            if (ID != CompareWith.ID) return false;
            if (Name != CompareWith.Name) return false;
            if (PacketColor != CompareWith.PacketColor) return false;
            return true;
        }
    }

    [Serializable]
    public class VLANInfo
    {
        public int _ID;
        [DisplayName("ID")]
        public int ID { get { return _ID; } set { _ID = value; } }

        public VLANTagType _Tag;

        [DisplayName("Tag")]
        public VLANTagType Tag { get { return _Tag; } set { _Tag = value; } }

        public VLANInfo()
        {
        }

        public VLANInfo(int id, VLANTagType tag)
        {
            ID = id;
            Tag = tag;
        }

        public bool Equals(VLANInfo CompareWith)
        {
            if (_ID != CompareWith._ID) return false;
            if (Tag != CompareWith.Tag) return false;
            return true;
        }
    }
}
