public WirelessNetworkSimulation(WirelessNetwork baseNetwork, int?seed = null)
        {
            RandomSeed = seed == null?SeedingRandom.Next() : seed.Value;

            r = new Random(RandomSeed);

            Network = baseNetwork;

            foreach (var n in Network.Nodes)
            {
                Type t = Assembly.GetExecutingAssembly().GetType(n.NodeType);

                SimulatedNode simNode = (SimulatedNode)t.GetConstructor(new Type[] { }).Invoke(new object[] { });
                simNode.ParentSimulation = this;
                simNode.SourceNode       = n;
                simNode.MyID             = SimulationNodes.Count;

                WirelessSimulationNode sn = new WirelessSimulationNode()
                {
                    NetworkNode = n,
                    Node        = simNode
                };

                SimulationNodes.Add(sn);
            }
        }
 public void SetButtonState(WirelessSimulationNode n, bool state, int index = 0)
 {
     SetButtonState(n.Node, state, index);
 }