Free cookie consent management tool by TermsFeed Policy Generator

source: addons/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/MessageItem.cs @ 17717

Last change on this file since 17717 was 6489, checked in by cneumuel, 14 years ago

#1215

  • fixed issue with multiple problems (by introducing valuesReadOnly to IOptimizable)
  • fixed error message when removing last problem instance
  • made quality measure name configurable
File size: 915 bytes
Line 
1using HeuristicLab.Common;
2using HeuristicLab.Core;
3
4namespace HeuristicLab.Problems.MetaOptimization.Views {
5  /// <summary>
6  /// used to display messages in a viewhost
7  /// </summary>
8  public class MessageItem : NamedItem {
9    public override bool CanChangeDescription { get { return !initialized; } }
10    public override bool CanChangeName { get { return !initialized; } }
11    private bool initialized = false;
12
13    public MessageItem() {
14      this.Name = "MessageItem";
15    }
16    public MessageItem(string message)
17      : this() {
18      this.Name = message;
19      this.Description = "This item represents a message to the user.";
20      this.initialized = true;
21    }
22    protected MessageItem(MessageItem original, Cloner cloner)
23      : base(original, cloner) {
24    }
25
26    public override IDeepCloneable Clone(Cloner cloner) {
27      return new MessageItem();
28    }
29  }
30}
Note: See TracBrowser for help on using the repository browser.