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
|
||||
datastore := VpControlLink1.Datastore;
|
||||
grp := datastore.Resources.AddResourceGroup([1, 2], NAME_OF_GROUP);
|
||||
grp.Pattern := opDiagCross;
|
||||
|
||||
// Optionally uncomment these lines to get not-default behavior:
|
||||
//grp.Pattern := opDiagCross;
|
||||
//grp.ReadOnly := false;
|
||||
//grp.ShowDetails := [odResource, odEventDescription, odEventCategory];
|
||||
|
||||
|
@ -86,32 +86,29 @@ begin
|
||||
grp := FWeekView.Datastore.Resource.Group;
|
||||
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
|
||||
begin
|
||||
if (grp <> nil) and (odResource in grp.ShowDetails) then
|
||||
begin
|
||||
res := FWeekView.Datastore.Resources.GetResource(AEvent.ResourceID);
|
||||
if res <> nil then
|
||||
Result := '[' + res.Description + ']';
|
||||
Result := Result + '[' + res.Description + '] ';
|
||||
end else
|
||||
Result := '[' + RSOverlayedEvent + ']';
|
||||
Result := Result + '[' + RSOverlayedEvent + '] ';
|
||||
end;
|
||||
|
||||
if (not isOverlayed) or ((grp <> nil) and (odEventDescription in grp.ShowDetails)) then
|
||||
begin
|
||||
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;
|
||||
Result := Result + AEvent.Description;
|
||||
end;
|
||||
|
||||
procedure TVpWeekViewPainter.Clear;
|
||||
|
Reference in New Issue
Block a user