Class FinAdmin

Namespace
Subsembly.FinTS.Forms
Assembly
Subsembly.FinTS.Win32.dll

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 IFinContactFolder

An 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 FinBanksFile

Optional 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

FinBanksFile

ContactCount

The number of contacts stored in the ContactFolder.

public int ContactCount { get; }

Property Value

int

ContactFolder

The IFinContactFolder implementation that was passed to the constructor.

public IFinContactFolder ContactFolder { get; }

Property Value

IFinContactFolder

DefaultCaption

Provides the default caption for all FinAdmin dialogs.

public static string DefaultCaption { get; set; }

Property Value

string

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

HelpProvider

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 BoxHelp 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

bool

Remarks

The default value is false.

Methods

AddContact(IWin32Window, FinContact, bool)

public void AddContact(IWin32Window aParentWindow, FinContact aContact, bool fSync)

Parameters

aParentWindow IWin32Window
aContact FinContact
fSync bool

If true, then the added contact will automatically be synchronized, if needed. If false, then it will just be added to the contact folder.

BrowseForKeyFile(string, bool)

public static string BrowseForKeyFile(string sFileName, bool fCreate)

Parameters

sFileName string
fCreate bool

Returns

string

ChangeMediaPin(IWin32Window, FinContact)

Change the PIN of the security media associated with the given contact.

public void ChangeMediaPin(IWin32Window aParentWindow, FinContact aContact)

Parameters

aParentWindow IWin32Window
aContact FinContact

FinContact 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 IWin32Window
aContact FinContact

FinContact instance to change the PIN (or passphrase) for.

DeleteContact(IWin32Window, FinContact)

public DialogResult DeleteContact(IWin32Window aParentWindow, FinContact aContact)

Parameters

aParentWindow IWin32Window
aContact FinContact

Returns

DialogResult

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

FinCommService

EditContact(IWin32Window, FinContact)

Show Form where the user can edit the contact data details.

public DialogResult EditContact(IWin32Window aParentWindow, FinContact aContact)

Parameters

aParentWindow IWin32Window
aContact FinContact

FinContact instance to be edited by the user. Must not be null.

Returns

DialogResult

FindContactName(string)

public FinContact FindContactName(string sContactName)

Parameters

sContactName string

Returns

FinContact

FormatFingerprint(byte[])

public static string FormatFingerprint(byte[] vbFingerprint)

Parameters

vbFingerprint byte[]

Returns

string

GenerateIniLetter(FinContact, IFinSecurityMedia)

public void GenerateIniLetter(FinContact aContact, IFinSecurityMedia aSecMedia)

Parameters

aContact FinContact

Required 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 IFinSecurityMedia

Authenticated 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 string

Template string with placeholders.

aContact FinContact

Required 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 FinSecureKey

The public key that shall appear on the Ini-letter.

Returns

string

GenerateIniLetter(IWin32Window, FinContact)

public void GenerateIniLetter(IWin32Window aParentWindow, FinContact aContact)

Parameters

aParentWindow IWin32Window
aContact FinContact

ImportContact(string)

public FinContact ImportContact(string sContactFileName)

Parameters

sContactFileName string

Returns

FinContact

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 IWin32Window
aContact 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 IWin32Window
aContact FinContact

NewContact(IWin32Window)

public FinContact NewContact(IWin32Window aParentWindow)

Parameters

aParentWindow IWin32Window

Returns

FinContact

NewContact(IWin32Window, bool)

public FinContact NewContact(IWin32Window aParentWindow, bool fSync)

Parameters

aParentWindow IWin32Window
fSync bool

If true, then the new contact will be immediately synchronised after it was created.

Returns

FinContact

ProfileChange(IWin32Window, FinContact)

public FinContact ProfileChange(IWin32Window aParentWindow, FinContact aContact)

Parameters

aParentWindow IWin32Window
aContact FinContact

Returns

FinContact

RequestBankKeys(IWin32Window, FinContact)

public void RequestBankKeys(IWin32Window aParentWindow, FinContact aContact)

Parameters

aParentWindow IWin32Window
aContact FinContact

RevokePinBlock(IWin32Window, FinContact)

public void RevokePinBlock(IWin32Window aParentWindow, FinContact aContact)

Parameters

aParentWindow IWin32Window
aContact FinContact

ShowIniLetter(string)

Called to present the given Ini-Letter file to the user.

public virtual bool ShowIniLetter(string sFilePath)

Parameters

sFilePath string

Complete 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, then false 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 IWin32Window
aContact FinContact

SuggestNewContactName(string)

Helper that suggests a simple but unique default bank contact name.

public string SuggestNewContactName(string sBaseName)

Parameters

sBaseName string

Returns

string

SyncContact(IWin32Window, FinContact)

public void SyncContact(IWin32Window aParentWindow, FinContact aContact)

Parameters

aParentWindow IWin32Window
aContact FinContact

TanGeneratorSync(IWin32Window, FinContact)

public void TanGeneratorSync(IWin32Window aParentWindow, FinContact aContact)

Parameters

aParentWindow IWin32Window
aContact FinContact

ValidateCommAddress(FinCommService, string)

public static bool ValidateCommAddress(FinCommService nCommService, string sCommAddress)

Parameters

nCommService FinCommService
sCommAddress string

Returns

bool