Example #1
0
 private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
 {
     if (e.ObjectSpace is NonPersistentObjectSpace)
     {
         new NonPersistentObjectSpaceExtender((NonPersistentObjectSpace)e.ObjectSpace, globalNonPersistentObjects, Application.CreateObjectSpace(typeof(ContactForReport)));
     }
 }
 private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
 {
     if (e.ObjectSpace is NonPersistentObjectSpace)
     {
         ((NonPersistentObjectSpace)e.ObjectSpace).ObjectsGetting += DuAnNonPersistentWindowController_ObjectsGetting;
     }
 }
Example #3
0
        private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
        {
            var cos = e.ObjectSpace as CompositeObjectSpace;

            if (cos != null)
            {
                if (!(cos.Owner is CompositeObjectSpace))
                {
                    cos.PopulateAdditionalObjectSpaces((XafApplication)sender);
                    cos.AutoCommitAdditionalObjectSpaces  = true;
                    cos.AutoRefreshAdditionalObjectSpaces = true;
                }
            }
            var npos = e.ObjectSpace as NonPersistentObjectSpace;

            if (npos != null)
            {
                npos.AutoSetModifiedOnObjectChange = true;
                new NPGroupAdapter(npos);
                new NPFeatureAdapter(npos);
                new NPResourceAdapter(npos);
                new NPAgentAdapter(npos);
                new NPTechnologyAdapter(npos);
            }
        }
Example #4
0
 private void Application_ObjectSpaceCreated(Object sender, ObjectSpaceCreatedEventArgs e)
 {
     if (e.ObjectSpace is NonPersistentObjectSpace)
     {
         ((NonPersistentObjectSpace)e.ObjectSpace).AdditionalObjectSpaces.Add(additionalObjectSpace);
     }
 }
        private void ApplicationOnObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
        {
            var objectSpace = e.ObjectSpace;

            objectSpace.Committed  += ObjectSpaceOnCommitted;
            objectSpace.Committing += ObjectSpaceOnCommitting;
            objectSpace.Disposed   += ObjectSpaceOnDisposed;
        }
Example #6
0
        private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
        {
            var nonPersistentObjectSpace = e.ObjectSpace as NonPersistentObjectSpace;

            if (nonPersistentObjectSpace != null)
            {
                nonPersistentObjectSpace.ObjectsGetting += NonPersistentObjectSpace_ObjectsGetting;
                nonPersistentObjectSpace.Committing     += NonPersistentObjectSpace_Committing;
            }
        }
Example #7
0
 void ConnectionStringActions(object sender, ObjectSpaceCreatedEventArgs e) {
     XpandModuleBase.ObjectSpaceCreated = true;
     var xafApplication = ((XafApplication)sender);
     xafApplication.ObjectSpaceCreated -= ConnectionStringActions;
     if (String.CompareOrdinal(_currentConnectionString, Application.ConnectionString) != 0) {
         _currentConnectionString = Application.ConnectionString;
         XpandModuleBase.ConnectionString = _xpandModuleBase.GetConnectionString();
         OnConnectionStringUpdated();
     }
 }
Example #8
0
        private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
        {
            NonPersistentObjectSpace nonPersistentObjectSpace = e.ObjectSpace as NonPersistentObjectSpace;

            if (nonPersistentObjectSpace != null)
            {
                nonPersistentObjectSpace.ObjectsGetting += NonPersistentObjectSpace_ObjectsGetting;
                // Subscribe to NonPersistentObjectSpace events and customize its properties
            }
        }
        private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
        {
            var npos = e.ObjectSpace as NonPersistentObjectSpace;

            if (npos != null)
            {
                new ArticleAdapter(npos);
                new ContactAdapter(npos);
            }
        }
 private void ApplicationOnObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
 {
     if (e.ObjectSpace is NonPersistentObjectSpace nonPersistentObjectSpace)
     {
         nonPersistentObjectSpace.ObjectsGetting     += NonPersistentObjectSpaceOnObjectsGetting;
         nonPersistentObjectSpace.ObjectByKeyGetting += NonPersistentObjectSpaceOnObjectByKeyGetting;
         nonPersistentObjectSpace.ObjectGetting      += NonPersistentObjectSpaceOnObjectGetting;
         nonPersistentObjectSpace.Committing         += NonPersistentObjectSpaceOnCommitting;
     }
 }
Example #11
0
 void ApplicationOnObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs objectSpaceCreatedEventArgs)
 {
     XpandModuleBase.ObjectSpaceCreated           = true;
     ((XafApplication)sender).ObjectSpaceCreated -= ApplicationOnObjectSpaceCreated;
     if (String.CompareOrdinal(_currentConnectionString, Application.ConnectionString) != 0)
     {
         _currentConnectionString         = Application.ConnectionString;
         XpandModuleBase.ConnectionString = _xpandModuleBase.GetConnectionString();
         OnConnectionStringUpdated();
     }
 }
Example #12
0
        private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
        {
            var nonPersistentObjectSpace = e.ObjectSpace as NonPersistentObjectSpace;

            if (nonPersistentObjectSpace != null)
            {
                IObjectSpace additionalObjectSpace = Application.CreateObjectSpace(typeof(Department));
                nonPersistentObjectSpace.AdditionalObjectSpaces.Add(additionalObjectSpace);
                nonPersistentObjectSpace.AutoDisposeAdditionalObjectSpaces = true;
            }
        }
Example #13
0
 private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
 {
     if (!(e.ObjectSpace is NonPersistentObjectSpace nonPersistentObjectSpace))
     {
         return;
     }
     nonPersistentObjectSpace.AdditionalObjectSpaces.Add(Application.CreateObjectSpace(typeof(BaseObject)));
     nonPersistentObjectSpace.AutoDisposeAdditionalObjectSpaces = true;
     nonPersistentObjectSpace.AutoRefreshAdditionalObjectSpaces = true;
     nonPersistentObjectSpace.ModifiedChanging += NonPersistentObjectSpace_ModifiedChanging;
     new NonPersistentObjectSpaceExtender(nonPersistentObjectSpace, globalNonPersistentObjects);
 }
Example #14
0
 private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
 {
     if (e.ObjectSpace is NonPersistentObjectSpace)
     {
         IObjectSpace additionalObjectSpace = Application.CreateObjectSpace(typeof(MCategory));
         ((NonPersistentObjectSpace)e.ObjectSpace).AdditionalObjectSpaces.Add(additionalObjectSpace);
         ((NonPersistentObjectSpace)e.ObjectSpace).ObjectGetting += ObjectSpace_ObjectGetting;
         e.ObjectSpace.Disposed += (s, args) => {
             ((NonPersistentObjectSpace)s).ObjectGetting -= ObjectSpace_ObjectGetting;
             additionalObjectSpace.Dispose();
         };
     }
 }
        private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
        {
            var npos = e.ObjectSpace as NonPersistentObjectSpace;

            if (npos != null)
            {
                if (!npos.AdditionalObjectSpaces.Any(os => os.IsKnownType(typeof(BaseObject))))
                {
                    IObjectSpace persistentObjectSpace = Application.CreateObjectSpace(typeof(BaseObject));
                    npos.AdditionalObjectSpaces.Add(persistentObjectSpace);
                }
                npos.AutoDisposeAdditionalObjectSpaces = true;
                npos.AutoRefreshAdditionalObjectSpaces = true;
                new LiveSummaryAdapter(npos);
            }
        }
        private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
        {
            var npos = e.ObjectSpace as NonPersistentObjectSpace;

            if (npos != null)
            {
                IObjectSpace persistentObjectSpace = Application.CreateObjectSpace(typeof(BaseObject));
                persistentObjectSpace.ObjectChanged += (s2, e2) => {
                    npos.SetModified(null);
                };
                npos.AdditionalObjectSpaces.Add(persistentObjectSpace);
                npos.AutoDisposeAdditionalObjectSpaces = true;
                npos.AutoRefreshAdditionalObjectSpaces = true;
                npos.AutoCommitAdditionalObjectSpaces  = true;
                new ProductViewAdapter(npos);
            }
        }
Example #17
0
 private void Application_ObjectSpaceCreated(Object sender, ObjectSpaceCreatedEventArgs e)
 {
     if (e.ObjectSpace is NonPersistentObjectSpace)
     {
         NonPersistentObjectSpace npos = (NonPersistentObjectSpace)e.ObjectSpace;
         if (basePersistentTypes != null)
         {
             foreach (var type in basePersistentTypes)
             {
                 EnsureObjectSpaceForType(npos, type);
             }
         }
         npos.AutoDisposeAdditionalObjectSpaces = true;
         foreach (var adapterCreator in AdapterCreators)
         {
             adapterCreator.Invoke(npos);
         }
     }
 }
Example #18
0
 void application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
 {
     e.ObjectSpace.ObjectSaving += ObjectSpace_ObjectSaving;
     e.ObjectSpace.Disposed     += ObjectSpace_Disposed;
 }
Example #19
0
 /// <summary>
 /// Handles the ObjectSpaceCreated event of the application control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="DevExpress.ExpressApp.ObjectSpaceCreatedEventArgs"/> instance containing the event data.</param>
 private void application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
 {
     RegisterObjectSpace(e.ObjectSpace);
 }
Example #20
0
 private void ElasticSearchModule_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
 {
     ElasticSearchClient.Instance?.RegisterObjectSpace(e.ObjectSpace as XPObjectSpace);
 }
Example #21
0
 /// <summary>
 /// Handles the ObjectSpaceCreated event of the application control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="DevExpress.ExpressApp.ObjectSpaceCreatedEventArgs"/> instance containing the event data.</param>
 void application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
 {
     // subscribe to RollingBack event of object space
     e.ObjectSpace.RollingBack += objectSpace_RollingBack;
     e.ObjectSpace.Disposed    += objectSpace_Disposed;
 }
 private void ApplicationOnObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs objectSpaceCreatedEventArgs){
     Application.ObjectSpaceCreated-=ApplicationOnObjectSpaceCreated;
     SubscribeToDataStoreProxyEvents();
 }
Example #23
0
 /// <summary>
 /// Handles the ObjectSpaceCreated event of the application control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="DevExpress.ExpressApp.ObjectSpaceCreatedEventArgs"/> instance containing the event data.</param>
 void application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
 {
     // subscribe to RollingBack event of object space
     e.ObjectSpace.RollingBack += objectSpace_RollingBack;
     e.ObjectSpace.Disposed += objectSpace_Disposed;
 }
Example #24
0
 /// <summary>
 /// Handles the ObjectSpaceCreated event of the application control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="DevExpress.ExpressApp.ObjectSpaceCreatedEventArgs"/> instance containing the event data.</param>
 private void application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
 {
     RegisterObjectSpace(e.ObjectSpace);
 }
Example #25
0
 private void ApplicationOnObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs objectSpaceCreatedEventArgs)
 {
     Application.ObjectSpaceCreated -= ApplicationOnObjectSpaceCreated;
     SubscribeToDataStoreProxyEvents();
 }
Example #26
0
 private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e)
 {
     (e.ObjectSpace as CompositeObjectSpace)?.PopulateAdditionalObjectSpaces((XafApplication)sender);
 }