initial stubs for creating a random network

This commit is contained in:
Tim Young 2017-08-24 20:03:00 -05:00
parent 985821fa5a
commit 9db658f362
2 changed files with 30 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -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
}
}