保存打印配置
This commit is contained in:
parent
cf63f05f2a
commit
73a204db85
|
|
@ -123,7 +123,7 @@ object frmLabelPrint: TfrmLabelPrint
|
||||||
end
|
end
|
||||||
object ComboBox1: TcxComboBox
|
object ComboBox1: TcxComboBox
|
||||||
Left = 67
|
Left = 67
|
||||||
Top = 47
|
Top = 48
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
Properties.Items.Strings = (
|
Properties.Items.Strings = (
|
||||||
'1'
|
'1'
|
||||||
|
|
|
||||||
|
|
@ -4,27 +4,28 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
IniFiles, Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||||
Printers, cxEdit, DB, cxDBData, ToolWin, ComCtrls, cxGridCustomTableView,
|
cxDataStorage, Printers, cxEdit, DB, cxDBData, ToolWin, ComCtrls,
|
||||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
|
||||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
cxClasses, cxControls, cxGridCustomView, cxGrid, DBClient, ADODB, ImgList,
|
||||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
StdCtrls, ExtCtrls, cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu,
|
||||||
cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, RM_Common, RM_Class,
|
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu,
|
||||||
RM_GridReport, RM_Dataset, RM_E_llPDF, RM_BarCode, RM_e_Graphic, RM_e_Jpeg,
|
RM_Common, RM_Class, RM_GridReport, RM_Dataset, RM_E_llPDF, RM_BarCode,
|
||||||
RM_e_Xls, cxContainer, cxMaskEdit, cxDropDownEdit, cxMRUEdit, dxSkinsCore,
|
RM_e_Graphic, RM_e_Jpeg, RM_e_Xls, cxContainer, cxMaskEdit, cxDropDownEdit,
|
||||||
dxSkinsDefaultPainters, cxProgressBar, cxButtons, dxSkinBlack, dxSkinBlue,
|
cxMRUEdit, dxSkinsCore, dxSkinsDefaultPainters, cxProgressBar, cxButtons,
|
||||||
dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
|
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
|
||||||
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||||
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
|
||||||
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
|
||||||
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
||||||
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
||||||
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
||||||
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||||
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven,
|
||||||
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
|
||||||
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinValentine, dxSkinVS2010,
|
dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
|
||||||
dxSkinWhiteprint, dxSkinXmas2008Blue, RM_System, Buttons;
|
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, RM_System,
|
||||||
|
Buttons;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmLabelPrint = class(TForm)
|
TfrmLabelPrint = class(TForm)
|
||||||
|
|
@ -68,7 +69,7 @@ type
|
||||||
procedure cbbLabPropertiesButtonClick(Sender: TObject);
|
procedure cbbLabPropertiesButtonClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
IsDebug, FPreviewPrint, IsSql1, IsSql2, IsSql3, IsSql4, IsSql5: Boolean;
|
IsDebug, FPreviewPrint, IsSql1, IsSql2, IsSql3, IsSql4, IsSql5: Boolean;
|
||||||
FLMType, FQrCodeField: string;
|
FLMType, FQrCodeField, PrintSetFileName: string;
|
||||||
FFiltration1, FFiltration2, FFiltration3, FFiltration4, FFiltration5: string;
|
FFiltration1, FFiltration2, FFiltration3, FFiltration4, FFiltration5: string;
|
||||||
FSuccessfulFun: string;
|
FSuccessfulFun: string;
|
||||||
FparamBlclid: string;
|
FparamBlclid: string;
|
||||||
|
|
@ -82,6 +83,8 @@ type
|
||||||
FJsonOut: PChar;
|
FJsonOut: PChar;
|
||||||
DConString, DCode, DName: string;
|
DConString, DCode, DName: string;
|
||||||
constructor Create(AOwner: TComponent; JsonArgs: PChar);
|
constructor Create(AOwner: TComponent; JsonArgs: PChar);
|
||||||
|
procedure WriteINIFile();
|
||||||
|
procedure ReadINIFile();
|
||||||
{ Public declarations }
|
{ Public declarations }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -94,6 +97,35 @@ uses
|
||||||
U_RTFun, U_LabelMapSet, superobject, U_QrCodeFun;
|
U_RTFun, U_LabelMapSet, superobject, U_QrCodeFun;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmLabelPrint.ReadINIFile();
|
||||||
|
var
|
||||||
|
programIni: Tinifile; //配置文件名
|
||||||
|
begin
|
||||||
|
PrintSetFileName := ExtractFilePath(Paramstr(0)) + '/printset.INI';
|
||||||
|
programIni := Tinifile.create(PrintSetFileName);
|
||||||
|
ComboBox_Print.ItemIndex := strtoint(programIni.ReadString(FLMType, 'dyj', '0'));
|
||||||
|
ComboBox1.ItemIndex := strtoint(programIni.ReadString(FLMType, 'bqfs', '1'));
|
||||||
|
|
||||||
|
programIni.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
//写设置信息到INI文件
|
||||||
|
//参数
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmLabelPrint.WriteINIFile();
|
||||||
|
var
|
||||||
|
programIni: Tinifile; //配置文件名
|
||||||
|
begin
|
||||||
|
PrintSetFileName := ExtractFilePath(Paramstr(0)) + '/printset.INI';
|
||||||
|
programIni := Tinifile.create(PrintSetFileName);
|
||||||
|
programIni.WriteString(FLMType, 'dyj', IntToStr(ComboBox_Print.ItemIndex));
|
||||||
|
programIni.WriteString(FLMType, 'bqfs', IntToStr(ComboBox1.ItemIndex));
|
||||||
|
|
||||||
|
programIni.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TfrmLabelPrint.Create(AOwner: TComponent; JsonArgs: PChar);
|
constructor TfrmLabelPrint.Create(AOwner: TComponent; JsonArgs: PChar);
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
|
|
@ -312,6 +344,7 @@ begin
|
||||||
PrintLabel(False);
|
PrintLabel(False);
|
||||||
FJsonOut := '{"success":true}';
|
FJsonOut := '{"success":true}';
|
||||||
ModalResult := 1;
|
ModalResult := 1;
|
||||||
|
WriteINIFile();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmLabelPrint.btnShowClick(Sender: TObject);
|
procedure TfrmLabelPrint.btnShowClick(Sender: TObject);
|
||||||
|
|
@ -407,6 +440,7 @@ begin
|
||||||
// RM1.PreviewButtons := [rmpbZoom, rmpbLoad, rmpbSave, rmpbFind, rmpbPageSetup, rmpbExit, rmpbSaveToXLS, rmpbExport, rmpbNavigator];
|
// RM1.PreviewButtons := [rmpbZoom, rmpbLoad, rmpbSave, rmpbFind, rmpbPageSetup, rmpbExit, rmpbSaveToXLS, rmpbExport, rmpbNavigator];
|
||||||
// ComboBox_Print.Properties.Items.Assign(printer.Printers);
|
// ComboBox_Print.Properties.Items.Assign(printer.Printers);
|
||||||
InitGrid();
|
InitGrid();
|
||||||
|
ReadINIFile();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmLabelPrint.TV1DblClick(Sender: TObject);
|
procedure TfrmLabelPrint.TV1DblClick(Sender: TObject);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmYMTRKList: TfrmYMTRKList
|
object frmYMTRKList: TfrmYMTRKList
|
||||||
Left = 386
|
Left = 380
|
||||||
Top = 545
|
Top = 322
|
||||||
Width = 1470
|
Width = 1470
|
||||||
Height = 823
|
Height = 823
|
||||||
Caption = #38754#26009#22238#20179#30331#35760
|
Caption = #38754#26009#22238#20179#30331#35760
|
||||||
|
|
|
||||||
3
云翔一码通/printset.INI
Normal file
3
云翔一码通/printset.INI
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[LMType]
|
||||||
|
dyj=0
|
||||||
|
bqfs=1
|
||||||
Loading…
Reference in New Issue
Block a user