You've already forked lazarus-ccr
tvplanit: Improved assembly of event text in WeekView.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5153 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -413,9 +413,9 @@ var
|
|||||||
begin
|
begin
|
||||||
datastore := VpControlLink1.Datastore;
|
datastore := VpControlLink1.Datastore;
|
||||||
grp := datastore.Resources.AddResourceGroup([1, 2], NAME_OF_GROUP);
|
grp := datastore.Resources.AddResourceGroup([1, 2], NAME_OF_GROUP);
|
||||||
grp.Pattern := opDiagCross;
|
|
||||||
|
|
||||||
// Optionally uncomment these lines to get not-default behavior:
|
// Optionally uncomment these lines to get not-default behavior:
|
||||||
|
//grp.Pattern := opDiagCross;
|
||||||
//grp.ReadOnly := false;
|
//grp.ReadOnly := false;
|
||||||
//grp.ShowDetails := [odResource, odEventDescription, odEventCategory];
|
//grp.ShowDetails := [odResource, odEventDescription, odEventCategory];
|
||||||
|
|
||||||
|
@ -86,32 +86,29 @@ begin
|
|||||||
grp := FWeekView.Datastore.Resource.Group;
|
grp := FWeekView.Datastore.Resource.Group;
|
||||||
isOverlayed := AEvent.IsOverlayed;
|
isOverlayed := AEvent.IsOverlayed;
|
||||||
|
|
||||||
|
if FWeekView.ShowEventTime then
|
||||||
|
begin
|
||||||
|
timefmt := IfThen(FWeekView.TimeFormat = tf24Hour, 'hh:nn', 'hh:nn AM/PM');
|
||||||
|
Result := Result + Format('%s - %s: ', [
|
||||||
|
FormatDateTime(timeFmt, AStartTime),
|
||||||
|
FormatDateTime(timeFmt, AEndTime)
|
||||||
|
]);
|
||||||
|
end else
|
||||||
|
Result := '';
|
||||||
|
|
||||||
if isOverlayed then
|
if isOverlayed then
|
||||||
begin
|
begin
|
||||||
if (grp <> nil) and (odResource in grp.ShowDetails) then
|
if (grp <> nil) and (odResource in grp.ShowDetails) then
|
||||||
begin
|
begin
|
||||||
res := FWeekView.Datastore.Resources.GetResource(AEvent.ResourceID);
|
res := FWeekView.Datastore.Resources.GetResource(AEvent.ResourceID);
|
||||||
if res <> nil then
|
if res <> nil then
|
||||||
Result := '[' + res.Description + ']';
|
Result := Result + '[' + res.Description + '] ';
|
||||||
end else
|
end else
|
||||||
Result := '[' + RSOverlayedEvent + ']';
|
Result := Result + '[' + RSOverlayedEvent + '] ';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (not isOverlayed) or ((grp <> nil) and (odEventDescription in grp.ShowDetails)) then
|
if (not isOverlayed) or ((grp <> nil) and (odEventDescription in grp.ShowDetails)) then
|
||||||
begin
|
Result := Result + AEvent.Description;
|
||||||
if Result <> '' then
|
|
||||||
Result := Result + ' ';
|
|
||||||
if FWeekView.ShowEventTime then
|
|
||||||
begin
|
|
||||||
timefmt := IfThen(FWeekView.TimeFormat = tf24Hour, 'hh:nn', 'hh:nn AM/PM');
|
|
||||||
Result := Result + Format('%s - %s: %s', [
|
|
||||||
FormatDateTime(timeFmt, AStartTime),
|
|
||||||
FormatDateTime(timeFmt, AEndTime),
|
|
||||||
AEvent.Description
|
|
||||||
]);
|
|
||||||
end else
|
|
||||||
Result := Result + AEvent.Description;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TVpWeekViewPainter.Clear;
|
procedure TVpWeekViewPainter.Clear;
|
||||||
|
Reference in New Issue
Block a user