procedure TMainForm.btActionClick(Sender: TObject);
var
DateTime: TDateTime;
begin
if rgActions.ItemIndex = 0 then
TryEncodeDateDay(StrToInt(edYear.Text),StrToInt(edDayYear.Text),DateTime);
if rgActions.ItemIndex = 1 then
TryEncodeDateMonthWeek(StrToInt(edYear.Text),StrToInt(edMonth.Text),
StrToInt(edWeekMonth.Text),StrToInt(edDayWeek.Text),DateTime);
if rgActions.ItemIndex = 2 then
TryEncodeDateWeek(StrToInt(edYear.Text),StrToInt(edWeekYear.Text),
DateTime,StrToInt(edDayWeek.Text));
if rgActions.ItemIndex = 3 then
TryEncodeDayOfWeekInMonth(StrToInt(edYear.Text),StrToInt(edMonth.Text),
StrToInt(edDayWeekMonth.Text),StrToInt(edDayWeek.Text),DateTime);
if rgActions.ItemIndex = 4 then
TryRecodeDateTime(DateTime,StrToInt(edYear2.Text),StrToInt(edMonth2.Text),
StrToInt(edDay.Text),StrToInt(edHour.Text),StrToInt(edMinute.Text),
StrToInt(edSecond.Text),StrToInt(edMilliSecond.Text),DateTime);
edDateTime.Text := DateTimeToStr(DateTime);
end;