-
Notifications
You must be signed in to change notification settings - Fork 0
/
UMaterial.pas
executable file
·180 lines (146 loc) · 3.79 KB
/
UMaterial.pas
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
unit UMaterial;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
UEmbedForm, ExtCtrls, StdCtrls,
tc;
type
TFMaterial = class(TEmbedForm)
Label1: TLabel;
Panel1: TPanel;
Label2: TLabel;
Panel2: TPanel;
Label4: TLabel;
Panel4: TPanel;
Label3: TLabel;
Panel3: TPanel;
Label6: TLabel;
Panel5: TPanel;
Label5: TLabel;
Panel6: TPanel;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
procedure Load(Material : TMaterial);
procedure Save(Material : TMaterial);
procedure SetMx(value : massa);
function GetMx : massa;
procedure SetSigma(value : massa);
function GetSigma : massa;
procedure SetLamda(value : massa);
function GetLamda : massa;
procedure SetQueue(value : massa);
function GetQueue : massa;
procedure SetLimit(value : massa);
function GetLimit : massa;
procedure SetKoef(value : double);
function GetKoef : double;
property Lamda : massa read GetLamda write SetLamda;
property mx : massa read GetMx write SetMx;
property Sigma : massa read GetSigma write SetSigma;
property Queue : massa read GetQueue write SetQueue;
property Limit : massa read GetLimit write SetLimit;
property Koef : double read GetKoef write SetKoef;
end;
var
FMaterial: TFMaterial;
implementation
Uses UMassa, USpeed, UDouble;
var
Fmx : TFSpeed;
FKoef : TFDouble;
FSigma : TFMassa;
FLamda : TFSpeed;
FQueue,
FLimit : TFMassa;
{$R *.DFM}
procedure TFMaterial.FormCreate(Sender: TObject);
begin
inherited;
Panel1.BorderStyle := bsNone;
Panel2.BorderStyle := bsNone;
Panel4.BorderStyle := bsNone;
Panel3.BorderStyle := bsNone;
Panel5.BorderStyle := bsNone;
Panel6.BorderStyle := bsNone;
Fmx := TFSpeed.CreateEmbedded(self, Panel1);
Fsigma := TFMassa.CreateEmbedded(self, Panel2);
FLamda := TFSpeed.CreateEmbedded(self, Panel4);
FQueue := TFMassa.CreateEmbedded(self, Panel3);
FLimit := TFMassa.CreateEmbedded(self, Panel5);
FKoef := TFDouble.CreateEmbedded(self, Panel6);
Fmx.Show;
Fsigma.Show;
FLamda.Show;
FQueue.Show;
FLimit.Show;
FKoef.Show;
end;
function TFMaterial.GetLamda: massa;
begin
result := FLamda.Number;
end;
function TFMaterial.GetMx: massa;
begin
result := Fmx.Number;
end;
function TFMaterial.GetSigma: massa;
begin
result := Fsigma.Number;
end;
function TFMaterial.GetLimit: massa;
begin
result := FLimit.Number;
end;
function TFMaterial.GetQueue: massa;
begin
result := FQueue.Number;
end;
function TFMaterial.GetKoef: double;
begin
result := FKoef.Number;
end;
procedure TFMaterial.Load(Material: TMaterial);
begin
mx := Material.mx;
sigma := Material.sigma;
Lamda := Material.Lamda;
Queue := Material.Queue;
Limit := Material.Limit;
Koef := Material.Koef;
end;
procedure TFMaterial.Save(Material: TMaterial);
begin
Material.mx := mx;
Material.sigma := sigma;
Material.Lamda := Lamda;
Material.Queue := Queue;
Material.Limit := Limit;
Material.Koef := Koef;
end;
procedure TFMaterial.SetLamda(value: massa);
begin
FLamda.Number := value;
end;
procedure TFMaterial.SetMx(value: massa);
begin
Fmx.Number := value;
end;
procedure TFMaterial.SetSigma(value: massa);
begin
Fsigma.Number := value;
end;
procedure TFMaterial.SetLimit(value: massa);
begin
FLimit.Number := value;
end;
procedure TFMaterial.SetQueue(value: massa);
begin
FQueue.Number := value;
end;
procedure TFMaterial.SetKoef(value: double);
begin
FKoef.Number := value;
end;
end.