- Timestamp:
- 11/27/14 09:35:43 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Breadcrumbs/HeuristicLab.Core.Views/3.3/ItemListView.cs
r10103 r11591 146 146 try { 147 147 return (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 148 } catch (Exception ex) { 148 } 149 catch (Exception ex) { 149 150 ErrorHandling.ShowErrorDialog(this, ex); 150 151 } … … 242 243 (Content != null) && !Content.IsReadOnly && !ReadOnly; 243 244 AdjustListViewColumnSizes(); 244 if (itemsListView.SelectedItems.Count == 1) { 245 var item = (T)itemsListView.SelectedItems[0].Tag; 246 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>(); 247 var outermostViewHost = mainForm.ShowContentInOutermostViewHost(item, this, true); 248 if (outermostViewHost != null && outermostViewHost.HotlinkingEnabled) { 249 outermostViewHost.ActiveView.ReadOnly = ReadOnly; 250 outermostViewHost.ActiveView.Locked = Locked; 245 246 if (showDetailsCheckBox.Checked) { 247 if (itemsListView.SelectedItems.Count == 1) { 248 T item = (T)itemsListView.SelectedItems[0].Tag; 249 detailsGroupBox.Enabled = true; 250 viewHost.Content = item; 251 251 } else { 252 if (showDetailsCheckBox.Checked) { 253 detailsGroupBox.Enabled = true; 254 viewHost.Content = item; 255 } else { 256 viewHost.Content = null; 257 detailsGroupBox.Enabled = false; 258 } 252 viewHost.Content = null; 253 detailsGroupBox.Enabled = false; 259 254 } 260 255 } … … 272 267 protected virtual void itemsListView_DoubleClick(object sender, EventArgs e) { 273 268 if (itemsListView.SelectedItems.Count == 1) { 274 var item = (T)itemsListView.SelectedItems[0].Tag; 275 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>(); 276 var outermostViewHost = mainForm.ShowContentInOutermostViewHost(item, this); 277 if (outermostViewHost != null) { 278 outermostViewHost.ActiveView.ReadOnly = ReadOnly; 279 outermostViewHost.ActiveView.Locked = Locked; 269 T item = itemsListView.SelectedItems[0].Tag as T; 270 if (item != null) { 271 IContentView view = MainFormManager.MainForm.ShowContent(item); 272 if (view != null) { 273 view.ReadOnly = ReadOnly; 274 view.Locked = Locked; 275 } 280 276 } 281 277 }
Note: See TracChangeset
for help on using the changeset viewer.