Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/23/13 17:52:50 (11 years ago)
Author:
ascheibe
Message:

#1042

  • the size of the ProgressView is now adjusted if the Cancel button is not shown
  • replaced the progress bar of the start page with the ProgressView
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs

    r9894 r9907  
    2525namespace HeuristicLab.MainForm.WindowsForms {
    2626  internal sealed partial class ProgressView : UserControl {
     27    private const int defaultControlHeight = 88;
     28    private const int collapsedControlHeight = 55;
     29
    2730    private readonly Control control;
    2831    public Control Control {
     
    8083        return;
    8184      }
     85      int height = Content.CanBeCanceled ? Height : collapsedControlHeight;
     86
    8287      Left = (Control.ClientRectangle.Width / 2) - (Width / 2);
    83       Top = (Control.ClientRectangle.Height / 2) - (Height / 2);
     88      Top = (Control.ClientRectangle.Height / 2) - (height / 2);
    8489      Anchor = AnchorStyles.None;
    8590
     
    127132      cancelButton.Visible = content != null && content.CanBeCanceled;
    128133      cancelButton.Enabled = content != null && content.CanBeCanceled;
     134
     135      if (content != null && content.CanBeCanceled) {
     136        Height = defaultControlHeight;
     137      } else if (content != null && !content.CanBeCanceled) {
     138        Height = collapsedControlHeight;
     139      }
    129140    }
    130141
Note: See TracChangeset for help on using the changeset viewer.