unit ksimmotf;
{------------------------------------------------------------------------------}
{
  KSimMot - This file include Kave 2000 Simulation for motor-components:
    TsMotorObject

   Author:  Vesa Lappalainen
   Date:    9.9.1996
   Changes: 15.3.1998/vl
            + saved as own unit with edit form
}
{------------------------------------------------------------------------------}


interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, KParam, kComp, kavesimf, savepos, kinicomp, ExtCtrls, kavesimu;

  {----------------------------------------------------------------------------}
type
  TFormEditKSimMot = class(TFormEditSimuObject)
    ParamRpm: TkParam;
    ParamRatio: TkParam;
  private
    { Private declarations }
  public
    { Public declarations }
    procedure GetData(const o:TaSimuObject); override;
    procedure SetData(o:TaSimuObject); override;
  end;

//var
//  FormEditKSimMot: TFormEditKSimMot;

implementation
uses kdouble, ksimmot;


{$R *.DFM}
{------------------------------------------------------------------------------}
//-----------------------------------------------------------------------------
// TFormEditKSimMot
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
procedure TFormEditKSimMot.GetData(const o:TaSimuObject); //  override;
var ob : TsMotorObject;
begin
  if not ( o is TsMotorObject ) then exit;
  ob := o as TsMotorObject;
  inherited;
  ParamRPM.Value := ob.Rpm;
  ParamRatio.Value := ob.Ratio;
end;


//-----------------------------------------------------------------------------
procedure TFormEditKSimMot.SetData(o:TaSimuObject); //  override;
var ob : TsMotorObject;
begin
  if not ( o is TsMotorObject ) then exit;
  ob := o as TsMotorObject;
  inherited;
  ob.Rpm := ParamRPM.Value;
  ob.Ratio := ParamRatio.Value;
end;


end.
