Changeset 4435 for trunk/sources/HeuristicLab.Core.Views/3.3
- Timestamp:
- 09/19/10 19:43:05 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Core.Views/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/Clipboard.cs
r3904 r4435 182 182 try { 183 183 i++; 184 SetEnabledStateOfContentViews(item, false); 184 185 XmlGenerator.Serialize(item, ItemsPath + Path.DirectorySeparatorChar + i.ToString("00000000") + ".hl", 9); 185 186 OnItemSaved(item, progressBar.Maximum / listView.Items.Count); … … 192 193 if (item != null) { 193 194 if (InvokeRequired) 194 Invoke(new Action<T, int>(OnItem Loaded), item, progress);195 else 195 Invoke(new Action<T, int>(OnItemSaved), item, progress); 196 else { 196 197 progressBar.Value += progress; 198 SetEnabledStateOfContentViews(item, true); 199 } 197 200 } 198 201 } … … 203 206 Enabled = true; 204 207 infoPanel.Visible = false; 208 } 209 } 210 211 private void SetEnabledStateOfContentViews(IItem item, bool enabled) { 212 if (InvokeRequired) 213 Invoke((Action<IItem, bool>)SetEnabledStateOfContentViews, item, enabled); 214 else { 215 var views = MainFormManager.MainForm.Views.OfType<IContentView>().Where(v => v.Content == item).ToList(); 216 views.ForEach(v => v.Enabled = enabled); 205 217 } 206 218 } -
trunk/sources/HeuristicLab.Core.Views/3.3/VariableValueView.Designer.cs
r3281 r4435 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.valuePanel = new System.Windows.Forms.Panel();48 47 this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 49 this.valuePanel.SuspendLayout();50 48 this.SuspendLayout(); 51 //52 // valuePanel53 //54 this.valuePanel.AllowDrop = true;55 this.valuePanel.Controls.Add(this.viewHost);56 this.valuePanel.Dock = System.Windows.Forms.DockStyle.Fill;57 this.valuePanel.Location = new System.Drawing.Point(0, 0);58 this.valuePanel.Name = "valuePanel";59 this.valuePanel.Size = new System.Drawing.Size(359, 274);60 this.valuePanel.TabIndex = 0;61 this.valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver);62 this.valuePanel.DragDrop += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragDrop);63 this.valuePanel.DragEnter += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver);64 49 // 65 50 // viewHost 66 51 // 52 this.viewHost.Caption = "View"; 67 53 this.viewHost.Content = null; 68 54 this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill; 69 55 this.viewHost.Location = new System.Drawing.Point(0, 0); 70 56 this.viewHost.Name = "viewHost"; 57 this.viewHost.ReadOnly = false; 71 58 this.viewHost.Size = new System.Drawing.Size(359, 274); 72 59 this.viewHost.TabIndex = 0; … … 77 64 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 78 65 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 79 this.Controls.Add(this.v aluePanel);66 this.Controls.Add(this.viewHost); 80 67 this.Name = "VariableValueView"; 81 68 this.Size = new System.Drawing.Size(359, 274); 82 this.valuePanel.ResumeLayout(false);83 69 this.ResumeLayout(false); 84 70 … … 87 73 #endregion 88 74 89 protected HeuristicLab.MainForm.WindowsForms.ViewHost viewHost;90 protected System.Windows.Forms.Panel valuePanel; 75 protected MainForm.WindowsForms.ViewHost viewHost; 76 91 77 } 92 78 } -
trunk/sources/HeuristicLab.Core.Views/3.3/VariableValueView.cs
r4068 r4435 77 77 } 78 78 79 protected override void SetEnabledStateOfControls() {80 base.SetEnabledStateOfControls();81 valuePanel.Enabled = Content != null;82 }83 84 79 protected virtual void Content_ValueChanged(object sender, EventArgs e) { 85 80 if (InvokeRequired)
Note: See TracChangeset
for help on using the changeset viewer.