tvplanit: Misc

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4909 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-07-04 15:53:06 +00:00
parent 524b731df8
commit 8cebf7fdb9
6 changed files with 33 additions and 21 deletions

View File

@ -690,8 +690,8 @@ object MainForm: TMainForm
DataStore = VpBufDSDataStore1
LocalizationFile = '../../source/vplocalize.xml'
Printer.BottomMargin = 5
Printer.DayStart = h_07
Printer.DayEnd = h_18
Printer.DayStart = h_02
Printer.DayEnd = h_16
Printer.Granularity = gr60Min
Printer.LeftMargin = 5
Printer.MarginUnits = imPercent

View File

@ -190,7 +190,7 @@ begin
'hu' : Result := $040E; // Hungarian
'it' : Result := $0410; // Italian
'jp' : Result := $0411; // Japanese
'nl' : Result := $0413; // Netherlands
'nl' : Result := $0413; // Netherlands (Dutch)
'pl' : Result := $0415; // Polish
'pt' : Result := $0816; // Portuguese (Portugal)
'ru' : Result := $0419; // Russian
@ -367,9 +367,15 @@ begin
t1 := StartOfTheWeek(now);
t2 := t1 + 7 - VpDayView1.NumDays mod 7; // + 7;
fmt.DayInc := VpDayView1.NumDays;
VpControlLink1.Printer.Granularity := VpDayView1.Granularity;
VpControlLink1.Printer.DayStart := h_08; //VpDayView1.DefaultTopHour;
VpControlLink1.Printer.DayEnd := h_17;
// wp: !!!!!!!!!!!!!!!!!!!!!!!!!!!! bring back in !!!!!!!!!!!!!
// VpControlLink1.Printer.Granularity := VpDayView1.Granularity;
// VpControlLink1.Printer.DayStart := h_08; //VpDayView1.DefaultTopHour;
// VpControlLink1.Printer.DayEnd := h_17;
end;
1: begin // current week in WeekView
t1 := StartOfTheWeek(now);
@ -447,6 +453,7 @@ begin
'he': po.Add('he - Hebrew');
'hu': po.Add('hu - magyar');
'it': po.Add('it - Italian');
'nl': po.Add('nl - Dutch');
'ru': po.Add('ru - русский');
end;
end;

View File

@ -359,7 +359,6 @@ type
FLocalizationFile : string;
FDefaultCountry : string;
FCityStateZipFormat: String;
FScreenOutput : Boolean;
protected{private}
DependentList: TList;
procedure Attach (Sender : TComponent);
@ -380,7 +379,6 @@ type
procedure TriggerOnPageEnd (Sender: TObject; PageNum: Integer; ADate: TDateTime; LastPage: Boolean);
procedure TriggerOnPageStart (Sender: TObject; PageNum: Integer; ADate: TDateTime);
property Localization : TVpLocalization read FLocalization write FLocalization;
property ScreenOutput: Boolean read FScreenOutput write FScreenOutput;
published
property CityStateZipFormat: String read FCityStateZipFormat write SetCityStateZipFormat;
// Use symbols @CITY, @STATE, @ZIP to define the order of these strings
@ -1201,7 +1199,6 @@ var
I: Integer;
begin
inherited;
FScreenOutput := true;
DependentList := TList.Create;

View File

@ -1554,6 +1554,8 @@ end;
procedure TVpDayViewPainter.RenderToCanvas(ARenderIn: TRect;
AAngle: TVpRotationAngle; AScale: Extended; ARenderDate: TDateTime;
AStartLine, AStopLine: Integer; AUseGran: TVpGranularity; ADisplayOnly: Boolean);
{wp: DisplayOnly is poorly-named. It is false during screen output in the form,
it is true during printing and in print preview }
var
tmpRect: TRect;
begin
@ -1562,15 +1564,12 @@ begin
// Make sure to use only the date part
ARenderDate := trunc(ARenderDate);
// Here begins the original routine...
InitColors;
SavePenBrush;
InitPenBrush;
SetMeasurements;
if StartLine < 0 then
StartLine := FDayView.TopLine;
{
if DisplayOnly then
ScrollBarOffset := 2
@ -1579,9 +1578,22 @@ begin
}
if (FDayView.VisibleLines < FDayView.LineCount) and FDayView.ControlLink.ScreenOutput then
ScrollbarOffset := 14 else
ScrollbarOffset := 0;
with TVpDayViewOpener(FDayView) do
if ADisplayOnly then begin
// use printer settings
SetTimeIntervals(ControlLink.Printer.Granularity);
TopLine := StartLine;
StartLine := TopLine;
end else
begin
// use screen settings
SetTimeIntervals(Granularity);
if StartLine < 0 then
StartLine := FDayView.TopLine;
if VisibleLines < LineCount then
ScrollbarOffset := 14;
end;
Rgn := CreateRectRgn(RenderIn.Left, RenderIn.Top, RenderIn.Right, RenderIn.Bottom);
try

View File

@ -706,7 +706,7 @@ begin
PPageInfo.Contact := 0;
PPageInfo.Task := 0;
PPageInfo.LastPage := False;
FPageInfo.Add (PPageInfo);
FPageInfo.Add(PPageInfo);
i := 0;
end;

View File

@ -222,13 +222,10 @@ end;
function TVpPrintPreviewDialog.Execute: Boolean;
var
EditForm: TfrmPrintPreview;
scr: Boolean;
begin
Result := False;
scr := ControlLink.ScreenOutput;
Application.CreateForm(TfrmPrintPreview, EditForm);
try
ControlLink.ScreenOutput := false;
DoFormPlacement(EditForm);
EditForm.WindowState := WindowState;
EditForm.VpPrintPreview1.ControlLink := ControlLink;
@ -253,7 +250,6 @@ begin
end;
end;
finally
ControlLink.ScreenOutput := scr;
EditForm.Release;
end;
end;