📄 pfibpreferences.pas
字号:
]
);
DefWriteToRegistry(
['Software',RegFIBRoot,RegPreferences,'pFIBDataSet','DefFormatFields'],
['DateFormat',
'TimeFormat',
'NumericDisplayFormat',
'NumericEditFormat',
'DateTimeFormat'
],
[
edDateFormat.Text,
edTimeFormat.Text,
edDisplayNumFormat.Text,
edEditNumFormat.Text,
edDateTimeDisplay.Text
]
);
DefWriteToRegistry(
['Software',RegFIBRoot,RegPreferences,'pFIBDataSet','Other'],
[
'DefPrefixGenName',
'DefSufixGenName'
],
[
EdPrefixGen.Text,
EdSufixGen .Text
]
);
DefWriteToRegistry(
['Software',RegFIBRoot,RegPreferences,'pFIBDataBase'],
[
'DialectC',
'CharSetC',
'UseLoginPrompt',
'UpperOldNames',
'SynchronizeTime',
'StoreConnected',
'CloseDesignConnectAfterRun'
],
[
DialectC.ItemIndex+1,
CharSetC.Text,
chUseLoginPrompt.Checked,
chUpperOldNames.Checked,
chSynchronizeTime.Checked,
chStoreConnected.Checked,
chCloseDsgnConnect.Checked
]
);
DefWriteToRegistry(
['Software',RegFIBRoot,RegPreferences,'pFIBQuery'],
[
'GoToFirstRecordOnExecute',
'ParamCheck',
'AutoStartTransaction',
'AutoCommitTransaction'
],
[
ChGo1.Checked,
ChParamCheck.Checked,
chAutoStartTransaction .Checked,
chAutoCommitTransaction.Checked
]
);
DefWriteToRegistry(
['Software',RegFIBRoot,RegPreferences,'pFIBTransaction'],
[
'TimeOutAction',
'TimeOut',
'TPBMode'
],
[
cmbTimeOutAction.ItemIndex,
edTimeout.Text,
cmbTPBMode.ItemIndex
]
);
end;
procedure LoadFromReg;
var Values:Variant;
begin
Values:=
DefReadFromRegistry(['Software',RegFIBRoot,RegPreferences,'pFIBDataSet','Options'],
[
'PersistentSorting',
'KeepSorting',
'ProtectedEdit',
'AutoFormatFields',
'StartTransaction',
'RefreshDeletedRecord',
'RefreshAfterPost',
'TrimCharFields',
'VisibleRecno',
'FetchAll',
'CacheCalcFields'
]
);
if VarType(Values)<>varBoolean then
begin
if Values[1,0] then
if Values[0,0] then
Include (DefaultOptions, poPersistentSorting)
else
Exclude (DefaultOptions, poPersistentSorting);
if Values[1,1] then
if Values[0,1] then
Include (DefaultOptions , poKeepSorting)
else
Exclude (DefaultOptions , poKeepSorting);
if Values[1,2] then
if Values[0,2] then
Include (DefaultOptions, poProtectedEdit)
else
Exclude (DefaultOptions, poProtectedEdit);
if Values[1,3] then
if Values[0,3] then
Include (DefaultOptions, poAutoFormatFields)
else
Exclude (DefaultOptions, poAutoFormatFields);
if Values[1,4] then
if Values[0,4] then
Include (DefaultOptions , poStartTransaction)
else
Exclude (DefaultOptions , poStartTransaction);
if Values[1,5] then
if Values[0,5] then
Include (DefaultOptions, poRefreshDeletedRecord)
else
Exclude (DefaultOptions, poRefreshDeletedRecord);
if Values[1,6] then
if Values[0,6] then
Include (DefaultOptions,poRefreshAfterPost)
else
Exclude (DefaultOptions,poRefreshAfterPost);
if Values[1,7] then
if Values[0,7] then
Include (DefaultOptions,poTrimCharFields )
else
Exclude (DefaultOptions,poTrimCharFields );
if Values[1,8] then
if Values[0,8] then
Include (DefaultOptions,poVisibleRecno )
else
Exclude (DefaultOptions,poVisibleRecno );
if Values[1,9] then
if Values[0,9] then
Include (DefaultOptions,poFetchAll )
else
Exclude (DefaultOptions,poFetchAll );
if Values[1,10] then
if Values[0,10] then
Include (DefaultOptions,poCacheCalcFields )
else
Exclude (DefaultOptions,poCacheCalcFields );
end;
Values:=
DefReadFromRegistry(['Software',RegFIBRoot,
RegPreferences,'pFIBDataSet','DefFormatFields'],
['DateFormat',
'TimeFormat',
'NumericDisplayFormat',
'NumericEditFormat',
'DateTimeFormat'
]
);
if VarType(Values)<>varBoolean then
begin
if Values[1,0] then
dDefDateFormat:=VarToStr(Values[0,0]);
if Values[1,1] then
dDefTimeFormat:=VarToStr(Values[0,1]);
if Values[1,2] then
dDefDisplayFormatNum:= VarToStr(Values[0,2]);
if Values[1,3] then
dDefEditFormatNum := VarToStr(Values[0,3]);
if Values[1,4] then
dDefDateTimeFormat := VarToStr(Values[0,4]);
end;
Values:=
DefReadFromRegistry(['Software',RegFIBRoot,
RegPreferences,'pFIBDataSet','DetailConditions'],
['WaitEndMasterScroll', 'ForceMasterRefresh','ForceOpen','IgnoreMasterClose']
);
if VarType(Values)<>varBoolean then
begin
if Values[1,0] then
if Values[0,0] then
Include (DefaultDetailConditions,dcWaitEndMasterScroll)
else
Exclude (DefaultDetailConditions,dcWaitEndMasterScroll);
if Values[1,1] then
if Values[0,1] then
Include (DefaultDetailConditions,dcForceMasterRefresh)
else
Exclude (DefaultDetailConditions,dcForceMasterRefresh);
if Values[1,2] then
if Values[0,2] then
Include (DefaultDetailConditions,dcForceOpen)
else
Exclude (DefaultDetailConditions,dcForceOpen);
if Values[1,3] then
if Values[0,3] then
Include (DefaultDetailConditions,dcIgnoreMasterClose)
else
Exclude (DefaultDetailConditions,dcIgnoreMasterClose);
end;
Values:=
DefReadFromRegistry(
['Software',RegFIBRoot,RegPreferences,'pFIBDataSet','PrepareOptions'],
['AskRecordCount',
'GetOrderInfo',
'ApplyRepositary',
'UseBooleanField',
'ImportDefaultValues',
'SetReadOnlyFields',
'RequiredFields',
'SQLINT64ToBCD',
'UseGuidField',
'SetEmptyStrToNull',
'UseLargeIntField'
]
);
if VarType(Values)<>varBoolean then
begin
if Values[1,0] then
if Values[0,0] then
Include (DefaultPrepareOptions,psAskRecordCount)
else
Exclude (DefaultPrepareOptions,psAskRecordCount);
if Values[1,1] then
if Values[0,1] then
Include (DefaultPrepareOptions,psGetOrderInfo)
else
Exclude (DefaultPrepareOptions,psGetOrderInfo);
if Values[1,2] then
if Values[0,2] then
Include (DefaultPrepareOptions,psApplyRepositary)
else
Exclude (DefaultPrepareOptions,psApplyRepositary);
if Values[1,3] then
if Values[0,3] then
Include (DefaultPrepareOptions,psUseBooleanField)
else
Exclude (DefaultPrepareOptions,psUseBooleanField);
if Values[1,4] then
if Values[0,4] then
Include (DefaultPrepareOptions,pfImportDefaultValues)
else
Exclude (DefaultPrepareOptions,pfImportDefaultValues);
if Values[1,5] then
if Values[0,5] then
Include (DefaultPrepareOptions,pfSetReadOnlyFields)
else
Exclude (DefaultPrepareOptions,pfSetReadOnlyFields);
if Values[1,6] then
if Values[0,6] then
Include (DefaultPrepareOptions,pfSetRequiredFields)
else
Exclude (DefaultPrepareOptions,pfSetRequiredFields);
if Values[1,7] then
if Values[0,7] then
Include (DefaultPrepareOptions,psSQLINT64ToBCD )
else
Exclude (DefaultPrepareOptions,psSQLINT64ToBCD );
if Values[1,8] then
if Values[0,8] then
Include (DefaultPrepareOptions,psUseGuidField)
else
Exclude (DefaultPrepareOptions,psUseGuidField);
if Values[1,9] then
if Values[0,9] then
Include (DefaultPrepareOptions,psSetEmptyStrToNull)
else
Exclude (DefaultPrepareOptions,psSetEmptyStrToNull);
if Values[1,10] then
if Values[0,10] then
Include (DefaultPrepareOptions,psUseLargeIntField)
else
Exclude (DefaultPrepareOptions,psUseLargeIntField);
end;
Values:=
DefReadFromRegistry(
['Software',RegFIBRoot,RegPreferences,'pFIBDataSet','Other'],
[
'DefPrefixGenName',
'DefSufixGenName'
]
);
if VarType(Values)<>varBoolean then
begin
if Values[1,0] then
DefPrefixGenName:=Values[0,0];
if Values[1,1] then
DefSufixGenName:=Values[0,1];
end;
Values:=DefReadFromRegistry(
['Software',RegFIBRoot,RegPreferences,'pFIBDataBase'],
[
'DialectC',
'CharSetC',
'UseLoginPrompt',
'UpperOldNames',
'SynchronizeTime',
'StoreConnected',
'CloseDesignConnectAfterRun'
]
);
if VarType(Values)<>varBoolean then
begin
if Values[1,0] then
DefSQLDialect:=Values[0,0];
if Values[1,1] then
DefCharSet:=Values[0,1];
if Values[1,2] then
DefUseLoginPrompt:=Values[0,2];
if Values[1,3] then
DefUpperOldNames:=Values[0,3];
if Values[1,4] then
DefSynchronizeTime:=Values[0,4];
if Values[1,5] then
DefStoreConnected :=Values[0,5];
if Values[1,6] then
bCloseDesignConnect:=Values[0,6];
end;
Values:=DefReadFromRegistry(
['Software',RegFIBRoot,RegPreferences,'pFIBQuery'],
[
'GoToFirstRecordOnExecute',
'ParamCheck',
'AutoStartTransaction',
'AutoCommitTransaction'
]
);
if VarType(Values)<>varBoolean then
begin
if Values[1,0] then
DefGoToFirstRecordOnExecute:=Values[0,0];
if Values[1,1] then
DefParamCheck:=Values[0,1];
if Values[1,2] then
if Values[0,2] then
Include(DefQueryOptions,qoStartTransaction);
if Values[1,3] then
if Values[0,3] then
Include(DefQueryOptions,qoAutoCommit);
end;
Values:=DefReadFromRegistry(
['Software',RegFIBRoot,RegPreferences,'pFIBTransaction'],
[
'TimeOutAction',
'TimeOut',
'TPBMode'
]
);
if VarType(Values)<>varBoolean then
begin
if Values[1,0] then
DefTimeOutAction :=TTransactionAction1(Values[0,0]);
if Values[1,1] then
DefTimeOut := Values[0,1];
if Values[1,2] then
DefTPBMode := TTPBMode(Values[0,2]);
end;
end;
procedure TfrmFIBPreferences.FormCreate(Sender: TObject);
begin
Caption := FPTPrefCaption;
Label4.Caption := FPTGeneratorPref;
Label5.Caption := FPTGeneratorSuf;
Label6.Caption := FPTCharSet;
Label8.Caption := FPTSQLDialect;
chStoreConnected.Caption := FPTStoreConnected;
chSynchronizeTime.Caption := FPTSyncTime;
chUpperOldNames.Caption := FPTUpperOldNames;
chUseLoginPrompt.Caption := FPTUseLoginPromt;
Label1.Caption := FPTTimeoutAction;
Label2.Caption := FPTTimeout;
ChGo1.Caption := FPTGotoFirstRecord;
ChParamCheck.Caption := FPTCheckParam;
chAutoStartTransaction.Caption := FPTAutoStartTrans;
chAutoCommitTransaction.Caption := FPTAutoCommitTrans;
Button1.Caption := SOKButton;
Button2.Caption := SCancelButton;
end;
procedure TfrmFIBPreferences.chCloseDsgnConnectClick(Sender: TObject);
begin
bCloseDesignConnect:=chCloseDsgnConnect.Checked
end;
initialization
LoadFromReg;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -