Changeset 9907 for trunk/sources/HeuristicLab.MainForm.WindowsForms
- Timestamp:
- 08/23/13 17:52:50 (11 years ago)
- Location:
- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs
r9894 r9907 25 25 namespace HeuristicLab.MainForm.WindowsForms { 26 26 internal sealed partial class ProgressView : UserControl { 27 private const int defaultControlHeight = 88; 28 private const int collapsedControlHeight = 55; 29 27 30 private readonly Control control; 28 31 public Control Control { … … 80 83 return; 81 84 } 85 int height = Content.CanBeCanceled ? Height : collapsedControlHeight; 86 82 87 Left = (Control.ClientRectangle.Width / 2) - (Width / 2); 83 Top = (Control.ClientRectangle.Height / 2) - ( Height / 2);88 Top = (Control.ClientRectangle.Height / 2) - (height / 2); 84 89 Anchor = AnchorStyles.None; 85 90 … … 127 132 cancelButton.Visible = content != null && content.CanBeCanceled; 128 133 cancelButton.Enabled = content != null && content.CanBeCanceled; 134 135 if (content != null && content.CanBeCanceled) { 136 Height = defaultControlHeight; 137 } else if (content != null && !content.CanBeCanceled) { 138 Height = collapsedControlHeight; 139 } 129 140 } 130 141 -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.designer.cs
r9894 r9907 35 35 /// </summary> 36 36 private void InitializeComponent() { 37 this.components = new System.ComponentModel.Container();38 37 this.progressBar = new System.Windows.Forms.ProgressBar(); 39 38 this.statusLabel = new System.Windows.Forms.Label(); … … 45 44 // progressBar 46 45 // 47 this.progressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 48 46 this.progressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 47 | System.Windows.Forms.AnchorStyles.Right))); 49 48 this.progressBar.Location = new System.Drawing.Point(3, 3); 50 49 this.progressBar.Name = "progressBar"; … … 55 54 // statusLabel 56 55 // 57 this.statusLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 58 56 this.statusLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 57 | System.Windows.Forms.AnchorStyles.Right))); 59 58 this.statusLabel.Location = new System.Drawing.Point(3, 33); 60 59 this.statusLabel.Name = "statusLabel"; … … 75 74 // panel 76 75 // 77 this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 78 | System.Windows.Forms.AnchorStyles.Right))); 76 this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 77 | System.Windows.Forms.AnchorStyles.Left) 78 | System.Windows.Forms.AnchorStyles.Right))); 79 79 this.panel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 80 80 this.panel.Controls.Add(this.progressBar); … … 94 94 this.panel.ResumeLayout(false); 95 95 this.ResumeLayout(false); 96 96 97 } 97 98
Note: See TracChangeset
for help on using the changeset viewer.