This repository has been archived by the owner on Oct 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
WinModule.cs
43 lines (42 loc) · 2.1 KB
/
WinModule.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Linq;
using System.Text;
using System.ComponentModel;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.DC;
using System.Collections.Generic;
using DevExpress.ExpressApp.Model;
using DevExpress.ExpressApp.Editors;
using DevExpress.ExpressApp.Actions;
using DevExpress.ExpressApp.Updating;
using DevExpress.ExpressApp.Model.Core;
using DevExpress.ExpressApp.Model.DomainLogics;
using DevExpress.ExpressApp.Model.NodeGenerators;
using DevExpress.Persistent.BaseImpl;
namespace CustomizeRibbonTemplateExample.Module.Win {
[ToolboxItemFilter("Xaf.Platform.Win")]
// For more typical usage scenarios, be sure to check out http://documentation.devexpress.com/#Xaf/clsDevExpressExpressAppModuleBasetopic.
public sealed partial class CustomizeRibbonTemplateExampleWindowsFormsModule : ModuleBase {
private void Application_CreateCustomModelDifferenceStore(Object sender, CreateCustomModelDifferenceStoreEventArgs e) {
e.Store = new ModelDifferenceDbStore((XafApplication)sender, true);
e.Handled = true;
}
private void Application_CreateCustomUserModelDifferenceStore(Object sender, CreateCustomModelDifferenceStoreEventArgs e) {
e.Store = new ModelDifferenceDbStore((XafApplication)sender, false);
e.Handled = true;
}
public CustomizeRibbonTemplateExampleWindowsFormsModule() {
InitializeComponent();
ModelDifferenceDbStore.ModelDifferenceType = typeof(ModelDifference);
}
public override IEnumerable<ModuleUpdater> GetModuleUpdaters(IObjectSpace objectSpace, Version versionFromDB) {
return ModuleUpdater.EmptyModuleUpdaters;
}
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.
}
}
}