EduNetworkBuilder/EduNetworkBuilder/VLANStuff.cs

70 lines
1.6 KiB
C#

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