diff --git a/Capstone Application/CA.cs b/Capstone Application/CA.cs index f7e7c60..0333a39 100644 --- a/Capstone Application/CA.cs +++ b/Capstone Application/CA.cs @@ -105,7 +105,7 @@ public CA(ControllerScript control, int width, int height, int numStates, List512 true false - C:\Users\GAB\Desktop\CAPSTONE\Winform\2019-07-13\ + C:\Users\GAB\Desktop\CAPSTONE\Winform\2019-10-13\ true Disk false @@ -22,7 +22,7 @@ false false true - 22 + 23 0.1.0.%2a false true diff --git a/Capstone Application/Form1.Designer.cs b/Capstone Application/Form1.Designer.cs index 18ca530..c33d012 100644 --- a/Capstone Application/Form1.Designer.cs +++ b/Capstone Application/Form1.Designer.cs @@ -61,6 +61,7 @@ private void InitializeComponent() this.PauseButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.resetRunButton = new System.Windows.Forms.ToolStripButton(); + this.resetRunsButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); this.editGridButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); @@ -76,10 +77,9 @@ private void InitializeComponent() this.decrease = new System.Windows.Forms.ToolStripButton(); this.increase = new System.Windows.Forms.ToolStripButton(); this.panel1 = new System.Windows.Forms.Panel(); + this.innerPictureBox = new Capstone_Application.PictureBoxWithInterpolationMode(); this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); - this.innerPictureBox = new Capstone_Application.PictureBoxWithInterpolationMode(); - this.resetRunsButton = new System.Windows.Forms.ToolStripButton(); this.menuStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout(); this.panel1.SuspendLayout(); @@ -364,6 +364,16 @@ private void InitializeComponent() this.resetRunButton.Text = "Run Reset"; this.resetRunButton.Click += new System.EventHandler(this.resetButton_Click); // + // resetRunsButton + // + this.resetRunsButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.resetRunsButton.Image = ((System.Drawing.Image)(resources.GetObject("resetRunsButton.Image"))); + this.resetRunsButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.resetRunsButton.Name = "resetRunsButton"; + this.resetRunsButton.Size = new System.Drawing.Size(61, 22); + this.resetRunsButton.Text = "Full Reset"; + this.resetRunsButton.Click += new System.EventHandler(this.resetRunsButton_Click); + // // toolStripSeparator5 // this.toolStripSeparator5.Name = "toolStripSeparator5"; @@ -434,14 +444,14 @@ private void InitializeComponent() // speedLabel // this.speedLabel.Name = "speedLabel"; - this.speedLabel.Size = new System.Drawing.Size(39, 15); + this.speedLabel.Size = new System.Drawing.Size(39, 22); this.speedLabel.Text = "Speed"; // // speedInput // this.speedInput.MaxLength = 3; this.speedInput.Name = "speedInput"; - this.speedInput.Size = new System.Drawing.Size(25, 23); + this.speedInput.Size = new System.Drawing.Size(25, 25); this.speedInput.Text = "0"; this.speedInput.TextChanged += new System.EventHandler(this.speedInput_TextChanged); // @@ -450,7 +460,7 @@ private void InitializeComponent() this.decrease.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.decrease.ImageTransparentColor = System.Drawing.Color.Magenta; this.decrease.Name = "decrease"; - this.decrease.Size = new System.Drawing.Size(23, 19); + this.decrease.Size = new System.Drawing.Size(23, 22); this.decrease.Text = "-"; this.decrease.Click += new System.EventHandler(this.decrease_Click); // @@ -459,7 +469,7 @@ private void InitializeComponent() this.increase.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.increase.ImageTransparentColor = System.Drawing.Color.Magenta; this.increase.Name = "increase"; - this.increase.Size = new System.Drawing.Size(23, 19); + this.increase.Size = new System.Drawing.Size(23, 22); this.increase.Text = "+"; this.increase.Click += new System.EventHandler(this.increase_Click); // @@ -475,11 +485,6 @@ private void InitializeComponent() this.panel1.Size = new System.Drawing.Size(600, 600); this.panel1.TabIndex = 4; // - // backgroundWorker1 - // - this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork); - this.backgroundWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted); - // // innerPictureBox // this.innerPictureBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; @@ -499,15 +504,10 @@ private void InitializeComponent() this.innerPictureBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.innerPictureBox_MouseMove); this.innerPictureBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.innerPictureBox_MouseUp); // - // resetRunsButton + // backgroundWorker1 // - this.resetRunsButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.resetRunsButton.Image = ((System.Drawing.Image)(resources.GetObject("resetRunsButton.Image"))); - this.resetRunsButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.resetRunsButton.Name = "resetRunsButton"; - this.resetRunsButton.Size = new System.Drawing.Size(61, 22); - this.resetRunsButton.Text = "Full Reset"; - this.resetRunsButton.Click += new System.EventHandler(this.resetRunsButton_Click); + this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork); + this.backgroundWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted); // // Form1 // diff --git a/Capstone Application/Form1.cs b/Capstone Application/Form1.cs index 680baf1..e613f59 100644 --- a/Capstone Application/Form1.cs +++ b/Capstone Application/Form1.cs @@ -346,17 +346,18 @@ public void AutoPathSave(string time, string folder_path, bool addToName) wt.WriteLine(); wt.Write("Iteration,"); List lengths = paths.Select(x => x.Count).ToList(); + int max = lengths.Max(); for (int i = 0; i < paths.Count; i++) { wt.Write(agent + (i + 1).ToString() + "," + ","); } wt.WriteLine(); - for (int i = 0; i < lengths.Max(); i++) + for (int i = 0; i < max; i++) { wt.Write(i + ","); for (int j = 0; j < paths.Count; j++) { - if(controllerScript.Paths[j].Count >= i) + if(paths[j].Count > i) { wt.Write(paths[j][i].Item1 + "," + paths[j][i].Item2 + ","); } diff --git a/Capstone Application/Form1.resx b/Capstone Application/Form1.resx index 2466a67..5e287e0 100644 --- a/Capstone Application/Form1.resx +++ b/Capstone Application/Form1.resx @@ -169,14 +169,7 @@ TgDQASA1MVpwzwAAAABJRU5ErkJggg== - - - iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA+SURBVHhe7cExAQAAAMKg9U9tCy8gAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgqAacpAAB5eVcggAAAABJRU5ErkJggg== - - - + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG @@ -191,13 +184,14 @@ TgDQASA1MVpwzwAAAABJRU5ErkJggg== - - 237, 17 - - - 401, 17 - - + + + iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA+SURBVHhe7cExAQAAAMKg9U9tCy8gAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgqAacpAAB5eVcggAAAABJRU5ErkJggg== + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG @@ -212,4 +206,10 @@ TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + 237, 17 + + + 401, 17 + \ No newline at end of file