Changeset 3693
- Timestamp:
- 05/07/10 03:59:59 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/PathTSPTourView.Designer.cs
r3158 r3693 46 46 private void InitializeComponent() { 47 47 this.pictureBox = new System.Windows.Forms.PictureBox(); 48 this.tabControl = new System.Windows.Forms.TabControl(); 49 this.visualizationTabPage = new System.Windows.Forms.TabPage(); 50 this.valueTabPage = new System.Windows.Forms.TabPage(); 51 this.tourGroupBox = new System.Windows.Forms.GroupBox(); 52 this.tourViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 53 this.splitContainer = new System.Windows.Forms.SplitContainer(); 54 this.qualityGroupBox = new System.Windows.Forms.GroupBox(); 55 this.qualityViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 48 56 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); 57 this.tabControl.SuspendLayout(); 58 this.visualizationTabPage.SuspendLayout(); 59 this.valueTabPage.SuspendLayout(); 60 this.tourGroupBox.SuspendLayout(); 61 this.splitContainer.Panel1.SuspendLayout(); 62 this.splitContainer.Panel2.SuspendLayout(); 63 this.splitContainer.SuspendLayout(); 64 this.qualityGroupBox.SuspendLayout(); 49 65 this.SuspendLayout(); 50 66 // … … 56 72 this.pictureBox.BackColor = System.Drawing.Color.White; 57 73 this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 58 this.pictureBox.Location = new System.Drawing.Point( 0, 0);74 this.pictureBox.Location = new System.Drawing.Point(6, 6); 59 75 this.pictureBox.Name = "pictureBox"; 60 this.pictureBox.Size = new System.Drawing.Size( 392, 310);76 this.pictureBox.Size = new System.Drawing.Size(403, 288); 61 77 this.pictureBox.TabIndex = 0; 62 78 this.pictureBox.TabStop = false; 63 79 this.pictureBox.SizeChanged += new System.EventHandler(this.pictureBox_SizeChanged); 64 80 // 81 // tabControl 82 // 83 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 84 | System.Windows.Forms.AnchorStyles.Left) 85 | System.Windows.Forms.AnchorStyles.Right))); 86 this.tabControl.Controls.Add(this.visualizationTabPage); 87 this.tabControl.Controls.Add(this.valueTabPage); 88 this.tabControl.Location = new System.Drawing.Point(0, 3); 89 this.tabControl.Name = "tabControl"; 90 this.tabControl.SelectedIndex = 0; 91 this.tabControl.Size = new System.Drawing.Size(423, 326); 92 this.tabControl.TabIndex = 0; 93 // 94 // visualizationTabPage 95 // 96 this.visualizationTabPage.Controls.Add(this.pictureBox); 97 this.visualizationTabPage.Location = new System.Drawing.Point(4, 22); 98 this.visualizationTabPage.Name = "visualizationTabPage"; 99 this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3); 100 this.visualizationTabPage.Size = new System.Drawing.Size(415, 300); 101 this.visualizationTabPage.TabIndex = 0; 102 this.visualizationTabPage.Text = "Visualization"; 103 this.visualizationTabPage.UseVisualStyleBackColor = true; 104 // 105 // valueTabPage 106 // 107 this.valueTabPage.Controls.Add(this.tourGroupBox); 108 this.valueTabPage.Location = new System.Drawing.Point(4, 22); 109 this.valueTabPage.Name = "valueTabPage"; 110 this.valueTabPage.Padding = new System.Windows.Forms.Padding(3); 111 this.valueTabPage.Size = new System.Drawing.Size(415, 300); 112 this.valueTabPage.TabIndex = 1; 113 this.valueTabPage.Text = "Value"; 114 this.valueTabPage.UseVisualStyleBackColor = true; 115 // 116 // tourGroupBox 117 // 118 this.tourGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 119 | System.Windows.Forms.AnchorStyles.Left) 120 | System.Windows.Forms.AnchorStyles.Right))); 121 this.tourGroupBox.Controls.Add(this.tourViewHost); 122 this.tourGroupBox.Location = new System.Drawing.Point(6, 6); 123 this.tourGroupBox.Name = "tourGroupBox"; 124 this.tourGroupBox.Size = new System.Drawing.Size(403, 288); 125 this.tourGroupBox.TabIndex = 0; 126 this.tourGroupBox.TabStop = false; 127 this.tourGroupBox.Text = "Tour"; 128 // 129 // tourViewHost 130 // 131 this.tourViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 132 | System.Windows.Forms.AnchorStyles.Left) 133 | System.Windows.Forms.AnchorStyles.Right))); 134 this.tourViewHost.Caption = null; 135 this.tourViewHost.Content = null; 136 this.tourViewHost.Location = new System.Drawing.Point(6, 19); 137 this.tourViewHost.Name = "tourViewHost"; 138 this.tourViewHost.ReadOnly = false; 139 this.tourViewHost.Size = new System.Drawing.Size(391, 263); 140 this.tourViewHost.TabIndex = 0; 141 this.tourViewHost.ViewType = null; 142 // 143 // splitContainer 144 // 145 this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; 146 this.splitContainer.Location = new System.Drawing.Point(0, 0); 147 this.splitContainer.Name = "splitContainer"; 148 this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; 149 // 150 // splitContainer.Panel1 151 // 152 this.splitContainer.Panel1.Controls.Add(this.qualityGroupBox); 153 // 154 // splitContainer.Panel2 155 // 156 this.splitContainer.Panel2.Controls.Add(this.tabControl); 157 this.splitContainer.Size = new System.Drawing.Size(423, 402); 158 this.splitContainer.SplitterDistance = 69; 159 this.splitContainer.TabIndex = 0; 160 // 161 // qualityGroupBox 162 // 163 this.qualityGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 164 | System.Windows.Forms.AnchorStyles.Left) 165 | System.Windows.Forms.AnchorStyles.Right))); 166 this.qualityGroupBox.Controls.Add(this.qualityViewHost); 167 this.qualityGroupBox.Location = new System.Drawing.Point(0, 0); 168 this.qualityGroupBox.Name = "qualityGroupBox"; 169 this.qualityGroupBox.Size = new System.Drawing.Size(423, 66); 170 this.qualityGroupBox.TabIndex = 0; 171 this.qualityGroupBox.TabStop = false; 172 this.qualityGroupBox.Text = "Quality"; 173 // 174 // qualityViewHost 175 // 176 this.qualityViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 177 | System.Windows.Forms.AnchorStyles.Left) 178 | System.Windows.Forms.AnchorStyles.Right))); 179 this.qualityViewHost.Caption = null; 180 this.qualityViewHost.Content = null; 181 this.qualityViewHost.Location = new System.Drawing.Point(6, 19); 182 this.qualityViewHost.Name = "qualityViewHost"; 183 this.qualityViewHost.ReadOnly = false; 184 this.qualityViewHost.Size = new System.Drawing.Size(411, 41); 185 this.qualityViewHost.TabIndex = 0; 186 this.qualityViewHost.ViewType = null; 187 // 65 188 // PathTSPTourView 66 189 // 67 190 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 68 191 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 69 this.Controls.Add(this. pictureBox);192 this.Controls.Add(this.splitContainer); 70 193 this.Name = "PathTSPTourView"; 71 this.Size = new System.Drawing.Size( 392, 310);194 this.Size = new System.Drawing.Size(423, 402); 72 195 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); 196 this.tabControl.ResumeLayout(false); 197 this.visualizationTabPage.ResumeLayout(false); 198 this.valueTabPage.ResumeLayout(false); 199 this.tourGroupBox.ResumeLayout(false); 200 this.splitContainer.Panel1.ResumeLayout(false); 201 this.splitContainer.Panel2.ResumeLayout(false); 202 this.splitContainer.ResumeLayout(false); 203 this.qualityGroupBox.ResumeLayout(false); 73 204 this.ResumeLayout(false); 74 205 … … 78 209 79 210 private System.Windows.Forms.PictureBox pictureBox; 211 private System.Windows.Forms.TabControl tabControl; 212 private System.Windows.Forms.TabPage visualizationTabPage; 213 private System.Windows.Forms.TabPage valueTabPage; 214 private System.Windows.Forms.GroupBox tourGroupBox; 215 private HeuristicLab.MainForm.WindowsForms.ViewHost tourViewHost; 216 private System.Windows.Forms.SplitContainer splitContainer; 217 private System.Windows.Forms.GroupBox qualityGroupBox; 218 private HeuristicLab.MainForm.WindowsForms.ViewHost qualityViewHost; 80 219 81 220 -
trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/PathTSPTourView.cs
r3566 r3693 48 48 49 49 protected override void DeregisterContentEvents() { 50 Content.QualityChanged -= new EventHandler(Content_QualityChanged); 50 51 Content.CoordinatesChanged -= new EventHandler(Content_CoordinatesChanged); 51 52 Content.PermutationChanged -= new EventHandler(Content_PermutationChanged); … … 54 55 protected override void RegisterContentEvents() { 55 56 base.RegisterContentEvents(); 57 Content.QualityChanged += new EventHandler(Content_QualityChanged); 56 58 Content.CoordinatesChanged += new EventHandler(Content_CoordinatesChanged); 57 59 Content.PermutationChanged += new EventHandler(Content_PermutationChanged); … … 61 63 base.OnContentChanged(); 62 64 if (Content == null) { 65 qualityViewHost.Content = null; 63 66 pictureBox.Image = null; 67 tourViewHost.Content = null; 64 68 } else { 69 qualityViewHost.Content = Content.Quality; 65 70 GenerateImage(); 71 tourViewHost.Content = Content.Permutation; 66 72 } 67 73 SetEnabledStateOfControls(); … … 74 80 75 81 private void SetEnabledStateOfControls() { 82 qualityGroupBox.Enabled = Content != null; 76 83 pictureBox.Enabled = Content != null; 84 tourGroupBox.Enabled = Content != null; 77 85 } 78 86 … … 121 129 } 122 130 131 private void Content_QualityChanged(object sender, EventArgs e) { 132 if (InvokeRequired) 133 Invoke(new EventHandler(Content_QualityChanged), sender, e); 134 else 135 qualityViewHost.Content = Content.Quality; 136 } 123 137 private void Content_CoordinatesChanged(object sender, EventArgs e) { 124 138 if (InvokeRequired) … … 130 144 if (InvokeRequired) 131 145 Invoke(new EventHandler(Content_PermutationChanged), sender, e); 132 else 146 else { 133 147 GenerateImage(); 148 tourViewHost.Content = Content.Permutation; 149 } 134 150 } 135 151
Note: See TracChangeset
for help on using the changeset viewer.