Colored packets, and some bugs that caused things to crash adding vlans

This commit is contained in:
Tim Young 2016-10-31 11:57:25 -05:00
parent b6eaf00d6d
commit a82db7ecb2
8 changed files with 186 additions and 15 deletions

View File

@ -27,6 +27,7 @@ namespace EduNetworkBuilder
public bool OptionShowLabels = false;
public bool ShowLabelsHere = false;
public bool VLANsEnabled = false;
public bool VLANPacketColors = false;
public LanguageStrings NetMessage;
public LanguageStrings NetTitle;
List<NetworkComponent> NetComponents = new List<NetworkComponent>();
@ -136,6 +137,11 @@ namespace EduNetworkBuilder
case "vlansenabled":
bool.TryParse(Individual.InnerText, out VLANsEnabled);
break;
case "vlanpacketcolors":
bool.TryParse(Individual.InnerText, out VLANPacketColors);
if (VLANPacketColors)
VLANsEnabled = true; //If we do colors, we need to do vlans
break;
case "itemsize":
int.TryParse(Individual.InnerText, out itemsize);
break;
@ -282,6 +288,7 @@ namespace EduNetworkBuilder
writer.WriteElementString("uniqueidentifier", UniqueIdentifier.ToString());
writer.WriteElementString("startinghelplevel", StartingHelpLevel.ToString());
writer.WriteElementString("vlansenabled", VLANsEnabled.ToString());
writer.WriteElementString("VLANPacketColors", VLANPacketColors.ToString());
//Save all the devices
for (int loop = 0; loop < NetComponents.Count; loop++)
{
@ -1441,6 +1448,7 @@ namespace EduNetworkBuilder
public Color ColorFromPacketVLAN(int id)
{
if (!VLANPacketColors) return Color.Blue; //If we are not set up to do vlan colors.
foreach(VLANName VN in VlanNames)
{
if (VN.ID == id)

View File

@ -39,10 +39,10 @@ namespace EduNetworkBuilder
{
myNicType = theType;
_nic_name = myNicType.ToString() + index.ToString();
myID = new HostNicID(HostID, UniqueIdentifier, hostname, _nic_name);
NetworkInterface nInterface = new NetworkInterface(NicName(), NB.ZeroIPString, NB.ZeroIPString, myID);
if(theType == NicType.lo)
nInterface = new NetworkInterface(NicName(), "127.0.0.1", "255.0.0.0", myID);
myID = new HostNicID(HostID, UniqueIdentifier,hostname,nInterface.nic_name);
interfaces.Add(nInterface);
ApplyNicRules();
SetIPForDHCP();

View File

@ -50,6 +50,7 @@
this.cbStartingHelpLevel = new System.Windows.Forms.ComboBox();
this.lblStartingHelp = new System.Windows.Forms.Label();
this.cbVLANs = new System.Windows.Forms.CheckBox();
this.cb_ColoredPackets = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// btnDone
@ -239,12 +240,23 @@
// cbVLANs
//
this.cbVLANs.AutoSize = true;
this.cbVLANs.Location = new System.Drawing.Point(341, 44);
this.cbVLANs.Location = new System.Drawing.Point(519, 247);
this.cbVLANs.Name = "cbVLANs";
this.cbVLANs.Size = new System.Drawing.Size(129, 21);
this.cbVLANs.TabIndex = 21;
this.cbVLANs.Text = "VLANs Enabled";
this.cbVLANs.UseVisualStyleBackColor = true;
this.cbVLANs.CheckedChanged += new System.EventHandler(this.cbVLANs_CheckedChanged);
//
// cb_ColoredPackets
//
this.cb_ColoredPackets.AutoSize = true;
this.cb_ColoredPackets.Location = new System.Drawing.Point(519, 274);
this.cb_ColoredPackets.Name = "cb_ColoredPackets";
this.cb_ColoredPackets.Size = new System.Drawing.Size(173, 21);
this.cb_ColoredPackets.TabIndex = 22;
this.cb_ColoredPackets.Text = "VLAN Colored Packets";
this.cb_ColoredPackets.UseVisualStyleBackColor = true;
//
// OptionsWindow
//
@ -252,6 +264,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(836, 307);
this.Controls.Add(this.cb_ColoredPackets);
this.Controls.Add(this.cbVLANs);
this.Controls.Add(this.lblStartingHelp);
this.Controls.Add(this.cbStartingHelpLevel);
@ -305,5 +318,6 @@
private System.Windows.Forms.ComboBox cbStartingHelpLevel;
private System.Windows.Forms.Label lblStartingHelp;
private System.Windows.Forms.CheckBox cbVLANs;
private System.Windows.Forms.CheckBox cb_ColoredPackets;
}
}

View File

@ -46,6 +46,7 @@ namespace EduNetworkBuilder
myToolTip.SetToolTip(lblSortOrder, NB.Translate("OW_OWSort"));
myToolTip.SetToolTip(tbSortOrder, NB.Translate("OW_OWSort"));
myToolTip.SetToolTip(cbVLANs, NB.Translate("OW_OWVLANs"));
myToolTip.SetToolTip(cb_ColoredPackets, NB.Translate("OW_OWVLANColoredPacketsTT"));
LoadValuesFromNetwork();
}
@ -63,6 +64,7 @@ namespace EduNetworkBuilder
lblSortOrder.Text = NB.Translate("OW_lblSortOrder");
lblStartingHelp.Text = NB.Translate("OW_lblStartingHelp");
cbVLANs.Text = NB.Translate("OW_cbVLANs");
cb_ColoredPackets.Text = NB.Translate("OW_OWVLANColoredPackets");
Text = NB.Translate("OW_Form");
}
@ -74,6 +76,7 @@ namespace EduNetworkBuilder
tbNetworkTitle.Text = myNet.NetTitle.GetText();
cbDisplayTitles.Checked = myNet.OptionShowLabels;
cbVLANs.Checked = myNet.VLANsEnabled;
cb_ColoredPackets.Checked = myNet.VLANPacketColors;
tbNetworkX.Text = myNet.myWidth.ToString();
tbNetworkY.Text = myNet.myHeight.ToString();
tbLevel.Text = myNet.Level.ToString();
@ -111,6 +114,7 @@ namespace EduNetworkBuilder
myNet.NetTitle.Add(tbNetworkTitle.Text);
myNet.OptionShowLabels = cbDisplayTitles.Checked;
myNet.VLANsEnabled = cbVLANs.Checked;
myNet.VLANPacketColors = cb_ColoredPackets.Checked;
myNet.ShowLabelsHere = myNet.OptionShowLabels;
int.TryParse(tbNetworkX.Text, out myNet.myWidth);
int.TryParse(tbNetworkY.Text, out myNet.myHeight);
@ -375,5 +379,18 @@ namespace EduNetworkBuilder
int.TryParse(tbLevel.Text, out value);
tbLevel.Text = value.ToString();
}
private void cbVLANs_CheckedChanged(object sender, EventArgs e)
{
if(cbVLANs.Checked)
{
cb_ColoredPackets.Visible = true;
}
else
{
cb_ColoredPackets.Visible = false;
cb_ColoredPackets.Checked = false;
}
}
}
}

View File

@ -1601,4 +1601,12 @@
<value>The Interface needs an Untagged VLAN</value>
<comment>NT_TstDiscriptNeedsUntaggedVLAN</comment>
</data>
<data name="OW_OWVLANColoredPackets" xml:space="preserve">
<value>VLAN Colored Packets</value>
<comment>OW_OWVLANColoredPackets = VLAN Colored Packets</comment>
</data>
<data name="OW_OWVLANColoredPacketsTT" xml:space="preserve">
<value>When packets are passing across a VLAN link, color the packets so we can visualize them better.</value>
<comment>OW_OWVLANColoredPacketsTT = When packets are passing across a VLAN link, color the packets so we can visualize them better.</comment>
</data>
</root>

View File

@ -14,6 +14,7 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<uniqueidentifier>169</uniqueidentifier>
<startinghelplevel>full</startinghelplevel>
<vlansenabled>True</vlansenabled>
<VLANPacketColors>True</VLANPacketColors>
<device>
<hostname>firewall0</hostname>
<size>100</size>
@ -40,6 +41,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>lo</nictype>
<uniqueidentifier>134</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>lo0</nicname>
<myip>
@ -64,6 +67,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>wan</nictype>
<uniqueidentifier>137</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>wan0</nicname>
<myip>
@ -88,6 +93,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>eth</nictype>
<uniqueidentifier>135</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>eth0</nicname>
<myip>
@ -138,6 +145,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>eth</nictype>
<uniqueidentifier>136</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>eth1</nicname>
<myip>
@ -207,6 +216,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>lo</nictype>
<uniqueidentifier>144</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>lo0</nicname>
<myip>
@ -231,6 +242,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>eth</nictype>
<uniqueidentifier>145</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>eth0</nicname>
<myip>
@ -260,10 +273,10 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<interface>
<nicname>wlan2</nicname>
<myip>
<ip>192.168.2.5</ip>
<mask>255.255.255.0</mask>
<gateway>192.168.2.1</gateway>
<type>route</type>
<ip>0.0.0.0</ip>
<mask>0.0.0.0</mask>
<gateway>0.0.0.0</gateway>
<type>ip</type>
</myip>
<VLAN
ID="1">Untagged</VLAN>
@ -296,6 +309,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>lo</nictype>
<uniqueidentifier>148</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>lo0</nicname>
<myip>
@ -320,6 +335,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>eth</nictype>
<uniqueidentifier>149</uniqueidentifier>
<usesdhcp>True</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>eth0</nicname>
<myip>
@ -344,6 +361,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>wlan</nictype>
<uniqueidentifier>150</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>wlan2</nicname>
<myip>
@ -383,6 +402,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>lo</nictype>
<uniqueidentifier>101</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>lo0</nicname>
<myip>
@ -407,6 +428,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>management_interface</nictype>
<uniqueidentifier>102</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>management_interface0</nicname>
<myip>
@ -431,6 +454,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>103</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port1</nicname>
<myip>
@ -459,6 +484,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>104</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port2</nicname>
<myip>
@ -487,6 +514,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>105</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port3</nicname>
<myip>
@ -515,6 +544,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>106</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port4</nicname>
<myip>
@ -543,6 +574,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>107</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port5</nicname>
<myip>
@ -571,6 +604,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>108</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port6</nicname>
<myip>
@ -599,6 +634,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>109</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port7</nicname>
<myip>
@ -642,6 +679,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>lo</nictype>
<uniqueidentifier>156</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>lo0</nicname>
<myip>
@ -666,6 +705,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>management_interface</nictype>
<uniqueidentifier>157</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>management_interface0</nicname>
<myip>
@ -690,6 +731,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>158</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port1</nicname>
<myip>
@ -718,6 +761,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>159</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port2</nicname>
<myip>
@ -746,6 +791,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>160</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port3</nicname>
<myip>
@ -774,6 +821,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>161</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port4</nicname>
<myip>
@ -802,6 +851,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>162</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port5</nicname>
<myip>
@ -830,6 +881,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>163</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port6</nicname>
<myip>
@ -858,6 +911,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>port</nictype>
<uniqueidentifier>164</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>port7</nicname>
<myip>
@ -902,6 +957,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>lo</nictype>
<uniqueidentifier>111</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>lo0</nicname>
<myip>
@ -926,6 +983,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>eth</nictype>
<uniqueidentifier>112</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>eth0</nicname>
<myip>
@ -966,6 +1025,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>lo</nictype>
<uniqueidentifier>114</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>lo0</nicname>
<myip>
@ -990,6 +1051,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>eth</nictype>
<uniqueidentifier>115</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>eth0</nicname>
<myip>
@ -1030,6 +1093,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>lo</nictype>
<uniqueidentifier>117</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>lo0</nicname>
<myip>
@ -1054,6 +1119,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>eth</nictype>
<uniqueidentifier>118</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>eth0</nicname>
<myip>
@ -1093,6 +1160,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>lo</nictype>
<uniqueidentifier>122</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>lo0</nicname>
<myip>
@ -1117,6 +1186,8 @@ For this map, the VLAN packets are displayed with the color of the PC on that VL
<nictype>eth</nictype>
<uniqueidentifier>123</uniqueidentifier>
<usesdhcp>False</usesdhcp>
<encryptionkey />
<ssid />
<interface>
<nicname>eth1</nicname>
<myip>

View File

@ -49,9 +49,17 @@ namespace EduNetworkBuilder
}
void NamesDataBindingComplete(object Sender, EventArgs e)
{
Network theNet = NB.GetNetwork();
if (dgv_VLANNames.Columns.Count > 0)
{
dgv_VLANNames.Columns[0].ReadOnly = LockedNames;
dgv_VLANNames.Columns[1].ReadOnly = LockedNames;
if(theNet.VLANPacketColors && dgv_VLANNames.Columns.Count > 2)
{
dgv_VLANNames.Columns[2].ReadOnly = LockedNames;
}
}
}
private void UpdateForm()
@ -70,6 +78,7 @@ namespace EduNetworkBuilder
UpdateNamesFromForm(); //Read in any changes so far
processing = true;
//********************
//Bind the vlan names
Network theNet = NB.GetNetwork();
int selectedrow = -1;
@ -84,8 +93,44 @@ namespace EduNetworkBuilder
List<VLANName> tList = theNet.VlanNames.OrderBy(x => x.ID).ToList();
StashedVLANNameList = new BindingList<VLANName>(tList);
dgv_VLANNames.AutoGenerateColumns = false;
dgv_VLANNames.Columns.Clear();
dgv_VLANNames.DataSource = StashedVLANNameList;
dgv_VLANNames.AllowUserToAddRows = true;
//The VLAN ID
DataGridViewTextBoxColumn DGVTB = new DataGridViewTextBoxColumn();
DGVTB.ValueType = typeof(string);
DGVTB.DataPropertyName = "ID";
DGVTB.Name = "ID";
DGVTB.HeaderText = "ID";
dgv_VLANNames.Columns.Add(DGVTB);
//The VLAN name
DGVTB = new DataGridViewTextBoxColumn();
DGVTB.ValueType = typeof(string);
DGVTB.DataPropertyName = "Name";
DGVTB.Name = "Name";
DGVTB.HeaderText = "Name";
dgv_VLANNames.Columns.Add(DGVTB);
if (theNet.VLANPacketColors)
{
//The VLAN color. (optional)
DataGridViewComboBoxColumn DGVCBC = new DataGridViewComboBoxColumn();
DGVCBC.ValueType = typeof(string);
DGVCBC.DataPropertyName = "PacketColorString";
DGVCBC.Name = "Color";
DGVCBC.HeaderText = "Color";
DGVCBC.Items.Add("Blue");
DGVCBC.Items.Add("Purple");
DGVCBC.Items.Add("Yellow");
DGVCBC.Items.Add("Green");
DGVCBC.Items.Add("Orange");
DGVCBC.Items.Add("Cyan");
dgv_VLANNames.Columns.Add(DGVCBC);
}
if (TheDevice != null)
{
if (theNet.ItemIsLocked(hostname, "", NetTestType.LockVLANNames) ||
@ -94,6 +139,9 @@ namespace EduNetworkBuilder
else
LockedNames = false;
}
//**************************************
//Start building the VLAN/Interface list
VlanBindings.Columns.Clear();
VlanBindings.Columns.Add("IF", typeof(string));
foreach (VLANName vn in theNet.VlanNames)
@ -234,7 +282,8 @@ namespace EduNetworkBuilder
{
if (!VLANNamesHasID(theNet.VlanNames, id))
{
Color tColor = oList[theNet.VlanNames.Count].PacketColor;
Color tColor = Color.Blue;
if(theNet.VlanNames.Count < oList.Count ) tColor = oList[theNet.VlanNames.Count].PacketColor;
if (DR.Cells["Name"].Value == null) //When we are still adding
theNet.VlanNames.Add(new VLANName(id, "----", tColor));
else
@ -283,8 +332,8 @@ namespace EduNetworkBuilder
private void dgv_VLANNames_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
{
string headerText =
dgv_VLANNames.Columns[e.ColumnIndex].HeaderText;
//return;
string headerText = dgv_VLANNames.Columns[e.ColumnIndex].Name;
if (processing) return;
dgv_VLANNames.Rows[e.RowIndex].ErrorText = ""; //clear the old one out
@ -325,9 +374,13 @@ namespace EduNetworkBuilder
}
}
//MessageBox.Show(e.RowIndex.ToString() + " out of " + StashedVLANNameList.Count);
}
}
if (headerText.Equals("Color"))
{
//Checking the color
Console.WriteLine("Here "+ e.RowIndex);
}
}
private void dgv_VLANNames_UserDeletedRow(object sender, DataGridViewRowEventArgs e)

View File

@ -11,16 +11,16 @@ namespace EduNetworkBuilder
[Serializable]
public class VLANName
{
public int _ID;
public int _ID = 0;
[DisplayName("ID")]
public int ID { get { return _ID; } set { _ID = value; } }
public string _Name;
public string _Name = "----";
[DisplayName("Name")]
public string Name { get { return _Name; } set { _Name = value; } }
Color _Color = Color.Empty;
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; } }