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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.