Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2676


Ignore:
Timestamp:
01/25/10 02:34:23 (14 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • continued work on adapting and refactoring HeuristicLab.Data according to the changes in HeuristicLab.Core
  • unified visual appearance of views
Location:
trunk/sources
Files:
1 added
54 edited

Legend:

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

    r2655 r2676  
    8787      this.nameLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    8888      this.nameLabel.AutoSize = true;
    89       this.nameLabel.Location = new System.Drawing.Point(12, 289);
     89      this.nameLabel.Location = new System.Drawing.Point(9, 289);
    9090      this.nameLabel.Name = "nameLabel";
    9191      this.nameLabel.Size = new System.Drawing.Size(38, 13);
     
    9797      this.nameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
    9898                  | System.Windows.Forms.AnchorStyles.Right)));
    99       this.nameTextBox.Location = new System.Drawing.Point(81, 286);
     99      this.nameTextBox.Location = new System.Drawing.Point(78, 286);
    100100      this.nameTextBox.Name = "nameTextBox";
    101       this.nameTextBox.Size = new System.Drawing.Size(449, 20);
     101      this.nameTextBox.Size = new System.Drawing.Size(452, 20);
    102102      this.nameTextBox.TabIndex = 2;
    103103      //
     
    106106      this.descriptionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    107107      this.descriptionLabel.AutoSize = true;
    108       this.descriptionLabel.Location = new System.Drawing.Point(12, 315);
     108      this.descriptionLabel.Location = new System.Drawing.Point(9, 315);
    109109      this.descriptionLabel.Name = "descriptionLabel";
    110110      this.descriptionLabel.Size = new System.Drawing.Size(63, 13);
     
    116116      this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
    117117                  | System.Windows.Forms.AnchorStyles.Right)));
    118       this.descriptionTextBox.Location = new System.Drawing.Point(81, 312);
     118      this.descriptionTextBox.Location = new System.Drawing.Point(78, 312);
    119119      this.descriptionTextBox.Multiline = true;
    120120      this.descriptionTextBox.Name = "descriptionTextBox";
    121121      this.descriptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
    122       this.descriptionTextBox.Size = new System.Drawing.Size(449, 103);
     122      this.descriptionTextBox.Size = new System.Drawing.Size(452, 103);
    123123      this.descriptionTextBox.TabIndex = 4;
    124124      //
     
    127127      this.dataTypeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    128128      this.dataTypeLabel.AutoSize = true;
    129       this.dataTypeLabel.Location = new System.Drawing.Point(12, 426);
     129      this.dataTypeLabel.Location = new System.Drawing.Point(9, 426);
    130130      this.dataTypeLabel.Name = "dataTypeLabel";
    131131      this.dataTypeLabel.Size = new System.Drawing.Size(60, 13);
     
    138138                  | System.Windows.Forms.AnchorStyles.Right)));
    139139      this.dataTypeTextBox.Enabled = false;
    140       this.dataTypeTextBox.Location = new System.Drawing.Point(81, 423);
     140      this.dataTypeTextBox.Location = new System.Drawing.Point(78, 423);
    141141      this.dataTypeTextBox.Name = "dataTypeTextBox";
    142142      this.dataTypeTextBox.ReadOnly = true;
    143       this.dataTypeTextBox.Size = new System.Drawing.Size(420, 20);
     143      this.dataTypeTextBox.Size = new System.Drawing.Size(423, 20);
    144144      this.dataTypeTextBox.TabIndex = 6;
    145145      //
     
    148148      this.setDataTypeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    149149      this.setDataTypeButton.Enabled = false;
     150      this.setDataTypeButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add;
    150151      this.setDataTypeButton.Location = new System.Drawing.Point(507, 421);
    151152      this.setDataTypeButton.Name = "setDataTypeButton";
     
    154155      this.toolTip.SetToolTip(this.setDataTypeButton, "Set Data Type");
    155156      this.setDataTypeButton.UseVisualStyleBackColor = true;
    156       this.setDataTypeButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add;
    157157      this.setDataTypeButton.Click += new System.EventHandler(this.setDataTypeButton_Click);
    158158      //
     
    201201    #endregion
    202202
    203     private System.Windows.Forms.Button cancelButton;
    204     private System.Windows.Forms.Button okButton;
    205     private System.Windows.Forms.Label nameLabel;
    206     private System.Windows.Forms.TextBox nameTextBox;
    207     private System.Windows.Forms.Label descriptionLabel;
    208     private System.Windows.Forms.TextBox descriptionTextBox;
    209     private TypeSelector parameterTypeSelector;
    210     private System.Windows.Forms.Label dataTypeLabel;
    211     private System.Windows.Forms.TextBox dataTypeTextBox;
    212     private System.Windows.Forms.Button setDataTypeButton;
    213     private System.Windows.Forms.ToolTip toolTip;
     203    protected System.Windows.Forms.Button cancelButton;
     204    protected System.Windows.Forms.Button okButton;
     205    protected System.Windows.Forms.Label nameLabel;
     206    protected System.Windows.Forms.TextBox nameTextBox;
     207    protected System.Windows.Forms.Label descriptionLabel;
     208    protected System.Windows.Forms.TextBox descriptionTextBox;
     209    protected TypeSelector parameterTypeSelector;
     210    protected System.Windows.Forms.Label dataTypeLabel;
     211    protected System.Windows.Forms.TextBox dataTypeTextBox;
     212    protected System.Windows.Forms.Button setDataTypeButton;
     213    protected System.Windows.Forms.ToolTip toolTip;
    214214  }
    215215}
  • trunk/sources/HeuristicLab.Core.Views/3.3/CreateParameterDialog.cs

    r2655 r2676  
    3333namespace HeuristicLab.Core.Views {
    3434  public partial class CreateParameterDialog : Form {
    35     TypeSelectorDialog typeSelectorDialog;
     35    protected TypeSelectorDialog typeSelectorDialog;
    3636
    3737    public IParameter Parameter {
     
    5858    }
    5959
    60     private void setDataTypeButton_Click(object sender, EventArgs e) {
     60    protected virtual void setDataTypeButton_Click(object sender, EventArgs e) {
    6161      if (typeSelectorDialog == null) {
    6262        typeSelectorDialog = new TypeSelectorDialog();
     
    7272    }
    7373
    74     private void CreateParameterDialog_Load(object sender, EventArgs e) {
     74    protected virtual void CreateParameterDialog_Load(object sender, EventArgs e) {
    7575      parameterTypeSelector.Configure(typeof(IParameter), false, true);
    7676    }
    7777
    78     private void parameterTypeSelector_SelectedTypeChanged(object sender, EventArgs e) {
     78    protected virtual void parameterTypeSelector_SelectedTypeChanged(object sender, EventArgs e) {
    7979      dataTypeTextBox.Text = "-";
    8080      dataTypeTextBox.Tag = null;
  • trunk/sources/HeuristicLab.Core.Views/3.3/EngineView.Designer.cs

    r2664 r2676  
    6363      //
    6464      this.executionTimeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    65       this.executionTimeTextBox.Location = new System.Drawing.Point(661, 620);
     65      this.executionTimeTextBox.Location = new System.Drawing.Point(655, 620);
    6666      this.executionTimeTextBox.Name = "executionTimeTextBox";
    6767      this.executionTimeTextBox.ReadOnly = true;
     
    7373      this.executionTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    7474      this.executionTimeLabel.AutoSize = true;
    75       this.executionTimeLabel.Location = new System.Drawing.Point(572, 623);
     75      this.executionTimeLabel.Location = new System.Drawing.Point(566, 623);
    7676      this.executionTimeLabel.Name = "executionTimeLabel";
    7777      this.executionTimeLabel.Size = new System.Drawing.Size(83, 13);
     
    100100      // operatorGraphView
    101101      //
     102      this.operatorGraphView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     103                  | System.Windows.Forms.AnchorStyles.Left)
     104                  | System.Windows.Forms.AnchorStyles.Right)));
    102105      this.operatorGraphView.Caption = "Operator Graph";
    103       this.operatorGraphView.Dock = System.Windows.Forms.DockStyle.Fill;
    104106      this.operatorGraphView.Item = null;
    105       this.operatorGraphView.Location = new System.Drawing.Point(0, 0);
     107      this.operatorGraphView.Location = new System.Drawing.Point(3, 3);
    106108      this.operatorGraphView.Name = "operatorGraphView";
     109      this.operatorGraphView.Object = null;
    107110      this.operatorGraphView.OperatorGraph = null;
    108       this.operatorGraphView.Size = new System.Drawing.Size(401, 611);
     111      this.operatorGraphView.Size = new System.Drawing.Size(395, 605);
    109112      this.operatorGraphView.TabIndex = 0;
    110113      //
    111114      // scopeView
    112115      //
     116      this.scopeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     117                  | System.Windows.Forms.AnchorStyles.Left)
     118                  | System.Windows.Forms.AnchorStyles.Right)));
    113119      this.scopeView.Caption = "Scope";
    114       this.scopeView.Dock = System.Windows.Forms.DockStyle.Fill;
    115120      this.scopeView.Item = null;
    116       this.scopeView.Location = new System.Drawing.Point(0, 0);
     121      this.scopeView.Location = new System.Drawing.Point(3, 3);
    117122      this.scopeView.Name = "scopeView";
     123      this.scopeView.Object = null;
    118124      this.scopeView.Scope = null;
    119       this.scopeView.Size = new System.Drawing.Size(397, 611);
     125      this.scopeView.Size = new System.Drawing.Size(391, 605);
    120126      this.scopeView.TabIndex = 0;
    121127      //
     
    124130      this.resetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    125131      this.resetButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Restart;
    126       this.resetButton.Location = new System.Drawing.Point(58, 617);
     132      this.resetButton.Location = new System.Drawing.Point(63, 617);
    127133      this.resetButton.Name = "resetButton";
    128134      this.resetButton.Size = new System.Drawing.Size(23, 23);
     
    137143      this.stopButton.Enabled = false;
    138144      this.stopButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Stop;
    139       this.stopButton.Location = new System.Drawing.Point(29, 617);
     145      this.stopButton.Location = new System.Drawing.Point(34, 617);
    140146      this.stopButton.Name = "stopButton";
    141147      this.stopButton.Size = new System.Drawing.Size(23, 23);
     
    149155      this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    150156      this.startButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Play;
    151       this.startButton.Location = new System.Drawing.Point(0, 617);
     157      this.startButton.Location = new System.Drawing.Point(5, 617);
    152158      this.startButton.Name = "startButton";
    153159      this.startButton.Size = new System.Drawing.Size(23, 23);
     
    157163      this.startButton.Click += new System.EventHandler(this.startButton_Click);
    158164      //
    159       // EngineBaseView
     165      // EngineView
    160166      //
    161167      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    162168      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    163169      this.Controls.Add(this.executionTimeTextBox);
     170      this.Controls.Add(this.stopButton);
    164171      this.Controls.Add(this.executionTimeLabel);
    165172      this.Controls.Add(this.splitContainer);
    166173      this.Controls.Add(this.resetButton);
    167       this.Controls.Add(this.stopButton);
    168174      this.Controls.Add(this.startButton);
    169       this.Name = "EngineBaseView";
     175      this.Name = "EngineView";
    170176      this.Size = new System.Drawing.Size(802, 640);
    171177      this.splitContainer.Panel1.ResumeLayout(false);
     
    187193    protected HeuristicLab.Core.Views.OperatorGraphView operatorGraphView;
    188194    protected HeuristicLab.Core.Views.ScopeView scopeView;
    189     private System.Windows.Forms.ToolTip toolTip;
     195    protected System.Windows.Forms.ToolTip toolTip;
    190196
    191197  }
  • trunk/sources/HeuristicLab.Core.Views/3.3/EngineView.cs

    r2664 r2676  
    111111
    112112    #region Engine Events
    113     private void Engine_OperatorGraphChanged(object sender, EventArgs e) {
     113    protected virtual void Engine_OperatorGraphChanged(object sender, EventArgs e) {
    114114      if (InvokeRequired)
    115115        Invoke(new EventHandler(Engine_OperatorGraphChanged), sender, e);
     
    117117        operatorGraphView.OperatorGraph = Engine.OperatorGraph;
    118118    }
    119     private void Engine_Initialized(object sender, EventArgs e) {
     119    protected virtual void Engine_Initialized(object sender, EventArgs e) {
    120120      if (InvokeRequired)
    121121        Invoke(new EventHandler(Engine_Initialized), sender, e);
     
    129129      }
    130130    }
    131     private void Engine_Started(object sender, EventArgs e) {
     131    protected virtual void Engine_Started(object sender, EventArgs e) {
    132132      executionTimeCounter = 0;
    133133      if (InvokeRequired)
     
    142142      }
    143143    }
    144     private void Engine_Stopped(object sender, EventArgs e) {
     144    protected virtual void Engine_Stopped(object sender, EventArgs e) {
    145145      if (InvokeRequired)
    146146        Invoke(new EventHandler(Engine_Stopped), sender, e);
     
    154154      }
    155155    }
    156     private void Engine_ExecutionTimeChanged(object sender, EventArgs e) {
     156    protected virtual void Engine_ExecutionTimeChanged(object sender, EventArgs e) {
    157157      executionTimeCounter++;
    158158      if ((executionTimeCounter == 100) || !Engine.Running) {
     
    161161      }
    162162    }
    163     private void Engine_ExceptionOccurred(object sender, EventArgs<Exception> e) {
     163    protected virtual void Engine_ExceptionOccurred(object sender, EventArgs<Exception> e) {
    164164      if (InvokeRequired)
    165165        Invoke(new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred), sender, e);
     
    170170
    171171    #region Button events
    172     private void startButton_Click(object sender, EventArgs e) {
     172    protected virtual void startButton_Click(object sender, EventArgs e) {
    173173      Engine.Start();
    174174    }
    175     private void stopButton_Click(object sender, EventArgs e) {
     175    protected virtual void stopButton_Click(object sender, EventArgs e) {
    176176      Engine.Stop();
    177177    }
    178     private void resetButton_Click(object sender, EventArgs e) {
     178    protected virtual void resetButton_Click(object sender, EventArgs e) {
    179179      Engine.Initialize();
    180180    }
     
    182182
    183183    #region Helpers
    184     private void UpdateExecutionTimeTextBox() {
     184    protected virtual void UpdateExecutionTimeTextBox() {
    185185      if (InvokeRequired)
    186186        Invoke(new Action(UpdateExecutionTimeTextBox));
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.Designer.cs

    r2655 r2676  
    5252    private void InitializeComponent() {
    5353      this.components = new System.ComponentModel.Container();
    54       this.splitContainer1 = new System.Windows.Forms.SplitContainer();
     54      this.splitContainer = new System.Windows.Forms.SplitContainer();
    5555      this.itemsListView = new System.Windows.Forms.ListView();
    5656      this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
     
    6464      this.itemsGroupBox = new System.Windows.Forms.GroupBox();
    6565      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    66       this.splitContainer1.Panel1.SuspendLayout();
    67       this.splitContainer1.Panel2.SuspendLayout();
    68       this.splitContainer1.SuspendLayout();
     66      this.splitContainer.Panel1.SuspendLayout();
     67      this.splitContainer.Panel2.SuspendLayout();
     68      this.splitContainer.SuspendLayout();
    6969      this.detailsGroupBox.SuspendLayout();
    7070      this.itemsGroupBox.SuspendLayout();
    7171      this.SuspendLayout();
    7272      //
    73       // splitContainer1
    74       //
    75       this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
    76       this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
    77       this.splitContainer1.Location = new System.Drawing.Point(3, 16);
    78       this.splitContainer1.Name = "splitContainer1";
    79       //
    80       // splitContainer1.Panel1
    81       //
    82       this.splitContainer1.Panel1.Controls.Add(this.itemsListView);
    83       this.splitContainer1.Panel1.Controls.Add(this.sortDescendingButton);
    84       this.splitContainer1.Panel1.Controls.Add(this.sortAscendingButton);
    85       this.splitContainer1.Panel1.Controls.Add(this.removeButton);
    86       this.splitContainer1.Panel1.Controls.Add(this.addButton);
    87       this.splitContainer1.Panel1MinSize = 100;
    88       //
    89       // splitContainer1.Panel2
    90       //
    91       this.splitContainer1.Panel2.Controls.Add(this.detailsGroupBox);
    92       this.splitContainer1.Size = new System.Drawing.Size(526, 364);
    93       this.splitContainer1.SplitterDistance = 250;
    94       this.splitContainer1.TabIndex = 0;
     73      // splitContainer
     74      //
     75      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
     76      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
     77      this.splitContainer.Location = new System.Drawing.Point(3, 16);
     78      this.splitContainer.Name = "splitContainer";
     79      //
     80      // splitContainer.Panel1
     81      //
     82      this.splitContainer.Panel1.Controls.Add(this.itemsListView);
     83      this.splitContainer.Panel1.Controls.Add(this.sortDescendingButton);
     84      this.splitContainer.Panel1.Controls.Add(this.sortAscendingButton);
     85      this.splitContainer.Panel1.Controls.Add(this.removeButton);
     86      this.splitContainer.Panel1.Controls.Add(this.addButton);
     87      this.splitContainer.Panel1MinSize = 100;
     88      //
     89      // splitContainer.Panel2
     90      //
     91      this.splitContainer.Panel2.Controls.Add(this.detailsGroupBox);
     92      this.splitContainer.Size = new System.Drawing.Size(526, 364);
     93      this.splitContainer.SplitterDistance = 250;
     94      this.splitContainer.TabIndex = 0;
    9595      //
    9696      // itemsListView
     
    107107      this.itemsListView.Name = "itemsListView";
    108108      this.itemsListView.ShowItemToolTips = true;
    109       this.itemsListView.Size = new System.Drawing.Size(244, 329);
     109      this.itemsListView.Size = new System.Drawing.Size(244, 328);
    110110      this.itemsListView.SmallImageList = this.imageList;
    111111      this.itemsListView.TabIndex = 4;
     
    189189      // viewHost
    190190      //
    191       this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill;
    192       this.viewHost.Location = new System.Drawing.Point(3, 16);
     191      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     192                  | System.Windows.Forms.AnchorStyles.Left)
     193                  | System.Windows.Forms.AnchorStyles.Right)));
     194      this.viewHost.Location = new System.Drawing.Point(6, 19);
    193195      this.viewHost.Name = "viewHost";
    194196      this.viewHost.Object = null;
    195       this.viewHost.Size = new System.Drawing.Size(260, 316);
     197      this.viewHost.Size = new System.Drawing.Size(254, 310);
    196198      this.viewHost.TabIndex = 0;
    197199      //
    198200      // itemsGroupBox
    199201      //
    200       this.itemsGroupBox.Controls.Add(this.splitContainer1);
     202      this.itemsGroupBox.Controls.Add(this.splitContainer);
    201203      this.itemsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
    202204      this.itemsGroupBox.Location = new System.Drawing.Point(0, 0);
     
    213215      this.Name = "ItemCollectionView";
    214216      this.Size = new System.Drawing.Size(532, 383);
    215       this.splitContainer1.Panel1.ResumeLayout(false);
    216       this.splitContainer1.Panel2.ResumeLayout(false);
    217       this.splitContainer1.ResumeLayout(false);
     217      this.splitContainer.Panel1.ResumeLayout(false);
     218      this.splitContainer.Panel2.ResumeLayout(false);
     219      this.splitContainer.ResumeLayout(false);
    218220      this.detailsGroupBox.ResumeLayout(false);
    219221      this.itemsGroupBox.ResumeLayout(false);
     
    224226    #endregion
    225227
    226     protected System.Windows.Forms.SplitContainer splitContainer1;
     228    protected System.Windows.Forms.SplitContainer splitContainer;
    227229    protected System.Windows.Forms.ColumnHeader columnHeader1;
    228230    protected GroupBox itemsGroupBox;
     
    233235    protected ToolTip toolTip;
    234236    protected ImageList imageList;
    235     private ViewHost viewHost;
     237    protected ViewHost viewHost;
    236238    protected Button sortAscendingButton;
    237239    protected Button sortDescendingButton;
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs

    r2664 r2676  
    140140      }
    141141    }
    142     private void itemsListView_SizeChanged(object sender, EventArgs e) {
     142    protected virtual void itemsListView_SizeChanged(object sender, EventArgs e) {
    143143      if (itemsListView.Columns.Count > 0)
    144144        itemsListView.Columns[0].Width = Math.Max(0, itemsListView.Width - 25);
     
    197197        ItemCollection.Add(item);
    198198    }
    199     protected void sortAscendingButton_Click(object sender, EventArgs e) {
     199    protected virtual void sortAscendingButton_Click(object sender, EventArgs e) {
    200200      SortItemsListView(SortOrder.Ascending);
    201201    }
    202     protected void sortDescendingButton_Click(object sender, EventArgs e) {
     202    protected virtual void sortDescendingButton_Click(object sender, EventArgs e) {
    203203      SortItemsListView(SortOrder.Descending);
    204204    }
     
    213213
    214214    #region ItemCollection Events
    215     private void ItemCollection_ItemsAdded(object sender, CollectionItemsChangedEventArgs<T> e) {
     215    protected virtual void ItemCollection_ItemsAdded(object sender, CollectionItemsChangedEventArgs<T> e) {
    216216      if (InvokeRequired)
    217217        Invoke(new CollectionItemsChangedEventHandler<T>(ItemCollection_ItemsAdded), sender, e);
     
    220220          AddListViewItem(CreateListViewItem(item));
    221221    }
    222     private void ItemCollection_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<T> e) {
     222    protected virtual void ItemCollection_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<T> e) {
    223223      if (InvokeRequired)
    224224        Invoke(new CollectionItemsChangedEventHandler<T>(ItemCollection_ItemsRemoved), sender, e);
     
    232232      }
    233233    }
    234     private void ItemCollection_CollectionReset(object sender, CollectionItemsChangedEventArgs<T> e) {
     234    protected virtual void ItemCollection_CollectionReset(object sender, CollectionItemsChangedEventArgs<T> e) {
    235235      if (InvokeRequired)
    236236        Invoke(new CollectionItemsChangedEventHandler<T>(ItemCollection_CollectionReset), sender, e);
     
    249249
    250250    #region Item Events
    251     private void Item_Changed(object sender, ChangedEventArgs e) {
     251    protected virtual void Item_Changed(object sender, ChangedEventArgs e) {
    252252      if (InvokeRequired)
    253253        Invoke(new ChangedEventHandler(Item_Changed), sender, e);
     
    261261
    262262    #region Helpers
    263     private void SortItemsListView(SortOrder sortOrder) {
     263    protected virtual void SortItemsListView(SortOrder sortOrder) {
    264264      itemsListView.Sorting = sortOrder;
    265265      itemsListView.Sort();
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.Designer.cs

    r2655 r2676  
    5151    private void InitializeComponent() {
    5252      this.components = new System.ComponentModel.Container();
    53       this.splitContainer1 = new System.Windows.Forms.SplitContainer();
     53      this.splitContainer = new System.Windows.Forms.SplitContainer();
    5454      this.removeButton = new System.Windows.Forms.Button();
    5555      this.moveUpButton = new System.Windows.Forms.Button();
    5656      this.moveDownButton = new System.Windows.Forms.Button();
    5757      this.itemsListView = new System.Windows.Forms.ListView();
    58       this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
     58      this.listViewColumnHeader = new System.Windows.Forms.ColumnHeader();
    5959      this.imageList = new System.Windows.Forms.ImageList(this.components);
    6060      this.addButton = new System.Windows.Forms.Button();
     
    6363      this.itemsGroupBox = new System.Windows.Forms.GroupBox();
    6464      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    65       this.splitContainer1.Panel1.SuspendLayout();
    66       this.splitContainer1.Panel2.SuspendLayout();
    67       this.splitContainer1.SuspendLayout();
     65      this.splitContainer.Panel1.SuspendLayout();
     66      this.splitContainer.Panel2.SuspendLayout();
     67      this.splitContainer.SuspendLayout();
    6868      this.detailsGroupBox.SuspendLayout();
    6969      this.itemsGroupBox.SuspendLayout();
    7070      this.SuspendLayout();
    7171      //
    72       // splitContainer1
    73       //
    74       this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
    75       this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
    76       this.splitContainer1.Location = new System.Drawing.Point(3, 16);
    77       this.splitContainer1.Name = "splitContainer1";
    78       //
    79       // splitContainer1.Panel1
    80       //
    81       this.splitContainer1.Panel1.Controls.Add(this.removeButton);
    82       this.splitContainer1.Panel1.Controls.Add(this.moveUpButton);
    83       this.splitContainer1.Panel1.Controls.Add(this.moveDownButton);
    84       this.splitContainer1.Panel1.Controls.Add(this.itemsListView);
    85       this.splitContainer1.Panel1.Controls.Add(this.addButton);
    86       //
    87       // splitContainer1.Panel2
    88       //
    89       this.splitContainer1.Panel2.Controls.Add(this.detailsGroupBox);
    90       this.splitContainer1.Size = new System.Drawing.Size(493, 323);
    91       this.splitContainer1.SplitterDistance = 200;
    92       this.splitContainer1.TabIndex = 0;
     72      // splitContainer
     73      //
     74      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
     75      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
     76      this.splitContainer.Location = new System.Drawing.Point(3, 16);
     77      this.splitContainer.Name = "splitContainer";
     78      //
     79      // splitContainer.Panel1
     80      //
     81      this.splitContainer.Panel1.Controls.Add(this.removeButton);
     82      this.splitContainer.Panel1.Controls.Add(this.moveUpButton);
     83      this.splitContainer.Panel1.Controls.Add(this.moveDownButton);
     84      this.splitContainer.Panel1.Controls.Add(this.itemsListView);
     85      this.splitContainer.Panel1.Controls.Add(this.addButton);
     86      //
     87      // splitContainer.Panel2
     88      //
     89      this.splitContainer.Panel2.Controls.Add(this.detailsGroupBox);
     90      this.splitContainer.Size = new System.Drawing.Size(493, 323);
     91      this.splitContainer.SplitterDistance = 200;
     92      this.splitContainer.TabIndex = 0;
    9393      //
    9494      // removeButton
     
    135135                  | System.Windows.Forms.AnchorStyles.Right)));
    136136      this.itemsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
    137             this.columnHeader1});
     137            this.listViewColumnHeader});
    138138      this.itemsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
    139139      this.itemsListView.HideSelection = false;
     
    141141      this.itemsListView.Name = "itemsListView";
    142142      this.itemsListView.ShowItemToolTips = true;
    143       this.itemsListView.Size = new System.Drawing.Size(194, 288);
     143      this.itemsListView.Size = new System.Drawing.Size(194, 287);
    144144      this.itemsListView.SmallImageList = this.imageList;
    145145      this.itemsListView.TabIndex = 4;
     
    187187      // viewHost
    188188      //
    189       this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill;
    190       this.viewHost.Location = new System.Drawing.Point(3, 16);
     189      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     190                  | System.Windows.Forms.AnchorStyles.Left)
     191                  | System.Windows.Forms.AnchorStyles.Right)));
     192      this.viewHost.Location = new System.Drawing.Point(6, 19);
    191193      this.viewHost.Name = "viewHost";
    192194      this.viewHost.Object = null;
    193       this.viewHost.Size = new System.Drawing.Size(277, 275);
     195      this.viewHost.Size = new System.Drawing.Size(271, 269);
    194196      this.viewHost.TabIndex = 0;
    195197      //
    196198      // itemsGroupBox
    197199      //
    198       this.itemsGroupBox.Controls.Add(this.splitContainer1);
     200      this.itemsGroupBox.Controls.Add(this.splitContainer);
    199201      this.itemsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
    200202      this.itemsGroupBox.Location = new System.Drawing.Point(0, 0);
     
    211213      this.Name = "ItemListView";
    212214      this.Size = new System.Drawing.Size(499, 342);
    213       this.splitContainer1.Panel1.ResumeLayout(false);
    214       this.splitContainer1.Panel2.ResumeLayout(false);
    215       this.splitContainer1.ResumeLayout(false);
     215      this.splitContainer.Panel1.ResumeLayout(false);
     216      this.splitContainer.Panel2.ResumeLayout(false);
     217      this.splitContainer.ResumeLayout(false);
    216218      this.detailsGroupBox.ResumeLayout(false);
    217219      this.itemsGroupBox.ResumeLayout(false);
     
    222224    #endregion
    223225
    224     private System.Windows.Forms.SplitContainer splitContainer1;
    225     private System.Windows.Forms.ColumnHeader columnHeader1;
     226    protected System.Windows.Forms.SplitContainer splitContainer;
     227    protected System.Windows.Forms.ColumnHeader listViewColumnHeader;
    226228    protected GroupBox itemsGroupBox;
    227229    protected ListView itemsListView;
     
    231233    protected Button moveUpButton;
    232234    protected Button moveDownButton;
    233     private ToolTip toolTip;
    234     private ImageList imageList;
     235    protected ToolTip toolTip;
     236    protected ImageList imageList;
    235237    protected ViewHost viewHost;
    236238  }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs

    r2664 r2676  
    168168
    169169    #region ListView Events
    170     private void itemsListView_SizeChanged(object sender, EventArgs e) {
     170    protected virtual void itemsListView_SizeChanged(object sender, EventArgs e) {
    171171      if (itemsListView.Columns.Count > 0)
    172172        itemsListView.Columns[0].Width = Math.Max(0, itemsListView.Width - 25);
     
    261261
    262262    #region NamedItemCollection Events
    263     private void ItemList_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {
     263    protected virtual void ItemList_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {
    264264      if (InvokeRequired)
    265265        Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsAdded), sender, e);
     
    268268          InsertListViewItem(item.Index, CreateListViewItem(item.Value));
    269269    }
    270     private void ItemList_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {
     270    protected virtual void ItemList_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {
    271271      if (InvokeRequired)
    272272        Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsRemoved), sender, e);
     
    279279      }
    280280    }
    281     private void ItemList_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {
     281    protected virtual void ItemList_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {
    282282      if (InvokeRequired)
    283283        Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsReplaced), sender, e);
     
    299299      }
    300300    }
    301     private void ItemList_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {
     301    protected virtual void ItemList_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {
    302302      if (InvokeRequired)
    303303        Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsMoved), sender, e);
     
    310310      }
    311311    }
    312     private void ItemList_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {
     312    protected virtual void ItemList_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {
    313313      if (InvokeRequired)
    314314        Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_CollectionReset), sender, e);
     
    327327
    328328    #region Item Events
    329     private void Item_Changed(object sender, ChangedEventArgs e) {
     329    protected virtual void Item_Changed(object sender, ChangedEventArgs e) {
    330330      if (InvokeRequired)
    331331        Invoke(new ChangedEventHandler(Item_Changed), sender, e);
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemParameterView.Designer.cs

    r2664 r2676  
    5050      this.valuePanel = new System.Windows.Forms.Panel();
    5151      this.viewHost = new HeuristicLab.Core.Views.ViewHost();
     52      this.clearValueButton = new System.Windows.Forms.Button();
     53      this.setValueButton = new System.Windows.Forms.Button();
    5254      this.actualNameTextBox = new System.Windows.Forms.TextBox();
    5355      this.actualNameLabel = new System.Windows.Forms.Label();
    54       this.setValueButton = new System.Windows.Forms.Button();
    55       this.clearValueButton = new System.Windows.Forms.Button();
    5656      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
     57      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5758      this.valueGroupBox.SuspendLayout();
    5859      this.valuePanel.SuspendLayout();
     
    7273      // nameTextBox
    7374      //
     75      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     76      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
     77      this.nameTextBox.Location = new System.Drawing.Point(80, 0);
    7478      this.nameTextBox.Size = new System.Drawing.Size(306, 20);
    7579      //
     
    103107      //
    104108      this.valuePanel.AllowDrop = true;
     109      this.valuePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     110                  | System.Windows.Forms.AnchorStyles.Left)
     111                  | System.Windows.Forms.AnchorStyles.Right)));
    105112      this.valuePanel.Controls.Add(this.viewHost);
    106       this.valuePanel.Location = new System.Drawing.Point(3, 48);
     113      this.valuePanel.Location = new System.Drawing.Point(6, 48);
    107114      this.valuePanel.Name = "valuePanel";
    108       this.valuePanel.Size = new System.Drawing.Size(380, 118);
     115      this.valuePanel.Size = new System.Drawing.Size(374, 115);
    109116      this.valuePanel.TabIndex = 0;
    110117      this.valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver);
     
    118125      this.viewHost.Name = "viewHost";
    119126      this.viewHost.Object = null;
    120       this.viewHost.Size = new System.Drawing.Size(380, 118);
     127      this.viewHost.Size = new System.Drawing.Size(374, 115);
    121128      this.viewHost.TabIndex = 0;
    122       //
    123       // actualNameTextBox
    124       //
    125       this.actualNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    126                   | System.Windows.Forms.AnchorStyles.Right)));
    127       this.actualNameTextBox.Location = new System.Drawing.Point(80, 26);
    128       this.actualNameTextBox.Name = "actualNameTextBox";
    129       this.actualNameTextBox.Size = new System.Drawing.Size(306, 20);
    130       this.actualNameTextBox.TabIndex = 3;
    131       this.actualNameTextBox.Validated += new System.EventHandler(this.actualNameTextBox_Validated);
    132       //
    133       // actualNameLabel
    134       //
    135       this.actualNameLabel.AutoSize = true;
    136       this.actualNameLabel.Location = new System.Drawing.Point(3, 29);
    137       this.actualNameLabel.Name = "actualNameLabel";
    138       this.actualNameLabel.Size = new System.Drawing.Size(71, 13);
    139       this.actualNameLabel.TabIndex = 2;
    140       this.actualNameLabel.Text = "&Actual Name:";
    141       //
    142       // setValueButton
    143       //
    144       this.setValueButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add;
    145       this.setValueButton.Location = new System.Drawing.Point(6, 19);
    146       this.setValueButton.Name = "setValueButton";
    147       this.setValueButton.Size = new System.Drawing.Size(23, 23);
    148       this.setValueButton.TabIndex = 8;
    149       this.toolTip.SetToolTip(this.setValueButton, "Set Value");
    150       this.setValueButton.UseVisualStyleBackColor = true;
    151       this.setValueButton.Click += new System.EventHandler(this.setValueButton_Click);
    152129      //
    153130      // clearValueButton
     
    163140      this.clearValueButton.Click += new System.EventHandler(this.clearValueButton_Click);
    164141      //
    165       // ParameterView
     142      // setValueButton
     143      //
     144      this.setValueButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add;
     145      this.setValueButton.Location = new System.Drawing.Point(6, 19);
     146      this.setValueButton.Name = "setValueButton";
     147      this.setValueButton.Size = new System.Drawing.Size(23, 23);
     148      this.setValueButton.TabIndex = 8;
     149      this.toolTip.SetToolTip(this.setValueButton, "Set Value");
     150      this.setValueButton.UseVisualStyleBackColor = true;
     151      this.setValueButton.Click += new System.EventHandler(this.setValueButton_Click);
     152      //
     153      // actualNameTextBox
     154      //
     155      this.actualNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     156                  | System.Windows.Forms.AnchorStyles.Right)));
     157      this.actualNameTextBox.Location = new System.Drawing.Point(80, 26);
     158      this.actualNameTextBox.Name = "actualNameTextBox";
     159      this.actualNameTextBox.Size = new System.Drawing.Size(306, 20);
     160      this.actualNameTextBox.TabIndex = 3;
     161      this.actualNameTextBox.Validated += new System.EventHandler(this.actualNameTextBox_Validated);
     162      //
     163      // actualNameLabel
     164      //
     165      this.actualNameLabel.AutoSize = true;
     166      this.actualNameLabel.Location = new System.Drawing.Point(3, 29);
     167      this.actualNameLabel.Name = "actualNameLabel";
     168      this.actualNameLabel.Size = new System.Drawing.Size(71, 13);
     169      this.actualNameLabel.TabIndex = 2;
     170      this.actualNameLabel.Text = "&Actual Name:";
     171      //
     172      // ItemParameterView
    166173      //
    167174      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    168175      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    169176      this.Controls.Add(this.valueGroupBox);
     177      this.Controls.Add(this.actualNameTextBox);
    170178      this.Controls.Add(this.actualNameLabel);
    171       this.Controls.Add(this.actualNameTextBox);
    172       this.Name = "ParameterView";
     179      this.Name = "ItemParameterView";
    173180      this.Size = new System.Drawing.Size(386, 315);
    174       this.Controls.SetChildIndex(this.dataTypeLabel, 0);
    175       this.Controls.SetChildIndex(this.dataTypeTextBox, 0);
    176181      this.Controls.SetChildIndex(this.descriptionTextBox, 0);
    177182      this.Controls.SetChildIndex(this.descriptionLabel, 0);
     183      this.Controls.SetChildIndex(this.dataTypeTextBox, 0);
     184      this.Controls.SetChildIndex(this.actualNameLabel, 0);
     185      this.Controls.SetChildIndex(this.dataTypeLabel, 0);
     186      this.Controls.SetChildIndex(this.nameTextBox, 0);
    178187      this.Controls.SetChildIndex(this.actualNameTextBox, 0);
    179       this.Controls.SetChildIndex(this.actualNameLabel, 0);
     188      this.Controls.SetChildIndex(this.nameLabel, 0);
    180189      this.Controls.SetChildIndex(this.valueGroupBox, 0);
    181       this.Controls.SetChildIndex(this.nameLabel, 0);
    182       this.Controls.SetChildIndex(this.nameTextBox, 0);
     190      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    183191      this.valueGroupBox.ResumeLayout(false);
    184192      this.valuePanel.ResumeLayout(false);
     
    190198    #endregion
    191199
    192     private System.Windows.Forms.GroupBox valueGroupBox;
    193     private System.Windows.Forms.TextBox actualNameTextBox;
    194     private System.Windows.Forms.Label actualNameLabel;
    195     private System.Windows.Forms.Panel valuePanel;
    196     private ViewHost viewHost;
    197     private System.Windows.Forms.Button setValueButton;
    198     private System.Windows.Forms.ToolTip toolTip;
    199     private System.Windows.Forms.Button clearValueButton;
     200    protected System.Windows.Forms.GroupBox valueGroupBox;
     201    protected System.Windows.Forms.TextBox actualNameTextBox;
     202    protected System.Windows.Forms.Label actualNameLabel;
     203    protected System.Windows.Forms.Panel valuePanel;
     204    protected ViewHost viewHost;
     205    protected System.Windows.Forms.Button setValueButton;
     206    protected System.Windows.Forms.ToolTip toolTip;
     207    protected System.Windows.Forms.Button clearValueButton;
    200208  }
    201209}
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemParameterView.cs

    r2664 r2676  
    3535  [Content(typeof(ItemParameter), true)]
    3636  public partial class ItemParameterView : ParameterView {
    37     private TypeSelectorDialog typeSelectorDialog;
     37    protected TypeSelectorDialog typeSelectorDialog;
    3838
    3939    /// <summary>
     
    105105    }
    106106
    107     private void Parameter_ActualNameChanged(object sender, EventArgs e) {
     107    protected virtual void Parameter_ActualNameChanged(object sender, EventArgs e) {
    108108      if (InvokeRequired)
    109109        Invoke(new EventHandler(Parameter_ActualNameChanged), sender, e);
     
    111111        actualNameTextBox.Text = Parameter.ActualName;
    112112    }
    113     private void Parameter_ValueChanged(object sender, EventArgs e) {
     113    protected virtual void Parameter_ValueChanged(object sender, EventArgs e) {
    114114      if (InvokeRequired)
    115115        Invoke(new EventHandler(Parameter_ValueChanged), sender, e);
     
    122122    }
    123123
    124     private void actualNameTextBox_Validated(object sender, EventArgs e) {
     124    protected virtual void actualNameTextBox_Validated(object sender, EventArgs e) {
    125125      Parameter.ActualName = actualNameTextBox.Text;
    126126    }
    127     private void setValueButton_Click(object sender, EventArgs e) {
     127    protected virtual void setValueButton_Click(object sender, EventArgs e) {
    128128      if (typeSelectorDialog == null) {
    129129        typeSelectorDialog = new TypeSelectorDialog();
     
    134134        Parameter.Value = (IItem)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
    135135    }
    136     private void clearValueButton_Click(object sender, EventArgs e) {
     136    protected virtual void clearValueButton_Click(object sender, EventArgs e) {
    137137      Parameter.Value = null;
    138138    }
    139     private void valuePanel_DragEnterOver(object sender, DragEventArgs e) {
     139    protected virtual void valuePanel_DragEnterOver(object sender, DragEventArgs e) {
    140140      e.Effect = DragDropEffects.None;
    141141      Type type = e.Data.GetData("Type") as Type;
     
    146146      }
    147147    }
    148     private void valuePanel_DragDrop(object sender, DragEventArgs e) {
     148    protected virtual void valuePanel_DragDrop(object sender, DragEventArgs e) {
    149149      if (e.Effect != DragDropEffects.None) {
    150150        IItem item = e.Data.GetData("Value") as IItem;
  • trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemCollectionView.cs

    r2655 r2676  
    8989
    9090    #region NamedItemCollection Events
    91     private void NamedItemCollection_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<T> e) {
     91    protected virtual void NamedItemCollection_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<T> e) {
    9292      if (InvokeRequired)
    9393        Invoke(new CollectionItemsChangedEventHandler<T>(NamedItemCollection_ItemsReplaced), sender, e);
     
    102102
    103103    #region Helpers
    104     protected string GetUniqueName(string originalName) {
     104    protected virtual string GetUniqueName(string originalName) {
    105105      if (!NamedItemCollection.ContainsKey(originalName))
    106106        return originalName;
  • trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemView.Designer.cs

    r2664 r2676  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.components = new System.ComponentModel.Container();
    4748      this.nameLabel = new System.Windows.Forms.Label();
    4849      this.nameTextBox = new System.Windows.Forms.TextBox();
    4950      this.descriptionLabel = new System.Windows.Forms.Label();
    5051      this.descriptionTextBox = new System.Windows.Forms.TextBox();
     52      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     53      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5154      this.SuspendLayout();
    5255      //
     
    6871      this.nameTextBox.Size = new System.Drawing.Size(279, 20);
    6972      this.nameTextBox.TabIndex = 1;
     73      this.nameTextBox.Validated += new System.EventHandler(this.nameTextBox_Validated);
     74      this.nameTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.nameTextBox_KeyDown);
    7075      this.nameTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.nameTextBox_Validating);
    7176      //
     
    8893      this.descriptionTextBox.Name = "descriptionTextBox";
    8994      this.descriptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
    90       this.descriptionTextBox.Size = new System.Drawing.Size(279, 62);
     95      this.descriptionTextBox.Size = new System.Drawing.Size(279, 86);
    9196      this.descriptionTextBox.TabIndex = 3;
    9297      this.descriptionTextBox.Validated += new System.EventHandler(this.descriptionTextBox_Validated);
    9398      //
    94       // NamedItemBaseView
     99      // errorProvider
     100      //
     101      this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
     102      this.errorProvider.ContainerControl = this;
     103      //
     104      // NamedItemView
    95105      //
    96106      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     
    100110      this.Controls.Add(this.descriptionLabel);
    101111      this.Controls.Add(this.nameLabel);
    102       this.Name = "NamedItemBaseView";
    103       this.Size = new System.Drawing.Size(351, 88);
     112      this.Name = "NamedItemView";
     113      this.Size = new System.Drawing.Size(351, 112);
     114      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    104115      this.ResumeLayout(false);
    105116      this.PerformLayout();
     
    113124    protected System.Windows.Forms.Label descriptionLabel;
    114125    protected System.Windows.Forms.TextBox descriptionTextBox;
     126    protected System.Windows.Forms.ErrorProvider errorProvider;
    115127  }
    116128}
  • trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemView.cs

    r2669 r2676  
    3535  [Content(typeof(NamedItem), true)]
    3636  public partial class NamedItemView : ItemView {
    37     public NamedItem NamedItemBase {
     37    public NamedItem NamedItem {
    3838      get { return (NamedItem)Item; }
    3939      set { base.Item = value; }
     
    4343      InitializeComponent();
    4444      Caption = "NamedItem";
     45      errorProvider.SetIconAlignment(nameTextBox, ErrorIconAlignment.MiddleLeft);
     46      errorProvider.SetIconPadding(nameTextBox, 2);
    4547    }
    46     public NamedItemView(NamedItem namedItemBase)
     48    public NamedItemView(NamedItem namedItem)
    4749      : this() {
    48       NamedItemBase = namedItemBase;
     50      NamedItem = namedItem;
    4951    }
    5052
    5153    protected override void DeregisterObjectEvents() {
    52       NamedItemBase.NameChanged -= new EventHandler(NamedItemBase_NameChanged);
    53       NamedItemBase.DescriptionChanged -= new EventHandler(NamedItemBase_DescriptionChanged);
     54      NamedItem.NameChanged -= new EventHandler(NamedItem_NameChanged);
     55      NamedItem.DescriptionChanged -= new EventHandler(NamedItem_DescriptionChanged);
    5456      base.DeregisterObjectEvents();
    5557    }
    5658    protected override void RegisterObjectEvents() {
    5759      base.RegisterObjectEvents();
    58       NamedItemBase.NameChanged += new EventHandler(NamedItemBase_NameChanged);
    59       NamedItemBase.DescriptionChanged += new EventHandler(NamedItemBase_DescriptionChanged);
     60      NamedItem.NameChanged += new EventHandler(NamedItem_NameChanged);
     61      NamedItem.DescriptionChanged += new EventHandler(NamedItem_DescriptionChanged);
    6062    }
    6163
    6264    protected override void OnObjectChanged() {
    6365      base.OnObjectChanged();
    64       if (NamedItemBase == null) {
     66      if (NamedItem == null) {
    6567        Caption = "NamedItem";
    6668        nameTextBox.Text = "-";
     
    7173        descriptionTextBox.Enabled = false;
    7274      } else {
    73         Caption = NamedItemBase.Name + " (" + NamedItemBase.GetType().Name + ")";
    74         nameTextBox.Text = NamedItemBase.Name;
    75         nameTextBox.ReadOnly = !NamedItemBase.CanChangeName;
     75        Caption = NamedItem.Name + " (" + NamedItem.GetType().Name + ")";
     76        nameTextBox.Text = NamedItem.Name;
     77        nameTextBox.ReadOnly = !NamedItem.CanChangeName;
    7678        nameTextBox.Enabled = true;
    77         descriptionTextBox.Text = NamedItemBase.Description;
    78         descriptionTextBox.ReadOnly = !NamedItemBase.CanChangeDescription;
     79        descriptionTextBox.Text = NamedItem.Description;
     80        descriptionTextBox.ReadOnly = !NamedItem.CanChangeDescription;
    7981        descriptionTextBox.Enabled = true;
    8082      }
    8183    }
    8284
    83     protected virtual void NamedItemBase_NameChanged(object sender, EventArgs e) {
     85    protected virtual void NamedItem_NameChanged(object sender, EventArgs e) {
    8486      if (InvokeRequired)
    85         Invoke(new EventHandler(NamedItemBase_NameChanged), sender, e);
     87        Invoke(new EventHandler(NamedItem_NameChanged), sender, e);
    8688      else
    87         nameTextBox.Text = NamedItemBase.Name;
     89        nameTextBox.Text = NamedItem.Name;
    8890    }
    89     protected virtual void NamedItemBase_DescriptionChanged(object sender, EventArgs e) {
     91    protected virtual void NamedItem_DescriptionChanged(object sender, EventArgs e) {
    9092      if (InvokeRequired)
    91         Invoke(new EventHandler(NamedItemBase_DescriptionChanged), sender, e);
     93        Invoke(new EventHandler(NamedItem_DescriptionChanged), sender, e);
    9294      else
    93         descriptionTextBox.Text = NamedItemBase.Description;
     95        descriptionTextBox.Text = NamedItem.Description;
    9496    }
    9597
    9698    protected virtual void nameTextBox_Validating(object sender, CancelEventArgs e) {
    97       if (NamedItemBase.CanChangeName) {
    98         string oldName = NamedItemBase.Name;
    99         NamedItemBase.Name = nameTextBox.Text;
     99      if (NamedItem.CanChangeName) {
     100        NamedItem.Name = nameTextBox.Text;
    100101
    101102        // check if variable name was set successfully
    102         e.Cancel = e.Cancel || !NamedItemBase.Name.Equals(nameTextBox.Text);
    103         if (e.Cancel) {
    104           MessageBox.Show(this, "\"" + nameTextBox.Text + "\" is not a valid name.", "Invalid Value", MessageBoxButtons.OK, MessageBoxIcon.Error);
    105           nameTextBox.Text = oldName;
     103        if (!NamedItem.Name.Equals(nameTextBox.Text)) {
     104          e.Cancel = true;
     105          errorProvider.SetError(nameTextBox, "Invalid Name");
    106106          nameTextBox.SelectAll();
    107           nameTextBox.Focus();
    108107        }
    109108      }
    110109    }
     110    protected virtual void nameTextBox_Validated(object sender, EventArgs e) {
     111      errorProvider.SetError(nameTextBox, string.Empty);
     112    }
     113    protected virtual void nameTextBox_KeyDown(object sender, KeyEventArgs e) {
     114      if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return))
     115        nameLabel.Focus();  // set focus on label to validate data
     116      if (e.KeyCode == Keys.Escape) {
     117        nameTextBox.Text = NamedItem.Name;
     118        nameLabel.Focus();  // set focus on label to validate data
     119      }
     120    }
    111121    protected virtual void descriptionTextBox_Validated(object sender, EventArgs e) {
    112       if (NamedItemBase.CanChangeDescription)
    113         NamedItemBase.Description = descriptionTextBox.Text;
     122      if (NamedItem.CanChangeDescription)
     123        NamedItem.Description = descriptionTextBox.Text;
    114124    }
    115125  }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ObjectView.cs

    r2664 r2676  
    2828using System.Xml;
    2929using System.Windows.Forms;
     30using HeuristicLab.MainForm;
    3031using HeuristicLab.MainForm.WindowsForms;
    3132
     
    4445    public object Object {
    4546      get { return obj; }
    46       protected set {
     47      set {
     48        if ((value != null) && (!MainFormManager.ViewCanViewObject(this, value)))
     49          throw new ArgumentException(string.Format("View \"{0}\" cannot view object \"{1}\".", this.GetType().Name, value.GetType().Name));
    4750        if (InvokeRequired) {
    4851          Invoke(new Action<object>(delegate(object o) { Object = o; }), value);
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorCollectionView.cs

    r2655 r2676  
    1414  [Content(typeof(IObservableCollection<IOperator>), true)]
    1515  public partial class OperatorCollectionView : ItemCollectionView<IOperator> {
    16     private TypeSelectorDialog typeSelectorDialog;
     16    protected TypeSelectorDialog typeSelectorDialog;
    1717
    1818    /// <summary>
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorGraphView.Designer.cs

    r2655 r2676  
    7878      // operatorsView
    7979      //
     80      this.operatorsView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     81                  | System.Windows.Forms.AnchorStyles.Left)
     82                  | System.Windows.Forms.AnchorStyles.Right)));
    8083      this.operatorsView.Caption = "Operator Set";
    81       this.operatorsView.Dock = System.Windows.Forms.DockStyle.Fill;
    8284      this.operatorsView.ItemCollection = null;
    8385      this.operatorsView.ItemSet = null;
    84       this.operatorsView.Location = new System.Drawing.Point(0, 0);
     86      this.operatorsView.Location = new System.Drawing.Point(3, 3);
    8587      this.operatorsView.Name = "operatorsView";
    86       this.operatorsView.Size = new System.Drawing.Size(608, 316);
     88      this.operatorsView.Object = null;
     89      this.operatorsView.Size = new System.Drawing.Size(602, 309);
    8790      this.operatorsView.TabIndex = 0;
    8891      this.operatorsView.Load += new System.EventHandler(this.operatorsView_Load);
     
    9093      // graphView
    9194      //
     95      this.graphView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     96                  | System.Windows.Forms.AnchorStyles.Left)
     97                  | System.Windows.Forms.AnchorStyles.Right)));
    9298      this.graphView.Caption = "Operator";
    93       this.graphView.Dock = System.Windows.Forms.DockStyle.Fill;
    9499      this.graphView.Item = null;
    95       this.graphView.Location = new System.Drawing.Point(3, 16);
     100      this.graphView.Location = new System.Drawing.Point(6, 19);
    96101      this.graphView.Name = "graphView";
     102      this.graphView.Object = null;
    97103      this.graphView.Operator = null;
    98       this.graphView.Size = new System.Drawing.Size(602, 194);
     104      this.graphView.Size = new System.Drawing.Size(590, 183);
    99105      this.graphView.TabIndex = 0;
    100106      //
     
    114120      this.splitContainer.Panel2.Controls.Add(this.graphGroupBox);
    115121      this.splitContainer.Size = new System.Drawing.Size(608, 533);
    116       this.splitContainer.SplitterDistance = 316;
     122      this.splitContainer.SplitterDistance = 315;
    117123      this.splitContainer.TabIndex = 3;
    118124      //
    119125      // graphGroupBox
    120126      //
     127      this.graphGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     128                  | System.Windows.Forms.AnchorStyles.Left)
     129                  | System.Windows.Forms.AnchorStyles.Right)));
    121130      this.graphGroupBox.Controls.Add(this.graphView);
    122       this.graphGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
    123       this.graphGroupBox.Location = new System.Drawing.Point(0, 0);
     131      this.graphGroupBox.Location = new System.Drawing.Point(3, 3);
    124132      this.graphGroupBox.Name = "graphGroupBox";
    125       this.graphGroupBox.Size = new System.Drawing.Size(608, 213);
     133      this.graphGroupBox.Size = new System.Drawing.Size(602, 208);
    126134      this.graphGroupBox.TabIndex = 0;
    127135      this.graphGroupBox.TabStop = false;
     
    146154    #endregion
    147155
    148     private System.Windows.Forms.ContextMenuStrip operatorsContextMenuStrip;
    149     private System.Windows.Forms.ToolStripMenuItem initialOperatorToolStripMenuItem;
    150     private OperatorSetView operatorsView;
    151     private OperatorTreeView graphView;
    152     private System.Windows.Forms.SplitContainer splitContainer;
    153     private System.Windows.Forms.GroupBox graphGroupBox;
     156    protected System.Windows.Forms.ContextMenuStrip operatorsContextMenuStrip;
     157    protected System.Windows.Forms.ToolStripMenuItem initialOperatorToolStripMenuItem;
     158    protected OperatorSetView operatorsView;
     159    protected OperatorTreeView graphView;
     160    protected System.Windows.Forms.SplitContainer splitContainer;
     161    protected System.Windows.Forms.GroupBox graphGroupBox;
    154162  }
    155163}
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorGraphView.cs

    r2664 r2676  
    110110    }
    111111
    112     private void MarkInitialOperator() {
     112    protected virtual void MarkInitialOperator() {
    113113      foreach (ListViewItem item in operatorsView.ItemsListView.Items) {
    114114        if ((OperatorGraph.InitialOperator != null) && (((IOperator)item.Tag) == OperatorGraph.InitialOperator))
     
    120120
    121121    #region Context Menu Events
    122     private void operatorsContextMenuStrip_Opening(object sender, CancelEventArgs e) {
     122    protected virtual void operatorsView_Load(object sender, EventArgs e) {
     123      operatorsView.ItemsListView.ContextMenuStrip = operatorsContextMenuStrip;
     124    }
     125    protected virtual void operatorsContextMenuStrip_Opening(object sender, CancelEventArgs e) {
    123126      initialOperatorToolStripMenuItem.Enabled = false;
    124127      initialOperatorToolStripMenuItem.Checked = false;
     
    131134      }
    132135    }
    133     private void initialOperatorToolStripMenuItem_Click(object sender, EventArgs e) {
     136    protected virtual void initialOperatorToolStripMenuItem_Click(object sender, EventArgs e) {
    134137      if (initialOperatorToolStripMenuItem.Checked)
    135138        OperatorGraph.InitialOperator = (IOperator)initialOperatorToolStripMenuItem.Tag;
     
    140143
    141144    #region OperatorGraph Events
    142     private void OperatorGraph_InitialOperatorChanged(object sender, EventArgs e) {
     145    protected virtual void OperatorGraph_InitialOperatorChanged(object sender, EventArgs e) {
    143146      if (InvokeRequired)
    144147        Invoke(new EventHandler(OperatorGraph_InitialOperatorChanged), sender, e);
     
    149152    }
    150153    #endregion
    151 
    152     private void operatorsView_Load(object sender, EventArgs e) {
    153       operatorsView.ItemsListView.ContextMenuStrip = operatorsContextMenuStrip;
    154     }
    155154  }
    156155}
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorListView.cs

    r2655 r2676  
    1414  [Content(typeof(IObservableList<IOperator>), true)]
    1515  public partial class OperatorListView : ItemListView<IOperator> {
    16     TypeSelectorDialog typeSelectorDialog;
     16    protected TypeSelectorDialog typeSelectorDialog;
    1717
    1818    /// <summary>
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorSetView.cs

    r2655 r2676  
    1414  [Content(typeof(IObservableSet<IOperator>), true)]
    1515  public partial class OperatorSetView : ItemSetView<IOperator> {
    16     TypeSelectorDialog typeSelectorDialog;
     16    protected TypeSelectorDialog typeSelectorDialog;
    1717
    1818    /// <summary>
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorTreeView.Designer.cs

    r2655 r2676  
    9292            this.viewToolStripMenuItem});
    9393      this.graphContextMenuStrip.Name = "graphContextMenuStrip";
    94       this.graphContextMenuStrip.Size = new System.Drawing.Size(153, 70);
     94      this.graphContextMenuStrip.Size = new System.Drawing.Size(132, 48);
    9595      this.graphContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.graphContextMenuStrip_Opening);
    9696      //
     
    9999      this.breakpointToolStripMenuItem.CheckOnClick = true;
    100100      this.breakpointToolStripMenuItem.Name = "breakpointToolStripMenuItem";
    101       this.breakpointToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
     101      this.breakpointToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
    102102      this.breakpointToolStripMenuItem.Text = "&Breakpoint";
    103103      this.breakpointToolStripMenuItem.ToolTipText = "Halt engine execution after executing the operator";
     
    107107      //
    108108      this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
    109       this.viewToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
     109      this.viewToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
    110110      this.viewToolStripMenuItem.Text = "&View...";
    111111      this.viewToolStripMenuItem.ToolTipText = "View operator";
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorTreeView.cs

    r2664 r2676  
    3737  /// </summary>
    3838  [Content(typeof(IOperator), false)]
    39   public partial class OperatorTreeView : ItemView {
     39  public sealed partial class OperatorTreeView : ItemView {
    4040    private Dictionary<IOperatorParameter, List<TreeNode>> operatorParameterNodeTable;
    4141    private Dictionary<IOperator, List<TreeNode>> operatorNodeTable;
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorsSidebar.Designer.cs

    r2655 r2676  
    7272    #endregion
    7373
    74     private TypeSelector typeSelector;
    75 
    76 
     74    protected TypeSelector typeSelector;
    7775  }
    7876}
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorsSidebar.cs

    r2655 r2676  
    3737    }
    3838
    39     private void OperatorsSidebar_Load(object sender, EventArgs e) {
     39    protected virtual void OperatorsSidebar_Load(object sender, EventArgs e) {
    4040      typeSelector.Configure(typeof(IOperator), false, false);
    4141    }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ParameterCollectionView.cs

    r2655 r2676  
    1414  [Content(typeof(IObservableKeyedCollection<string, IParameter>), true)]
    1515  public partial class ParameterCollectionView : NamedItemCollectionView<IParameter> {
    16     CreateParameterDialog createParameterDialog;
     16    protected CreateParameterDialog createParameterDialog;
    1717    /// <summary>
    1818    /// Initializes a new instance of <see cref="VariablesScopeView"/> with caption "Variables Scope View".
  • trunk/sources/HeuristicLab.Core.Views/3.3/ParameterView.Designer.cs

    r2664 r2676  
    4747      this.dataTypeLabel = new System.Windows.Forms.Label();
    4848      this.dataTypeTextBox = new System.Windows.Forms.TextBox();
     49      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    4950      this.SuspendLayout();
    5051      //
    5152      // nameTextBox
    5253      //
    53       this.nameTextBox.Location = new System.Drawing.Point(80, 0);
    54       this.nameTextBox.Size = new System.Drawing.Size(313, 20);
     54      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     55      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
     56      this.nameTextBox.Location = new System.Drawing.Point(72, 0);
     57      this.nameTextBox.Size = new System.Drawing.Size(321, 20);
     58      //
     59      // nameLabel
     60      //
     61      this.nameLabel.Location = new System.Drawing.Point(3, 3);
     62      //
     63      // descriptionLabel
     64      //
     65      this.descriptionLabel.Location = new System.Drawing.Point(3, 29);
    5566      //
    5667      // descriptionTextBox
     
    5869      this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    5970                  | System.Windows.Forms.AnchorStyles.Right)));
    60       this.descriptionTextBox.Location = new System.Drawing.Point(80, 26);
    61       this.descriptionTextBox.Size = new System.Drawing.Size(313, 62);
     71      this.descriptionTextBox.Location = new System.Drawing.Point(72, 26);
     72      this.descriptionTextBox.Size = new System.Drawing.Size(321, 62);
    6273      //
    6374      // dataTypeLabel
     
    7485      this.dataTypeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    7586                  | System.Windows.Forms.AnchorStyles.Right)));
    76       this.dataTypeTextBox.Location = new System.Drawing.Point(80, 94);
     87      this.dataTypeTextBox.Location = new System.Drawing.Point(72, 94);
    7788      this.dataTypeTextBox.Name = "dataTypeTextBox";
    7889      this.dataTypeTextBox.ReadOnly = true;
    79       this.dataTypeTextBox.Size = new System.Drawing.Size(313, 20);
     90      this.dataTypeTextBox.Size = new System.Drawing.Size(321, 20);
    8091      this.dataTypeTextBox.TabIndex = 5;
    8192      //
    82       // ParameterBaseView
     93      // ParameterView
    8394      //
    8495      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    8596      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     97      this.Controls.Add(this.dataTypeLabel);
    8698      this.Controls.Add(this.dataTypeTextBox);
    87       this.Controls.Add(this.dataTypeLabel);
    88       this.Name = "ParameterBaseView";
    89       this.Size = new System.Drawing.Size(393, 117);
     99      this.Name = "ParameterView";
     100      this.Size = new System.Drawing.Size(393, 124);
     101      this.Controls.SetChildIndex(this.dataTypeTextBox, 0);
    90102      this.Controls.SetChildIndex(this.descriptionTextBox, 0);
    91       this.Controls.SetChildIndex(this.dataTypeLabel, 0);
    92       this.Controls.SetChildIndex(this.dataTypeTextBox, 0);
    93103      this.Controls.SetChildIndex(this.descriptionLabel, 0);
    94104      this.Controls.SetChildIndex(this.nameLabel, 0);
    95105      this.Controls.SetChildIndex(this.nameTextBox, 0);
     106      this.Controls.SetChildIndex(this.dataTypeLabel, 0);
     107      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    96108      this.ResumeLayout(false);
    97109      this.PerformLayout();
  • trunk/sources/HeuristicLab.Core.Views/3.3/ScopeView.Designer.cs

    r2655 r2676  
    6161      // scopesTreeView
    6262      //
    63       this.scopesTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
     63      this.scopesTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     64                  | System.Windows.Forms.AnchorStyles.Left)
     65                  | System.Windows.Forms.AnchorStyles.Right)));
    6466      this.scopesTreeView.HideSelection = false;
    65       this.scopesTreeView.Location = new System.Drawing.Point(3, 16);
     67      this.scopesTreeView.Location = new System.Drawing.Point(6, 19);
    6668      this.scopesTreeView.Name = "scopesTreeView";
    6769      this.scopesTreeView.ShowNodeToolTips = true;
    68       this.scopesTreeView.Size = new System.Drawing.Size(394, 181);
     70      this.scopesTreeView.Size = new System.Drawing.Size(382, 169);
    6971      this.scopesTreeView.TabIndex = 0;
    7072      this.scopesTreeView.AfterCollapse += new System.Windows.Forms.TreeViewEventHandler(this.scopesTreeView_AfterCollapse);
     
    9395      // scopesGroupBox
    9496      //
     97      this.scopesGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     98                  | System.Windows.Forms.AnchorStyles.Left)
     99                  | System.Windows.Forms.AnchorStyles.Right)));
    95100      this.scopesGroupBox.Controls.Add(this.scopesTreeView);
    96       this.scopesGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
    97       this.scopesGroupBox.Location = new System.Drawing.Point(0, 0);
     101      this.scopesGroupBox.Location = new System.Drawing.Point(3, 3);
    98102      this.scopesGroupBox.Name = "scopesGroupBox";
    99       this.scopesGroupBox.Size = new System.Drawing.Size(400, 200);
     103      this.scopesGroupBox.Size = new System.Drawing.Size(394, 194);
    100104      this.scopesGroupBox.TabIndex = 0;
    101105      this.scopesGroupBox.TabStop = false;
     
    104108      // variableCollectionView
    105109      //
     110      this.variableCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     111                  | System.Windows.Forms.AnchorStyles.Left)
     112                  | System.Windows.Forms.AnchorStyles.Right)));
    106113      this.variableCollectionView.Caption = "VariableCollection";
    107       this.variableCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
    108114      this.variableCollectionView.ItemCollection = null;
    109       this.variableCollectionView.Location = new System.Drawing.Point(0, 0);
     115      this.variableCollectionView.Location = new System.Drawing.Point(3, 3);
    110116      this.variableCollectionView.Name = "variableCollectionView";
    111117      this.variableCollectionView.NamedItemCollection = null;
    112       this.variableCollectionView.Size = new System.Drawing.Size(400, 196);
     118      this.variableCollectionView.Object = null;
     119      this.variableCollectionView.Size = new System.Drawing.Size(394, 190);
    113120      this.variableCollectionView.TabIndex = 0;
    114121      //
  • trunk/sources/HeuristicLab.Core.Views/3.3/ScopeView.cs

    r2664 r2676  
    3737  /// </summary>
    3838  [Content(typeof(Scope), true)]
    39   public partial class ScopeView : ItemView {
     39  public sealed partial class ScopeView : ItemView {
    4040    private Dictionary<Scope, TreeNode> scopeNodeTable;
    4141    private Dictionary<ScopeList, Scope> subScopesScopeTable;
  • trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.Designer.cs

    r2655 r2676  
    4848      this.typesTreeView = new System.Windows.Forms.TreeView();
    4949      this.imageList = new System.Windows.Forms.ImageList(this.components);
    50       this.groupBox = new System.Windows.Forms.GroupBox();
     50      this.typesGroupBox = new System.Windows.Forms.GroupBox();
    5151      this.splitContainer = new System.Windows.Forms.SplitContainer();
    5252      this.descriptionTextBox = new System.Windows.Forms.TextBox();
    53       this.groupBox.SuspendLayout();
     53      this.typesGroupBox.SuspendLayout();
    5454      this.splitContainer.Panel1.SuspendLayout();
    5555      this.splitContainer.Panel2.SuspendLayout();
     
    5959      // typesTreeView
    6060      //
    61       this.typesTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
     61      this.typesTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     62                  | System.Windows.Forms.AnchorStyles.Left)
     63                  | System.Windows.Forms.AnchorStyles.Right)));
    6264      this.typesTreeView.HideSelection = false;
    6365      this.typesTreeView.ImageIndex = 0;
    6466      this.typesTreeView.ImageList = this.imageList;
    65       this.typesTreeView.Location = new System.Drawing.Point(0, 0);
     67      this.typesTreeView.Location = new System.Drawing.Point(3, 3);
    6668      this.typesTreeView.Name = "typesTreeView";
    6769      this.typesTreeView.SelectedImageIndex = 0;
    6870      this.typesTreeView.ShowNodeToolTips = true;
    69       this.typesTreeView.Size = new System.Drawing.Size(297, 199);
     71      this.typesTreeView.Size = new System.Drawing.Size(291, 192);
    7072      this.typesTreeView.TabIndex = 0;
    7173      this.typesTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.typesTreeView_AfterSelect);
     
    7880      this.imageList.TransparentColor = System.Drawing.Color.Transparent;
    7981      //
    80       // groupBox
     82      // typesGroupBox
    8183      //
    82       this.groupBox.Controls.Add(this.splitContainer);
    83       this.groupBox.Dock = System.Windows.Forms.DockStyle.Fill;
    84       this.groupBox.Location = new System.Drawing.Point(0, 0);
    85       this.groupBox.Name = "groupBox";
    86       this.groupBox.Size = new System.Drawing.Size(303, 306);
    87       this.groupBox.TabIndex = 0;
    88       this.groupBox.TabStop = false;
    89       this.groupBox.Text = "&Available Types";
     84      this.typesGroupBox.Controls.Add(this.splitContainer);
     85      this.typesGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
     86      this.typesGroupBox.Location = new System.Drawing.Point(0, 0);
     87      this.typesGroupBox.Name = "typesGroupBox";
     88      this.typesGroupBox.Size = new System.Drawing.Size(303, 306);
     89      this.typesGroupBox.TabIndex = 0;
     90      this.typesGroupBox.TabStop = false;
     91      this.typesGroupBox.Text = "&Available Types";
    9092      //
    9193      // splitContainer
     
    104106      this.splitContainer.Panel2.Controls.Add(this.descriptionTextBox);
    105107      this.splitContainer.Size = new System.Drawing.Size(297, 287);
    106       this.splitContainer.SplitterDistance = 199;
     108      this.splitContainer.SplitterDistance = 198;
    107109      this.splitContainer.TabIndex = 2;
    108110      //
    109111      // descriptionTextBox
    110112      //
    111       this.descriptionTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
     113      this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     114                  | System.Windows.Forms.AnchorStyles.Left)
     115                  | System.Windows.Forms.AnchorStyles.Right)));
    112116      this.descriptionTextBox.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    113       this.descriptionTextBox.Location = new System.Drawing.Point(0, 0);
     117      this.descriptionTextBox.Location = new System.Drawing.Point(3, 3);
    114118      this.descriptionTextBox.Multiline = true;
    115119      this.descriptionTextBox.Name = "descriptionTextBox";
    116120      this.descriptionTextBox.ReadOnly = true;
    117121      this.descriptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
    118       this.descriptionTextBox.Size = new System.Drawing.Size(297, 84);
     122      this.descriptionTextBox.Size = new System.Drawing.Size(291, 79);
    119123      this.descriptionTextBox.TabIndex = 0;
    120124      //
     
    123127      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    124128      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    125       this.Controls.Add(this.groupBox);
     129      this.Controls.Add(this.typesGroupBox);
    126130      this.Name = "TypeSelector";
    127131      this.Size = new System.Drawing.Size(303, 306);
    128       this.groupBox.ResumeLayout(false);
     132      this.typesGroupBox.ResumeLayout(false);
    129133      this.splitContainer.Panel1.ResumeLayout(false);
    130134      this.splitContainer.Panel2.ResumeLayout(false);
     
    137141    #endregion
    138142
    139     private System.Windows.Forms.GroupBox groupBox;
    140     private System.Windows.Forms.TextBox descriptionTextBox;
    141     private System.Windows.Forms.ImageList imageList;
    142     private System.Windows.Forms.TreeView typesTreeView;
    143     private System.Windows.Forms.SplitContainer splitContainer;
    144 
    145 
     143    protected System.Windows.Forms.GroupBox typesGroupBox;
     144    protected System.Windows.Forms.TextBox descriptionTextBox;
     145    protected System.Windows.Forms.ImageList imageList;
     146    protected System.Windows.Forms.TreeView typesTreeView;
     147    protected System.Windows.Forms.SplitContainer splitContainer;
    146148
    147149  }
  • trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.cs

    r2655 r2676  
    3333namespace HeuristicLab.Core.Views {
    3434  public partial class TypeSelector : UserControl {
    35     private Type baseType;
     35    protected Type baseType;
    3636    public Type BaseType {
    3737      get { return baseType; }
    3838    }
    39     private bool showNotInstantiableTypes;
     39    protected bool showNotInstantiableTypes;
    4040    public bool ShowNotInstantiableTypes {
    4141      get { return showNotInstantiableTypes; }
    4242    }
    43     private bool showGenericTypes;
     43    protected bool showGenericTypes;
    4444    public bool ShowGenericTypes {
    4545      get { return showGenericTypes; }
    4646    }
    4747    public string Caption {
    48       get { return groupBox.Text; }
     48      get { return typesGroupBox.Text; }
    4949      set {
    5050        if (InvokeRequired)
    5151          Invoke(new Action<string>(delegate(string s) { Caption = s; }), value);
    5252        else
    53           groupBox.Text = value;
     53          typesGroupBox.Text = value;
    5454      }
    5555    }
     
    5757      get { return typesTreeView; }
    5858    }
    59     private Type selectedType;
     59    protected Type selectedType;
    6060    public Type SelectedType {
    6161      get { return selectedType; }
     
    7373    }
    7474
    75     public void Configure(Type baseType, bool showNotInstantiableTypes, bool showGenericTypes) {
     75    public virtual void Configure(Type baseType, bool showNotInstantiableTypes, bool showGenericTypes) {
    7676      if (baseType == null) throw new ArgumentNullException();
    7777      if (InvokeRequired)
     
    150150    }
    151151
    152     public object CreateInstanceOfSelectedType(params object[] args) {
     152    public virtual object CreateInstanceOfSelectedType(params object[] args) {
    153153      if (SelectedType != null) {
    154154      try {
     
    165165    }
    166166
    167     private void UpdateDescription() {
     167    protected virtual void UpdateDescription() {
    168168      descriptionTextBox.Text = string.Empty;
    169169
     
    186186    }
    187187
    188     private void typesTreeView_AfterSelect(object sender, TreeViewEventArgs e) {
     188    protected virtual void typesTreeView_AfterSelect(object sender, TreeViewEventArgs e) {
    189189      if (typesTreeView.SelectedNode != null) {
    190190        SelectedType = typesTreeView.SelectedNode.Tag as Type;
     
    193193    }
    194194
    195     private void typesTreeView_ItemDrag(object sender, ItemDragEventArgs e) {
     195    protected virtual void typesTreeView_ItemDrag(object sender, ItemDragEventArgs e) {
    196196      TreeNode node = (TreeNode)e.Item;
    197197      Type type = node.Tag as Type;
  • trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelectorDialog.Designer.cs

    r2655 r2676  
    7575                  | System.Windows.Forms.AnchorStyles.Left)
    7676                  | System.Windows.Forms.AnchorStyles.Right)));
     77      this.typeSelector.Caption = "&Available Types";
    7778      this.typeSelector.Location = new System.Drawing.Point(12, 12);
    7879      this.typeSelector.Name = "typeSelector";
     
    8081      this.typeSelector.TabIndex = 3;
    8182      this.typeSelector.SelectedTypeChanged += new System.EventHandler(this.typeSelector_SelectedTypeChanged);
    82       this.typeSelector.TypesTreeView.DoubleClick += new System.EventHandler(TypesTreeView_DoubleClick);
    8383      //
    8484      // TypeSelectorDialog
     
    9999      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
    100100      this.Text = "Select Type";
     101      this.Load += new System.EventHandler(this.TypeSelectorDialog_Load);
    101102      this.ResumeLayout(false);
    102103
     
    105106    #endregion
    106107
    107     private System.Windows.Forms.Button okButton;
    108     private System.Windows.Forms.Button cancelButton;
    109     private TypeSelector typeSelector;
     108    protected System.Windows.Forms.Button okButton;
     109    protected System.Windows.Forms.Button cancelButton;
     110    protected TypeSelector typeSelector;
    110111  }
    111112}
  • trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelectorDialog.cs

    r2655 r2676  
    6060    }
    6161
    62     private void typeSelector_SelectedTypeChanged(object sender, EventArgs e) {
     62
     63    protected virtual void TypeSelectorDialog_Load(object sender, EventArgs e) {
     64      this.typeSelector.TypesTreeView.DoubleClick += new System.EventHandler(TypesTreeView_DoubleClick);
     65    }
     66    protected virtual void typeSelector_SelectedTypeChanged(object sender, EventArgs e) {
    6367      okButton.Enabled = typeSelector.SelectedType != null;
    6468    }
    65     private void TypesTreeView_DoubleClick(object sender, System.EventArgs e) {
     69    protected virtual void TypesTreeView_DoubleClick(object sender, System.EventArgs e) {
    6670      if (typeSelector.SelectedType != null) {
    6771        DialogResult = DialogResult.OK;
  • trunk/sources/HeuristicLab.Core.Views/3.3/VariableView.Designer.cs

    r2655 r2676  
    5555      this.setValueButton = new System.Windows.Forms.Button();
    5656      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
     57      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5758      this.valueGroupBox.SuspendLayout();
    5859      this.valuePanel.SuspendLayout();
     
    6162      // nameTextBox
    6263      //
    63       this.nameTextBox.Size = new System.Drawing.Size(285, 20);
     64      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     65      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
     66      this.nameTextBox.Size = new System.Drawing.Size(287, 20);
    6467      //
    6568      // descriptionTextBox
     
    6770      this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    6871                  | System.Windows.Forms.AnchorStyles.Right)));
    69       this.descriptionTextBox.Size = new System.Drawing.Size(285, 62);
     72      this.descriptionTextBox.Size = new System.Drawing.Size(287, 62);
    7073      //
    7174      // dataTypeLabel
    7275      //
    7376      this.dataTypeLabel.AutoSize = true;
    74       this.dataTypeLabel.Location = new System.Drawing.Point(3, 98);
     77      this.dataTypeLabel.Location = new System.Drawing.Point(3, 97);
    7578      this.dataTypeLabel.Name = "dataTypeLabel";
    7679      this.dataTypeLabel.Size = new System.Drawing.Size(60, 13);
     
    8588      this.dataTypeTextBox.Name = "dataTypeTextBox";
    8689      this.dataTypeTextBox.ReadOnly = true;
    87       this.dataTypeTextBox.Size = new System.Drawing.Size(285, 20);
     90      this.dataTypeTextBox.Size = new System.Drawing.Size(287, 20);
    8891      this.dataTypeTextBox.TabIndex = 5;
    8992      //
     
    109112                  | System.Windows.Forms.AnchorStyles.Right)));
    110113      this.valuePanel.Controls.Add(this.viewHost);
    111       this.valuePanel.Location = new System.Drawing.Point(3, 48);
     114      this.valuePanel.Location = new System.Drawing.Point(6, 48);
    112115      this.valuePanel.Name = "valuePanel";
    113       this.valuePanel.Size = new System.Drawing.Size(353, 103);
     116      this.valuePanel.Size = new System.Drawing.Size(347, 100);
    114117      this.valuePanel.TabIndex = 2;
    115118      this.valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver);
     
    123126      this.viewHost.Name = "viewHost";
    124127      this.viewHost.Object = null;
    125       this.viewHost.Size = new System.Drawing.Size(353, 103);
     128      this.viewHost.Size = new System.Drawing.Size(347, 100);
    126129      this.viewHost.TabIndex = 0;
    127130      //
     
    153156      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    154157      this.Controls.Add(this.valueGroupBox);
     158      this.Controls.Add(this.dataTypeLabel);
    155159      this.Controls.Add(this.dataTypeTextBox);
    156       this.Controls.Add(this.dataTypeLabel);
    157160      this.Name = "VariableView";
    158161      this.Size = new System.Drawing.Size(359, 274);
     162      this.Controls.SetChildIndex(this.descriptionLabel, 0);
     163      this.Controls.SetChildIndex(this.dataTypeTextBox, 0);
    159164      this.Controls.SetChildIndex(this.dataTypeLabel, 0);
    160       this.Controls.SetChildIndex(this.dataTypeTextBox, 0);
     165      this.Controls.SetChildIndex(this.descriptionTextBox, 0);
     166      this.Controls.SetChildIndex(this.nameTextBox, 0);
     167      this.Controls.SetChildIndex(this.nameLabel, 0);
    161168      this.Controls.SetChildIndex(this.valueGroupBox, 0);
    162       this.Controls.SetChildIndex(this.descriptionTextBox, 0);
    163       this.Controls.SetChildIndex(this.nameLabel, 0);
    164       this.Controls.SetChildIndex(this.descriptionLabel, 0);
    165       this.Controls.SetChildIndex(this.nameTextBox, 0);
     169      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    166170      this.valueGroupBox.ResumeLayout(false);
    167171      this.valuePanel.ResumeLayout(false);
     
    173177    #endregion
    174178
    175     private System.Windows.Forms.Label dataTypeLabel;
    176     private System.Windows.Forms.TextBox dataTypeTextBox;
    177     private System.Windows.Forms.GroupBox valueGroupBox;
    178     private ViewHost viewHost;
    179     private System.Windows.Forms.Button clearValueButton;
    180     private System.Windows.Forms.ToolTip toolTip;
    181     private System.Windows.Forms.Button setValueButton;
    182     private System.Windows.Forms.Panel valuePanel;
     179    protected System.Windows.Forms.Label dataTypeLabel;
     180    protected System.Windows.Forms.TextBox dataTypeTextBox;
     181    protected System.Windows.Forms.GroupBox valueGroupBox;
     182    protected ViewHost viewHost;
     183    protected System.Windows.Forms.Button clearValueButton;
     184    protected System.Windows.Forms.ToolTip toolTip;
     185    protected System.Windows.Forms.Button setValueButton;
     186    protected System.Windows.Forms.Panel valuePanel;
    183187  }
    184188}
  • trunk/sources/HeuristicLab.Core.Views/3.3/VariableView.cs

    r2664 r2676  
    3535  [Content(typeof(Variable), true)]
    3636  public partial class VariableView : NamedItemView {
    37     private TypeSelectorDialog typeSelectorDialog;
     37    protected TypeSelectorDialog typeSelectorDialog;
    3838
    3939    /// <summary>
     
    103103    }
    104104
    105     private void Variable_ValueChanged(object sender, EventArgs e) {
     105    protected virtual void Variable_ValueChanged(object sender, EventArgs e) {
    106106      if (InvokeRequired)
    107107        Invoke(new EventHandler(Variable_ValueChanged), sender, e);
     
    115115    }
    116116
    117     private void setValueButton_Click(object sender, EventArgs e) {
     117    protected virtual void setValueButton_Click(object sender, EventArgs e) {
    118118      if (typeSelectorDialog == null) {
    119119        typeSelectorDialog = new TypeSelectorDialog();
     
    125125      }
    126126    }
    127     private void clearValueButton_Click(object sender, EventArgs e) {
     127    protected virtual void clearValueButton_Click(object sender, EventArgs e) {
    128128      Variable.Value = null;
    129129    }
    130     private void valuePanel_DragEnterOver(object sender, DragEventArgs e) {
     130    protected virtual void valuePanel_DragEnterOver(object sender, DragEventArgs e) {
    131131      e.Effect = DragDropEffects.None;
    132132      Type type = e.Data.GetData("Type") as Type;
     
    137137      }
    138138    }
    139     private void valuePanel_DragDrop(object sender, DragEventArgs e) {
     139    protected virtual void valuePanel_DragDrop(object sender, DragEventArgs e) {
    140140      if (e.Effect != DragDropEffects.None) {
    141141        IItem item = e.Data.GetData("Value") as IItem;
  • trunk/sources/HeuristicLab.Core.Views/3.3/ViewHost.Designer.cs

    r2665 r2676  
    6363      // messageLabel
    6464      //
    65       this.messageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    66                   | System.Windows.Forms.AnchorStyles.Right)));
    67       this.messageLabel.Location = new System.Drawing.Point(3, 24);
     65      this.messageLabel.Dock = System.Windows.Forms.DockStyle.Fill;
     66      this.messageLabel.Location = new System.Drawing.Point(0, 0);
    6867      this.messageLabel.Name = "messageLabel";
    69       this.messageLabel.Size = new System.Drawing.Size(221, 20);
     68      this.messageLabel.Size = new System.Drawing.Size(227, 184);
    7069      this.messageLabel.TabIndex = 0;
    7170      this.messageLabel.Text = "No view available.";
    72       this.messageLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
     71      this.messageLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
    7372      //
    7473      // viewLabel
     
    8786      this.viewComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    8887      this.viewComboBox.FormattingEnabled = true;
    89       this.viewComboBox.Location = new System.Drawing.Point(44, 0);
     88      this.viewComboBox.Location = new System.Drawing.Point(42, 0);
    9089      this.viewComboBox.Name = "viewComboBox";
    91       this.viewComboBox.Size = new System.Drawing.Size(183, 21);
     90      this.viewComboBox.Size = new System.Drawing.Size(185, 21);
    9291      this.viewComboBox.TabIndex = 1;
    9392      this.viewComboBox.SelectedIndexChanged += new System.EventHandler(this.viewComboBox_SelectedIndexChanged);
     
    9796      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    9897      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    99       this.Controls.Add(this.messageLabel);
    10098      this.Controls.Add(this.viewComboBox);
    10199      this.Controls.Add(this.viewLabel);
    102100      this.Controls.Add(this.viewPanel);
     101      this.Controls.Add(this.messageLabel);
    103102      this.Name = "ViewHost";
    104103      this.Size = new System.Drawing.Size(227, 184);
     
    110109    #endregion
    111110
    112     private System.Windows.Forms.Panel viewPanel;
    113     private System.Windows.Forms.Label viewLabel;
    114     private System.Windows.Forms.ComboBox viewComboBox;
    115     private System.Windows.Forms.Label messageLabel;
     111    protected System.Windows.Forms.Panel viewPanel;
     112    protected System.Windows.Forms.Label viewLabel;
     113    protected System.Windows.Forms.ComboBox viewComboBox;
     114    protected System.Windows.Forms.Label messageLabel;
    116115
    117116  }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ViewHost.cs

    r2665 r2676  
    4848    }
    4949
    50     private void Initialize() {
     50    protected virtual void Initialize() {
    5151      viewLabel.Visible = false;
    5252      viewComboBox.Items.Clear();
     
    8484    }
    8585
    86     private void viewComboBox_SelectedIndexChanged(object sender, EventArgs e) {
     86    protected virtual void viewComboBox_SelectedIndexChanged(object sender, EventArgs e) {
    8787      if (viewComboBox.SelectedItem != viewPanel.Tag) {
    8888        if (viewPanel.Controls.Count > 0) viewPanel.Controls[0].Dispose();
  • trunk/sources/HeuristicLab.Core/3.3/NamedItemCollection.cs

    r2669 r2676  
    9191    #region NOTE
    9292    // NOTE: OnItemsReplaced is not overridden as ItemsReplaced is only fired
    93     // by ObservableKeyedCollectionBase when the key of an item has changed. The items stays
     93    // by ObservableKeyedCollection when the key of an item has changed. The items stays
    9494    // in the collection and therefore the NameChanging, NameChanged and Changed event handler
    9595    // do not have to be removed and added again.
  • trunk/sources/HeuristicLab.Data.Views/3.3/BoolDataView.Designer.cs

    r2665 r2676  
    5151      //
    5252      this.valueCheckBox.AutoSize = true;
    53       this.valueCheckBox.Location = new System.Drawing.Point(3, 3);
     53      this.valueCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
     54      this.valueCheckBox.Location = new System.Drawing.Point(3, 0);
    5455      this.valueCheckBox.Name = "valueCheckBox";
    55       this.valueCheckBox.Size = new System.Drawing.Size(15, 14);
     56      this.valueCheckBox.Size = new System.Drawing.Size(56, 17);
    5657      this.valueCheckBox.TabIndex = 0;
     58      this.valueCheckBox.Text = "&Value:";
    5759      this.valueCheckBox.UseVisualStyleBackColor = true;
    5860      this.valueCheckBox.CheckedChanged += new System.EventHandler(this.valueCheckBox_CheckedChanged);
     
    6466      this.Controls.Add(this.valueCheckBox);
    6567      this.Name = "BoolDataView";
    66       this.Size = new System.Drawing.Size(30, 32);
     68      this.Size = new System.Drawing.Size(71, 27);
    6769      this.ResumeLayout(false);
    6870      this.PerformLayout();
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleArrayDataView.Designer.cs

    r2669 r2676  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.components = new System.ComponentModel.Container();
    4748      this.sizeLabel = new System.Windows.Forms.Label();
    4849      this.sizeTextBox = new System.Windows.Forms.TextBox();
    4950      this.dataGridView = new System.Windows.Forms.DataGridView();
     51      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
    5052      ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
     53      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5154      this.SuspendLayout();
    5255      //
     
    5457      //
    5558      this.sizeLabel.AutoSize = true;
    56       this.sizeLabel.Location = new System.Drawing.Point(3, 6);
     59      this.sizeLabel.Location = new System.Drawing.Point(3, 3);
    5760      this.sizeLabel.Name = "sizeLabel";
    5861      this.sizeLabel.Size = new System.Drawing.Size(30, 13);
     
    6467      this.sizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    6568                  | System.Windows.Forms.AnchorStyles.Right)));
    66       this.sizeTextBox.Location = new System.Drawing.Point(39, 3);
     69      this.sizeTextBox.Location = new System.Drawing.Point(50, 0);
    6770      this.sizeTextBox.Name = "sizeTextBox";
    68       this.sizeTextBox.Size = new System.Drawing.Size(382, 20);
     71      this.sizeTextBox.Size = new System.Drawing.Size(374, 20);
    6972      this.sizeTextBox.TabIndex = 1;
    7073      this.sizeTextBox.Validated += new System.EventHandler(this.sizeTextBox_Validated);
     
    8285      this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
    8386      this.dataGridView.ColumnHeadersVisible = false;
    84       this.dataGridView.Location = new System.Drawing.Point(3, 29);
     87      this.dataGridView.Location = new System.Drawing.Point(0, 26);
    8588      this.dataGridView.Name = "dataGridView";
    86       this.dataGridView.Size = new System.Drawing.Size(418, 372);
     89      this.dataGridView.Size = new System.Drawing.Size(424, 378);
    8790      this.dataGridView.TabIndex = 2;
    88       this.dataGridView.CellValidated += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellValidated);
     91      this.dataGridView.CellParsing += new System.Windows.Forms.DataGridViewCellParsingEventHandler(this.dataGridView_CellParsing);
    8992      this.dataGridView.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.dataGridView_CellValidating);
     93      this.dataGridView.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellEndEdit);
     94      //
     95      // errorProvider
     96      //
     97      this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
     98      this.errorProvider.ContainerControl = this;
    9099      //
    91100      // StringConvertibleArrayDataView
     
    99108      this.Size = new System.Drawing.Size(424, 404);
    100109      ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
     110      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    101111      this.ResumeLayout(false);
    102112      this.PerformLayout();
     
    109119    private System.Windows.Forms.TextBox sizeTextBox;
    110120    private System.Windows.Forms.DataGridView dataGridView;
     121    private System.Windows.Forms.ErrorProvider errorProvider;
    111122
    112123  }
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleArrayDataView.cs

    r2669 r2676  
    4343      InitializeComponent();
    4444      Caption = "StringConvertibleArrayDataView View";
     45      errorProvider.SetIconAlignment(sizeTextBox, ErrorIconAlignment.MiddleLeft);
     46      errorProvider.SetIconPadding(sizeTextBox, 2);
    4547    }
    4648    public StringConvertibleArrayDataView(IStringConvertibleArrayData stringConvertibleArrayData)
     
    5153    protected override void DeregisterObjectEvents() {
    5254      StringConvertibleArrayData.ItemChanged -= new EventHandler<EventArgs<int>>(StringConvertibleArrayData_ItemChanged);
    53       StringConvertibleArrayData.Changed -= new ChangedEventHandler(StringConvertibleArrayData_Changed);
     55      StringConvertibleArrayData.Reset -= new EventHandler(StringConvertibleArrayData_Reset);
    5456      base.DeregisterObjectEvents();
    5557    }
     
    5961      base.RegisterObjectEvents();
    6062      StringConvertibleArrayData.ItemChanged += new EventHandler<EventArgs<int>>(StringConvertibleArrayData_ItemChanged);
    61       StringConvertibleArrayData.Changed += new ChangedEventHandler(StringConvertibleArrayData_Changed);
     63      StringConvertibleArrayData.Reset += new EventHandler(StringConvertibleArrayData_Reset);
    6264    }
    6365
     
    8082      sizeTextBox.Enabled = true;
    8183      dataGridView.Rows.Clear();
    82       if (StringConvertibleArrayData.Length > 0) {
    83         dataGridView.ColumnCount = 1;
    84         dataGridView.Rows.Add(StringConvertibleArrayData.Length);
    85       }
     84      dataGridView.ColumnCount = 1;
     85      dataGridView.RowCount = StringConvertibleArrayData.Length;
    8686      for (int i = 0; i < StringConvertibleArrayData.Length; i++)
    8787        dataGridView.Rows[i].Cells[0].Value = StringConvertibleArrayData.GetValue(i);
     
    9595        dataGridView.Rows[e.Value].Cells[0].Value = StringConvertibleArrayData.GetValue(e.Value);
    9696    }
    97     private void StringConvertibleArrayData_Changed(object sender, ChangedEventArgs e) {
     97    private void StringConvertibleArrayData_Reset(object sender, EventArgs e) {
    9898      if (InvokeRequired)
    99         Invoke(new ChangedEventHandler(StringConvertibleArrayData_Changed), sender, e);
     99        Invoke(new EventHandler(StringConvertibleArrayData_Reset), sender, e);
    100100      else
    101101        UpdateContent();
     
    104104    private void sizeTextBox_Validating(object sender, CancelEventArgs e) {
    105105      int i = 0;
    106       e.Cancel = e.Cancel || !int.TryParse(sizeTextBox.Text, out i);
    107       e.Cancel = e.Cancel || (i < 0);
    108       if (e.Cancel) {
    109         MessageBox.Show(this, "\"" + sizeTextBox.Text + "\" is not a valid array length.", "Invalid Array Length", MessageBoxButtons.OK, MessageBoxIcon.Error);
     106      if (!int.TryParse(sizeTextBox.Text, out i) || (i < 0)) {
     107        e.Cancel = true;
     108        errorProvider.SetError(sizeTextBox, "Invalid Array Length");
    110109        sizeTextBox.SelectAll();
    111         sizeTextBox.Focus();
    112110      }
    113111    }
    114112    private void sizeTextBox_Validated(object sender, EventArgs e) {
    115113      StringConvertibleArrayData.Length = int.Parse(sizeTextBox.Text);
     114      errorProvider.SetError(sizeTextBox, string.Empty);
    116115    }
    117116    private void sizeTextBox_KeyDown(object sender, KeyEventArgs e) {
    118117      if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return)
    119         sizeLabel.Focus();
     118        sizeLabel.Focus();  // set focus on label to validate data
     119      if (e.KeyCode == Keys.Escape) {
     120        sizeTextBox.Text = StringConvertibleArrayData.Length.ToString();
     121        sizeLabel.Focus();  // set focus on label to validate data
     122      }
    120123    }
    121124    private void dataGridView_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) {
    122       e.Cancel = e.Cancel || !StringConvertibleArrayData.SetValue(e.FormattedValue.ToString(), e.RowIndex);
    123       if (e.Cancel)
    124         MessageBox.Show(this, "\"" + e.FormattedValue.ToString() + "\" is not a valid value.", "Invalid Value", MessageBoxButtons.OK, MessageBoxIcon.Error);
     125      if (!StringConvertibleArrayData.Validate(e.FormattedValue.ToString())) {
     126        e.Cancel = true;
     127        dataGridView.Rows[e.RowIndex].ErrorText = "Invalid Value";
     128      }
    125129    }
    126     private void dataGridView_CellValidated(object sender, DataGridViewCellEventArgs e) {
    127       dataGridView.Rows[e.RowIndex].Cells[0].Value = StringConvertibleArrayData.GetValue(e.RowIndex);
     130    private void dataGridView_CellParsing(object sender, DataGridViewCellParsingEventArgs e) {
     131      string value = e.Value.ToString();
     132      e.ParsingApplied = StringConvertibleArrayData.SetValue(value, e.RowIndex);
     133      if (e.ParsingApplied) e.Value = StringConvertibleArrayData.GetValue(e.RowIndex);
     134    }
     135    private void dataGridView_CellEndEdit(object sender, DataGridViewCellEventArgs e) {
     136      dataGridView.Rows[e.RowIndex].ErrorText = string.Empty;
    128137    }
    129138  }
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleDataView.Designer.cs

    r2665 r2676  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.components = new System.ComponentModel.Container();
    4748      this.valueTextBox = new System.Windows.Forms.TextBox();
     49      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     50      this.valueLabel = new System.Windows.Forms.Label();
     51      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    4852      this.SuspendLayout();
    4953      //
     
    5256      this.valueTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    5357                  | System.Windows.Forms.AnchorStyles.Right)));
    54       this.valueTextBox.Location = new System.Drawing.Point(3, 0);
     58      this.valueTextBox.Location = new System.Drawing.Point(56, 0);
    5559      this.valueTextBox.Name = "valueTextBox";
    56       this.valueTextBox.Size = new System.Drawing.Size(244, 20);
    57       this.valueTextBox.TabIndex = 0;
     60      this.valueTextBox.Size = new System.Drawing.Size(194, 20);
     61      this.valueTextBox.TabIndex = 1;
    5862      this.valueTextBox.Validated += new System.EventHandler(this.valueTextBox_Validated);
     63      this.valueTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.valueTextBox_KeyDown);
    5964      this.valueTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.valueTextBox_Validating);
     65      //
     66      // errorProvider
     67      //
     68      this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
     69      this.errorProvider.ContainerControl = this;
     70      //
     71      // valueLabel
     72      //
     73      this.valueLabel.AutoSize = true;
     74      this.valueLabel.Location = new System.Drawing.Point(3, 3);
     75      this.valueLabel.Name = "valueLabel";
     76      this.valueLabel.Size = new System.Drawing.Size(37, 13);
     77      this.valueLabel.TabIndex = 0;
     78      this.valueLabel.Text = "&Value:";
    6079      //
    6180      // StringConvertibleDataView
     
    6382      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    6483      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     84      this.Controls.Add(this.valueLabel);
    6585      this.Controls.Add(this.valueTextBox);
    6686      this.Name = "StringConvertibleDataView";
    67       this.Size = new System.Drawing.Size(250, 34);
     87      this.Size = new System.Drawing.Size(250, 38);
     88      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    6889      this.ResumeLayout(false);
    6990      this.PerformLayout();
     
    7495
    7596    private System.Windows.Forms.TextBox valueTextBox;
     97    private System.Windows.Forms.ErrorProvider errorProvider;
     98    private System.Windows.Forms.Label valueLabel;
    7699  }
    77100}
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleDataView.cs

    r2669 r2676  
    4242      InitializeComponent();
    4343      Caption = "StringConvertibleData View";
     44      errorProvider.SetIconAlignment(valueTextBox, ErrorIconAlignment.MiddleLeft);
     45      errorProvider.SetIconPadding(valueTextBox, 2);
    4446    }
    4547    public StringConvertibleDataView(IStringConvertibleData stringConvertibleData)
     
    7880    }
    7981
     82    private void valueTextBox_KeyDown(object sender, KeyEventArgs e) {
     83      if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return))
     84        valueLabel.Focus();  // set focus on label to validate data
     85      if (e.KeyCode == Keys.Escape) {
     86        valueTextBox.Text = StringConvertibleData.GetValue();
     87        valueLabel.Focus();  // set focus on label to validate data
     88      }
     89    }
    8090    private void valueTextBox_Validating(object sender, CancelEventArgs e) {
    81       e.Cancel = e.Cancel || !StringConvertibleData.SetValue(valueTextBox.Text);
    82       if (e.Cancel) {
    83         MessageBox.Show(this, "\"" + valueTextBox.Text + "\" is not a valid value.", "Invalid Value", MessageBoxButtons.OK, MessageBoxIcon.Error);
     91      if (!StringConvertibleData.Validate(valueTextBox.Text)) {
     92        e.Cancel = true;
     93        errorProvider.SetError(valueTextBox, "Invalid Value");
    8494        valueTextBox.SelectAll();
    85         valueTextBox.Focus();
    8695      }
    8796    }
    8897    private void valueTextBox_Validated(object sender, EventArgs e) {
    89       valueTextBox.Text = StringConvertibleData.GetValue();
     98      StringConvertibleData.SetValue(valueTextBox.Text);
     99      errorProvider.SetError(valueTextBox, string.Empty);
    90100    }
    91101  }
  • trunk/sources/HeuristicLab.Data/3.3/BoolData.cs

    r2669 r2676  
    4141    }
    4242
     43    #region IStringConvertibleData Members
     44    bool IStringConvertibleData.Validate(string value) {
     45      bool b;
     46      return bool.TryParse(value, out b);
     47    }
    4348    string IStringConvertibleData.GetValue() {
    4449      return Value.ToString();
     
    5358      }
    5459    }
     60    #endregion
    5561  }
    5662}
  • trunk/sources/HeuristicLab.Data/3.3/DateTimeData.cs

    r2669 r2676  
    4545    }
    4646
     47    #region IStringConvertibleData Members
     48    bool IStringConvertibleData.Validate(string value) {
     49      DateTime d;
     50      return DateTime.TryParse(value, out d);
     51    }
    4752    string IStringConvertibleData.GetValue() {
    4853      return Value.ToString("o");  // round-trip format
     
    5762      }
    5863    }
     64    #endregion
    5965  }
    6066}
  • trunk/sources/HeuristicLab.Data/3.3/DoubleData.cs

    r2669 r2676  
    4545    }
    4646
     47    #region IStringConvertibleData Members
     48    bool IStringConvertibleData.Validate(string value) {
     49      double d;
     50      return double.TryParse(value, out d);
     51    }
    4752    string IStringConvertibleData.GetValue() {
    4853      return Value.ToString("r");  // round-trip format
     
    5762      }
    5863    }
     64    #endregion
    5965  }
    6066}
  • trunk/sources/HeuristicLab.Data/3.3/HeuristicLab.Data-3.3.csproj

    r2669 r2676  
    103103      <SubType>Code</SubType>
    104104    </Compile>
     105    <Compile Include="BoolArrayData.cs" />
    105106    <Compile Include="IStringConvertibleArrayData.cs" />
    106107    <Compile Include="ValueTypeArrayData.cs" />
  • trunk/sources/HeuristicLab.Data/3.3/IStringConvertibleArrayData.cs

    r2669 r2676  
    3131    int Length { get; set; }
    3232
     33    bool Validate(string value);
    3334    string GetValue(int index);
    3435    bool SetValue(string value, int index);
    3536
    36     event ChangedEventHandler Changed;
    3737    event EventHandler<EventArgs<int>> ItemChanged;
     38    event EventHandler Reset;
    3839  }
    3940}
  • trunk/sources/HeuristicLab.Data/3.3/IStringConvertibleData.cs

    r2669 r2676  
    2828namespace HeuristicLab.Data {
    2929  public interface IStringConvertibleData {
     30    bool Validate(string value);
    3031    string GetValue();
    3132    bool SetValue(string value);
  • trunk/sources/HeuristicLab.Data/3.3/IntArrayData.cs

    r2669 r2676  
    2424using System.Text;
    2525using System.Xml;
     26using HeuristicLab.Common;
    2627using HeuristicLab.Core;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3435    public IntArrayData() : base() { }
    3536    public IntArrayData(int length) : base(length) { }
    36     public IntArrayData(IntArrayData elements) : base(elements) { }
    3737    public IntArrayData(int[] elements) : base(elements) { }
     38    protected IntArrayData(IntArrayData elements) : base(elements) { }
    3839
    3940    public override IDeepCloneable Clone(Cloner cloner) {
     
    4344    }
    4445
     46    #region IStringConvertibleArrayData Members
    4547    int IStringConvertibleArrayData.Length {
    4648      get { return Length; }
    4749      set { Length = value; }
     50    }
     51    bool IStringConvertibleArrayData.Validate(string value) {
     52      int i;
     53      return int.TryParse(value, out i);
    4854    }
    4955    string IStringConvertibleArrayData.GetValue(int index) {
     
    5965      }
    6066    }
     67    event EventHandler<EventArgs<int>> IStringConvertibleArrayData.ItemChanged {
     68      add { base.ItemChanged += value; }
     69      remove { base.ItemChanged -= value; }
     70    }
     71    event EventHandler IStringConvertibleArrayData.Reset {
     72      add { base.Reset += value; }
     73      remove { base.Reset -= value; }
     74    }
     75    #endregion
    6176  }
    6277}
  • trunk/sources/HeuristicLab.Data/3.3/IntData.cs

    r2669 r2676  
    4141    }
    4242
     43    #region IStringConvertibleData Members
     44    bool IStringConvertibleData.Validate(string value) {
     45      int i;
     46      return int.TryParse(value, out i);
     47    }
    4348    string IStringConvertibleData.GetValue() {
    4449      return Value.ToString();
     
    5358      }
    5459    }
     60    #endregion
    5561  }
    5662}
  • trunk/sources/HeuristicLab.Data/3.3/StringData.cs

    r2669 r2676  
    6363    }
    6464
     65    #region IStringConvertibleData Members
     66    bool IStringConvertibleData.Validate(string value) {
     67      return true;
     68    }
    6569    string IStringConvertibleData.GetValue() {
    6670      return Value;
     
    7074      return true;
    7175    }
     76    #endregion
    7277  }
    7378}
  • trunk/sources/HeuristicLab.Data/3.3/TimeSpanData.cs

    r2669 r2676  
    4141    }
    4242
     43    #region IStringConvertibleData Members
     44    bool IStringConvertibleData.Validate(string value) {
     45      TimeSpan t;
     46      return TimeSpan.TryParse(value, out t);
     47    }
    4348    string IStringConvertibleData.GetValue() {
    4449      return Value.ToString();
     
    5358      }
    5459    }
     60    #endregion
    5561  }
    5662}
  • trunk/sources/HeuristicLab.Data/3.3/ValueTypeArrayData.cs

    r2669 r2676  
    4141        Array.Copy(array, newArray, Math.Min(value, array.Length));
    4242        array = newArray;
    43         OnChanged();
     43        OnReset();
    4444      }
    4545    }
     
    6060      array = new T[length];
    6161    }
    62     public ValueTypeArrayData(ValueTypeArrayData<T> elements) {
    63       if (elements == null) throw new ArgumentNullException();
    64       array = (T[])elements.array.Clone();
    65     }
    6662    public ValueTypeArrayData(T[] elements) {
    6763      if (elements == null) throw new ArgumentNullException();
    6864      array = (T[])elements.Clone();
     65    }
     66    protected ValueTypeArrayData(ValueTypeArrayData<T> elements) {
     67      if (elements == null) throw new ArgumentNullException();
     68      array = (T[])elements.array.Clone();
    6969    }
    7070
     
    9191    }
    9292
    93     public event EventHandler<EventArgs<int>> ItemChanged;
    94     protected virtual void OnItemChanged(int index) {
     93    protected event EventHandler<EventArgs<int>> ItemChanged;
     94    private void OnItemChanged(int index) {
    9595      if (ItemChanged != null)
    9696        ItemChanged(this, new EventArgs<int>(index));
    9797      OnChanged();
    9898    }
     99    protected event EventHandler Reset;
     100    private void OnReset() {
     101      if (Reset != null)
     102        Reset(this, EventArgs.Empty);
     103      OnChanged();
     104    }
    99105  }
    100106}
  • trunk/sources/HeuristicLab.Operators.Views/3.3/OperatorView.Designer.cs

    r2664 r2676  
    4646    private void InitializeComponent() {
    4747      this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView();
     48      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    4849      this.SuspendLayout();
    4950      //
    5051      // nameTextBox
    5152      //
     53      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     54      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    5255      this.nameTextBox.Size = new System.Drawing.Size(418, 20);
    5356      //
     
    5659      this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    5760                  | System.Windows.Forms.AnchorStyles.Right)));
    58       this.descriptionTextBox.Size = new System.Drawing.Size(418, 90);
     61      this.descriptionTextBox.Size = new System.Drawing.Size(418, 87);
    5962      //
    6063      // parameterCollectionView
     
    6568      this.parameterCollectionView.Caption = "ParameterCollection";
    6669      this.parameterCollectionView.ItemCollection = null;
    67       this.parameterCollectionView.Location = new System.Drawing.Point(0, 122);
     70      this.parameterCollectionView.Location = new System.Drawing.Point(0, 119);
    6871      this.parameterCollectionView.Name = "parameterCollectionView";
    6972      this.parameterCollectionView.NamedItemCollection = null;
    70       this.parameterCollectionView.Size = new System.Drawing.Size(490, 231);
     73      this.parameterCollectionView.Object = null;
     74      this.parameterCollectionView.Size = new System.Drawing.Size(490, 234);
    7175      this.parameterCollectionView.TabIndex = 4;
    7276      //
    73       // OperatorBaseView
     77      // OperatorView
    7478      //
    7579      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    7680      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    7781      this.Controls.Add(this.parameterCollectionView);
    78       this.Name = "OperatorBaseView";
     82      this.Name = "OperatorView";
    7983      this.Size = new System.Drawing.Size(490, 353);
    80       this.Controls.SetChildIndex(this.parameterCollectionView, 0);
     84      this.Controls.SetChildIndex(this.nameTextBox, 0);
    8185      this.Controls.SetChildIndex(this.nameLabel, 0);
    8286      this.Controls.SetChildIndex(this.descriptionLabel, 0);
    83       this.Controls.SetChildIndex(this.nameTextBox, 0);
    8487      this.Controls.SetChildIndex(this.descriptionTextBox, 0);
     88      this.Controls.SetChildIndex(this.parameterCollectionView, 0);
     89      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    8590      this.ResumeLayout(false);
    8691      this.PerformLayout();
  • trunk/sources/HeuristicLab.Operators.Views/3.3/OperatorView.cs

    r2664 r2676  
    3737  [Content(typeof(Operator), true)]
    3838  public partial class OperatorView : NamedItemView {
    39     public Operator OperatorBase {
     39    public Operator Operator {
    4040      get { return (Operator)base.Item; }
    4141      set { base.Item = value; }
     
    5252    /// </summary>
    5353    /// <param name="item">The item that should be displayed.</param>
    54     public OperatorView(Operator operatorBase)
     54    public OperatorView(Operator op)
    5555      : this() {
    56       OperatorBase = operatorBase;
     56      Operator = op;
    5757    }
    5858
    5959    protected override void OnObjectChanged() {
    6060      base.OnObjectChanged();
    61       if (OperatorBase == null) {
     61      if (Operator == null) {
    6262        parameterCollectionView.NamedItemCollection = null;
    6363      } else {
    64         parameterCollectionView.NamedItemCollection = ((IOperator)OperatorBase).Parameters;
     64        parameterCollectionView.NamedItemCollection = ((IOperator)Operator).Parameters;
    6565      }
    6666    }
Note: See TracChangeset for help on using the changeset viewer.