rm_jvinterpreter_dialogs.pas

来自「胜天进销存源码,国产优秀的进销存」· PAS 代码 · 共 1,106 行 · 第 1/3 页

PAS
1,106
字号
end;

{$IFDEF COMPLIB_VCL}

{ property Read Device: TFontDialogDevice }

procedure TFontDialog_Read_Device(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TFontDialog(Args.Obj).Device;
end;

{ property Write Device(Value: TFontDialogDevice) }

procedure TFontDialog_Write_Device(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TFontDialog(Args.Obj).Device := Value;
end;

{ property Read MinFontSize: Integer }

procedure TFontDialog_Read_MinFontSize(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TFontDialog(Args.Obj).MinFontSize;
end;

{ property Write MinFontSize(Value: Integer) }

procedure TFontDialog_Write_MinFontSize(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TFontDialog(Args.Obj).MinFontSize := Value;
end;

{ property Read MaxFontSize: Integer }

procedure TFontDialog_Read_MaxFontSize(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TFontDialog(Args.Obj).MaxFontSize;
end;

{ property Write MaxFontSize(Value: Integer) }

procedure TFontDialog_Write_MaxFontSize(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TFontDialog(Args.Obj).MaxFontSize := Value;
end;

{ property Read Options: TFontDialogOptions }

procedure TFontDialog_Read_Options(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := S2V(Word(TFontDialog(Args.Obj).Options));
end;

{ property Write Options(Value: TFontDialogOptions) }

procedure TFontDialog_Write_Options(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TFontDialog(Args.Obj).Options := TFontDialogOptions(Word(V2S(Value)));
end;

{$ENDIF COMPLIB_VCL}

{$IFDEF COMPLIB_VCL}

{ TPrinterSetupDialog }

{ constructor Create(AOwner: TComponent) }

procedure TPrinterSetupDialog_Create(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := O2V(TPrinterSetupDialog.Create(V2O(Args.Values[0]) as TComponent));
end;

{ function Execute: Boolean; }

procedure TPrinterSetupDialog_Execute(var Value: Variant; Args: TJvInterpreterArgs);
begin
  {$IFDEF COMPILER3_UP}
  Value := TPrinterSetupDialog(Args.Obj).Execute;
  {$ELSE}
  TPrinterSetupDialog(Args.Obj).Execute;
  {$ENDIF COMPILER3_UP}
end;

{ TPrintDialog }

{ constructor Create(AOwner: TComponent) }

procedure TPrintDialog_Create(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := O2V(TPrintDialog.Create(V2O(Args.Values[0]) as TComponent));
end;

{ function Execute: Boolean; }

procedure TPrintDialog_Execute(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TPrintDialog(Args.Obj).Execute;
end;

{ property Read Collate: Boolean }

procedure TPrintDialog_Read_Collate(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TPrintDialog(Args.Obj).Collate;
end;

{ property Write Collate(Value: Boolean) }

procedure TPrintDialog_Write_Collate(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TPrintDialog(Args.Obj).Collate := Value;
end;

{ property Read Copies: Integer }

procedure TPrintDialog_Read_Copies(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TPrintDialog(Args.Obj).Copies;
end;

{ property Write Copies(Value: Integer) }

procedure TPrintDialog_Write_Copies(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TPrintDialog(Args.Obj).Copies := Value;
end;

{ property Read FromPage: Integer }

procedure TPrintDialog_Read_FromPage(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TPrintDialog(Args.Obj).FromPage;
end;

{ property Write FromPage(Value: Integer) }

procedure TPrintDialog_Write_FromPage(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TPrintDialog(Args.Obj).FromPage := Value;
end;

{ property Read MinPage: Integer }

procedure TPrintDialog_Read_MinPage(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TPrintDialog(Args.Obj).MinPage;
end;

{ property Write MinPage(Value: Integer) }

procedure TPrintDialog_Write_MinPage(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TPrintDialog(Args.Obj).MinPage := Value;
end;

{ property Read MaxPage: Integer }

procedure TPrintDialog_Read_MaxPage(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TPrintDialog(Args.Obj).MaxPage;
end;

{ property Write MaxPage(Value: Integer) }

procedure TPrintDialog_Write_MaxPage(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TPrintDialog(Args.Obj).MaxPage := Value;
end;

{ property Read Options: TPrintDialogOptions }

procedure TPrintDialog_Read_Options(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := S2V(Byte(TPrintDialog(Args.Obj).Options));
end;

{ property Write Options(Value: TPrintDialogOptions) }

procedure TPrintDialog_Write_Options(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TPrintDialog(Args.Obj).Options := TPrintDialogOptions(Byte(V2S(Value)));
end;

{ property Read PrintToFile: Boolean }

procedure TPrintDialog_Read_PrintToFile(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TPrintDialog(Args.Obj).PrintToFile;
end;

{ property Write PrintToFile(Value: Boolean) }

procedure TPrintDialog_Write_PrintToFile(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TPrintDialog(Args.Obj).PrintToFile := Value;
end;

{ property Read PrintRange: TPrintRange }

procedure TPrintDialog_Read_PrintRange(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TPrintDialog(Args.Obj).PrintRange;
end;

{ property Write PrintRange(Value: TPrintRange) }

procedure TPrintDialog_Write_PrintRange(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TPrintDialog(Args.Obj).PrintRange := Value;
end;

{ property Read ToPage: Integer }

procedure TPrintDialog_Read_ToPage(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TPrintDialog(Args.Obj).ToPage;
end;

{ property Write ToPage(Value: Integer) }

procedure TPrintDialog_Write_ToPage(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TPrintDialog(Args.Obj).ToPage := Value;
end;

{$ENDIF COMPLIB_VCL}

{ TFindDialog }

{ constructor Create(AOwner: TComponent) }

procedure TFindDialog_Create(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := O2V(TFindDialog.Create(V2O(Args.Values[0]) as TComponent));
end;

{ procedure CloseDialog; }

{$IFDEF COMPLIB_VCL}
procedure TFindDialog_CloseDialog(var Value: Variant; Args: TJvInterpreterArgs);
begin
  TFindDialog(Args.Obj).CloseDialog;
end;
{$ENDIF COMPLIB_VCL}

{ function Execute: Boolean; }

procedure TFindDialog_Execute(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TFindDialog(Args.Obj).Execute;
end;

{$IFDEF COMPLIB_VCL}

{ property Read Left: Integer }

procedure TFindDialog_Read_Left(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TFindDialog(Args.Obj).Left;
end;

{ property Write Left(Value: Integer) }

procedure TFindDialog_Write_Left(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TFindDialog(Args.Obj).Left := Value;
end;

{$ENDIF COMPLIB_VCL}

{ property Read Position: TPoint }

procedure TFindDialog_Read_Position(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := Point2Var(TFindDialog(Args.Obj).Position);
end;

{ property Write Position(Value: TPoint) }

procedure TFindDialog_Write_Position(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TFindDialog(Args.Obj).Position := Var2Point(Value);
end;

{$IFDEF COMPLIB_VCL}

{ property Read Top: Integer }

procedure TFindDialog_Read_Top(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TFindDialog(Args.Obj).Top;
end;

{ property Write Top(Value: Integer) }

procedure TFindDialog_Write_Top(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TFindDialog(Args.Obj).Top := Value;
end;

{$ENDIF COMPLIB_VCL}

{ property Read FindText: string }

procedure TFindDialog_Read_FindText(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TFindDialog(Args.Obj).FindText;
end;

{ property Write FindText(Value: string) }

procedure TFindDialog_Write_FindText(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TFindDialog(Args.Obj).FindText := Value;
end;

{ property Read Options: TFindOptions }

procedure TFindDialog_Read_Options(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := S2V(Word(TFindDialog(Args.Obj).Options));
end;

{ property Write Options(Value: TFindOptions) }

procedure TFindDialog_Write_Options(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TFindDialog(Args.Obj).Options := TFindOptions(Word(V2S(Value)));
end;

{ TReplaceDialog }

{ constructor Create(AOwner: TComponent) }

procedure TReplaceDialog_Create(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := O2V(TReplaceDialog.Create(V2O(Args.Values[0]) as TComponent));
end;

{ property Read ReplaceText: string }

procedure TReplaceDialog_Read_ReplaceText(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := TReplaceDialog(Args.Obj).ReplaceText;
end;

{ property Write ReplaceText(Value: string) }

procedure TReplaceDialog_Write_ReplaceText(const Value: Variant; Args: TJvInterpreterArgs);
begin
  TReplaceDialog(Args.Obj).ReplaceText := Value;
end;

{ function CreateMessageDialog(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): TForm; }

{$IFDEF COMPLIB_VCL}
procedure JvInterpreter_CreateMessageDialog(var Value: Variant; Args: TJvInterpreterArgs);
begin
  Value := O2V(CreateMessageDialog(Args.Values[0], Args.Values[1], TMsgDlgButtons(Word(V2S(Args.Values[2])))));
end;
{$ENDIF COMPLIB_VCL}

{ function MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer; }

procedure JvInterpreter_MessageDlg(var Value: Variant; Args: TJvInterpreterArgs);
begin
  {$IFDEF COMPLIB_VCL}
  Value := MessageDlg(Args.Values[0], Args.Values[1], TMsgDlgButtons(Word(V2S(Args.Values[2]))), Args.Values[3]);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?