Change tags to context help (and whitespace change)
This commit is contained in:
parent
6058ddf20b
commit
b4630655b3
@ -25,7 +25,7 @@
|
||||
<InstallUrl>http://tyounglightsys.ddns.info/EduNetworkBuilder/v1/</InstallUrl>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.htm</WebPage>
|
||||
<ApplicationRevision>17</ApplicationRevision>
|
||||
<ApplicationRevision>18</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
|
@ -45,7 +45,7 @@ namespace EduNetworkBuilder
|
||||
public enum NetTestVerbosity { none, basic, hints, full }
|
||||
public enum LBContents { routes, messages, dhcp, puzzles }
|
||||
public enum HelpTopics {
|
||||
DHCP, DHCPServer, Firewall, Gateway, Help, IPAddress, Link, Subnet, Ping,
|
||||
None, DHCP, DHCPServer, Firewall, Gateway, Help, IPAddress, Link, Subnet, Ping,
|
||||
VPN, Hub, Switch, ARP, StaticRoute, Subnetting, WhenToSubnet, ComparingAddresses, MACAddress,
|
||||
Network, Packet, NIC, Interface
|
||||
}
|
||||
@ -459,7 +459,16 @@ namespace EduNetworkBuilder
|
||||
|
||||
public static T ParseEnum<T>(string value)
|
||||
{
|
||||
return (T)Enum.Parse(typeof(T), value, true);
|
||||
// Do not initialize this variable here.
|
||||
return (T)Enum.Parse(typeof(T), value, true);
|
||||
}
|
||||
|
||||
public static T TryParseEnum<T>(string value, T Default )
|
||||
{
|
||||
if (!Enum.IsDefined(typeof(T), value))
|
||||
return Default;
|
||||
|
||||
return (T)Enum.Parse(typeof(T), value);
|
||||
}
|
||||
|
||||
public static GeneralComponentType GetComponentType(NetworkComponent What)
|
||||
@ -472,6 +481,13 @@ namespace EduNetworkBuilder
|
||||
return theType;
|
||||
}
|
||||
|
||||
public static void ReadContextHelp(HelpTopics What)
|
||||
{
|
||||
//make a new window if needed
|
||||
//load help
|
||||
//Jump to the correct location
|
||||
}
|
||||
|
||||
public static string GenerateMACAddress()
|
||||
{
|
||||
var sBuilder = new StringBuilder();
|
||||
|
@ -41,7 +41,7 @@ namespace EduNetworkBuilder
|
||||
public NetTestVerbosity HintsToDisplay = NetTestVerbosity.none;
|
||||
public NetTestVerbosity StartingHelpLevel = NetTestVerbosity.none;
|
||||
public bool PuzzleIsSolved = true; //only set to false if we load a puzzle
|
||||
public List<string> Tags = new List<string>();
|
||||
public List<HelpTopics> SuggestedReadings = new List<HelpTopics>();
|
||||
private DateTime NetworkStartTime = DateTime.Now;
|
||||
private bool AlreadyChosenTimeout = false;
|
||||
private int DefaultTimeout = 10;
|
||||
@ -146,7 +146,11 @@ namespace EduNetworkBuilder
|
||||
NetTests.Add(nt);
|
||||
break;
|
||||
case "tag":
|
||||
Tags.Add(Individual.InnerText);
|
||||
HelpTopics tempHelpTopic = NB.TryParseEnum<HelpTopics>(Individual.InnerText, HelpTopics.None);
|
||||
if (tempHelpTopic != HelpTopics.None)
|
||||
{
|
||||
SuggestedReadings.Add(tempHelpTopic);
|
||||
}
|
||||
break;
|
||||
case "level":
|
||||
int.TryParse(Individual.InnerText, out Level);
|
||||
@ -253,10 +257,9 @@ namespace EduNetworkBuilder
|
||||
{
|
||||
nt.Save(writer);
|
||||
}
|
||||
foreach(string Tag in Tags)
|
||||
foreach(HelpTopics HT in SuggestedReadings)
|
||||
{
|
||||
if(!Tag.Contains("Level"))
|
||||
writer.WriteElementString("tag",Tag);
|
||||
writer.WriteElementString("tag",HT.ToString());
|
||||
}
|
||||
writer.WriteEndElement();
|
||||
}
|
||||
|
@ -380,8 +380,8 @@ namespace EduNetworkBuilder
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!PuzzleTags.Contains(str, StringComparer.OrdinalIgnoreCase))
|
||||
PuzzleTags.Add(str);
|
||||
//if (!PuzzleTags.Contains(str, StringComparer.OrdinalIgnoreCase))
|
||||
// PuzzleTags.Add(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,10 +88,10 @@ namespace EduNetworkBuilder
|
||||
}
|
||||
}
|
||||
lbTags.Items.Clear();
|
||||
myNet.Tags.Sort();
|
||||
foreach (string tag in myNet.Tags)
|
||||
myNet.SuggestedReadings.Sort();
|
||||
foreach (HelpTopics HT in myNet.SuggestedReadings)
|
||||
{
|
||||
lbTags.Items.Add(tag);
|
||||
lbTags.Items.Add(HT.ToString());
|
||||
}
|
||||
cbStartingHelpLevel.Items.Clear();
|
||||
foreach (string helplevel in Enum.GetNames(typeof(NetTestVerbosity)))
|
||||
@ -222,13 +222,17 @@ namespace EduNetworkBuilder
|
||||
lbTags.ClearSelected();
|
||||
lbTags_MouseDoubleClick(sender, null);
|
||||
}
|
||||
private void lbTags_Read_Click(object sender, EventArgs e)
|
||||
{
|
||||
//We need to add this.
|
||||
}
|
||||
|
||||
private void lbTags_Delete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lbTags.SelectedIndex >= lbTags.Items.Count) return;
|
||||
if (lbTags.SelectedIndex < 0) return;
|
||||
SaveValuesToNetwork();
|
||||
myNet.Tags.RemoveAt(lbTags.SelectedIndex);
|
||||
myNet.SuggestedReadings.RemoveAt(lbTags.SelectedIndex);
|
||||
LoadValuesFromNetwork();
|
||||
}
|
||||
|
||||
@ -250,6 +254,8 @@ namespace EduNetworkBuilder
|
||||
{
|
||||
lbTags.ContextMenuStrip.Items.Add("Edit");
|
||||
lbTags.ContextMenuStrip.Items[index++].Click += lbTags_Edit_Click;
|
||||
lbTags.ContextMenuStrip.Items.Add("Read");
|
||||
lbTags.ContextMenuStrip.Items[index++].Click += lbTags_Read_Click;
|
||||
lbTags.ContextMenuStrip.Items.Add("Delete");
|
||||
lbTags.ContextMenuStrip.Items[index++].Click += lbTags_Delete_Click;
|
||||
}
|
||||
@ -266,13 +272,28 @@ namespace EduNetworkBuilder
|
||||
lbPrompt.Location = new Point(1, 1);
|
||||
lbPrompt.Size = new Size(200, lbPrompt.Size.Height);
|
||||
|
||||
TextBox Choice = new TextBox();
|
||||
Choice.Text = value;
|
||||
ListBox Choice = new ListBox();
|
||||
List<string> tlist = new List<string>();
|
||||
foreach(HelpTopics HT in Enum.GetValues(typeof(HelpTopics)))
|
||||
{
|
||||
tlist.Add(HT.ToString());
|
||||
}
|
||||
tlist.Remove("None");
|
||||
tlist.Sort();
|
||||
foreach(string tstring in tlist)
|
||||
{
|
||||
Choice.Items.Add(tstring);
|
||||
}
|
||||
|
||||
if(value != "" && Choice.Items.Contains(value))
|
||||
{
|
||||
Choice.SelectedItem = value;
|
||||
}
|
||||
Choice.Location = new Point(1, lbPrompt.Location.Y + lbPrompt.Height + 5);
|
||||
|
||||
Button Done = new Button();
|
||||
Done.Click += btnClose_Click;
|
||||
Choice.DoubleClick += btnClose_Click;
|
||||
Done.Text = "Done";
|
||||
Done.Location = new Point(1, Choice.Location.Y + Choice.Height + 5);
|
||||
QuestionForm.Controls.Clear();
|
||||
@ -305,14 +326,16 @@ namespace EduNetworkBuilder
|
||||
if (lbTags.SelectedIndex != -1)
|
||||
{
|
||||
//Something is selected. Edit it
|
||||
newstring = QuickPrompt("Edit Tag", "Tag:", myNet.Tags[lbTags.SelectedIndex]);
|
||||
newstring = QuickPrompt("Edit Tag", "Tag:", myNet.SuggestedReadings[lbTags.SelectedIndex].ToString());
|
||||
if (newstring != "")
|
||||
{
|
||||
myNet.Tags[lbTags.SelectedIndex] = newstring;
|
||||
HelpTopics tHelpTopic = NB.TryParseEnum<HelpTopics>(newstring, HelpTopics.None);
|
||||
if (tHelpTopic != HelpTopics.None)
|
||||
myNet.SuggestedReadings[lbTags.SelectedIndex] = tHelpTopic;
|
||||
}
|
||||
else
|
||||
{
|
||||
myNet.Tags.RemoveAt(lbTags.SelectedIndex);
|
||||
myNet.SuggestedReadings.RemoveAt(lbTags.SelectedIndex);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -321,7 +344,9 @@ namespace EduNetworkBuilder
|
||||
newstring = QuickPrompt("Edit Tag", "Tag:", "");
|
||||
if (newstring != "")
|
||||
{
|
||||
myNet.Tags.Add(newstring);
|
||||
HelpTopics tHelpTopic = NB.TryParseEnum<HelpTopics>(newstring, HelpTopics.None);
|
||||
if(tHelpTopic != HelpTopics.None)
|
||||
myNet.SuggestedReadings.Add(tHelpTopic);
|
||||
}
|
||||
}
|
||||
LoadValuesFromNetwork();
|
||||
|
@ -50,6 +50,11 @@ namespace EduNetworkBuilder
|
||||
currentFont.Size + 2, FontStyle.Regular);
|
||||
rtbContent.DeselectAll();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start an RTFWindow with the specified information showing
|
||||
/// </summary>
|
||||
/// <param name="WhatToShow"></param>
|
||||
public RTFWindow(RTFWindowContents WhatToShow)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
@ -1,4 +1,4 @@
|
||||
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}{\f1\fnil\fcharset0 Courier New;}{\f2\fmodern\fprq1\fcharset0 Consolas;}{\f3\fnil\fcharset0 Calibri;}}
|
||||
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}{\f1\fnil\fcharset0 Courier New;}{\f2\fnil\fcharset0 Calibri;}{\f3\fmodern\fprq1\fcharset0 Consolas;}}
|
||||
{\colortbl ;\red0\green0\blue255;}
|
||||
{\*\generator Riched20 6.3.9600}\viewkind4\uc1
|
||||
\pard\widctlpar\sa200\sl276\slmult1\f0\fs22\lang9 This is a basic help document for EduNetworkBuilder\par
|
||||
@ -11,12 +11,16 @@ Different devices can have multiple network cards. Each card has a MAC (Etherne
|
||||
Each network card can have multiple IP addresses. This allows you to have one network wire coming into a computer, but have multiple IP-addresses. This adds a little bit of complexity, to it being a "simple" network simulation tool. But it adds a lot of flexibility, as well as being closer to reality.\par
|
||||
\b Building a network\b0\par
|
||||
Use the item list on the left to choose an item to add to the network.\par
|
||||
\b Links:\b0\par
|
||||
Click on the link button, then left-click on the starting item and drag to the destination item. Release the button on the destination and a "link" box will appear. Select the network-cards and interfaces that are selected.\par
|
||||
\b Configuring The Devices\par
|
||||
\b0 Double-click an item to edit it. You can change the host name, and add network cards and interfaces. You can also set the default gateway and add routes. On servers, you can configure the DHCP service.\par
|
||||
\b Network Cards\par
|
||||
\b0 For the most part, you should not need to add extra network cards. But, if you want to, you can. If you press the edit button on a network card, you can choose if the network card is configured statically, or through DHCP.\par
|
||||
\b Interfaces\b0\par
|
||||
\b Network Cards:\par
|
||||
\b0 A network card is the thing that connects the device to the network. There are many different types of network cards. Ethernet (wired), Wireless, VPN (virtual network cards), and a number pf other ones.\par
|
||||
Different devices can have one or multiple network cards depending on the nature of the device. Each network card has a unique MAC (Ethernet) address.\par
|
||||
Each network card can have multiple IP addresses (each IP address is assigned to an "interface". This allows you to have one network wire coming into a computer, but have multiple IP-addresses connected to that one wire. This adds a lot of flexibility for things such as firewalls and routers.\par
|
||||
For the most part, you should not need to add extra network cards. But, if you want to, you can by pressing the + button. If you press the edit button on a network card, you can choose if the network card is configured statically or DHCP, you can configure the VPN settings, and a few other items.\par
|
||||
\b Interfaces:\b0\par
|
||||
You change an interface when you are editing a device. If the device has multiple network cards, you need to select the network card you want to change the interface for. The interface initially looks like: "0.0.0.0 - 0.0.0.0" This is the network and subnet. The whole object of the program is to simulate what happens when you have different values here. Or to have someone set up a network and then for you to go in and configure it so it works. Double-click on an interface to set the IP Address and netmask for that interface.\par
|
||||
\b Default Gateway\b0\par
|
||||
The default gateway is on a device editing screen at the top-right. Click on the button to set it. If a Network Card is set to use DHCP then any value you put in will be overridden if the device does a DHCP Request.\par
|
||||
@ -56,8 +60,10 @@ DHCP Server:\par
|
||||
\b0 (See DHCP above) A DHCP server remembers all the clients that request IP addresses so it issues the same IP address if that particular client asks a second time. It also remembers which IP addresses it has given out so it does not give the same IP address to different computers.\b\par
|
||||
Ping:\par
|
||||
\b0 A Ping is a simple packet that is sent from one comput to the other. The computer you send the ping packet to will usually respond. The word "Ping" comes from the concept of a submarine and sonar. Something does a "Ping" and you hear an echo to tell you that the computer is alive. This is usually what it is used for, to determine if a computer is turned on, functional, or to see if the network is properly set up.\b\par
|
||||
MAC Addresses:\par
|
||||
\b0 Each Network Card has a hard-coded "address". These are supposed to be unique to each network card, and look something like: \f1\lang1033 10:08:b1:73:aa:5b.\f2 Packets that are being sent on the local network use the "Ethernet protocol", which sends the packet from one MAC Address to another. \b\f0\lang9\par
|
||||
ARP:\par
|
||||
\b0 ARP stands for "Address Resolution Protocol." Computers on a local network talk to each-other by using the MAC Addresses. These are addresses that are unique to each network card, that look something like: \f1\lang1033 10:08:b1:73:aa:5b\par
|
||||
\b0 ARP stands for "Address Resolution Protocol." Computers on a local network talk to each-other by using the MAC Addresses. \f1\lang1033\par
|
||||
\f0\lang9 ARP is what is used when one computer wants to find the MAC address of another computer. It usually sends out a broadcast that says, "who has this IP Address?" And it gets a response back that says something like, "I have that IP and my MAC address is: \f1\lang1033 10:08:b1:73:aa:5b\f0\lang9 "\par
|
||||
We do not get into it too much on this program, but if a computer does not know the MAC address of the computer it is trying to communicate with, it first sends out an ARP request to find that before it sends out a packet containing the ping or other communication.\par
|
||||
You can usually run: arp -a\par
|
||||
@ -83,7 +89,7 @@ ADVANCED TOPICS:\b0\par
|
||||
\b Subnetting: \b0 (Based heavily off of LordFlasheart's post, "Subnetting Made Easy" here: {{\field{\*\fldinst{HYPERLINK http://www.techexams.net/forums/ccna-ccent/38772-subnetting-made-easy.html }}{\fldrslt{http://www.techexams.net/forums/ccna-ccent/38772-subnetting-made-easy.html\ul0\cf0}}}}\f0\fs22\par
|
||||
An IP address is made up of 32 bits, split into 4 octets (octet = 8 bits). Some bits are reserved for identifying the network and the other bits are left to identify the host.\par
|
||||
Below shows you how, for each class, the address is split in terms of network (N) and host (H) portions.\par
|
||||
\f2 NNNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH /8\par
|
||||
\f3 NNNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH /8\par
|
||||
NNNNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH /16\par
|
||||
NNNNNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH /24\par
|
||||
\f0 There is a boundary at each dot, therefore there are boundaries after bits 8, 16, 24, and 32. This is an important concept to remember. The first move in doing any work with subnets is to figure out which boundary segment you are working within. So you will need to remember the 8, 16, 24, 32.\par
|
||||
@ -173,6 +179,6 @@ There are a few main rules for how to subnet:\par
|
||||
\b Smaller adjacent subnets should fit into larger subnets, most of the time.\par
|
||||
\b0 If you plan it right, you should be able to supernet your subnets, and have one route or rule for them. For example, you may have your networking equipment in 1-63, and your printers from 65-127. That means you can have one route or rule that matches all 128 IPs. This makes life a lot simpler for creating many sorts of rules.\b\par
|
||||
Smaller routing tables require less management and resources.\par
|
||||
\b0 Again, with the onset of more powerful routers, firewalls, and faster networking speeds, this is no longer quite as critical as it once was. But if you have a finely tuned firewall, you can end up with many rules. Often it is very nice to block all access to a whole range instead of blocking access to each machine one IP at a time. Often, the "less management" simply means less work for the techies who are keeping things running smoothly.\f3\par
|
||||
\b0 Again, with the onset of more powerful routers, firewalls, and faster networking speeds, this is no longer quite as critical as it once was. But if you have a finely tuned firewall, you can end up with many rules. Often it is very nice to block all access to a whole range instead of blocking access to each machine one IP at a time. Often, the "less management" simply means less work for the techies who are keeping things running smoothly.\f2\par
|
||||
}
|
||||
|