Class FinAdmin
Manages the contacts stored in a contact folder.
public class FinAdmin
- Inheritance
-
FinAdmin
- Inherited Members
Constructors
FinAdmin(IFinContactFolder, FinBanksFile)
public FinAdmin(IFinContactFolder aContactFolder, FinBanksFile aBanksFile)
Parameters
aContactFolder
IFinContactFolderAn IFinContactFolder implementation that provides access to the storage of the FinContact instances that are managed by this adminstrator. This could be the FinContactFolder.Default storage folder, or your own implementation. Thus must not be
null
.aBanksFile
FinBanksFileOptional FinBanksFile instance that provides the bank data database which significantly eases contact setup for the user. If this is
null
, then the user must manually provide all contact data.
Exceptions
- ArgumentNullException
The parameter aContactFolder was null.
Properties
BanksFile
The FinBanksFile instance that was passed to the constructor. May
be null
.
public FinBanksFile BanksFile { get; }
Property Value
ContactCount
The number of contacts stored in the ContactFolder.
public int ContactCount { get; }
Property Value
ContactFolder
The IFinContactFolder implementation that was passed to the constructor.
public IFinContactFolder ContactFolder { get; }
Property Value
DefaultCaption
Provides the default caption for all FinAdmin dialogs.
public static string DefaultCaption { get; set; }
Property Value
HelpProvider
Optional HelpProvider instance that will be used to provide Help on all dialogs spawned by this FinAdmin instance.
public HelpProvider HelpProvider { get; set; }
Property Value
Remarks
A HelpProvider instance attached through this property will be associated with all dialogs that are spawed by this FinAdmin instance. The different dialogs are associated with different help keywords as shown in the following table:
Dialog Box | Help Keyword |
---|---|
Dialog box for editing the contact details that is shown by the EditContact(IWin32Window, FinContact) method. | FinContactForm |
Wizard that has been started by one of the NewContact methods of this class. | FinWizardForm |
Dialog box for changing the PIN or password that is shown by the ChangeMediaPin(IWin32Window, FinContact) method. | FinChangePasswordForm |
HideAccounts
Flag that controls whether UPD accounts shall be hidden in all dialogs.
public static bool HideAccounts { get; set; }
Property Value
Remarks
The default value is false
.
Methods
AddContact(IWin32Window, FinContact, bool)
public void AddContact(IWin32Window aParentWindow, FinContact aContact, bool fSync)
Parameters
aParentWindow
IWin32WindowaContact
FinContactfSync
boolIf
true
, then the added contact will automatically be synchronized, if needed. Iffalse
, then it will just be added to the contact folder.
BrowseForKeyFile(string, bool)
public static string BrowseForKeyFile(string sFileName, bool fCreate)
Parameters
Returns
ChangeMediaPin(IWin32Window, FinContact)
Change the PIN of the security media associated with the given contact.
public void ChangeMediaPin(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContactFinContact instance to change the PIN (or passphrase) for.
ChangeOnlinePin(IWin32Window, FinContact)
Change the online PIN of the given contact.
public void ChangeOnlinePin(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContactFinContact instance to change the PIN (or passphrase) for.
DeleteContact(IWin32Window, FinContact)
public DialogResult DeleteContact(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContact
Returns
DetectCommService(string)
Detects the type of communication service from the specified address and also validates the address.
public static FinCommService DetectCommService(string sCommAddress)
Parameters
sCommAddress
string
Returns
EditContact(IWin32Window, FinContact)
Show Form where the user can edit the contact data details.
public DialogResult EditContact(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContactFinContact instance to be edited by the user. Must not be
null
.
Returns
FindContactName(string)
public FinContact FindContactName(string sContactName)
Parameters
sContactName
string
Returns
FormatFingerprint(byte[])
public static string FormatFingerprint(byte[] vbFingerprint)
Parameters
vbFingerprint
byte[]
Returns
GenerateIniLetter(FinContact, IFinSecurityMedia)
public void GenerateIniLetter(FinContact aContact, IFinSecurityMedia aSecMedia)
Parameters
aContact
FinContactRequired FinContact object. This is solely used in order to extract the general contact information that will appear on the Ini-letter. This is not used to obtain the actual key data!
aSecMedia
IFinSecurityMediaAuthenticated security media object that will be used in order to extract the key data that will appear on the Ini-letter.
GenerateIniLetter(string, FinContact, FinSecureKey)
Generates an Ini-Letter for the given key of the given contact.
public static string GenerateIniLetter(string sIniLetterTemplate, FinContact aContact, FinSecureKey aKey)
Parameters
sIniLetterTemplate
stringTemplate string with placeholders.
aContact
FinContactRequired FinContact object. This is solely used in order to extract the general contact information that will appear on the Ini-letter. This is not used to obtain the actual key data!
aKey
FinSecureKeyThe public key that shall appear on the Ini-letter.
Returns
GenerateIniLetter(IWin32Window, FinContact)
public void GenerateIniLetter(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContact
ImportContact(string)
public FinContact ImportContact(string sContactFileName)
Parameters
sContactFileName
string
Returns
InternalizeKeyFile(IWin32Window, FinContact)
Reads the secret keys from a key file and stores them in the FinContact.
public void InternalizeKeyFile(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContact
Remarks
In addition to reading the secret keys, the FinContact is changed to use the FinSecurityMediaVoid implementation which will use the secret keys that are now stored in the FinContact. This means, that the key file is no longer needed or referenced.
Exceptions
- ArgumentNullException
The parameter aContact was
null
.- ArgumentException
The SecurityMediaType of the given FinContact was not KeyFile.
KeyChange(IWin32Window, FinContact)
public void KeyChange(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContact
NewContact(IWin32Window)
public FinContact NewContact(IWin32Window aParentWindow)
Parameters
aParentWindow
IWin32Window
Returns
NewContact(IWin32Window, bool)
public FinContact NewContact(IWin32Window aParentWindow, bool fSync)
Parameters
aParentWindow
IWin32WindowfSync
boolIf
true
, then the new contact will be immediately synchronised after it was created.
Returns
ProfileChange(IWin32Window, FinContact)
public FinContact ProfileChange(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContact
Returns
RequestBankKeys(IWin32Window, FinContact)
public void RequestBankKeys(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContact
RevokePinBlock(IWin32Window, FinContact)
public void RevokePinBlock(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContact
ShowIniLetter(string)
Called to present the given Ini-Letter file to the user.
public virtual bool ShowIniLetter(string sFilePath)
Parameters
sFilePath
stringComplete file path to the Ini-Letter file. This is only valid during the call and may go away after this method returns. The file type must be derived from the file extension. Currently the Ini-Letter is generated as a HTML file with
.html
extension. In the future this may be a PDF file with.pdf
extension.
Returns
- bool
If the Ini-Letter file was successfully presented, then
true
shall be returned. If the attempt to present the Ini-Letter file failed, thenfalse
shall be returned.
Remarks
The default implementation just starts a new Process
with the given
file. This means that the default application that handles the file type
will be started.
SubmitUserKeys(IWin32Window, FinContact)
public void SubmitUserKeys(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContact
SuggestNewContactName(string)
Helper that suggests a simple but unique default bank contact name.
public string SuggestNewContactName(string sBaseName)
Parameters
sBaseName
string
Returns
SyncContact(IWin32Window, FinContact)
public void SyncContact(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContact
TanGeneratorSync(IWin32Window, FinContact)
public void TanGeneratorSync(IWin32Window aParentWindow, FinContact aContact)
Parameters
aParentWindow
IWin32WindowaContact
FinContact
ValidateCommAddress(FinCommService, string)
public static bool ValidateCommAddress(FinCommService nCommService, string sCommAddress)
Parameters
nCommService
FinCommServicesCommAddress
string