- Timestamp:
- 05/09/11 16:49:26 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationCacheView.Designer.cs
r6140 r6169 1 namespace HeuristicLab.Problems.ExternalEvaluation {1 namespace HeuristicLab.Problems.ExternalEvaluation.Views { 2 2 partial class EvaluationCacheView { 3 /// <summary> 3 /// <summary> 4 4 /// Required designer variable. 5 5 /// </summary> 6 6 private System.ComponentModel.IContainer components = null; 7 7 8 /// <summary> 8 /// <summary> 9 9 /// Clean up any resources being used. 10 10 /// </summary> … … 17 17 } 18 18 19 #region Windows FormDesigner generated code19 #region Component Designer generated code 20 20 21 /// <summary> 22 /// Required method for Designer support - do not modify 21 /// <summary> 22 /// Required method for Designer support - do not modify 23 23 /// the contents of this method with the code editor. 24 24 /// </summary> 25 25 private void InitializeComponent() { 26 this.sizeLabel = new System.Windows.Forms.Label(); 27 this.sizeTextBox = new System.Windows.Forms.TextBox(); 28 this.hitsTextBox = new System.Windows.Forms.TextBox(); 29 this.hitsLabel = new System.Windows.Forms.Label(); 26 this.hits_sizeLabel = new System.Windows.Forms.Label(); 27 this.hits_sizeTextBox = new System.Windows.Forms.TextBox(); 30 28 this.clearButton = new System.Windows.Forms.Button(); 31 29 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 32 30 this.SuspendLayout(); 31 // 32 // parameterCollectionView 33 // 34 this.parameterCollectionView.Location = new System.Drawing.Point(0, 52); 35 this.parameterCollectionView.Size = new System.Drawing.Size(490, 301); 33 36 // 34 37 // nameTextBox … … 37 40 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 38 41 // 39 // sizeLabel42 // hits_sizeLabel 40 43 // 41 this. sizeLabel.AutoSize = true;42 this. sizeLabel.Location = new System.Drawing.Point(6, 30);43 this. sizeLabel.Name = "sizeLabel";44 this. sizeLabel.Size = new System.Drawing.Size(30, 13);45 this. sizeLabel.TabIndex = 3;46 this. sizeLabel.Text = "Size:";44 this.hits_sizeLabel.AutoSize = true; 45 this.hits_sizeLabel.Location = new System.Drawing.Point(3, 29); 46 this.hits_sizeLabel.Name = "hits_sizeLabel"; 47 this.hits_sizeLabel.Size = new System.Drawing.Size(53, 13); 48 this.hits_sizeLabel.TabIndex = 4; 49 this.hits_sizeLabel.Text = "Hits/Size:"; 47 50 // 48 // sizeTextBox51 // hits_sizeTextBox 49 52 // 50 this. sizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)53 this.hits_sizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 51 54 | System.Windows.Forms.AnchorStyles.Right))); 52 this.sizeTextBox.Location = new System.Drawing.Point(58, 27); 53 this.sizeTextBox.Name = "sizeTextBox"; 54 this.sizeTextBox.ReadOnly = true; 55 this.sizeTextBox.Size = new System.Drawing.Size(290, 20); 56 this.sizeTextBox.TabIndex = 4; 57 // 58 // hitsTextBox 59 // 60 this.hitsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 61 | System.Windows.Forms.AnchorStyles.Right))); 62 this.hitsTextBox.Location = new System.Drawing.Point(58, 54); 63 this.hitsTextBox.Name = "hitsTextBox"; 64 this.hitsTextBox.ReadOnly = true; 65 this.hitsTextBox.Size = new System.Drawing.Size(290, 20); 66 this.hitsTextBox.TabIndex = 5; 67 // 68 // hitsLabel 69 // 70 this.hitsLabel.AutoSize = true; 71 this.hitsLabel.Location = new System.Drawing.Point(6, 57); 72 this.hitsLabel.Name = "hitsLabel"; 73 this.hitsLabel.Size = new System.Drawing.Size(28, 13); 74 this.hitsLabel.TabIndex = 6; 75 this.hitsLabel.Text = "Hits:"; 55 this.hits_sizeTextBox.Location = new System.Drawing.Point(59, 26); 56 this.hits_sizeTextBox.Name = "hits_sizeTextBox"; 57 this.hits_sizeTextBox.ReadOnly = true; 58 this.hits_sizeTextBox.Size = new System.Drawing.Size(379, 20); 59 this.hits_sizeTextBox.TabIndex = 5; 76 60 // 77 61 // clearButton 78 62 // 79 63 this.clearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 80 this.clearButton.Location = new System.Drawing.Point( 273, 80);64 this.clearButton.Location = new System.Drawing.Point(444, 24); 81 65 this.clearButton.Name = "clearButton"; 82 this.clearButton.Size = new System.Drawing.Size( 75, 23);83 this.clearButton.TabIndex = 7;66 this.clearButton.Size = new System.Drawing.Size(43, 23); 67 this.clearButton.TabIndex = 6; 84 68 this.clearButton.Text = "Clear"; 69 this.toolTip.SetToolTip(this.clearButton, "Clear"); 85 70 this.clearButton.UseVisualStyleBackColor = true; 86 71 this.clearButton.Click += new System.EventHandler(this.clearButton_Click); … … 89 74 // 90 75 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 91 this. Controls.Add(this.hitsTextBox);92 this.Controls.Add(this. sizeTextBox);93 this.Controls.Add(this. sizeLabel);76 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 77 this.Controls.Add(this.hits_sizeTextBox); 78 this.Controls.Add(this.hits_sizeLabel); 94 79 this.Controls.Add(this.clearButton); 95 this.Controls.Add(this.hitsLabel);96 80 this.Name = "EvaluationCacheView"; 97 this.Size = new System.Drawing.Size(351, 107);98 this.Controls.SetChildIndex(this.hitsLabel, 0);99 81 this.Controls.SetChildIndex(this.clearButton, 0); 100 this.Controls.SetChildIndex(this.sizeLabel, 0); 101 this.Controls.SetChildIndex(this.sizeTextBox, 0); 102 this.Controls.SetChildIndex(this.hitsTextBox, 0); 82 this.Controls.SetChildIndex(this.hits_sizeLabel, 0); 83 this.Controls.SetChildIndex(this.hits_sizeTextBox, 0); 84 this.Controls.SetChildIndex(this.infoLabel, 0); 85 this.Controls.SetChildIndex(this.nameTextBox, 0); 103 86 this.Controls.SetChildIndex(this.nameLabel, 0); 104 this.Controls.SetChildIndex(this.nameTextBox, 0); 105 this.Controls.SetChildIndex(this.infoLabel, 0); 87 this.Controls.SetChildIndex(this.parameterCollectionView, 0); 106 88 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 107 89 this.ResumeLayout(false); … … 112 94 #endregion 113 95 114 private System.Windows.Forms.Label sizeLabel; 115 private System.Windows.Forms.TextBox sizeTextBox; 116 private System.Windows.Forms.TextBox hitsTextBox; 117 private System.Windows.Forms.Label hitsLabel; 96 private System.Windows.Forms.Label hits_sizeLabel; 97 private System.Windows.Forms.TextBox hits_sizeTextBox; 118 98 private System.Windows.Forms.Button clearButton; 119 99 } -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationCacheView.cs
r6140 r6169 1 1 using System; 2 using System.Windows.Forms; 2 3 using HeuristicLab.Core.Views; 3 4 using HeuristicLab.MainForm; 4 namespace HeuristicLab.Problems.ExternalEvaluation { 5 6 namespace HeuristicLab.Problems.ExternalEvaluation.Views { 5 7 6 8 [View("EvaluationCacheView")] 7 9 [Content(typeof(EvaluationCache), IsDefaultView = true)] 8 public sealed partial class EvaluationCacheView : NamedItemView {10 public sealed partial class EvaluationCacheView : ParameterizedNamedItemView { 9 11 10 12 public new EvaluationCache Content { … … 18 20 19 21 protected override void DeregisterContentEvents() { 20 Content. CacheSizeChanged -= Content_CacheSizeChanged;21 Content. CacheHitsChanged -= Content_CacheHitsChanged;22 Content.SizeChanged -= new System.EventHandler(Content_StatusChanged); 23 Content.HitsChanged -= new System.EventHandler(Content_StatusChanged); 22 24 base.DeregisterContentEvents(); 23 25 } … … 25 27 protected override void RegisterContentEvents() { 26 28 base.RegisterContentEvents(); 27 Content. CacheSizeChanged += Content_CacheSizeChanged;28 Content. CacheHitsChanged += Content_CacheHitsChanged;29 Content.SizeChanged += new System.EventHandler(Content_StatusChanged); 30 Content.HitsChanged += new System.EventHandler(Content_StatusChanged); 29 31 } 30 32 31 32 33 #region Event Handlers (Content) 33 void Content_CacheSizeChanged(object sender, System.EventArgs e) { 34 sizeTextBox.Text = Content.CacheSize.ToString(); 34 void Content_StatusChanged(object sender, EventArgs e) { 35 if (InvokeRequired) 36 Invoke(new EventHandler(Content_StatusChanged), sender, e); 37 else 38 hits_sizeTextBox.Text = string.Format("{0}/{1}", Content.Hits, Content.Size); 35 39 } 36 40 37 void Content_CacheHitsChanged(object sender, System.EventArgs e) {38 hitsTextBox.Text = Content.CacheHits.ToString();39 }40 41 #endregion 41 42 … … 43 44 base.OnContentChanged(); 44 45 if (Content == null) { 45 sizeTextBox.Text = ""; 46 hitsTextBox.Text = ""; 46 hits_sizeTextBox.Text = "#/#"; 47 47 } else { 48 sizeTextBox.Text = Content.CacheSize.ToString(); 49 hitsTextBox.Text = Content.CacheHits.ToString(); 48 Content_StatusChanged(this, EventArgs.Empty); 50 49 } 51 50 } … … 57 56 58 57 #region Event Handlers (child controls) 59 private void clearButton_Click(object sender, System.EventArgs e) {58 private void clearButton_Click(object sender, EventArgs e) { 60 59 Content.Reset(); 61 60 } 62 61 #endregion 63 62 } 64 65 63 } -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationCacheView.resx
r6140 r6169 121 121 <value>107, 17</value> 122 122 </metadata> 123 <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 <value>107, 17</value> 125 </metadata> 123 126 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 127 <value>17, 17</value>
Note: See TracChangeset
for help on using the changeset viewer.