Last change
on this file since 3623 was
3614,
checked in by mkommend, 14 years ago
|
implemented first version of RunConstraints (ticket #970)
|
File size:
1.3 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.ComponentModel;
|
---|
4 | using System.Drawing;
|
---|
5 | using System.Data;
|
---|
6 | using System.Linq;
|
---|
7 | using System.Text;
|
---|
8 | using System.Windows.Forms;
|
---|
9 | using HeuristicLab.MainForm;
|
---|
10 |
|
---|
11 | namespace HeuristicLab.Optimization.Views {
|
---|
12 | [Content(typeof(RunCollectionEqualityConstraint),true)]
|
---|
13 | public partial class RunCollectionEqualityConstraintView : RunCollectionConstraintView {
|
---|
14 | public RunCollectionEqualityConstraintView() {
|
---|
15 | InitializeComponent();
|
---|
16 | }
|
---|
17 |
|
---|
18 | public new RunCollectionEqualityConstraint Content {
|
---|
19 | get { return (RunCollectionEqualityConstraint)base.Content; }
|
---|
20 | set { base.Content = value; }
|
---|
21 | }
|
---|
22 |
|
---|
23 | protected override void OnContentChanged() {
|
---|
24 | base.OnContentChanged();
|
---|
25 | if (Content == null || Content.ConstraintData == null)
|
---|
26 | this.txtConstraintData.Text = string.Empty;
|
---|
27 | else
|
---|
28 | this.txtConstraintData.Text = Content.ConstraintData.ToString();
|
---|
29 | }
|
---|
30 |
|
---|
31 | protected override void SetEnabledStateOfControls() {
|
---|
32 | base.SetEnabledStateOfControls();
|
---|
33 | txtConstraintData.ReadOnly = Content == null || this.ReadOnly ;
|
---|
34 | }
|
---|
35 |
|
---|
36 | private void txtConstraintData_TextChanged(object sender, EventArgs e) {
|
---|
37 | Content.ConstraintData = txtConstraintData.Text;
|
---|
38 | }
|
---|
39 | }
|
---|
40 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.