public AStarLabFormExtension(ILabForm labForm, Workspace workspace) : base(labForm, workspace) { if (workspace.SimulationPlugins.OfType <AStarSimulationPluginFactory>().Any() == false) { var pluginFactory = new AStarSimulationPluginFactory(); workspace.SimulationPlugins.Add(pluginFactory); Add(pluginFactory); } }
public DijkstraLabFormExtension(ILabForm labForm, Workspace workspace) : base(labForm, workspace) { if (workspace.SimulationPlugins.OfType <DijkstraSimulationPluginFactory>().Any() == false) { var driverDefinition = new DijkstraSimulationPluginFactory(); workspace.SimulationPlugins.Add(driverDefinition); Add(driverDefinition); } }
public NeuralLabFormExtension(ILabForm labForm, Workspace workspace) : base(labForm, workspace) { AddNewAgentMenuItem("&Neural Agent", menuItemNewAgentOnClick); labForm.Agents.AddContextMenuItem("&Randomise Agent Network", RandomiseAgentNetwork, IsNeuralSimulationPlugin); labForm.Simulations.AddContextMenuItem("&Train", Train, IsNeuralSimulationTemplate); labForm.Spaces.AddContextMenuItem("&Train Neural Agent", TrainOnSpace); //ToolStripMenuItem menuItemNewNetwork = new ToolStripMenuItem(); //menuItemNewNetwork.Name = "menuItemNewNetwork"; //menuItemNewNetwork.Size = new System.Drawing.Size(98, 22); //menuItemNewNetwork.Text = "&New"; //menuItemNewNetwork.Click += new System.EventHandler(this.menuItemNewNetwork_Click); // //ToolStripMenuItem networkToolStripMenuItem = new ToolStripMenuItem(); //networkToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { //menuItemNewNetwork}); //networkToolStripMenuItem.Name = "networkToolStripMenuItem"; //networkToolStripMenuItem.Size = new System.Drawing.Size(64, 20); //networkToolStripMenuItem.Text = "&Neural Network"; //LabForm.MenuAgentDrivers.Items.Add(networkToolStripMenuItem); }
public LabFormExtension(ILabForm labForm, Workspace workspace) { LabForm = labForm; workspace.SimulationPlugins.OfType <TPluginFactory>().ForEach(Add); }