Click or drag to resize

MPInterfacebInitInterface Method

Automatic Initialization All Settings to connect to the MARIProject database are read automatically.

Namespace:  MARIInterface
Assembly:  MARIInterface (in MARIInterface.dll) Version: 8.0.0.100
Syntax
public bool bInitInterface()

Return Value

Type: Boolean
True if sucessfully initialized MARIProject Interface
Examples
Initialization Example
//Make sure, that the file MARIProjectConnection.xml is in the same folder as MARIEngine.dll. The first link to a MARIProject database will be used
MARIInterface.MPInterface MPInterface;
MPInterface = new MARIInterface.MPInterface();
//Initialize the interface
if (MPInterface.bInitInterface()) {
    // MARIProject user and password
    if (MPInterface.bUserLogin("MARINGO", "")) {

        // Start your code here...
        this.oMPInterface = MPInterface;

        //Add an Application.Idle Handler to call
        oMPInterface.ClearBusinessLogicBusyCash(); // when you are idle. This will allow to reload changes from other users in your Interface.

    } else {
        //                                           Read results from oError Object
        throw new SystemException("Login failed: " + MPInterface.oErrors.PrintErrors());
    }
} else {
    //                                           Read results from oError Object
    throw new SystemException("Login failed: " + MPInterface.oErrors.PrintErrors());
}
See Also