diff --git a/EduNetworkBuilder/NetworkBuilder.Designer.cs b/EduNetworkBuilder/NetworkBuilder.Designer.cs index 9b769cd..0311062 100644 --- a/EduNetworkBuilder/NetworkBuilder.Designer.cs +++ b/EduNetworkBuilder/NetworkBuilder.Designer.cs @@ -75,6 +75,7 @@ this.HelpPanel = new System.Windows.Forms.Panel(); this.cbViewTitles = new System.Windows.Forms.CheckBox(); this.myProgressBar = new System.Windows.Forms.ProgressBar(); + this.randomToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.msMainMenuStrip.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbNetworkView)).BeginInit(); this.HelpPanel.SuspendLayout(); @@ -332,7 +333,8 @@ this.samplesToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.puzzlesToolStripMenuItem, this.solvedToolStripMenuItem, - this.toSolveToolStripMenuItem}); + this.toSolveToolStripMenuItem, + this.randomToolStripMenuItem}); this.samplesToolStripMenuItem.Name = "samplesToolStripMenuItem"; this.samplesToolStripMenuItem.Size = new System.Drawing.Size(77, 24); this.samplesToolStripMenuItem.Text = "Samples"; @@ -506,6 +508,13 @@ this.myProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous; this.myProgressBar.TabIndex = 11; // + // randomToolStripMenuItem + // + this.randomToolStripMenuItem.Name = "randomToolStripMenuItem"; + this.randomToolStripMenuItem.Size = new System.Drawing.Size(181, 26); + this.randomToolStripMenuItem.Text = "Random"; + this.randomToolStripMenuItem.Click += new System.EventHandler(this.randomToolStripMenuItem_Click); + // // BuilderWindow // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); @@ -588,6 +597,7 @@ private System.Windows.Forms.ToolStripMenuItem submitHomeworkToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem markAsGradedToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem logoutToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem randomToolStripMenuItem; } } diff --git a/EduNetworkBuilder/NetworkBuilder.cs b/EduNetworkBuilder/NetworkBuilder.cs index 5089110..e7f8712 100644 --- a/EduNetworkBuilder/NetworkBuilder.cs +++ b/EduNetworkBuilder/NetworkBuilder.cs @@ -2132,5 +2132,24 @@ namespace EduNetworkBuilder if(InvisibleNetwork == null) return false; return true; } + + + #region Random Map Stuff + private void randomToolStripMenuItem_Click(object sender, EventArgs e) + { + GenerateARandomMap(); + } + + private void GenerateARandomMap() + { + LoadSolvedRandomMap(); + } + + private void LoadSolvedRandomMap() + { + //we will prompt for stuff. For now, just use the firewalls network + LoadSolvedResource( SolvedNetworkNames.firewalls.ToString()); + } + #endregion Random Map Stuff } } \ No newline at end of file