Last change
on this file since 9584 was
9440,
checked in by jhelm, 12 years ago
|
#1966: Implemented new encoding (MultiComponentVector/MCV); Implemented move-operators for MCV and GV encodings; Implemented new decoding-methods for PS, GV and MCV encodings (ExtremePoint-based packing);
|
File size:
1.1 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Windows.Forms;
|
---|
3 | using HeuristicLab.Core.Views;
|
---|
4 | using HeuristicLab.MainForm;
|
---|
5 | using HeuristicLab.Encodings.PackingEncoding.PackingPlan;
|
---|
6 | using HeuristicLab.Problems.BinPacking.Interfaces;
|
---|
7 | using HeuristicLab.Problems.BinPacking.Shapes;
|
---|
8 |
|
---|
9 | namespace HeuristicLab.Problems.BinPacking.Views {
|
---|
10 | [View("View for a rectangular shape.")]
|
---|
11 | [Content(typeof(RectangularPackingShape), true)]
|
---|
12 | public partial class RectangularPackingShapeView : NamedItemView {
|
---|
13 | public RectangularPackingShapeView() {
|
---|
14 | InitializeComponent();
|
---|
15 | }
|
---|
16 |
|
---|
17 |
|
---|
18 | public new RectangularPackingShape Content {
|
---|
19 | get { return (RectangularPackingShape)base.Content; }
|
---|
20 | set { base.Content = value; }
|
---|
21 | }
|
---|
22 |
|
---|
23 |
|
---|
24 | protected override void OnContentChanged() {
|
---|
25 | base.OnContentChanged();
|
---|
26 | if (Content == null) {
|
---|
27 | Redraw();
|
---|
28 | } else {
|
---|
29 | Redraw(Content);
|
---|
30 | }
|
---|
31 | }
|
---|
32 |
|
---|
33 |
|
---|
34 | private void Redraw() {
|
---|
35 | packingPlan2D.InitializeContainer(0,0);
|
---|
36 | }
|
---|
37 |
|
---|
38 | private void Redraw(RectangularPackingShape shape) {
|
---|
39 | packingPlan2D.InitializeContainer(shape.Width, shape.Height);
|
---|
40 | }
|
---|
41 |
|
---|
42 | }
|
---|
43 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.