Реферат: Программная реализация модального управления для линейных стационарных систем
procedure TForm_Main.BitBtn_CloseClick(Sender: TObject);
begin
Close;
end;
procedure TForm_Main.BitBtn_OptionsClick(Sender: TObject);
var
V0, V1, V2, V3: LongInt;
LS: TCheckBoxState;
begin
with Form_Options do
begin
V0 := SpinEdit0.Value;
V1 := SpinEdit1.Value;
V2 := SpinEdit2.Value;
V3 := SpinEdit3.Value;
LS := CheckBox_Link.State;
ShowModal;
if ModalResult = mrCancel then
begin
SpinEdit0.Value := V0;
SpinEdit1.Value := V1;
SpinEdit2.Value := V2;
SpinEdit3.Value := V3;
CheckBox_Link.State := LS;
end
else
if ((SpinEdit0.Value <> V0) or (SpinEdit1.Value <> V1)) or
((SpinEdit2.Value <> V2) or (SpinEdit3.Value <> V3)) then
begin