Ignore:
Timestamp:
10/15/15 16:41:12 (5 years ago)
Author:
jkarder
Message:

#2116: added new breadcrumb navigation prototype

Location:
trunk/sources/HeuristicLab.Core.Views/3.3
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/HeuristicLab.Core.Views-3.3.csproj

    r11623 r13014  
    123123  <ItemGroup>
    124124    <None Include="Plugin.cs.frame" />
     125    <Compile Include="BreadcrumbViewHost.cs">
     126      <SubType>UserControl</SubType>
     127    </Compile>
     128    <Compile Include="BreadcrumbViewHost.Designer.cs">
     129      <DependentUpon>BreadcrumbViewHost.cs</DependentUpon>
     130    </Compile>
    125131    <Compile Include="CheckedItemCollectionView.cs">
    126132      <SubType>UserControl</SubType>
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs

    r12618 r13014  
    277277        T item = itemsListView.SelectedItems[0].Tag as T;
    278278        if (item != null) {
    279           IContentView view = MainFormManager.MainForm.ShowContent(item);
    280           if (view != null) {
    281             view.ReadOnly = ReadOnly;
    282             view.Locked = Locked;
     279          Control c = this;
     280          BreadcrumbViewHost bcvh;
     281
     282          do {
     283            c = c.Parent;
     284            bcvh = c as BreadcrumbViewHost;
     285          } while ((bcvh == null || !bcvh.EnableBreadcrumbs) && c != null);
     286
     287          if (bcvh != null) {
     288            bcvh.AddBreadcrumbs(bcvh.Content);
     289            bcvh.AddBreadcrumbs(item);
     290            bcvh.Content = item;
     291            bcvh.ReadOnly = ReadOnly;
     292            bcvh.Locked = Locked;
     293          } else {
     294            IContentView view = MainFormManager.MainForm.ShowContent(item);
     295            if (view != null) {
     296              view.ReadOnly = ReadOnly;
     297              view.Locked = Locked;
     298            }
    283299          }
    284300        }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ParameterCollectionView.cs

    r12012 r13014  
    2727using HeuristicLab.Collections;
    2828using HeuristicLab.MainForm;
     29using HeuristicLab.MainForm.WindowsForms;
    2930
    3031namespace HeuristicLab.Core.Views {
     
    154155        IParameter item = itemsListView.SelectedItems[0].Tag as IParameter;
    155156        if (item != null) {
    156           IContentView view = MainFormManager.MainForm.ShowContent(item);
    157           if (view != null) {
    158             view.ReadOnly = ReadOnly || (item.Hidden && !AllowEditingOfHiddenParameters);
    159             view.Locked = Locked;
     157          Control c = this;
     158          BreadcrumbViewHost bcvh;
     159
     160          do {
     161            c = c.Parent;
     162            bcvh = c as BreadcrumbViewHost;
     163          } while ((bcvh == null || !bcvh.EnableBreadcrumbs) && c != null);
     164
     165          if (bcvh != null) {
     166            bcvh.AddBreadcrumbs(bcvh.Content);
     167            bcvh.AddBreadcrumbs(item);
     168            bcvh.Content = item;
     169            bcvh.ReadOnly = ReadOnly || (item.Hidden && !AllowEditingOfHiddenParameters);
     170            bcvh.Locked = Locked;
     171          } else {
     172            IContentView view = MainFormManager.MainForm.ShowContent(item);
     173            if (view != null) {
     174              view.ReadOnly = ReadOnly || (item.Hidden && !AllowEditingOfHiddenParameters);
     175              view.Locked = Locked;
     176            }
    160177          }
    161178        }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ParameterizedNamedItemView.Designer.cs

    r12012 r13014  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView();
     47      this.parameterCollectionView = new HeuristicLab.Core.Views.BreadcrumbViewHost();
    4848      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    4949      this.SuspendLayout();
     
    7272      this.parameterCollectionView.Size = new System.Drawing.Size(490, 327);
    7373      this.parameterCollectionView.TabIndex = 3;
     74      this.parameterCollectionView.ViewsLabelVisible = false;
    7475      //
    7576      // ParameterizedNamedItemView
     
    9293    #endregion
    9394
    94     protected ParameterCollectionView parameterCollectionView;
     95    protected HeuristicLab.Core.Views.BreadcrumbViewHost parameterCollectionView;
    9596
    9697  }
Note: See TracChangeset for help on using the changeset viewer.