minute: integer = 0;Р second: integer = 0;Р tot:integer = 0;РimplementationР{$R *.dfm}Рprocedure TForm1.CalculateTimeToSencond(timeKind:String; time:integer);РbeginР if timeKind = 'hh' thenР hour := timeР else if timeKind = 'mi' thenР minute := timeР else if timeKind = 'ss' thenР second := time;Р tot := hour * 60 * 60 + minute * 60 + second;Р form1.Label4.Caption := '总共为' + IntToStr(tot) + '秒';Рend;Рprocedure TForm1.SpinEdit1Change(Sender: TObject);РbeginР Form1.CalculateTimeToSencond('hh', StrToInt(Form1.SpinEdit1.Text));Рend;Рprocedure TForm1.SpinEdit2Change(Sender: TObject);РbeginР Form1.CalculateTimeToSencond('mi', StrToInt(Form1.SpinEdit2.Text));Рend;Рprocedure TForm1.SpinEdit3Change(Sender: TObject);РbeginР Form1.CalculateTimeToSencond('ss', StrToInt(Form1.SpinEdit3.Text));Рend;Рend.