Prerequisite: Follow the link How to create a new project to create your application with LinsUIWPF Suite.
1. Assume
you have an assembly AdvanceOperation.dll,
and the assembly has the following initialization class and method,
namespace
AdvanceOperation
{
public
static
partial
class
InitializeAdvanceOperation
{
public
static
void
Initialize(bool
bInitializeCommands, string
csUser)
{
///////////////////////////////////
//
Do initialization here
///////////////////////////////////
}
}
}
Then
add the following codes at the place where you want to load and initialize the
specified assembly,
Option
1:
object[]
args = { true,
"Dongman"
};
string
csAdvanceOperationAssemblyFullName = “C:\\Users\\Dongman\\Documents\\Visual
Studio 2012\\Projects\\Demo\\Demo\\Release\\AdvanceOperation.dll”;
LinsUIWPFUtil.InitializeAssembly(
csAdvanceOperationAssemblyFullName,
"Customization.InitializeCustomization",
"Initialize",
args);
Option
2: If you just want to load the assembly
without initialization, then the codes will look like the
following,
string
csCustomizationAssemblyFullName = “C:\\Users\\Dongman\\Documents\\Visual
Studio 2012\\Projects\\Demo\\Demo\\Release\\Customization.dll”;
LinsUIWPFUtil.InitializeAssembly(
csCustomizationAssemblyFullName,
null,
null,
null);
No comments:
Post a Comment