You've already forked lazarus-ccr
Clean check code
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1986 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -170,19 +170,16 @@ begin
|
|||||||
if theValue = 0 then
|
if theValue = 0 then
|
||||||
begin
|
begin
|
||||||
DecodeTime(Now, hh, mm, ss, ms);
|
DecodeTime(Now, hh, mm, ss, ms);
|
||||||
//ShowMessage('sin hora');
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
DecodeTime(theValue, hh, mm, ss, ms);
|
DecodeTime(theValue, hh, mm, ss, ms);
|
||||||
//ShowMessage('con hora');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
hhs := IntToStr(hh);
|
hhs := IntToStr(hh);
|
||||||
mms := IntToStr(mm);
|
mms := IntToStr(mm);
|
||||||
sss := IntToStr(ss);
|
sss := IntToStr(ss);
|
||||||
mss := IntToStr(ms);
|
mss := IntToStr(ms);
|
||||||
//ShowMessage(TimeString);
|
|
||||||
texto := Value;
|
texto := Value;
|
||||||
Result := texto; // default value
|
Result := texto; // default value
|
||||||
tokens := TStringList.Create;
|
tokens := TStringList.Create;
|
||||||
@ -223,8 +220,6 @@ var
|
|||||||
bTime: TDateTime;
|
bTime: TDateTime;
|
||||||
begin
|
begin
|
||||||
Result := TryStrToTime(Value, bTime);
|
Result := TryStrToTime(Value, bTime);
|
||||||
//if Result = False then
|
|
||||||
// ShowMessage('Hora incorrecta: ' + Value);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -164,7 +164,7 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
ShowMessage(CellEditor.Caption + ' no es una hora válida: Editing done');
|
ShowMessage(CellEditor.Caption + ' no es una hora válida');
|
||||||
CellEditor.Text := FormatDateTime(format, theValue);
|
CellEditor.Text := FormatDateTime(format, theValue);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -194,7 +194,7 @@ begin
|
|||||||
if (Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT]) and
|
if (Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT]) and
|
||||||
(not IsValidTimeString(NormalizeTime(CellEditor.Caption, theValue))) then
|
(not IsValidTimeString(NormalizeTime(CellEditor.Caption, theValue))) then
|
||||||
begin
|
begin
|
||||||
ShowMessage(CellEditor.Caption + ' no es una hora válida OnKeyDown');
|
ShowMessage(CellEditor.Caption + ' no es una hora válida');
|
||||||
CellEditor.Text := FormatDateTime(format, theValue);
|
CellEditor.Text := FormatDateTime(format, theValue);
|
||||||
CellEditor.SelectAll;
|
CellEditor.SelectAll;
|
||||||
Key := VK_UNKNOWN;
|
Key := VK_UNKNOWN;
|
||||||
@ -225,7 +225,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
theValue := StrToTime(CellEditor.Caption);
|
theValue := StrToTime(CellEditor.Caption);
|
||||||
Field.DataSet.Edit;
|
Field.DataSet.Edit;
|
||||||
Field.AsDateTime:= theValue ; ShowMessage('TAB/Enter/right/left key-> ' + Field.AsString);//Field.AsDateTime := theValue;
|
Field.AsDateTime:= theValue ;
|
||||||
CellEditor.SelectAll;
|
CellEditor.SelectAll;
|
||||||
updated := True;
|
updated := True;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user