Changeset 4441 for branches/OKB/HeuristicLab.Clients.OKB-3.3/Views
- Timestamp:
- 09/20/10 05:15:15 (14 years ago)
- Location:
- branches/OKB/HeuristicLab.Clients.OKB-3.3/Views
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AdministratorView.Designer.cs
r4426 r4441 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container(); 47 48 this.tabControl = new System.Windows.Forms.TabControl(); 49 this.platformsTabPage = new System.Windows.Forms.TabPage(); 50 this.platformCollectionView = new HeuristicLab.Clients.OKB.PlatformCollectionView(); 48 51 this.algorithmClassesTabPage = new System.Windows.Forms.TabPage(); 49 52 this.algorithmClassCollectionView = new HeuristicLab.Clients.OKB.AlgorithmClassCollectionView(); 50 this.refreshButton = new System.Windows.Forms.Button();51 53 this.algorithmsTabPage = new System.Windows.Forms.TabPage(); 52 54 this.algorithmCollectionView = new HeuristicLab.Clients.OKB.AlgorithmCollectionView(); 55 this.refreshButton = new System.Windows.Forms.Button(); 56 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 53 57 this.tabControl.SuspendLayout(); 58 this.platformsTabPage.SuspendLayout(); 54 59 this.algorithmClassesTabPage.SuspendLayout(); 55 60 this.algorithmsTabPage.SuspendLayout(); … … 61 66 | System.Windows.Forms.AnchorStyles.Left) 62 67 | System.Windows.Forms.AnchorStyles.Right))); 68 this.tabControl.Controls.Add(this.platformsTabPage); 63 69 this.tabControl.Controls.Add(this.algorithmClassesTabPage); 64 70 this.tabControl.Controls.Add(this.algorithmsTabPage); … … 67 73 this.tabControl.SelectedIndex = 0; 68 74 this.tabControl.Size = new System.Drawing.Size(727, 406); 69 this.tabControl.TabIndex = 2; 75 this.tabControl.TabIndex = 1; 76 // 77 // platformsTabPage 78 // 79 this.platformsTabPage.Controls.Add(this.platformCollectionView); 80 this.platformsTabPage.Location = new System.Drawing.Point(4, 22); 81 this.platformsTabPage.Name = "platformsTabPage"; 82 this.platformsTabPage.Padding = new System.Windows.Forms.Padding(3); 83 this.platformsTabPage.Size = new System.Drawing.Size(719, 380); 84 this.platformsTabPage.TabIndex = 2; 85 this.platformsTabPage.Text = "Platforms"; 86 this.platformsTabPage.UseVisualStyleBackColor = true; 87 // 88 // platformCollectionView 89 // 90 this.platformCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 91 | System.Windows.Forms.AnchorStyles.Left) 92 | System.Windows.Forms.AnchorStyles.Right))); 93 this.platformCollectionView.Caption = "PlatformCollection View"; 94 this.platformCollectionView.Content = null; 95 this.platformCollectionView.Location = new System.Drawing.Point(6, 6); 96 this.platformCollectionView.Name = "platformCollectionView"; 97 this.platformCollectionView.ReadOnly = false; 98 this.platformCollectionView.Size = new System.Drawing.Size(707, 368); 99 this.platformCollectionView.TabIndex = 0; 70 100 // 71 101 // algorithmClassesTabPage … … 91 121 this.algorithmClassCollectionView.ReadOnly = false; 92 122 this.algorithmClassCollectionView.Size = new System.Drawing.Size(707, 368); 93 this.algorithmClassCollectionView.TabIndex = 3; 94 // 95 // refreshButton 96 // 97 this.refreshButton.Location = new System.Drawing.Point(0, 0); 98 this.refreshButton.Name = "refreshButton"; 99 this.refreshButton.Size = new System.Drawing.Size(75, 23); 100 this.refreshButton.TabIndex = 2; 101 this.refreshButton.Text = "&Refresh"; 102 this.refreshButton.UseVisualStyleBackColor = true; 103 this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click); 123 this.algorithmClassCollectionView.TabIndex = 0; 104 124 // 105 125 // algorithmsTabPage … … 125 145 this.algorithmCollectionView.ReadOnly = false; 126 146 this.algorithmCollectionView.Size = new System.Drawing.Size(707, 368); 127 this.algorithmCollectionView.TabIndex = 2; 147 this.algorithmCollectionView.TabIndex = 0; 148 // 149 // refreshButton 150 // 151 this.refreshButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Refresh; 152 this.refreshButton.Location = new System.Drawing.Point(0, 0); 153 this.refreshButton.Name = "refreshButton"; 154 this.refreshButton.Size = new System.Drawing.Size(24, 24); 155 this.refreshButton.TabIndex = 0; 156 this.toolTip.SetToolTip(this.refreshButton, "Refresh Data"); 157 this.refreshButton.UseVisualStyleBackColor = true; 158 this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click); 128 159 // 129 160 // AdministratorView … … 136 167 this.Size = new System.Drawing.Size(727, 435); 137 168 this.tabControl.ResumeLayout(false); 169 this.platformsTabPage.ResumeLayout(false); 138 170 this.algorithmClassesTabPage.ResumeLayout(false); 139 171 this.algorithmsTabPage.ResumeLayout(false); … … 150 182 private AlgorithmClassCollectionView algorithmClassCollectionView; 151 183 private AlgorithmCollectionView algorithmCollectionView; 184 private System.Windows.Forms.ToolTip toolTip; 185 private System.Windows.Forms.TabPage platformsTabPage; 186 private PlatformCollectionView platformCollectionView; 152 187 153 188 } -
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AdministratorView.cs
r4433 r4441 53 53 base.OnContentChanged(); 54 54 if (Content == null) { 55 platformCollectionView.Content = null; 55 56 algorithmClassCollectionView.Content = null; 56 57 algorithmCollectionView.Content = null; 57 58 } else { 59 platformCollectionView.Content = Content.Platforms; 58 60 algorithmClassCollectionView.Content = Content.AlgorithmClasses; 59 61 algorithmCollectionView.Content = Content.Algorithms; … … 64 66 base.SetEnabledStateOfControls(); 65 67 refreshButton.Enabled = Content != null; 68 platformCollectionView.Enabled = Content != null; 66 69 algorithmClassCollectionView.Enabled = Content != null; 67 70 algorithmCollectionView.Enabled = Content != null; … … 72 75 Invoke(new EventHandler(Content_Refreshing), sender, e); 73 76 } else { 74 Enabled = false;75 77 Cursor = Cursors.AppStarting; 78 refreshButton.Enabled = false; 79 tabControl.Enabled = false; 76 80 } 77 81 } … … 80 84 Invoke(new EventHandler(Content_Refreshed), sender, e); 81 85 } else { 86 platformCollectionView.Content = Content.Platforms; 82 87 algorithmClassCollectionView.Content = Content.AlgorithmClasses; 83 88 algorithmCollectionView.Content = Content.Algorithms; 89 refreshButton.Enabled = true; 90 tabControl.Enabled = true; 84 91 Cursor = Cursors.Default; 85 Enabled = true;86 92 } 87 93 } -
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/NamedOKBItemView.Designer.cs
r4426 r4441 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container();48 47 this.nameLabel = new System.Windows.Forms.Label(); 49 48 this.nameTextBox = new System.Windows.Forms.TextBox(); 50 49 this.descriptionLabel = new System.Windows.Forms.Label(); 51 50 this.descriptionTextBox = new System.Windows.Forms.TextBox(); 52 this.toolTip = new System.Windows.Forms.ToolTip(this.components);51 ((System.ComponentModel.ISupportInitialize)(this.modifiedPictureBox)).BeginInit(); 53 52 this.SuspendLayout(); 53 // 54 // storeButton 55 // 56 this.toolTip.SetToolTip(this.storeButton, "Store Data"); 57 // 58 // modifiedPictureBox 59 // 60 this.modifiedPictureBox.Location = new System.Drawing.Point(308, 3); 61 this.modifiedPictureBox.Size = new System.Drawing.Size(39, 130); 54 62 // 55 63 // nameLabel … … 68 76 this.nameTextBox.Location = new System.Drawing.Point(72, 29); 69 77 this.nameTextBox.Name = "nameTextBox"; 70 this.nameTextBox.Size = new System.Drawing.Size(2 79, 20);78 this.nameTextBox.Size = new System.Drawing.Size(230, 20); 71 79 this.nameTextBox.TabIndex = 2; 80 this.nameTextBox.TextChanged += new System.EventHandler(this.nameTextBox_TextChanged); 72 81 this.nameTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.nameTextBox_KeyDown); 73 this.nameTextBox.Validated += new System.EventHandler(this.nameTextBox_Validated);74 82 // 75 83 // descriptionLabel … … 89 97 this.descriptionTextBox.Name = "descriptionTextBox"; 90 98 this.descriptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 91 this.descriptionTextBox.Size = new System.Drawing.Size(2 79, 20);99 this.descriptionTextBox.Size = new System.Drawing.Size(230, 20); 92 100 this.descriptionTextBox.TabIndex = 4; 101 this.descriptionTextBox.TextChanged += new System.EventHandler(this.descriptionTextBox_TextChanged); 93 102 this.descriptionTextBox.DoubleClick += new System.EventHandler(this.descriptionTextBox_DoubleClick); 94 this.descriptionTextBox.Validated += new System.EventHandler(this.descriptionTextBox_Validated);95 103 // 96 104 // NamedOKBItemView … … 103 111 this.Controls.Add(this.nameTextBox); 104 112 this.Name = "NamedOKBItemView"; 105 this.Size = new System.Drawing.Size(351, 80); 113 this.Size = new System.Drawing.Size(350, 229); 114 this.Controls.SetChildIndex(this.modifiedPictureBox, 0); 106 115 this.Controls.SetChildIndex(this.storeButton, 0); 107 116 this.Controls.SetChildIndex(this.nameTextBox, 0); … … 109 118 this.Controls.SetChildIndex(this.descriptionLabel, 0); 110 119 this.Controls.SetChildIndex(this.descriptionTextBox, 0); 120 ((System.ComponentModel.ISupportInitialize)(this.modifiedPictureBox)).EndInit(); 111 121 this.ResumeLayout(false); 112 122 this.PerformLayout(); … … 120 130 protected System.Windows.Forms.Label descriptionLabel; 121 131 protected System.Windows.Forms.TextBox descriptionTextBox; 122 protected System.Windows.Forms.ToolTip toolTip;123 132 } 124 133 } -
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/NamedOKBItemView.cs
r4426 r4441 91 91 } 92 92 } 93 protected virtual void nameTextBox_Validated(object sender, EventArgs e) { 94 Content.Name = nameTextBox.Text; 93 protected virtual void nameTextBox_TextChanged(object sender, EventArgs e) { 94 if (nameTextBox.Text != Content.Name) 95 Content.Name = nameTextBox.Text; 95 96 } 96 protected virtual void descriptionTextBox_Validated(object sender, EventArgs e) { 97 Content.Description = descriptionTextBox.Text; 97 protected virtual void descriptionTextBox_TextChanged(object sender, EventArgs e) { 98 if (descriptionTextBox.Text != Content.Description) 99 Content.Description = descriptionTextBox.Text; 98 100 } 99 101 -
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/OKBItemView.Designer.cs
r4426 r4441 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container(); 47 48 this.storeButton = new System.Windows.Forms.Button(); 49 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 50 this.modifiedPictureBox = new System.Windows.Forms.PictureBox(); 51 ((System.ComponentModel.ISupportInitialize)(this.modifiedPictureBox)).BeginInit(); 48 52 this.SuspendLayout(); 49 53 // 50 54 // storeButton 51 55 // 56 this.storeButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.PublishToWeb; 52 57 this.storeButton.Location = new System.Drawing.Point(0, 0); 53 58 this.storeButton.Name = "storeButton"; 54 this.storeButton.Size = new System.Drawing.Size( 75, 23);59 this.storeButton.Size = new System.Drawing.Size(24, 24); 55 60 this.storeButton.TabIndex = 0; 56 this. storeButton.Text = "&Store";61 this.toolTip.SetToolTip(this.storeButton, "Store Data"); 57 62 this.storeButton.UseVisualStyleBackColor = true; 58 63 this.storeButton.Click += new System.EventHandler(this.storeButton_Click); 64 // 65 // modifiedPictureBox 66 // 67 this.modifiedPictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 68 this.modifiedPictureBox.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.HighPriorityLarge; 69 this.modifiedPictureBox.Location = new System.Drawing.Point(312, 3); 70 this.modifiedPictureBox.Name = "modifiedPictureBox"; 71 this.modifiedPictureBox.Size = new System.Drawing.Size(39, 130); 72 this.modifiedPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; 73 this.modifiedPictureBox.TabIndex = 1; 74 this.modifiedPictureBox.TabStop = false; 75 this.toolTip.SetToolTip(this.modifiedPictureBox, "Data Modified"); 76 this.modifiedPictureBox.Visible = false; 59 77 // 60 78 // OKBItemView … … 62 80 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 63 81 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 82 this.Controls.Add(this.modifiedPictureBox); 64 83 this.Controls.Add(this.storeButton); 65 84 this.Name = "OKBItemView"; 66 this.Size = new System.Drawing.Size(315, 292); 85 this.Size = new System.Drawing.Size(354, 308); 86 ((System.ComponentModel.ISupportInitialize)(this.modifiedPictureBox)).EndInit(); 67 87 this.ResumeLayout(false); 68 88 … … 72 92 73 93 protected System.Windows.Forms.Button storeButton; 94 protected System.Windows.Forms.ToolTip toolTip; 95 protected System.Windows.Forms.PictureBox modifiedPictureBox; 74 96 75 97 -
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/OKBItemView.cs
r4426 r4441 43 43 protected override void DeregisterContentEvents() { 44 44 Content.PropertyChanged -= new PropertyChangedEventHandler(Content_PropertyChanged); 45 Content.ModifiedChanged -= new EventHandler(Content_ModifiedChanged); 45 46 base.DeregisterContentEvents(); 46 47 } … … 48 49 base.RegisterContentEvents(); 49 50 Content.PropertyChanged += new PropertyChangedEventHandler(Content_PropertyChanged); 51 Content.ModifiedChanged += new EventHandler(Content_ModifiedChanged); 50 52 } 51 53 52 54 protected override void SetEnabledStateOfControls() { 53 55 base.SetEnabledStateOfControls(); 54 storeButton.Enabled = Content != null; 56 storeButton.Enabled = (Content != null) && Content.Modified; 57 modifiedPictureBox.Visible = (Content != null) && Content.Modified; 55 58 } 56 59 … … 63 66 } 64 67 protected virtual void OnContentPropertyChanged(string propertyName) { } 68 protected virtual void Content_ModifiedChanged(object sender, EventArgs e) { 69 if (InvokeRequired) 70 Invoke(new EventHandler(Content_ModifiedChanged), sender, e); 71 else { 72 storeButton.Enabled = Content.Modified; 73 modifiedPictureBox.Visible = Content.Modified; 74 } 75 } 65 76 66 77 protected virtual void storeButton_Click(object sender, EventArgs e) {
Note: See TracChangeset
for help on using the changeset viewer.