Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3395


Ignore:
Timestamp:
04/18/10 03:25:33 (15 years ago)
Author:
mkommend
Message:

renamed MainForm.ShowViewsInViewHost and removed ShowInViewHost from ViewAttribute (ticket #972)

Location:
trunk/sources
Files:
10 edited

Legend:

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

    r3362 r3395  
    3030  /// The visual representation of an <see cref="OperatorGraph"/>.
    3131  /// </summary>
    32   [View("OperatorGraph View (Tree)",ShowInViewHost=true)]
     32  [View("OperatorGraph View (Tree)")]
    3333  [Content(typeof(OperatorGraph), false)]
    3434  public partial class OperatorGraphView : ItemView {
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/DockForm.cs

    r3281 r3395  
    5858          this.view.CaptionChanged += new EventHandler(View_CaptionChanged);
    5959          UpdateText();
    60 
    61           ContentView contentView = view as ContentView;
    62           if (ViewAttribute.GetShowInViewHost(viewType) && contentView != null) {
    63             ViewHost viewHost = new ViewHost();
    64             viewHost.ViewType = viewType;
    65             viewHost.Content = contentView.Content;
    66             viewHost.Dock = DockStyle.Fill;
    67             viewPanel.Controls.Add(viewHost);
    68           } else
    69             viewPanel.Controls.Add(control);
     60          viewPanel.Controls.Add(control);
    7061        }
    7162      } else {
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/DockingMainForm.cs

    r3394 r3395  
    4040      InitializeComponent();
    4141    }
    42     public DockingMainForm(Type userInterfaceItemType, bool showInViewHost)
     42    public DockingMainForm(Type userInterfaceItemType, bool showViewsInViewHost)
    4343      : this(userInterfaceItemType) {
    44       this.ShowInViewHost = showInViewHost;
     44      this.ShowViewsInViewHost = showViewsInViewHost;
    4545    }
    4646
     
    6969      DockForm form;
    7070      IContentView contentView = view as IContentView;
    71       if (ShowInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) {
     71      if (ShowViewsInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) {
    7272        ViewHost viewHost = new ViewHost(contentView.Content);
    7373        form = new DockForm(viewHost);
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/DocumentForm.cs

    r3281 r3395  
    4444        view.CaptionChanged += new EventHandler(View_CaptionChanged);
    4545        UpdateText();
    46 
    47         ContentView contentView = view as ContentView;
    48         if (ViewAttribute.GetShowInViewHost(viewType) && contentView != null) {
    49           ViewHost viewHost = new ViewHost();
    50           viewHost.ViewType = viewType;
    51           viewHost.Content = contentView.Content;
    52           viewHost.Dock = DockStyle.Fill;
    53           viewPanel.Controls.Add(viewHost);
    54         } else
    55           viewPanel.Controls.Add(control);
     46        viewPanel.Controls.Add(control);
    5647      } else {
    5748        Label errorLabel = new Label();
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/MainForm.cs

    r3394 r3395  
    4343      this.userInterfaceItems = new List<IUserInterfaceItem>();
    4444      this.initialized = false;
     45      this.showViewsInViewHost = false;
    4546    }
    4647
     
    5152
    5253    #region properties
    53     private bool showInViewHost;
    54     public bool ShowInViewHost {
    55       get { return this.showInViewHost; }
    56       set { this.showInViewHost = value; }
     54    private bool showViewsInViewHost;
     55    public bool ShowViewsInViewHost {
     56      get { return this.showViewsInViewHost; }
     57      set { this.showViewsInViewHost = value; }
    5758    }
    5859
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/MultipleDocumentMainForm.cs

    r3394 r3395  
    3939      InitializeComponent();
    4040    }
    41     public MultipleDocumentMainForm(Type userInterfaceItemType, bool showInViewHost)
     41    public MultipleDocumentMainForm(Type userInterfaceItemType, bool showViewsInViewHost)
    4242      : this(userInterfaceItemType) {
    43       this.ShowInViewHost = showInViewHost;
     43      this.ShowViewsInViewHost = showViewsInViewHost;
    4444    }
    4545
     
    7575      Form form;
    7676      IContentView contentView = view as IContentView;
    77       if (ShowInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) {
     77      if (ShowViewsInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) {
    7878        ViewHost viewHost = new ViewHost(contentView.Content);
    7979        form = new DocumentForm(viewHost);
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/SingleDocumentMainForm.cs

    r3394 r3395  
    4040      InitializeComponent();
    4141    }
    42     public SingleDocumentMainForm(Type userInterfaceItemType, bool showInViewHost)
     42    public SingleDocumentMainForm(Type userInterfaceItemType, bool showViewsInViewHost)
    4343      : this(userInterfaceItemType) {
    44       this.ShowInViewHost = showInViewHost;
     44      this.ShowViewsInViewHost = showViewsInViewHost;
    4545    }
    4646
     
    6969      Form form;
    7070      IContentView contentView = view as IContentView;
    71       if (ShowInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) {
     71      if (ShowViewsInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) {
    7272        ViewHost viewHost = new ViewHost(contentView.Content);
    7373        form = new DocumentForm(viewHost);
  • trunk/sources/HeuristicLab.MainForm/3.2/ViewAttribute.cs

    r3281 r3395  
    3131    public ViewAttribute(string name) {
    3232      this.name = name;
    33       this.showInViewHost = false;
    3433    }
    3534
     
    3837      get { return this.name; }
    3938      set { this.name = value; }
    40     }
    41 
    42     private bool showInViewHost;
    43     public bool ShowInViewHost {
    44       get { return this.showInViewHost; }
    45       set { this.showInViewHost = value; }
    4639    }
    4740
     
    5750      return viewType.Name;
    5851    }
    59 
    60     public static bool GetShowInViewHost(MemberInfo viewType) {
    61       ViewAttribute[] attributes = (ViewAttribute[])viewType.GetCustomAttributes(typeof(ViewAttribute), false);
    62       if (attributes.Length == 1)
    63         return attributes[0].showInViewHost;
    64       return false;
    65     }
    6652  }
    6753}
  • trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLabOptimizerPlugin.cs.frame

    r3394 r3395  
    4040    public override void Run() {
    4141      OptimizerMainForm mainForm = new OptimizerMainForm(typeof(IOptimizerUserInterfaceItemProvider));
    42       mainForm.ShowInViewHost = true;
     42      mainForm.ShowViewsInViewHost = true;
    4343      Application.Run(mainForm);
    4444    }
  • trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMainForm.cs

    r3394 r3395  
    4545      InitializeComponent();
    4646    }
    47     public OptimizerMainForm(Type userInterfaceItemType, bool showInViewHost)
     47    public OptimizerMainForm(Type userInterfaceItemType, bool showViewsInViewHost)
    4848      : this(userInterfaceItemType) {
    49       this.ShowInViewHost = showInViewHost;
     49      this.ShowViewsInViewHost = showViewsInViewHost;
    5050    }
    5151
Note: See TracChangeset for help on using the changeset viewer.