Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/02/14 14:41:45 (10 years ago)
Author:
pfleck
Message:

#2208 Hide Quality Penalty and Distance values in OrienteeringSolutionView when no solution is present.

Location:
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.Designer.cs

    r11327 r11329  
    7474      // pictureBox
    7575      //
    76       this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
    77             | System.Windows.Forms.AnchorStyles.Left) 
     76      this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     77            | System.Windows.Forms.AnchorStyles.Left)
    7878            | System.Windows.Forms.AnchorStyles.Right)));
    7979      this.pictureBox.BackColor = System.Drawing.Color.White;
     
    8989      //
    9090      this.tabControl.AllowDrop = true;
    91       this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
    92             | System.Windows.Forms.AnchorStyles.Left) 
     91      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     92            | System.Windows.Forms.AnchorStyles.Left)
    9393            | System.Windows.Forms.AnchorStyles.Right)));
    9494      this.tabControl.Controls.Add(this.visualizationTabPage);
     
    117117      this.valueTabPage.Name = "valueTabPage";
    118118      this.valueTabPage.Padding = new System.Windows.Forms.Padding(3);
    119       this.valueTabPage.Size = new System.Drawing.Size(251, 370);
     119      this.valueTabPage.Size = new System.Drawing.Size(211, 370);
    120120      this.valueTabPage.TabIndex = 1;
    121121      this.valueTabPage.Text = "Value";
     
    124124      // tourGroupBox
    125125      //
    126       this.tourGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
    127             | System.Windows.Forms.AnchorStyles.Left) 
     126      this.tourGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     127            | System.Windows.Forms.AnchorStyles.Left)
    128128            | System.Windows.Forms.AnchorStyles.Right)));
    129129      this.tourGroupBox.Controls.Add(this.tourViewHost);
    130130      this.tourGroupBox.Location = new System.Drawing.Point(6, 6);
    131131      this.tourGroupBox.Name = "tourGroupBox";
    132       this.tourGroupBox.Size = new System.Drawing.Size(239, 358);
     132      this.tourGroupBox.Size = new System.Drawing.Size(199, 358);
    133133      this.tourGroupBox.TabIndex = 0;
    134134      this.tourGroupBox.TabStop = false;
     
    137137      // tourViewHost
    138138      //
    139       this.tourViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
    140             | System.Windows.Forms.AnchorStyles.Left) 
     139      this.tourViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     140            | System.Windows.Forms.AnchorStyles.Left)
    141141            | System.Windows.Forms.AnchorStyles.Right)));
    142142      this.tourViewHost.Caption = "View";
     
    146146      this.tourViewHost.Name = "tourViewHost";
    147147      this.tourViewHost.ReadOnly = false;
    148       this.tourViewHost.Size = new System.Drawing.Size(227, 333);
     148      this.tourViewHost.Size = new System.Drawing.Size(187, 333);
    149149      this.tourViewHost.TabIndex = 0;
    150150      this.tourViewHost.ViewsLabelVisible = true;
     
    175175      // qualityGroupBox
    176176      //
    177       this.qualityGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     177      this.qualityGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    178178            | System.Windows.Forms.AnchorStyles.Right)));
    179179      this.qualityGroupBox.Controls.Add(this.qualityViewHost);
     
    201201      // distanceGroupBox
    202202      //
    203       this.distanceGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     203      this.distanceGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    204204            | System.Windows.Forms.AnchorStyles.Right)));
    205205      this.distanceGroupBox.Controls.Add(this.distanceViewHost);
     
    227227      // penaltyGroupBox
    228228      //
    229       this.penaltyGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     229      this.penaltyGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    230230            | System.Windows.Forms.AnchorStyles.Right)));
    231231      this.penaltyGroupBox.Controls.Add(this.penaltyViewHost);
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.cs

    r11327 r11329  
    6969        penaltyViewHost.Content = null;
    7070        distanceViewHost.Content = null;
     71        splitContainer.Panel1Collapsed = true;
    7172        pictureBox.Image = null;
    7273        tourViewHost.Content = null;
     
    7576        penaltyViewHost.Content = Content.Penalty;
    7677        distanceViewHost.Content = Content.Distance;
     78        SetPanelCollapsing();
    7779        GenerateImage();
    7880        tourViewHost.Content = Content.IntegerVector;
     
    161163    }
    162164
     165    private void SetPanelCollapsing() {
     166      splitContainer.Panel1Collapsed = qualityViewHost.Content == null && penaltyViewHost.Content == null && distanceViewHost.Content == null;
     167    }
     168
    163169    private void Content_QualityChanged(object sender, EventArgs e) {
    164170      if (InvokeRequired)
    165171        Invoke(new EventHandler(Content_QualityChanged), sender, e);
    166       else
     172      else {
    167173        qualityViewHost.Content = Content.Quality;
     174        SetPanelCollapsing();
     175      }
    168176    }
    169177    private void Content_PenaltyChanged(object sender, EventArgs e) {
     
    173181        penaltyViewHost.Content = Content.Penalty;
    174182        GenerateImage();
     183        SetPanelCollapsing();
    175184      }
    176185    }
     
    179188      if (InvokeRequired)
    180189        Invoke(new EventHandler(Content_DistanceChanged), sender, e);
    181       else
     190      else {
    182191        distanceViewHost.Content = Content.Distance;
     192        SetPanelCollapsing();
     193      }
    183194    }
    184195    private void Content_CoordinatesChanged(object sender, EventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.