Changeset 9730 for branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/PermutationSolutionDictionaryView.cs
- Timestamp:
- 07/22/13 12:05:19 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/PermutationSolutionDictionaryView.cs
r9728 r9730 20 20 #endregion 21 21 22 using System; 23 using System.Linq; 22 24 using System.Windows.Forms; 23 25 using HeuristicLab.Core.Views; 24 26 using HeuristicLab.MainForm; 27 using HeuristicLab.MainForm.WindowsForms; 25 28 26 29 namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views { … … 48 51 completeSizeTextBox.Text = Content.NumberOfCompleteSolutions().ToString(); 49 52 } 50 } 53 } 54 55 protected override void OnInitialized(EventArgs e) { 56 base.OnInitialized(e); 57 var viewTypes = MainFormManager.GetViewTypes(typeof(PermutationSolutionDictionary<PermutationWrapper, PermutationInformation>), true); 58 foreach (Type viewType in viewTypes.OrderBy(x => ViewAttribute.GetViewName(x))) { 59 if ((viewType != typeof(PermutationSolutionDictionaryView)) && (viewType != typeof(ViewHost))) { 60 ToolStripMenuItem menuItem = new ToolStripMenuItem(); 61 menuItem.Text = ViewAttribute.GetViewName(viewType); 62 menuItem.Tag = viewType; 63 menuItem.Click += new EventHandler(menuItem_Click); 64 analyzeToolStripButton.DropDownItems.Add(menuItem); 65 } 66 } 67 } 68 69 private void menuItem_Click(object sender, EventArgs e) { 70 ToolStripMenuItem menuItem = (ToolStripMenuItem)sender; 71 Type viewType = (Type)menuItem.Tag; 72 IContentView view = MainFormManager.MainForm.ShowContent(Content, viewType); 73 if (view != null) { 74 view.Locked = Locked; 75 view.ReadOnly = ReadOnly; 76 } 77 } 51 78 } 52 79 }
Note: See TracChangeset
for help on using the changeset viewer.