function TClPrn.Get_Active: WordBool;
begin
Result := Active;
end;
function TClPrn.Get_AlignDisabled: WordBool;
begin
Result := AlignDisabled;
end;
function TClPrn.Get_AutoScroll: WordBool;
begin
Result := AutoScroll;
end;
function TClPrn.Get_AutoSize: WordBool;
begin
Result := AutoSize;
end;
function TClPrn.Get_AxBorderStyle: TxActiveFormBorderStyle;
begin
Result := Ord(AxBorderStyle);
end;
function TClPrn.Get_Caption: WideString;
begin
Result := WideString(Caption);
end;
function TClPrn.Get_Color: OLE_COLOR;
begin
Result := OLE_COLOR(Color);
end;
function TClPrn.Get_Cursor: Smallint;
begin
Result := Smallint(Cursor);
end;
function TClPrn.Get_DoubleBuffered: WordBool;
begin
Result := DoubleBuffered;
end;
function TClPrn.Get_DropTarget: WordBool;
begin
Result := DropTarget;
end;
function TClPrn.Get_Enabled: WordBool;
begin
Result := Enabled;
end;
function TClPrn.Get_Font: IFontDisp;
begin
GetOleFont(Font, Result);
end;
function TClPrn.Get_HelpFile: WideString;
begin
Result := WideString(HelpFile);
end;
function TClPrn.Get_HelpKeyword: WideString;
begin
Result := WideString(HelpKeyword);
end;
function TClPrn.Get_HelpType: TxHelpType;
begin
Result := Ord(HelpType);
end;
function TClPrn.Get_KeyPreview: WordBool;
begin
Result := KeyPreview;
end;
function TClPrn.Get_PixelsPerInch: Integer;
begin
Result := PixelsPerInch;
end;
function TClPrn.Get_PrintScale: TxPrintScale;
begin
Result := Ord(PrintScale);
end;
function TClPrn.Get_Scaled: WordBool;
begin
Result := Scaled;
end;
function TClPrn.Get_Visible: WordBool;
begin
Result := Visible;
end;
function TClPrn.Get_VisibleDockClientCount: Integer;
begin
Result := VisibleDockClientCount;
end;
procedure TClPrn._Set_Font(var Value: IFontDisp);
begin
SetOleFont(Font, Value);
end;
procedure TClPrn.ActivateEvent(Sender: TObject);
begin
if FEvents <> nil then FEvents.OnActivate;
end;
procedure TClPrn.ClickEvent(Sender: TObject);
begin
if FEvents <> nil then FEvents.OnClick;
end;
procedure TClPrn.CreateEvent(Sender: TObject);
begin
if FEvents <> nil then FEvents.OnCreate;
end;
procedure TClPrn.DblClickEvent(Sender: TObject);
begin
if FEvents <> nil then FEvents.OnDblClick;
end;
procedure TClPrn.DeactivateEvent(Sender: TObject);
begin
if FEvents <> nil then FEvents.OnDeactivate;
end;
procedure TClPrn.DestroyEvent(Sender: TObject);
begin
if FEvents <> nil then FEvents.OnDestroy;
end;
procedure TClPrn.KeyPressEvent(Sender: TObject; var Key: Char);
var
TempKey: Smallint;
begin
TempKey := Smallint(Key);
if FEvents <> nil then FEvents.OnKeyPress(TempKey);
Key := Char(TempKey);
end;
procedure TClPrn.PaintEvent(Sender: TObject);
begin
if FEvents <> nil then FEvents.OnPaint;
end;
procedure TClPrn.Set_AutoScroll(Value: WordBool);
begin
AutoScroll := Value;
end;
procedure TClPrn.Set_AutoSize(Value: WordBool);
begin
AutoSize := Value;
end;
procedure TClPrn.Set_AxBorderStyle(Value: TxActiveFormBorderStyle);
begin
AxBorderStyle := TActiveFormBorderStyle(Value);
end;
procedure TClPrn.Set_Caption(const Value: WideString);
begin
Caption := TCaption(Value);
end;
procedure TClPrn.Set_Color(Value: OLE_COLOR);
begin
Color := TColor(Value);
end;
procedure TClPrn.Set_Cursor(Value: Smallint);
begin
Cursor := TCursor(Value);
end;
procedure TClPrn.Set_DoubleBuffered(Value: WordBool);
begin
DoubleBuffered := Value;
end;
procedure TClPrn.Set_DropTarget(Value: WordBool);
begin
DropTarget := Value;
end;
procedure TClPrn.Set_Enabled(Value: WordBool);
begin
Enabled := Value;
end;
procedure TClPrn.Set_Font(const Value: IFontDisp);
begin
SetOleFont(Font, Value);
end;
procedure TClPrn.Set_HelpFile(const Value: WideString);
begin
HelpFile := String(Value);
end;
procedure TClPrn.Set_HelpKeyword(const Value: WideString);
begin
HelpKeyword := String(Value);
end;
procedure TClPrn.Set_HelpType(Value: TxHelpType);
begin
HelpType := THelpType(Value);
end;
procedure TClPrn.Set_KeyPreview(Value: WordBool);
begin
KeyPreview := Value;
end;
procedure TClPrn.Set_PixelsPerInch(Value: Integer);
begin
PixelsPerInch := Value;
end;
procedure TClPrn.Set_PrintScale(Value: TxPrintScale);
begin
PrintScale := TPrintScale(Value);
end;
procedure TClPrn.Set_Scaled(Value: WordBool);
begin
Scaled := Value;
end;
procedure TClPrn.Set_Visible(Value: WordBool);
begin
Visible := Value;
end;
procedure TClPrn.ClPrn(const Str: WideString);
var
TmpStr,Temp : String;
Sub : Integer;
begin
QRLabel_Year.Caption := copy(FormatDateTime('yyyymmdd',Now),1,4) + '年'
+ copy(FormatDateTime('yyyymmdd',Now),5,2) + '月'
+ copy(FormatDateTime('yyyymmdd',Now),7,2) + '日';
ListBox1.Items.Clear;
TmpStr := Str;
if TmpStr <> '' then
begin
Sub := pos('&',TmpStr);
while Sub > 0 do
begin
Temp := copy(TmpStr,1,Sub-1);
ListBox1.Items.Add(Temp);
TmpStr := copy(TmpStr,Sub + 1,Length(TmpStr)-Sub);
Sub := pos('&',TmpStr);
end;
if TmpStr <> '' then
begin
ListBox1.Items.Add(TmpStr);
end;
while ListBox1.Items.Count < 30 do
begin
ListBox1.Items.Add(' ');
end;
QRLabel_Cx.Caption := ListBox1.Items[0];
QRLabel_Sj.Caption := ListBox1.Items[1];
QRLabel_Ddzb.Caption := ListBox1.Items[2];
QRLabel_Ycr.Caption := ListBox1.Items[3];
QRLabel_Dw.Caption := ListBox1.Items[4];
QRLabel_Bddd.Caption := ListBox1.Items[5];
QRLabel_Kw.Caption := ListBox1.Items[6];
QRLabel_Cchour.Caption := ListBox1.Items[7];
QRLabel_Fhhour.Caption := ListBox1.Items[8];
QRLabel_Ccbs.Caption := ListBox1.Items[9];
QRLabel_Fhbs.Caption := ListBox1.Items[10];
QRLabel_Xslc.Caption := ListBox1.Items[11];
QRRichText_Ddsx.Lines.Add(ListBox1.Items[12]);
QRRichText_Bz.Lines.Add(ListBox1.Items[13]);
QRRichText_Jycs.Lines.Add(ListBox1.Items[14]);
QRRichText_Qz.Lines.Add(ListBox1.Items[15]);
end
else
begin
Application.MessageBox('读取数值错误,请重新录入','错误!',mb_ok+mb_iconstop);
Exit;
end;
try
QuickRep_Print.Print;
except
Application.MessageBox('打印出错!','错误提示!',mb_ok+mb_iconstop);
end;
end;