Changeset 13244


Ignore:
Timestamp:
11/18/15 12:30:56 (4 years ago)
Author:
jkarder
Message:

#2116: worked on breadcrumb navigation

  • OperatorGraphView now checks for IOperatorGraphOperator instead of AlgorithmOperator
  • removed breadcrumbs from collection views
Location:
trunk/sources
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs

    r13014 r13244  
    277277        T item = itemsListView.SelectedItems[0].Tag as T;
    278278        if (item != null) {
    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             }
     279          IContentView view = MainFormManager.MainForm.ShowContent(item);
     280          if (view != null) {
     281            view.ReadOnly = ReadOnly;
     282            view.Locked = Locked;
    299283          }
    300284        }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ParameterCollectionView.cs

    r13014 r13244  
    2727using HeuristicLab.Collections;
    2828using HeuristicLab.MainForm;
    29 using HeuristicLab.MainForm.WindowsForms;
    3029
    3130namespace HeuristicLab.Core.Views {
     
    155154        IParameter item = itemsListView.SelectedItems[0].Tag as IParameter;
    156155        if (item != null) {
    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             }
     156          IContentView view = MainFormManager.MainForm.ShowContent(item);
     157          if (view != null) {
     158            view.ReadOnly = ReadOnly || (item.Hidden && !AllowEditingOfHiddenParameters);
     159            view.Locked = Locked;
    177160          }
    178161        }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ParameterizedNamedItemView.Designer.cs

    r13014 r13244  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.parameterCollectionView = new HeuristicLab.Core.Views.BreadcrumbViewHost();
     47      this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView();
    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;
    7574      //
    7675      // ParameterizedNamedItemView
     
    9392    #endregion
    9493
    95     protected HeuristicLab.Core.Views.BreadcrumbViewHost parameterCollectionView;
     94    protected ParameterCollectionView parameterCollectionView;
    9695
    9796  }
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/OperatorGraphView.cs

    r13014 r13244  
    141141          if (shapeInfo != null) {
    142142            IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
    143             AlgorithmOperator algOp = op as AlgorithmOperator;
     143            IOperatorGraphOperator graphOp = op as IOperatorGraphOperator;
    144144
    145145            Control c = this;
     
    151151            } while ((vh == null || !vh.EnableBreadcrumbs) && c != null);
    152152
    153             if (algOp != null && vh != null) {
     153            if (graphOp != null && vh != null) {
    154154              vh.AddBreadcrumbs(vh.Content);
    155               vh.AddBreadcrumb(algOp.Name, algOp.OperatorGraph);
    156               vh.Content = algOp.OperatorGraph;
     155              vh.AddBreadcrumb(graphOp.Name, graphOp.OperatorGraph);
     156              vh.Content = graphOp.OperatorGraph;
    157157              vh.ReadOnly = ReadOnly;
    158158              vh.Locked = Locked;
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.Designer.cs

    r13014 r13244  
    4141      this.newProblemButton = new System.Windows.Forms.Button();
    4242      this.parametersTabPage = new System.Windows.Forms.TabPage();
    43       this.parameterCollectionView = new HeuristicLab.Core.Views.BreadcrumbViewHost();
     43      this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView();
    4444      this.resultsTabPage = new System.Windows.Forms.TabPage();
    4545      this.resultsView = new HeuristicLab.Optimization.Views.ResultCollectionView();
     
    179179      // parameterCollectionView
    180180      //
     181      this.parameterCollectionView.AllowEditingOfHiddenParameters = true;
    181182      this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    182183            | System.Windows.Forms.AnchorStyles.Left)
     
    184185      this.parameterCollectionView.Caption = "ParameterCollection View";
    185186      this.parameterCollectionView.Content = null;
    186       this.parameterCollectionView.EnableBreadcrumbs = true;
    187187      this.parameterCollectionView.Location = new System.Drawing.Point(6, 6);
    188188      this.parameterCollectionView.Name = "parameterCollectionView";
     
    190190      this.parameterCollectionView.Size = new System.Drawing.Size(659, 388);
    191191      this.parameterCollectionView.TabIndex = 0;
    192       this.parameterCollectionView.ViewsLabelVisible = false;
    193192      //
    194193      // resultsTabPage
     
    298297    protected System.Windows.Forms.TabPage parametersTabPage;
    299298    protected System.Windows.Forms.TabPage problemTabPage;
    300     protected HeuristicLab.Core.Views.BreadcrumbViewHost parameterCollectionView;
     299    protected HeuristicLab.Core.Views.ParameterCollectionView parameterCollectionView;
    301300    protected HeuristicLab.MainForm.WindowsForms.ViewHost problemViewHost;
    302301    protected System.Windows.Forms.Button newProblemButton;
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs

    r13014 r13244  
    8888      } else {
    8989        parameterCollectionView.Content = Content.Parameters;
    90         var view = parameterCollectionView.ActiveView as ParameterCollectionView;
    91         if (view != null) view.AllowEditingOfHiddenParameters = true;
    9290        problemViewHost.ViewType = null;
    9391        problemViewHost.Content = Content.Problem;
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/ProblemView.Designer.cs

    r13014 r13244  
    5858      // parameterCollectionView
    5959      //
    60       this.parameterCollectionView.EnableBreadcrumbs = true;
    6160      this.parameterCollectionView.Location = new System.Drawing.Point(6, 27);
    6261      this.parameterCollectionView.Size = new System.Drawing.Size(501, 303);
Note: See TracChangeset for help on using the changeset viewer.