本文整理汇总了C#中XafApplication类的典型用法代码示例。如果您正苦于以下问题:C# XafApplication类的具体用法?C# XafApplication怎么用?C# XafApplication使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XafApplication类属于命名空间,在下文中一共展示了XafApplication类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Setup
public override void Setup(XafApplication application)
{
base.Setup(application);
RegisterEntities();
SequenceGeneratorInitializer.Register(application);
}
开发者ID:Rukhlov,项目名称:DataStudio,代码行数:7,代码来源:Module.cs
示例2: Setup
public override void Setup(XafApplication application) {
base.Setup(application);
CustomCollectionSourceManager.Register(typeof(LinqQueryCountry1));
CustomCollectionSourceManager.Register(typeof(LinqQueryCountry2));
CustomCollectionSourceManager.Register(typeof(LinqQueryCountry3));
CustomCollectionSourceManager.Register(typeof(testCountry4));
}
开发者ID:pitchalt,项目名称:IntecoAG.XAFExt,代码行数:7,代码来源:Module.cs
示例3: Setup
public override void Setup(XafApplication application)
{
base.Setup(application);
application.CreateCustomModelDifferenceStore += Application_CreateCustomModelDifferenceStore;
application.CreateCustomUserModelDifferenceStore += Application_CreateCustomUserModelDifferenceStore;
// Manage various aspects of the application UI and behavior at the module level.
}
开发者ID:ZixiangBoy,项目名称:CIIP,代码行数:7,代码来源:ERPAspNetModule.cs
示例4: CreateModulesManager
ApplicationModulesManager CreateModulesManager(XafApplication application, string configFileName, string assembliesPath, ITypesInfo typesInfo) {
if (!string.IsNullOrEmpty(configFileName)) {
bool isWebApplicationModel = string.Compare(Path.GetFileNameWithoutExtension(configFileName), "web", true) == 0;
if (string.IsNullOrEmpty(assembliesPath)) {
assembliesPath = Path.GetDirectoryName(configFileName);
if (isWebApplicationModel) {
assembliesPath = Path.Combine(assembliesPath + "", "Bin");
}
}
}
ReflectionHelper.AddResolvePath(assembliesPath);
try {
var result = new ApplicationModulesManager(new ControllersManager(), assembliesPath);
if (application != null) {
foreach (ModuleBase module in application.Modules) {
result.AddModule(module);
}
result.Security = application.Security;
}
if (!string.IsNullOrEmpty(configFileName)) {
result.AddModuleFromAssemblies(GetModulesFromConfig(application));
}
if (typesInfo is TypesInfo)
XpandModuleBase.Dictiorary = ((TypesInfo)typesInfo).Source.XPDictionary;
result.Load(typesInfo);
return result;
} finally {
XpandModuleBase.Dictiorary = XafTypesInfo.XpoTypeInfoSource.XPDictionary;
ReflectionHelper.RemoveResolvePath(assembliesPath);
}
}
开发者ID:gvilas,项目名称:eXpand,代码行数:33,代码来源:ModelLoader.cs
示例5: Setup
public override void Setup(XafApplication application) {
base.Setup(application);
InitializeInstanceXafApplicationManager();
application.SetupComplete += ApplicationOnSetupComplete;
application.CreateCustomObjectSpaceProvider +=
(sender, args) => ConnectionString = getConnectionStringWithOutThreadSafeDataLayerInitialization(args);
}
开发者ID:gvilas,项目名称:eXpand,代码行数:7,代码来源:XpandModuleBase.cs
示例6: Setup
public void Setup(IObjectSpace objectSpace, XafApplication application) {
if (helper == null) {
helper = new ObjectEditorHelper(MemberInfo.MemberTypeInfo, Model);
}
_application = application;
_objectSpace = objectSpace;
}
开发者ID:kevin3274,项目名称:eXpand,代码行数:7,代码来源:ReleasedSequencePropertyEditor.cs
示例7: Show
/// <summary>
/// Показать (установить данные для показа) детальное представление объекта операции
/// </summary>
/// <param name="obj">Объект операции</param>
/// <param name="app">Объект XafApplication</param>
/// <param name="sp">Объект ShowViewParameters</param>
/// <exception cref="System.ArgumentNullException" />
public static void Show(this OperationObject obj, XafApplication app, ShowViewParameters sp)
{
if (obj == null)
{
throw new ArgumentNullException("obj");
}
if (app == null)
{
throw new ArgumentNullException("app");
}
if (sp == null)
{
throw new ArgumentNullException("sp");
}
var isComposite = obj.Children != null && obj.Children.Count > 0;
if (isComposite)
{
sp.CreatedView = app.CreateDetailView(ObjectSpaceInMemory.CreateNew(), "OperationObject_DetailView_(Composite)", true, obj);
}
else
{
sp.CreatedView = app.CreateDetailView(ObjectSpaceInMemory.CreateNew(), obj);
}
sp.TargetWindow = TargetWindow.NewModalWindow;
sp.Context = TemplateContext.PopupWindow;
}
开发者ID:LSTANCZYK,项目名称:devexpress_xaf_aurum,代码行数:35,代码来源:OperationObjectHelper.cs
示例8: CreateApplicationModulesManager
public ApplicationModulesManager CreateApplicationModulesManager(XafApplication application, string configFileName, string assembliesPath, ITypesInfo typesInfo) {
if (!string.IsNullOrEmpty(configFileName)) {
bool isWebApplicationModel =
String.Compare(Path.GetFileNameWithoutExtension(configFileName), "web", StringComparison.OrdinalIgnoreCase) == 0;
if (string.IsNullOrEmpty(assembliesPath)) {
assembliesPath = Path.GetDirectoryName(configFileName);
if (isWebApplicationModel) {
assembliesPath = Path.Combine(assembliesPath + "", "Bin");
}
}
}
ReflectionHelper.AddResolvePath(assembliesPath);
try {
var result = new ApplicationModulesManager(new ControllersManager(), assembliesPath);
foreach (ModuleBase module in application.Modules) {
result.AddModule(module);
}
result.Security = application.Security;
if (GetModulesFromConfig(application) != null) {
result.AddModuleFromAssemblies(GetModulesFromConfig(application));
}
return result;
} finally {
ReflectionHelper.RemoveResolvePath(assembliesPath);
}
}
开发者ID:kevin3274,项目名称:eXpand,代码行数:26,代码来源:ModelApplicationBuilder.cs
示例9: Setup
public override void Setup(XafApplication application) {
base.Setup(application);
xApplication = application;
application.SetupComplete += application_SetupComplete;
}
开发者ID:pitchalt,项目名称:IntecoAG.XAFExt,代码行数:7,代码来源:XafExtModule.cs
示例10: RegisterControllers
static void RegisterControllers(XafApplication application, params Controller[] controllers) {
var methodInfo = application.GetType().GetMethod("CreateApplicationModulesManager",BindingFlags.NonPublic|BindingFlags.Instance);
Isolate.NonPublic.WhenCalled(application,"CreateApplicationModulesManager").DoInstead(context => {
((ControllersManager) context.Parameters[0]).RegisterController(controllers);
return methodInfo.Invoke(application, new[] { context.Parameters[0] });
});
}
开发者ID:gvilas,项目名称:eXpand,代码行数:7,代码来源:MockExtensions.cs
示例11: Setup
public override void Setup(XafApplication application) {
base.Setup(application);
if (ManifestModuleName == null)
ManifestModuleName = application.GetType().Assembly.ManifestModule.Name;
OnApplicationInitialized(application);
application.SetupComplete += ApplicationOnSetupComplete;
}
开发者ID:maxx1337,项目名称:eXpand,代码行数:7,代码来源:XpandModuleBase.cs
示例12: Setup
public override void Setup(XafApplication application) {
base.Setup(application);
if (RuntimeMode) {
AddToAdditionalExportedTypes("Xpand.Persistent.BaseImpl.PersistentMetaData");
application.CreateCustomObjectSpaceProvider += ApplicationOnCreateCustomObjectSpaceProvider;
}
}
开发者ID:noxe,项目名称:eXpand,代码行数:7,代码来源:WorldCreatorModuleBase.cs
示例13: OnApplicationInitialized
protected override void OnApplicationInitialized(XafApplication xafApplication) {
if (xafApplication == null)
return;
if (RuntimeMode)
_connectionString = xafApplication.GetConnectionString();
base.OnApplicationInitialized(xafApplication);
}
开发者ID:dimajanzen,项目名称:eXpand,代码行数:7,代码来源:WorldCreatorModuleBase.cs
示例14: Setup
public override void Setup(XafApplication application)
{
base.Setup(application);
AdditionalExportedTypes.Add(typeof(ReportData));
AdditionalExportedTypes.Add(typeof(BusinessObjects.PersonReportParametersObject));
// Manage various aspects of the application UI and behavior at the module level.
}
开发者ID:derjabkin,项目名称:XafDemos,代码行数:7,代码来源:Module.cs
示例15: CreateRegistrationControllers
public static IEnumerable<Controller> CreateRegistrationControllers(XafApplication app) {
var typeInfo = app.TypesInfo.FindTypeInfo(typeof(IPasswordScoreController)).Implementors.FirstOrDefault();
if (typeInfo != null)
yield return app.CreateController(typeInfo.Type);
yield return app.CreateController<ManageUsersOnLogonController>();
}
开发者ID:derjabkin,项目名称:eXpand,代码行数:7,代码来源:XpandSecurityModuleBase.cs
示例16: CreateListView
public ListView CreateListView(XafApplication application, IObjectSpace objectSpace, ISupportSequenceObject supportSequenceObject) {
var nestedObjectSpace = (XPNestedObjectSpace)objectSpace.CreateNestedObjectSpace();
var objectType = XafTypesInfo.Instance.FindBussinessObjectType<ISequenceReleasedObject>();
var collectionSource = application.CreateCollectionSource(nestedObjectSpace, objectType, application.FindListViewId(objectType));
collectionSource.Criteria["ShowReleasedSequences"] = CriteriaOperator.Parse("TypeName=?", supportSequenceObject.Prefix + supportSequenceObject.ClassInfo.FullName);
return application.CreateListView(nestedObjectSpace, objectType, true);
}
开发者ID:aries544,项目名称:eXpand,代码行数:7,代码来源:ReleaseSequencePopupWindowHelper.cs
示例17: Setup
public void Setup(ObjectSpace objectSpace, XafApplication application)
{
if (helper == null)
helper = new LookupEditorHelper(application, objectSpace, ObjectTypeInfo, Model);
helper.SetObjectSpace(objectSpace);
}
开发者ID:aries544,项目名称:eXpand,代码行数:7,代码来源:StringLookupPropertyEditor.cs
示例18: GetModelEditorController
internal ModelEditorController GetModelEditorController(XafApplication application)
{
var controller = new ModelEditorController(getDictionary(), new DummyStore(), application.Modules);
controller.ModifiedChanged += ControllerModifiedChanged;
controller.SetCurrentAspectByName(CurrentObject.CurrentLanguage);
return controller;
}
开发者ID:cevious,项目名称:eXpand,代码行数:7,代码来源:ModelEditorPropertyEditor.cs
示例19: AttachDialogController
private void AttachDialogController(ShowViewParameters svp, XafApplication app) {
var dc = app.CreateController<DialogController>();
dc.AcceptAction.Execute += AcceptAction_Execute;
dc.CancelAction.Enabled.SetItemValue("Cancel Disabled", false);
dc.CancelAction.Active.SetItemValue("Cancel Disabled", false);
svp.Controllers.Add(dc);
}
开发者ID:aries544,项目名称:eXpand,代码行数:7,代码来源:GenericMessageBox.cs
示例20: Setup
public override void Setup(XafApplication application) {
base.Setup(application);
if (application != null && !DesignMode) {
if (!(application is ISupportModelsManager))
throw new NotImplementedException("Implement " + typeof(ISupportModelsManager).FullName + " at your " + Application.GetType().FullName + " descenant or derive from XpandWinApplication or XpandWebApplication");
application.CreateCustomUserModelDifferenceStore += ApplicationOnCreateCustomUserModelDifferenceStore;
}
}
开发者ID:krazana,项目名称:eXpand,代码行数:8,代码来源:ModelDifferenceModule.cs
注:本文中的XafApplication类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论