Change tags to context help (and whitespace change)

This commit is contained in:
2015-08-08 07:12:34 -06:00
parent 6058ddf20b
commit b4630655b3
9 changed files with 258 additions and 27 deletions

View File

@@ -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();