Class SettingsTools
Global setting variables/functions and repairLegacyFunctions and checkpurgeNames tools
Inheritance
Namespace: DBaddin
Assembly: DBaddin.dll
Syntax
public class SettingsTools
Fields
| Improve this Doc View SourceCmdTimeout
global command timeout (can't be set in DB functions)
Declaration
public static int CmdTimeout
Field Value
Description |
---|
CnnTimeout
global connection timeout (can't be set in DB functions)
Declaration
public static int CnnTimeout
Field Value
Description |
---|
ConstConnString
Default ConnectionString, if no connection string is given by user....
Declaration
public static string ConstConnString
Field Value
Description |
---|
DefaultDBDateFormatting
default formatting style used in DBDate
Declaration
public static int DefaultDBDateFormatting
Field Value
Description |
---|
environdefs
environment definitions
Declaration
public static string[] environdefs
Field Value
Description |
---|
selectedEnvironment
currently selected environment for DB Functions, zero based (env -1) !!
Declaration
public static int selectedEnvironment
Field Value
Description |
---|
Methods
| Improve this Doc View SourcecheckpurgeNames()
maintenance procedure to check/purge names used for dbfunctions from workbook, or unhide DB names
Declaration
public static void checkpurgeNames()
env(Boolean)
environment for settings (+1 of selected Environment which is the index of the dropdown, if baseZero is set then simply the index)
Declaration
public static string env(bool baseZero = false)
Parameters
Name | Description |
---|---|
baseZero |
Returns
Description |
---|
fetchSetting(String, String)
encapsulates setting fetching (currently ConfigurationManager from DBAddin.xll.config)
Declaration
public static string fetchSetting(string Key, string defaultValue)
Parameters
Name | Description |
---|---|
Key | registry key to take value from |
defaultValue | Value that is taken if Key was not found |
Returns
Description |
---|
the setting value |
initSettings()
initializes global configuration variables
Declaration
public static void initSettings()
repairLegacyFunctions(Workbook, Boolean)
"repairs" legacy functions from old VB6-COM Addin by removing "DBAddin.Functions." before function name
Declaration
public static void repairLegacyFunctions(Workbook actWB, bool showResponse = false)
Parameters
Name | Description |
---|---|
actWB | |
showResponse | in case this is called interactively, provide a response in case of no legacy functions there |
resetCachesForWorkbook(String)
resets the caches for given workbook
Declaration
public static void resetCachesForWorkbook(string WBname)
Parameters
Name | Description |
---|---|
WBname |
setUserSetting(String, String)
change or add a key/value pair in the user settings
Declaration
public static void setUserSetting(string theKey, string theValue)
Parameters
Name | Description |
---|---|
theKey | key to change (or add) |
theValue | value for key |