Changeset 5832 for trunk/sources/HeuristicLab.Core.Views/3.3
- Timestamp:
- 03/25/11 17:18:58 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Core.Views/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemView.Designer.cs
r5445 r5832 48 48 this.nameLabel = new System.Windows.Forms.Label(); 49 49 this.nameTextBox = new System.Windows.Forms.TextBox(); 50 this.descriptionLabel = new System.Windows.Forms.Label();51 this.descriptionTextBox = new System.Windows.Forms.TextBox();52 50 this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 53 51 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 52 this.infoLabel = new System.Windows.Forms.Label(); 54 53 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 55 54 this.SuspendLayout(); … … 68 67 this.nameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 69 68 | System.Windows.Forms.AnchorStyles.Right))); 70 this.nameTextBox.Location = new System.Drawing.Point( 72, 0);69 this.nameTextBox.Location = new System.Drawing.Point(58, 0); 71 70 this.nameTextBox.Name = "nameTextBox"; 72 this.nameTextBox.Size = new System.Drawing.Size(2 79, 20);71 this.nameTextBox.Size = new System.Drawing.Size(268, 20); 73 72 this.nameTextBox.TabIndex = 1; 74 this.nameTextBox.Validated += new System.EventHandler(this.nameTextBox_Validated);75 73 this.nameTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.nameTextBox_KeyDown); 76 74 this.nameTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.nameTextBox_Validating); 77 // 78 // descriptionLabel 79 // 80 this.descriptionLabel.AutoSize = true; 81 this.descriptionLabel.Location = new System.Drawing.Point(3, 29); 82 this.descriptionLabel.Name = "descriptionLabel"; 83 this.descriptionLabel.Size = new System.Drawing.Size(63, 13); 84 this.descriptionLabel.TabIndex = 2; 85 this.descriptionLabel.Text = "&Description:"; 86 // 87 // descriptionTextBox 88 // 89 this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 90 | System.Windows.Forms.AnchorStyles.Right))); 91 this.descriptionTextBox.Location = new System.Drawing.Point(72, 26); 92 this.descriptionTextBox.Name = "descriptionTextBox"; 93 this.descriptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 94 this.descriptionTextBox.Size = new System.Drawing.Size(279, 20); 95 this.descriptionTextBox.TabIndex = 3; 96 this.descriptionTextBox.DoubleClick += new System.EventHandler(this.descriptionTextBox_DoubleClick); 97 this.descriptionTextBox.Validated += new System.EventHandler(this.descriptionTextBox_Validated); 75 this.nameTextBox.Validated += new System.EventHandler(this.nameTextBox_Validated); 98 76 // 99 77 // errorProvider … … 102 80 this.errorProvider.ContainerControl = this; 103 81 // 82 // infoLabel 83 // 84 this.infoLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 85 this.infoLabel.Image = HeuristicLab.Common.Resources.VSImageLibrary.Information; 86 this.infoLabel.Location = new System.Drawing.Point(332, 3); 87 this.infoLabel.Name = "infoLabel"; 88 this.infoLabel.Size = new System.Drawing.Size(16, 16); 89 this.infoLabel.TabIndex = 2; 90 this.toolTip.SetToolTip(this.infoLabel, "Double-click to open description editor."); 91 this.infoLabel.DoubleClick += new System.EventHandler(this.infoLabel_DoubleClick); 92 // 104 93 // NamedItemView 105 94 // 106 95 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 107 96 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 108 this.Controls.Add(this. descriptionTextBox);97 this.Controls.Add(this.infoLabel); 109 98 this.Controls.Add(this.nameTextBox); 110 this.Controls.Add(this.descriptionLabel);111 99 this.Controls.Add(this.nameLabel); 112 100 this.Name = "NamedItemView"; 113 this.Size = new System.Drawing.Size(351, 52);101 this.Size = new System.Drawing.Size(351, 28); 114 102 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 115 103 this.ResumeLayout(false); … … 122 110 protected System.Windows.Forms.TextBox nameTextBox; 123 111 protected System.Windows.Forms.Label nameLabel; 124 protected System.Windows.Forms.Label descriptionLabel;125 protected System.Windows.Forms.TextBox descriptionTextBox;126 112 protected System.Windows.Forms.ErrorProvider errorProvider; 127 113 protected System.Windows.Forms.ToolTip toolTip; 114 protected System.Windows.Forms.Label infoLabel; 128 115 } 129 116 } -
trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemView.cs
r5445 r5832 33 33 [Content(typeof(INamedItem), false)] 34 34 public partial class NamedItemView : ItemView { 35 private readonly string nl = Environment.NewLine; 36 private const string infoLabelToolTipSuffix = "Double-click to open description editor."; 37 35 38 public new INamedItem Content { 36 39 get { return (INamedItem)base.Content; } … … 59 62 if (Content == null) { 60 63 nameTextBox.Text = string.Empty; 61 descriptionTextBox.Text = string.Empty; 62 toolTip.SetToolTip(descriptionTextBox, string.Empty); 64 toolTip.SetToolTip(infoLabel, string.Empty); 63 65 if (ViewAttribute.HasViewAttribute(this.GetType())) 64 66 this.Caption = ViewAttribute.GetViewName(this.GetType()); … … 67 69 } else { 68 70 nameTextBox.Text = Content.Name; 69 descriptionTextBox.Text = Content.Description; 70 toolTip.SetToolTip(descriptionTextBox, Content.Description); 71 toolTip.SetToolTip(infoLabel, string.IsNullOrEmpty(Content.Description) ? infoLabelToolTipSuffix : Content.Description + nl + nl + infoLabelToolTipSuffix); 71 72 Caption = Content.Name; 72 73 } … … 77 78 if (Content == null) { 78 79 nameTextBox.Enabled = false; 79 descriptionTextBox.Enabled = false;80 infoLabel.Enabled = false; 80 81 } else { 81 82 nameTextBox.Enabled = true; 82 nameTextBox.ReadOnly = ReadOnly || !Content.CanChangeName; ; 83 descriptionTextBox.Enabled = true; 84 descriptionTextBox.ReadOnly = ReadOnly || !Content.CanChangeDescription; 83 nameTextBox.ReadOnly = ReadOnly || !Content.CanChangeName; 84 infoLabel.Enabled = true; 85 85 } 86 86 } … … 98 98 Invoke(new EventHandler(Content_DescriptionChanged), sender, e); 99 99 else { 100 descriptionTextBox.Text = Content.Description; 101 toolTip.SetToolTip(descriptionTextBox, Content.Description); 100 toolTip.SetToolTip(infoLabel, string.IsNullOrEmpty(Content.Description) ? infoLabelToolTipSuffix : Content.Description + nl + nl + infoLabelToolTipSuffix); 102 101 } 103 102 } … … 131 130 } 132 131 } 133 protected virtual void descriptionTextBox_Validated(object sender, EventArgs e) { 134 if (Content.CanChangeDescription) 135 Content.Description = descriptionTextBox.Text; 136 } 137 138 protected void descriptionTextBox_DoubleClick(object sender, EventArgs e) { 139 using (TextDialog dialog = new TextDialog("Description of " + Content.Name, descriptionTextBox.Text, ReadOnly || !Content.CanChangeDescription)) { 132 protected virtual void infoLabel_DoubleClick(object sender, EventArgs e) { 133 using (TextDialog dialog = new TextDialog("Description of " + Content.Name, Content.Description, ReadOnly || !Content.CanChangeDescription)) { 140 134 if (dialog.ShowDialog(this) == DialogResult.OK) 141 135 Content.Description = dialog.Content; -
trunk/sources/HeuristicLab.Core.Views/3.3/ParameterizedNamedItemView.Designer.cs
r5445 r5832 53 53 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 54 54 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 55 this.nameTextBox.Size = new System.Drawing.Size(418, 20); 55 this.nameTextBox.Location = new System.Drawing.Point(59, 0); 56 this.nameTextBox.Size = new System.Drawing.Size(406, 20); 56 57 // 57 // descriptionTextBox58 // infoLabel 58 59 // 59 this. descriptionTextBox.Size = new System.Drawing.Size(418, 20);60 this.infoLabel.Location = new System.Drawing.Point(471, 3); 60 61 // 61 62 // parameterCollectionView … … 64 65 | System.Windows.Forms.AnchorStyles.Left) 65 66 | System.Windows.Forms.AnchorStyles.Right))); 67 this.parameterCollectionView.Caption = "ParameterCollection View"; 66 68 this.parameterCollectionView.Content = null; 67 this.parameterCollectionView.Location = new System.Drawing.Point(0, 52);69 this.parameterCollectionView.Location = new System.Drawing.Point(0, 26); 68 70 this.parameterCollectionView.Name = "parameterCollectionView"; 69 this.parameterCollectionView.Size = new System.Drawing.Size(490, 301); 70 this.parameterCollectionView.TabIndex = 4; 71 this.parameterCollectionView.ReadOnly = false; 72 this.parameterCollectionView.Size = new System.Drawing.Size(490, 327); 73 this.parameterCollectionView.TabIndex = 3; 71 74 // 72 75 // ParameterizedNamedItemView … … 77 80 this.Name = "ParameterizedNamedItemView"; 78 81 this.Size = new System.Drawing.Size(490, 353); 82 this.Controls.SetChildIndex(this.infoLabel, 0); 79 83 this.Controls.SetChildIndex(this.nameTextBox, 0); 80 84 this.Controls.SetChildIndex(this.nameLabel, 0); 81 this.Controls.SetChildIndex(this.descriptionLabel, 0);82 this.Controls.SetChildIndex(this.descriptionTextBox, 0);83 85 this.Controls.SetChildIndex(this.parameterCollectionView, 0); 84 86 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); -
trunk/sources/HeuristicLab.Core.Views/3.3/VariableView.Designer.cs
r5445 r5832 50 50 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 51 51 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 52 this.nameTextBox.Size = new System.Drawing.Size(287, 20); 52 this.nameTextBox.Location = new System.Drawing.Point(69, 0); 53 this.nameTextBox.Size = new System.Drawing.Size(265, 20); 53 54 // 54 // descriptionTextBox55 // infoLabel 55 56 // 56 this. descriptionTextBox.Size = new System.Drawing.Size(287, 20);57 this.infoLabel.Location = new System.Drawing.Point(340, 3); 57 58 // 58 59 // dataTypeLabel 59 60 // 60 61 this.dataTypeLabel.AutoSize = true; 61 this.dataTypeLabel.Location = new System.Drawing.Point(3, 55);62 this.dataTypeLabel.Location = new System.Drawing.Point(3, 29); 62 63 this.dataTypeLabel.Name = "dataTypeLabel"; 63 64 this.dataTypeLabel.Size = new System.Drawing.Size(60, 13); 64 this.dataTypeLabel.TabIndex = 4;65 this.dataTypeLabel.TabIndex = 3; 65 66 this.dataTypeLabel.Text = "Data &Type:"; 66 67 // … … 69 70 this.dataTypeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 70 71 | System.Windows.Forms.AnchorStyles.Right))); 71 this.dataTypeTextBox.Location = new System.Drawing.Point( 72, 52);72 this.dataTypeTextBox.Location = new System.Drawing.Point(69, 26); 72 73 this.dataTypeTextBox.Name = "dataTypeTextBox"; 73 74 this.dataTypeTextBox.ReadOnly = true; 74 this.dataTypeTextBox.Size = new System.Drawing.Size(2 87, 20);75 this.dataTypeTextBox.TabIndex = 5;75 this.dataTypeTextBox.Size = new System.Drawing.Size(290, 20); 76 this.dataTypeTextBox.TabIndex = 4; 76 77 // 77 78 // valueGroupBox … … 83 84 this.valueGroupBox.Controls.Add(this.clearValueButton); 84 85 this.valueGroupBox.Controls.Add(this.setValueButton); 85 this.valueGroupBox.Location = new System.Drawing.Point(0, 78);86 this.valueGroupBox.Location = new System.Drawing.Point(0, 52); 86 87 this.valueGroupBox.Name = "valueGroupBox"; 87 this.valueGroupBox.Size = new System.Drawing.Size(359, 196);88 this.valueGroupBox.TabIndex = 7;88 this.valueGroupBox.Size = new System.Drawing.Size(359, 222); 89 this.valueGroupBox.TabIndex = 5; 89 90 this.valueGroupBox.TabStop = false; 90 91 this.valueGroupBox.Text = "Value"; … … 99 100 this.valuePanel.Location = new System.Drawing.Point(6, 49); 100 101 this.valuePanel.Name = "valuePanel"; 101 this.valuePanel.Size = new System.Drawing.Size(347, 1 41);102 this.valuePanel.Size = new System.Drawing.Size(347, 167); 102 103 this.valuePanel.TabIndex = 2; 103 this.valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver);104 104 this.valuePanel.DragDrop += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragDrop); 105 105 this.valuePanel.DragEnter += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver); 106 this.valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver); 106 107 // 107 108 // viewHost 108 109 // 110 this.viewHost.Caption = "View"; 109 111 this.viewHost.Content = null; 110 112 this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill; 113 this.viewHost.Enabled = false; 111 114 this.viewHost.Location = new System.Drawing.Point(0, 0); 112 115 this.viewHost.Name = "viewHost"; 113 this.viewHost.Size = new System.Drawing.Size(347, 141); 116 this.viewHost.ReadOnly = false; 117 this.viewHost.Size = new System.Drawing.Size(347, 167); 114 118 this.viewHost.TabIndex = 0; 119 this.viewHost.ViewsLabelVisible = true; 115 120 this.viewHost.ViewType = null; 116 121 // … … 132 137 this.setValueButton.Name = "setValueButton"; 133 138 this.setValueButton.Size = new System.Drawing.Size(24, 24); 134 this.setValueButton.TabIndex = 1;139 this.setValueButton.TabIndex = 0; 135 140 this.toolTip.SetToolTip(this.setValueButton, "Set Value"); 136 141 this.setValueButton.UseVisualStyleBackColor = true; … … 146 151 this.Name = "VariableView"; 147 152 this.Size = new System.Drawing.Size(359, 274); 148 this.Controls.SetChildIndex(this. descriptionLabel, 0);153 this.Controls.SetChildIndex(this.infoLabel, 0); 149 154 this.Controls.SetChildIndex(this.dataTypeTextBox, 0); 150 155 this.Controls.SetChildIndex(this.dataTypeLabel, 0); 151 this.Controls.SetChildIndex(this.descriptionTextBox, 0);152 156 this.Controls.SetChildIndex(this.nameTextBox, 0); 153 157 this.Controls.SetChildIndex(this.nameLabel, 0);
Note: See TracChangeset
for help on using the changeset viewer.