forked from iesmatauw/StackBuilder
/
PalletProperties.cs
84 lines (80 loc) · 2.43 KB
/
PalletProperties.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
#endregion
namespace TreeDim.StackBuilder.Basics
{
public class PalletProperties : ItemBase
{
#region Data members
double _length, _width, _height;
double _weight;
double _admissibleLoadWeight, _admissibleLoadHeight;
private Color _color = Color.Yellow;
private string _typeName = "Block";
#endregion
#region Constructor
public PalletProperties(Document document, string typeName, double length, double width, double height)
: base(document)
{
_typeName = typeName;
_length = length;
_width = width;
_height = height;
}
#endregion
#region Public properties
public double Length
{
get { return _length; }
set { _length = value; Modify(); }
}
public double Width
{
get { return _width; }
set { _width = value; Modify(); }
}
public double Height
{
get { return _height; }
set { _height = value; Modify(); }
}
public double Weight
{
get { return _weight; }
set { _weight = value; Modify(); }
}
public double AdmissibleLoadWeight
{
get { return _admissibleLoadWeight; }
set { _admissibleLoadWeight = value; Modify(); }
}
public double AdmissibleLoadHeight
{
get { return _admissibleLoadHeight; }
set { _admissibleLoadHeight = value; Modify(); }
}
public string TypeName
{
get { return _typeName; }
set { _typeName = value; Modify(); }
}
public Color Color
{
set { _color = value; }
get { return _color; }
}
#endregion
#region Object override
public override string ToString()
{
StringBuilder sBuilder = new StringBuilder();
sBuilder.Append(base.ToString());
sBuilder.Append(string.Format("PalletProperties => Type {0} Length {1} Width {2} Height {3}", _typeName, _length, _width, _height));
return sBuilder.ToString();
}
#endregion
}
}