Changeset 8393 for branches/HeuristicLab.Mono/HeuristicLab.Optimizer/3.3
- Timestamp:
- 08/02/12 16:05:46 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Mono/HeuristicLab.Optimizer/3.3/FileManager.cs
r7259 r8393 143 143 private static void SetEnabledStateOfContentViews(IStorableContent content, bool enabled) { 144 144 HeuristicLab.MainForm.WindowsForms.MainForm mainForm = MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>(); 145 if (mainForm.InvokeRequired) 146 mainForm.Invoke((Action<IStorableContent, bool>)SetEnabledStateOfContentViews, content, enabled); 147 else { 148 var views = MainFormManager.MainForm.Views.OfType<IContentView>().Where(v => v.Content == content).ToList(); 149 views.ForEach(v => v.Enabled = enabled); 150 } 145 mainForm.Invoke((Action)delegate { 146 var views = MainFormManager.MainForm.Views.OfType<IContentView>().Where(v => v.Content == content).ToList(); 147 views.ForEach(v => v.Enabled = enabled); 148 }); 151 149 } 152 150 }
Note: See TracChangeset
for help on using the changeset viewer.