Changeset 9890
- Timestamp:
- 08/21/13 15:21:04 (11 years ago)
- Location:
- branches/Robocode.TrunkInt
- Files:
-
- 3 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/CodeNodeView.Designer.cs
r9889 r9890 1 namespace HeuristicLab.Problems.Robocode 2 { 3 partial class CodeNodeView 4 { 5 /// <summary> 6 /// Required designer variable. 7 /// </summary> 8 private System.ComponentModel.IContainer components = null; 1 namespace HeuristicLab.Problems.Robocode { 2 partial class CodeNodeView { 3 /// <summary> 4 /// Required designer variable. 5 /// </summary> 6 private System.ComponentModel.IContainer components = null; 9 7 10 /// <summary> 11 /// Clean up any resources being used. 12 /// </summary> 13 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 14 protected override void Dispose(bool disposing) 15 { 16 if (disposing && (components != null)) 17 { 18 components.Dispose(); 19 } 20 base.Dispose(disposing); 21 } 8 /// <summary> 9 /// Clean up any resources being used. 10 /// </summary> 11 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 12 protected override void Dispose(bool disposing) { 13 if (disposing && (components != null)) { 14 components.Dispose(); 15 } 16 base.Dispose(disposing); 17 } 22 18 23 19 #region Component Designer generated code 24 20 25 /// <summary> 26 /// Required method for Designer support - do not modify 27 /// the contents of this method with the code editor. 28 /// </summary> 29 private void InitializeComponent() 30 { 21 /// <summary> 22 /// Required method for Designer support - do not modify 23 /// the contents of this method with the code editor. 24 /// </summary> 25 private void InitializeComponent() { 31 26 this.prefixCode = new System.Windows.Forms.TextBox(); 32 27 this.prefixLabel = new System.Windows.Forms.Label(); … … 34 29 this.suffixCode = new System.Windows.Forms.TextBox(); 35 30 this.splitContainer = new System.Windows.Forms.SplitContainer(); 36 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();37 31 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 38 32 this.splitContainer.Panel1.SuspendLayout(); … … 40 34 this.splitContainer.SuspendLayout(); 41 35 this.SuspendLayout(); 42 //43 // nameTextBox44 //45 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);46 this.errorProvider.SetIconPadding(this.nameTextBox, 2);47 this.nameTextBox.Size = new System.Drawing.Size(508, 20);48 this.nameTextBox.Visible = false;49 //50 // nameLabel51 //52 this.nameLabel.Visible = false;53 //54 // infoLabel55 //56 this.infoLabel.Location = new System.Drawing.Point(572, 3);57 this.infoLabel.Visible = false;58 36 // 59 37 // prefixCode … … 67 45 this.prefixCode.Name = "prefixCode"; 68 46 this.prefixCode.ScrollBars = System.Windows.Forms.ScrollBars.Both; 69 this.prefixCode.Size = new System.Drawing.Size(573, 1 00);47 this.prefixCode.Size = new System.Drawing.Size(573, 111); 70 48 this.prefixCode.TabIndex = 3; 71 49 this.prefixCode.Validated += new System.EventHandler(this.prefixCode_Validated); … … 98 76 this.suffixCode.Name = "suffixCode"; 99 77 this.suffixCode.ScrollBars = System.Windows.Forms.ScrollBars.Both; 100 this.suffixCode.Size = new System.Drawing.Size(573, 96);78 this.suffixCode.Size = new System.Drawing.Size(573, 108); 101 79 this.suffixCode.TabIndex = 6; 102 80 this.suffixCode.Validated += new System.EventHandler(this.suffixCode_Validated); … … 107 85 | System.Windows.Forms.AnchorStyles.Left) 108 86 | System.Windows.Forms.AnchorStyles.Right))); 109 this.splitContainer.Location = new System.Drawing.Point(6, 26);87 this.splitContainer.Location = new System.Drawing.Point(6, 3); 110 88 this.splitContainer.Name = "splitContainer"; 111 89 this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; … … 120 98 this.splitContainer.Panel2.Controls.Add(this.suffixLabel); 121 99 this.splitContainer.Panel2.Controls.Add(this.suffixCode); 122 this.splitContainer.Size = new System.Drawing.Size(582, 2 38);123 this.splitContainer.SplitterDistance = 1 19;100 this.splitContainer.Size = new System.Drawing.Size(582, 261); 101 this.splitContainer.SplitterDistance = 130; 124 102 this.splitContainer.TabIndex = 7; 125 103 // … … 130 108 this.Name = "CodeNodeView"; 131 109 this.Size = new System.Drawing.Size(591, 267); 132 this.Controls.SetChildIndex(this.nameLabel, 0);133 this.Controls.SetChildIndex(this.nameTextBox, 0);134 this.Controls.SetChildIndex(this.infoLabel, 0);135 this.Controls.SetChildIndex(this.splitContainer, 0);136 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();137 110 this.splitContainer.Panel1.ResumeLayout(false); 138 111 this.splitContainer.Panel1.PerformLayout(); … … 142 115 this.splitContainer.ResumeLayout(false); 143 116 this.ResumeLayout(false); 144 this.PerformLayout();145 117 146 118 } 147 119 148 120 #endregion 149 121 150 151 152 153 154 155 122 private System.Windows.Forms.TextBox prefixCode; 123 private System.Windows.Forms.Label prefixLabel; 124 private System.Windows.Forms.Label suffixLabel; 125 private System.Windows.Forms.TextBox suffixCode; 126 private System.Windows.Forms.SplitContainer splitContainer; 127 } 156 128 } -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/CodeNodeView.cs
r9889 r9890 27 27 [View("CodeNode View")] 28 28 [Content(typeof(CodeNode), IsDefaultView = true)] 29 public partial class CodeNodeView : NamedItemView {29 public partial class CodeNodeView : ItemView { 30 30 public new CodeNode Content { 31 31 get { return (CodeNode)base.Content; } … … 41 41 base.OnContentChanged(); 42 42 if (Content == null) { 43 this.prefixCode.Text = string.Empty;44 this.suffixCode.Text = string.Empty;43 prefixCode.Text = string.Empty; 44 suffixCode.Text = string.Empty; 45 45 } else { 46 this.prefixCode.Text = Content.Prefix;47 this.suffixCode.Text = Content.Suffix;46 prefixCode.Text = Content.Prefix; 47 suffixCode.Text = Content.Suffix; 48 48 } 49 49 } 50 50 51 51 private void suffixCode_Validated(object sender, EventArgs e) { 52 Content.Suffix = this.suffixCode.Text;52 Content.Suffix = suffixCode.Text; 53 53 } 54 54 55 55 private void prefixCode_Validated(object sender, EventArgs e) { 56 Content.Prefix = this.prefixCode.Text; 56 Content.Prefix = prefixCode.Text; 57 } 58 59 protected override void SetEnabledStateOfControls() { 60 base.SetEnabledStateOfControls(); 61 62 prefixCode.Enabled = Content != null && !Locked && !ReadOnly; 63 suffixCode.Enabled = Content != null && !Locked && !ReadOnly; 57 64 } 58 65 } -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/HeuristicLab.Problems.Robocode.Views-3.3.csproj
r9889 r9890 125 125 </ItemGroup> 126 126 <ItemGroup> 127 <EmbeddedResource Include="CodeNodeView.resx">128 <DependentUpon>CodeNodeView.cs</DependentUpon>129 </EmbeddedResource>130 <EmbeddedResource Include="SolutionCodeView.resx">131 <DependentUpon>SolutionCodeView.cs</DependentUpon>132 </EmbeddedResource>133 <EmbeddedResource Include="SolutionProgramView.resx">134 <DependentUpon>SolutionProgramView.cs</DependentUpon>135 </EmbeddedResource>136 </ItemGroup>137 <ItemGroup>138 127 <ProjectReference Include="..\..\HeuristicLab.Problems.Robocode\3.3\HeuristicLab.Problems.Robocode-3.3.csproj"> 139 128 <Project>{50776649-f3cf-459a-ae8c-146d1bfa64e4}</Project> -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionCodeView.Designer.cs
r9781 r9890 1 namespace HeuristicLab.Problems.Robocode 2 { 3 partial class SolutionCodeView 4 { 5 /// <summary> 6 /// Required designer variable. 7 /// </summary> 8 private System.ComponentModel.IContainer components = null; 1 namespace HeuristicLab.Problems.Robocode { 2 partial class SolutionCodeView { 3 /// <summary> 4 /// Required designer variable. 5 /// </summary> 6 private System.ComponentModel.IContainer components = null; 9 7 10 /// <summary> 11 /// Clean up any resources being used. 12 /// </summary> 13 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 14 protected override void Dispose(bool disposing) 15 { 16 if (disposing && (components != null)) 17 { 18 components.Dispose(); 19 } 20 base.Dispose(disposing); 21 } 8 /// <summary> 9 /// Clean up any resources being used. 10 /// </summary> 11 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 12 protected override void Dispose(bool disposing) { 13 if (disposing && (components != null)) { 14 components.Dispose(); 15 } 16 base.Dispose(disposing); 17 } 22 18 23 19 #region Component Designer generated code 24 20 25 /// <summary> 26 /// Required method for Designer support - do not modify 27 /// the contents of this method with the code editor. 28 /// </summary> 29 private void InitializeComponent() 30 { 31 this.programCode = new System.Windows.Forms.TextBox(); 32 this.btnRunInRobocode = new System.Windows.Forms.Button(); 33 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 34 this.SuspendLayout(); 35 // 36 // nameTextBox 37 // 38 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 39 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 40 // 41 // programCode 42 // 43 this.programCode.Dock = System.Windows.Forms.DockStyle.Fill; 44 this.programCode.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 45 this.programCode.Location = new System.Drawing.Point(0, 0); 46 this.programCode.Multiline = true; 47 this.programCode.Name = "programCode"; 48 this.programCode.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 49 this.programCode.Size = new System.Drawing.Size(351, 238); 50 this.programCode.TabIndex = 3; 51 // 52 // btnRunInRobocode 53 // 54 this.btnRunInRobocode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 55 this.btnRunInRobocode.AutoSize = true; 56 this.btnRunInRobocode.Location = new System.Drawing.Point(228, 3); 57 this.btnRunInRobocode.Name = "btnRunInRobocode"; 58 this.btnRunInRobocode.Size = new System.Drawing.Size(98, 23); 59 this.btnRunInRobocode.TabIndex = 4; 60 this.btnRunInRobocode.Text = "Run in Robocode"; 61 this.btnRunInRobocode.UseVisualStyleBackColor = true; 62 this.btnRunInRobocode.Click += new System.EventHandler(this.btnRunInRobocode_Click); 63 // 64 // SolutionCodeView 65 // 66 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 67 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 68 this.Controls.Add(this.btnRunInRobocode); 69 this.Controls.Add(this.programCode); 70 this.Name = "SolutionCodeView"; 71 this.Size = new System.Drawing.Size(351, 238); 72 this.Controls.SetChildIndex(this.nameLabel, 0); 73 this.Controls.SetChildIndex(this.nameTextBox, 0); 74 this.Controls.SetChildIndex(this.infoLabel, 0); 75 this.Controls.SetChildIndex(this.programCode, 0); 76 this.Controls.SetChildIndex(this.btnRunInRobocode, 0); 77 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 78 this.ResumeLayout(false); 79 this.PerformLayout(); 21 /// <summary> 22 /// Required method for Designer support - do not modify 23 /// the contents of this method with the code editor. 24 /// </summary> 25 private void InitializeComponent() { 26 this.programCode = new System.Windows.Forms.TextBox(); 27 this.btnRunInRobocode = new System.Windows.Forms.Button(); 28 this.SuspendLayout(); 29 // 30 // programCode 31 // 32 this.programCode.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 33 | System.Windows.Forms.AnchorStyles.Left) 34 | System.Windows.Forms.AnchorStyles.Right))); 35 this.programCode.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 36 this.programCode.Location = new System.Drawing.Point(3, 3); 37 this.programCode.Multiline = true; 38 this.programCode.Name = "programCode"; 39 this.programCode.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 40 this.programCode.Size = new System.Drawing.Size(345, 203); 41 this.programCode.TabIndex = 3; 42 // 43 // btnRunInRobocode 44 // 45 this.btnRunInRobocode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 46 this.btnRunInRobocode.AutoSize = true; 47 this.btnRunInRobocode.Location = new System.Drawing.Point(247, 212); 48 this.btnRunInRobocode.Name = "btnRunInRobocode"; 49 this.btnRunInRobocode.Size = new System.Drawing.Size(101, 23); 50 this.btnRunInRobocode.TabIndex = 4; 51 this.btnRunInRobocode.Text = "Run in Robocode"; 52 this.btnRunInRobocode.UseVisualStyleBackColor = true; 53 this.btnRunInRobocode.Click += new System.EventHandler(this.btnRunInRobocode_Click); 54 // 55 // SolutionCodeView 56 // 57 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 58 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 59 this.Controls.Add(this.btnRunInRobocode); 60 this.Controls.Add(this.programCode); 61 this.Name = "SolutionCodeView"; 62 this.Size = new System.Drawing.Size(351, 238); 63 this.ResumeLayout(false); 64 this.PerformLayout(); 80 65 81 66 } 82 67 83 68 #endregion 84 69 85 86 87 70 private System.Windows.Forms.TextBox programCode; 71 private System.Windows.Forms.Button btnRunInRobocode; 72 } 88 73 } -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionCodeView.cs
r9889 r9890 27 27 [View("Robocode Tank Code View")] 28 28 [Content(typeof(Solution), IsDefaultView = true)] 29 public partial class SolutionCodeView : NamedItemView { 29 public partial class SolutionCodeView : ItemView { 30 private const string programName = "BestSolution"; 31 30 32 public new Solution Content { 31 33 get { return (Solution)base.Content; } … … 41 43 base.OnContentChanged(); 42 44 if (Content == null) { 43 this.programCode.Text = string.Empty;45 programCode.Text = string.Empty; 44 46 } else { 45 this.programCode.Text = Interpreter.InterpretProgramTree(Content.Tree.Root, "BestSolution");47 programCode.Text = Interpreter.InterpretProgramTree(Content.Tree.Root, programName); 46 48 } 47 49 } 48 50 49 51 private void btnRunInRobocode_Click(object sender, EventArgs e) { 50 Interpreter.EvaluateTankProgram(Content.Tree, Content.Path, "BestSolution", true);52 Interpreter.EvaluateTankProgram(Content.Tree, Content.Path, programName, true); 51 53 } 52 54 } -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionProgramView.Designer.cs
r9889 r9890 26 26 private void InitializeComponent() { 27 27 this.graphTreeView = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.GraphicalSymbolicExpressionTreeView(); 28 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();29 28 this.SuspendLayout(); 30 //31 // nameTextBox32 //33 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);34 this.errorProvider.SetIconPadding(this.nameTextBox, 2);35 29 // 36 30 // graphTreeView 37 31 // 38 32 this.graphTreeView.AllowDrop = true; 39 this.graphTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 40 | System.Windows.Forms.AnchorStyles.Left) 33 this.graphTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 34 | System.Windows.Forms.AnchorStyles.Left) 41 35 | System.Windows.Forms.AnchorStyles.Right))); 42 36 this.graphTreeView.Caption = "Graphical SymbolicExpressionTree View"; 43 37 this.graphTreeView.Content = null; 44 this.graphTreeView.Location = new System.Drawing.Point(6, 26);38 this.graphTreeView.Location = new System.Drawing.Point(6, 3); 45 39 this.graphTreeView.Name = "graphTreeView"; 46 40 this.graphTreeView.ReadOnly = false; 47 this.graphTreeView.Size = new System.Drawing.Size(342, 190);41 this.graphTreeView.Size = new System.Drawing.Size(342, 213); 48 42 this.graphTreeView.TabIndex = 0; 49 43 // … … 53 47 this.Name = "SolutionProgramView"; 54 48 this.Size = new System.Drawing.Size(351, 219); 55 this.Controls.SetChildIndex(this.nameLabel, 0);56 this.Controls.SetChildIndex(this.nameTextBox, 0);57 this.Controls.SetChildIndex(this.infoLabel, 0);58 this.Controls.SetChildIndex(this.graphTreeView, 0);59 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();60 49 this.ResumeLayout(false); 61 this.PerformLayout();62 50 63 51 } -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionProgramView.cs
r9889 r9890 20 20 #endregion 21 21 22 using System.Windows.Forms;23 22 using HeuristicLab.Core.Views; 24 23 using HeuristicLab.MainForm; … … 27 26 [View("Robocode Tank Program Tree View")] 28 27 [Content(typeof(Solution), IsDefaultView = false)] 29 public sealed partial class SolutionProgramView : NamedItemView {28 public sealed partial class SolutionProgramView : ItemView { 30 29 public new Solution Content { 31 30 get { return (Solution)base.Content; } -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Solution.cs
r9879 r9890 27 27 namespace HeuristicLab.Problems.Robocode { 28 28 [StorableClass] 29 public sealed class Solution : NamedItem { 29 [Item("Solution", "A Robocode program.")] 30 public sealed class Solution : Item { 30 31 [Storable] 31 32 public ISymbolicExpressionTree Tree { get; set; } … … 39 40 : base(original, cloner) { 40 41 Tree = cloner.Clone(original.Tree); 41 Path = original.Path;42 Path = (string)original.Path.Clone(); 42 43 } 43 44 44 45 public Solution(ISymbolicExpressionTree tree, string path) 45 : base( "Solution", "A Robocode program.") {46 : base() { 46 47 this.Tree = tree; 47 48 this.Path = path;
Note: See TracChangeset
for help on using the changeset viewer.