Last change
on this file since 9674 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.2 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 cuboid shape.")]
|
---|
11 | [Content(typeof(CuboidPackingShape), true)]
|
---|
12 | public partial class CuboidPackingShapeView : NamedItemView {
|
---|
13 | public CuboidPackingShapeView() {
|
---|
14 | InitializeComponent();
|
---|
15 | }
|
---|
16 |
|
---|
17 |
|
---|
18 | public new CuboidPackingShape Content {
|
---|
19 | get { return (CuboidPackingShape)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 | Content.Name = "XX";
|
---|
31 | packingPlan3D1.StartRendering();
|
---|
32 | }
|
---|
33 | }
|
---|
34 |
|
---|
35 |
|
---|
36 | private void Redraw() {
|
---|
37 | packingPlan3D1.InitializeContainer(0,0,0);
|
---|
38 | }
|
---|
39 |
|
---|
40 | private void Redraw(CuboidPackingShape shape) {
|
---|
41 | packingPlan3D1.InitializeContainer(shape.Width, shape.Height, shape.Depth);
|
---|
42 | }
|
---|
43 | }
|
---|
44 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.