Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/23/09 11:08:34 (15 years ago)
Author:
swagner
Message:

Implemented first draft of MainForm support in HeuristicLab.Core/HeuristicLab.Core.Views and all other depending plugins (#770)

Location:
trunk/sources/HeuristicLab.Constraints/3.3
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Constraints/3.3/AllSubOperatorsTypeConstraint.cs

    r1823 r2520  
    119119      return clone;
    120120    }
    121 
    122     /// <summary>
    123     /// Creates a new instance of <see cref="AllSubOperatorsTypeConstraintView"/> to represent the current
    124     /// instance visually.
    125     /// </summary>
    126     /// <returns>The created view as <see cref="AllSubOperatorsTypeConstraintView"/>.</returns>
    127     public override IView CreateView() {
    128       return new AllSubOperatorsTypeConstraintView(groupConstraint);
    129     }
    130121  }
    131122}
  • trunk/sources/HeuristicLab.Constraints/3.3/AllSubOperatorsTypeConstraintView.cs

    r1529 r2520  
    2828using System.Windows.Forms;
    2929using HeuristicLab.Core;
     30using HeuristicLab.Core.Views;
     31using HeuristicLab.MainForm;
    3032
    3133namespace HeuristicLab.Constraints {
     
    3335  /// The visual representation of the <see cref="AllSubOperatorsTypeConstraint"/>.
    3436  /// </summary>
     37  [Content(typeof(AllSubOperatorsTypeConstraint), true)]
    3538  public partial class AllSubOperatorsTypeConstraintView : ViewBase {
    3639    private SubOperatorTypeConstraint constraint = new SubOperatorTypeConstraint();
  • trunk/sources/HeuristicLab.Constraints/3.3/AndConstraint.cs

    r1823 r2520  
    3232  /// Constraint where all sub-constraints must be <c>true</c>.
    3333  /// </summary>
    34   public class AndConstraint : ConstraintBase, IViewable {
     34  public class AndConstraint : ConstraintBase {
    3535
    3636    [Storable]
     
    7878
    7979    /// <summary>
    80     /// Creates a new instance of <see cref="AndConstraintView"/> to represent the current
    81     /// instance visually.
    82     /// </summary>
    83     /// <returns>The created view as <see cref="AndConstraintView"/>.</returns>
    84     public override IView CreateView() {
    85       return new AndConstraintView(this);
    86     }
    87 
    88     /// <summary>
    8980    /// Clones the current instance (deep clone).
    9081    /// </summary>
  • trunk/sources/HeuristicLab.Constraints/3.3/AndConstraintView.cs

    r1529 r2520  
    2929using HeuristicLab.Core;
    3030using HeuristicLab.Data;
     31using HeuristicLab.Core.Views;
     32using HeuristicLab.MainForm;
    3133
    3234namespace HeuristicLab.Constraints {
     
    3436  /// The visual representation of an <see cref="AndConstraint"/>.
    3537  /// </summary>
     38  [Content(typeof(AndConstraint), true)]
    3639  public partial class AndConstraintView : ViewBase {
    3740    /// <summary>
  • trunk/sources/HeuristicLab.Constraints/3.3/DoubleBoundedConstraint.cs

    r1823 r2520  
    180180
    181181    /// <summary>
    182     /// Creates a new instance of <see cref="DoubleBoundedConstraintView"/> to represent the current
    183     /// instance visually.
    184     /// </summary>
    185     /// <returns>The created view as <see cref="DoubleBoundedConstraintView"/>.</returns>
    186     public override IView CreateView() {
    187       return new DoubleBoundedConstraintView(this);
    188     }
    189 
    190     /// <summary>
    191182    /// Clones the current instance (deep clone).
    192183    /// </summary>
  • trunk/sources/HeuristicLab.Constraints/3.3/DoubleBoundedConstraintView.cs

    r1529 r2520  
    2929using HeuristicLab.Core;
    3030using HeuristicLab.Data;
     31using HeuristicLab.Core.Views;
     32using HeuristicLab.MainForm;
    3133
    3234namespace HeuristicLab.Constraints {
     
    3436  /// The visual representation of a <see cref="DoubleBoundedConstraint"/>.
    3537  /// </summary>
     38  [Content(typeof(DoubleBoundedConstraint), true)]
    3639  public partial class DoubleBoundedConstraintView : ViewBase {
    3740    /// <summary>
  • trunk/sources/HeuristicLab.Constraints/3.3/HeuristicLab.Constraints-3.3.csproj

    r1672 r2520  
    159159  </ItemGroup>
    160160  <ItemGroup>
     161    <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">
     162      <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project>
     163      <Name>HeuristicLab.Core.Views-3.3</Name>
     164    </ProjectReference>
    161165    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    162166      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
     
    166170      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
    167171      <Name>HeuristicLab.Data-3.3</Name>
     172    </ProjectReference>
     173    <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.2\HeuristicLab.MainForm.WindowsForms-3.2.csproj">
     174      <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
     175      <Name>HeuristicLab.MainForm.WindowsForms-3.2</Name>
     176    </ProjectReference>
     177    <ProjectReference Include="..\..\HeuristicLab.MainForm\3.2\HeuristicLab.MainForm-3.2.csproj">
     178      <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>
     179      <Name>HeuristicLab.MainForm-3.2</Name>
    168180    </ProjectReference>
    169181    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
  • trunk/sources/HeuristicLab.Constraints/3.3/HeuristicLabConstraintsPlugin.cs

    r1674 r2520  
    3232  [PluginFile(Filename = "HeuristicLab.Constraints-3.3.dll", Filetype = PluginFileType.Assembly)]
    3333  [Dependency(Dependency = "HeuristicLab.Core-3.3")]
     34  [Dependency(Dependency = "HeuristicLab.Core.Views-3.3")]
    3435  [Dependency(Dependency = "HeuristicLab.Data-3.3")]
     36  [Dependency(Dependency = "HeuristicLab.MainForm-3.2")]
     37  [Dependency(Dependency = "HeuristicLab.MainForm.WindowsForms-3.2")]
    3538  [Dependency(Dependency = "HeuristicLab.Persistence-3.3")]
    3639  public class HeuristicLabConstraintsPlugin : PluginBase {
  • trunk/sources/HeuristicLab.Constraints/3.3/IntBoundedConstraint.cs

    r1823 r2520  
    167167
    168168    /// <summary>
    169     /// Creates a new instance of <see cref="IntBoundedConstraintView"/> to represent the current
    170     /// instance visually.
    171     /// </summary>
    172     /// <returns>The created view as <see cref="IntBoundedConstraintView"/>.</returns>
    173     public override IView CreateView() {
    174       return new IntBoundedConstraintView(this);
    175     }
    176 
    177     /// <summary>
    178169    /// Clones the current instance (deep clone).
    179170    /// </summary>
  • trunk/sources/HeuristicLab.Constraints/3.3/IntBoundedConstraintView.cs

    r1529 r2520  
    2929using HeuristicLab.Core;
    3030using HeuristicLab.Data;
     31using HeuristicLab.Core.Views;
     32using HeuristicLab.MainForm;
    3133
    3234namespace HeuristicLab.Constraints {
     
    3436  /// The visual representation of an <see cref="IntBoundedConstraint"/>.
    3537  /// </summary>
     38  [Content(typeof(IntBoundedConstraint), true)]
    3639  public partial class IntBoundedConstraintView : ViewBase {
    3740    /// <summary>
  • trunk/sources/HeuristicLab.Constraints/3.3/ItemTypeConstraint.cs

    r1823 r2520  
    9191
    9292    /// <summary>
    93     /// Creates a new instance of <see cref="ItemTypeConstraintView"/> to represent the current
    94     /// instance visually.
    95     /// </summary>
    96     /// <returns>The created view as <see cref="ItemTypeConstraintView"/>.</returns>
    97     public override IView CreateView() {
    98       return new ItemTypeConstraintView(this);
    99     }
    100 
    101     /// <summary>
    10293    /// Clones the current instance (deep clone).
    10394    /// </summary>
  • trunk/sources/HeuristicLab.Constraints/3.3/ItemTypeConstraintView.cs

    r1529 r2520  
    2929using HeuristicLab.Core;
    3030using HeuristicLab.Data;
     31using HeuristicLab.Core.Views;
     32using HeuristicLab.MainForm;
    3133
    3234namespace HeuristicLab.Constraints {
     
    3436  /// The visual representation of an <see cref="ItemTypeConstraint"/>.
    3537  /// </summary>
     38  [Content(typeof(ItemTypeConstraint), true)]
    3639  public partial class ItemTypeConstraintView : ViewBase {
    3740    /// <summary>
  • trunk/sources/HeuristicLab.Constraints/3.3/NotConstraint.cs

    r1823 r2520  
    7171
    7272    /// <summary>
    73     /// Creates a new instance of <see cref="NotConstraintView"/> to represent the current
    74     /// instance visually.
    75     /// </summary>
    76     /// <returns>The created view as <see cref="NotConstraintView"/>.</returns>
    77     public override IView CreateView() {
    78       return new NotConstraintView(this);
    79     }
    80 
    81     /// <summary>
    8273    /// Clones the current instance (deep clone).
    8374    /// </summary>
  • trunk/sources/HeuristicLab.Constraints/3.3/NotConstraintView.Designer.cs

    r1529 r2520  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.subConstraintViewBase = new HeuristicLab.Core.ViewBase();
     47      this.subConstraintViewBase = new HeuristicLab.Core.Views.ViewBase();
    4848      this.subConstraintComboBox = new System.Windows.Forms.ComboBox();
    4949      this.SuspendLayout();
     
    8484    #endregion
    8585
    86     private HeuristicLab.Core.ViewBase subConstraintViewBase;
     86    private HeuristicLab.Core.Views.ViewBase subConstraintViewBase;
    8787    private System.Windows.Forms.ComboBox subConstraintComboBox;
    8888  }
  • trunk/sources/HeuristicLab.Constraints/3.3/NotConstraintView.cs

    r1529 r2520  
    3030using HeuristicLab.Core;
    3131using HeuristicLab.Data;
     32using HeuristicLab.Core.Views;
     33using HeuristicLab.MainForm;
    3234
    3335namespace HeuristicLab.Constraints {
     
    3537  /// Visual representation of a <see cref="NotConstraint"/>.
    3638  /// </summary>
     39  [Content(typeof(NotConstraint), true)]
    3740  public partial class NotConstraintView : ViewBase {
    3841    private Type[] itemTypes;
     
    113116          subConstraintViewBase.Dispose();
    114117        }
    115         subConstraintViewBase = (ViewBase)NotConstraint.SubConstraint.CreateView();
     118        subConstraintViewBase = (ViewBase)MainFormManager.CreateDefaultView(NotConstraint.SubConstraint);
    116119        if (subConstraintViewBase != null) {
    117120          subConstraintViewBase.Anchor = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
  • trunk/sources/HeuristicLab.Constraints/3.3/NumberOfSubOperatorsConstraint.cs

    r1823 r2520  
    103103      return clone;
    104104    }
    105 
    106     /// <summary>
    107     /// Creates a new instance of <see cref="NumberOfSubOperatorsConstraintView"/> to represent the current
    108     /// instance visually.
    109     /// </summary>
    110     /// <returns>The created view as <see cref="NumberOfSubOperatorsConstraintView"/>.</returns>
    111     public override IView CreateView() {
    112       return new NumberOfSubOperatorsConstraintView(this);
    113     }
    114105  }
    115106}
  • trunk/sources/HeuristicLab.Constraints/3.3/NumberOfSubOperatorsConstraintView.cs

    r1529 r2520  
    2828using System.Windows.Forms;
    2929using HeuristicLab.Core;
     30using HeuristicLab.Core.Views;
     31using HeuristicLab.MainForm;
    3032
    3133namespace HeuristicLab.Constraints {
     
    3335  /// Visual representation of a <see cref="NumberOfSubOperatorsConstraint"/>.
    3436  /// </summary>
     37  [Content(typeof(NumberOfSubOperatorsConstraint), true)]
    3538  public partial class NumberOfSubOperatorsConstraintView : ViewBase {
    3639    private NumberOfSubOperatorsConstraint constraint;
  • trunk/sources/HeuristicLab.Constraints/3.3/OrConstraint.cs

    r1823 r2520  
    3232  /// Constraint where at least one sub-constraint must be true.
    3333  /// </summary>
    34   public class OrConstraint : ConstraintBase, IViewable {
     34  public class OrConstraint : ConstraintBase {
    3535
    3636    [Storable]
     
    7878
    7979    /// <summary>
    80     /// Creates a new instance of <see cref="OrConstraintView"/> to represent the current
    81     /// instance visually.
    82     /// </summary>
    83     /// <returns>The created view as <see cref="OrConstraintView"/>.</returns>
    84     public override IView CreateView() {
    85       return new OrConstraintView(this);
    86     }
    87 
    88     /// <summary>
    8980    /// Clones the current instance (deep clone).
    9081    /// </summary>
  • trunk/sources/HeuristicLab.Constraints/3.3/OrConstraintView.cs

    r1529 r2520  
    2929using HeuristicLab.Core;
    3030using HeuristicLab.Data;
     31using HeuristicLab.Core.Views;
     32using HeuristicLab.MainForm;
    3133
    3234namespace HeuristicLab.Constraints {
     
    3436  /// Visual representation of an <see cref="OrConstraint"/>.
    3537  /// </summary>
     38  [Content(typeof(OrConstraint), true)]
    3639  public partial class OrConstraintView : ViewBase {
    3740    private OrConstraint OrConstraint {
  • trunk/sources/HeuristicLab.Constraints/3.3/SubOperatorsTypeConstraint.cs

    r1823 r2520  
    142142      return clone;
    143143    }
    144 
    145     /// <summary>
    146     /// Creates a new instance of <see cref="SubOperatorsTypeConstraintView"/> to represent the current
    147     /// instance visually.
    148     /// </summary>
    149     /// <returns>The created view as <see cref="SubOperatorsTypeConstraintView"/>.</returns>
    150     public override IView CreateView() {
    151       return new SubOperatorsTypeConstraintView(this);
    152     }
    153144  }
    154145}
  • trunk/sources/HeuristicLab.Constraints/3.3/SubOperatorsTypeConstraintView.cs

    r1529 r2520  
    2828using System.Windows.Forms;
    2929using HeuristicLab.Core;
     30using HeuristicLab.Core.Views;
     31using HeuristicLab.MainForm;
    3032
    3133namespace HeuristicLab.Constraints {
     
    3335  /// The visual representation of a <see cref="SubOperatorTypeConstraint"/>.
    3436  /// </summary>
     37  [Content(typeof(SubOperatorTypeConstraint), true)]
    3538  public partial class SubOperatorsTypeConstraintView : ViewBase {
    3639    private SubOperatorTypeConstraint constraint;
  • trunk/sources/HeuristicLab.Constraints/3.3/VariableComparisonConstraint.cs

    r1823 r2520  
    122122
    123123    /// <summary>
    124     /// Creates a new instance of <see cref="VariableComparisonConstraintView"/> to represent the current
    125     /// instance visually.
    126     /// </summary>
    127     /// <returns>The created view as <see cref="VariableComparisonConstraintView"/>.</returns>
    128     public override IView CreateView() {
    129       return new VariableComparisonConstraintView(this);
    130     }
    131 
    132     /// <summary>
    133124    /// Clones the current instance (deep clone).
    134125    /// </summary>
  • trunk/sources/HeuristicLab.Constraints/3.3/VariableComparisonConstraintView.cs

    r1529 r2520  
    2929using HeuristicLab.Core;
    3030using HeuristicLab.Data;
     31using HeuristicLab.Core.Views;
     32using HeuristicLab.MainForm;
    3133
    3234namespace HeuristicLab.Constraints {
     
    3436  /// Visual representation of a <see cref="VariableComparisonConstraint"/>.
    3537  /// </summary>
     38  [Content(typeof(VariableComparisonConstraint), true)]
    3639  public partial class VariableComparisonConstraintView : ViewBase {
    3740    /// <summary>
     
    138141          VariableComparisonConstraint.Comparer.Data = 2;
    139142        } else if (((RadioButton)sender).Checked) {
    140           Auxiliary.ShowErrorMessageBox("Unknown radio button selected: " + ((RadioButton)sender).Name.ToString());
     143          HeuristicLab.Core.Views.Auxiliary.ShowErrorMessageBox("Unknown radio button selected: " + ((RadioButton)sender).Name.ToString());
    141144        }
    142145      }
Note: See TracChangeset for help on using the changeset viewer.