tvplanit: Some improvements in VpEdFmtLst.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8508 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-10-03 17:06:43 +00:00
parent 6bf5ba0284
commit b2991baa90
6 changed files with 29 additions and 31 deletions

View File

@ -807,8 +807,8 @@ object MainForm: TMainForm
object VpControlLink1: TVpControlLink
LocalizationFile = '../../source/vplocalize.xml'
Printer.BottomMargin = 5
Printer.DayStart = h_08
Printer.DayEnd = h_16
Printer.DayStart = h_00
Printer.DayEnd = h_23
Printer.Granularity = gr30Min
Printer.LeftMargin = 5
Printer.MarginUnits = imPercent

View File

@ -776,9 +776,11 @@ begin
t1 := StartOfTheWeek(now);
t2 := t1 + 7 - VpDayView1.NumDays mod 7; // + 7;
fmt.DayInc := VpDayView1.NumDays;
{
VpControlLink1.Printer.Granularity := gr30Min;
VpControlLink1.Printer.DayStart := h_08;
VpControlLink1.Printer.DayEnd := h_18;
}
end;
1: begin // current week in WeekView
t1 := StartOfTheWeek(now);

View File

@ -581,7 +581,7 @@ msgstr "Markierte Einträge importieren"
#: vpsr.rsimporticalevent
msgid "Import ICalendar Event"
msgstr "iCalendar-Termin importieren"
msgstr "ICalendar-Termin importieren"
#: vpsr.rsimporticaltask
msgid "Import ICalendar Task"
@ -1095,7 +1095,7 @@ msgstr "Druckformat-Designer"
msgid "Print order"
msgstr ""
"Druck-\n"
"Reihenfolge\n"
"Reihenfolge"
#: vpsr.rsprintprvcancel
msgctxt "vpsr.rsprintprvcancel"
@ -1813,4 +1813,3 @@ msgstr "Unbekannte Achsen-Spezifikation: %s"
#: vpsr.sxmldecnotatbeg
msgid "The XML declaration must appear before the first element"
msgstr "Die XML-Deklaration muss vor dem ersten Element erscheinen"

View File

@ -72,13 +72,13 @@ object frmPrnFormat: TfrmPrnFormat
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideBottom.Control = btnMoveElementUp
Left = 318
Height = 15
Top = 390
Width = 58
Left = 332
Height = 30
Top = 375
Width = 30
Alignment = taCenter
Anchors = [akLeft, akBottom]
Caption = 'Print Order'
Caption = 'Print'#13#10'Order'
Color = clDefault
ParentColor = False
WordWrap = True
@ -272,16 +272,17 @@ object frmPrnFormat: TfrmPrnFormat
object btnOk: TButton
AnchorSideRight.Control = ButtonPanel
AnchorSideRight.Side = asrBottom
Left = 646
Left = 613
Height = 25
Top = 4
Width = 42
Width = 75
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Top = 4
BorderSpacing.Right = 6
BorderSpacing.Bottom = 4
Caption = 'OK'
Constraints.MinWidth = 75
OnClick = btnOkClick
TabOrder = 3
end

View File

@ -2,7 +2,7 @@
{"hash":99728530,"name":"tfrmprnformat.caption","sourcebytes":[80,114,105,110,116,32,70,111,114,109,97,116,32,68,101,115,105,103,110,101,114],"value":"Print Format Designer"},
{"hash":110338490,"name":"tfrmprnformat.lblformats.caption","sourcebytes":[38,70,111,114,109,97,116,115,58],"value":"&Formats:"},
{"hash":222337306,"name":"tfrmprnformat.lblelements.caption","sourcebytes":[69,108,101,38,109,101,110,116,115,58],"value":"Ele&ments:"},
{"hash":102832786,"name":"tfrmprnformat.lblprintorder.caption","sourcebytes":[80,114,105,110,116,32,79,114,100,101,114],"value":"Print Order"},
{"hash":145723266,"name":"tfrmprnformat.lblprintorder.caption","sourcebytes":[80,114,105,110,116,13,10,79,114,100,101,114],"value":"Print\r\nOrder"},
{"hash":177351,"name":"tfrmprnformat.btnnewformat.caption","sourcebytes":[38,78,101,119],"value":"&New"},
{"hash":2800388,"name":"tfrmprnformat.btneditformat.caption","sourcebytes":[38,69,100,105,116],"value":"&Edit"},
{"hash":179055749,"name":"tfrmprnformat.btndeleteformat.caption","sourcebytes":[38,68,101,108,101,116,101],"value":"&Delete"},

View File

@ -384,12 +384,20 @@ procedure TfrmPrnFormat.DoEditFormat;
var
AFormat: TVpPrintFormatItem;
frmEditFormat: TfrmEditFormat;
oldFormatName: String;
begin
if lbFormats.ItemIndex > -1 then begin
Application.CreateForm(TfrmEditFormat, frmEditFormat);
AFormat := TVpPrintFormatItem(lbFormats.Items.Objects[lbFormats.ItemIndex]);
oldFormatName := AFormat.FormatName;
if frmEditFormat.Execute(AFormat) then begin
IsDirty := True;
if AFormat.FormatName <> oldFormatName then
begin
lbFormats.Items.Delete(lbFormats.ItemIndex);
lbFormats.Items.AddObject(AFormat.FormatName, AFormat);
lbFormats.ItemIndex := lbFormats.Items.IndexOf(Aformat.FormatName);
end;
end;
frmEditFormat.Free;
@ -542,27 +550,15 @@ end;
procedure TfrmPrnFormat.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
var
Rslt: Integer;
begin
CanClose := True;
if IsDirty then begin
Rslt := DirtyPrompt;
case Rslt of
ID_YES:
begin
DoSave;
CanClose := True;
end;
ID_NO:
CanClose := True;
ID_CANCEL:
begin
CanClose := False;
Exit;
end;
case DirtyPrompt of
mrYes: DoSave;
mrNo: ;
mrCancel: CanClose := false;
end;
end else
CanClose := True;
end;
end;
function TfrmPrnFormat.GetControlLink: TVpControlLink;