예제 #1
0
 protected override void OnActivated()
 {
     base.OnActivated();
     navigationController = Frame.GetController <RecordsNavigationController>();
     navigationController.NextObjectAction.Execute += NextObjectAction_Execute;;
     View.CurrentObjectChanged += View_CurrentObjectChanged;
     // Perform various tasks depending on the target View.
 }
예제 #2
0
 private void _RecordsNavigationControllerHideAction(RecordsNavigationController recordsNavigationController)
 {
     if (recordsNavigationController != null)
     {
         recordsNavigationController.PreviousObjectAction.Active.SetItemValue("Visible", HideActionOptions.ShowNavigationActionsDetailView);
         recordsNavigationController.NextObjectAction.Active.SetItemValue("Visible", HideActionOptions.ShowNavigationActionsDetailView);
     }
 }
예제 #3
0
        private void DisableNavigationActions(Frame frame)
        {
            RecordsNavigationController recordsNavigationController = frame.GetController <RecordsNavigationController>();

            if (recordsNavigationController != null)
            {
                recordsNavigationController.Active.SetItemValue("DashboardFiltering", false);
            }
        }
예제 #4
0
 protected override void OnActivated()
 {
     base.OnActivated();
     InitSearchObjectActionItems();
     if (typeof(ISearchObject).IsAssignableFrom(View.ObjectTypeInfo.Type))
     {
         DetailView dv = View as DetailView;
         if (dv != null)
         {
             foreach (ListPropertyEditor editor in dv.GetItems <ListPropertyEditor>())
             {
                 if (editor.PropertyName == SearchResultsCollectionName)
                 {
                     editor.ControlCreated += new EventHandler <EventArgs>(editor_ControlCreated);
                 }
             }
             RefreshController refreshController = Frame.GetController <RefreshController>();
             if (refreshController != null)
             {
                 refreshController.RefreshAction.Active[ActiveKeySearchObject] = false;
             }
             RecordsNavigationController recordsNavigationController = Frame.GetController <RecordsNavigationController>();
             if (recordsNavigationController != null)
             {
                 recordsNavigationController.PreviousObjectAction.Active[ActiveKeySearchObject] = false;
                 recordsNavigationController.NextObjectAction.Active[ActiveKeySearchObject]     = false;
             }
             ModificationsController modificationsController = Frame.GetController <ModificationsController>();
             if (modificationsController != null)
             {
                 modificationsController.SaveAction.Active[ActiveKeySearchObject]         = false;
                 modificationsController.SaveAndCloseAction.Active[ActiveKeySearchObject] = false;
                 modificationsController.CancelAction.Active[ActiveKeySearchObject]       = false;
             }
             DeleteObjectsViewController deleteObjectsViewController = Frame.GetController <DeleteObjectsViewController>();
             if (deleteObjectsViewController != null)
             {
                 deleteObjectsViewController.DeleteAction.Active[ActiveKeySearchObject] = false;
             }
             NewObjectViewController newObjectViewController = Frame.GetController <NewObjectViewController>();
             if (newObjectViewController != null)
             {
                 newObjectViewController.NewObjectAction.Active[ActiveKeySearchObject] = false;
             }
         }
         SearchObjectAction.Active[ActiveKeySearchObject] = false;
     }
 }
예제 #5
0
        protected override void OnDeactivated()
        {
            ModificationsController modificationsController = Frame.GetController <ModificationsController>();

            if (modificationsController != null)
            {
                modificationsController.Active[GetType().Name] = true;
            }
            RecordsNavigationController recordsNavigationController = Frame.GetController <RecordsNavigationController>();

            if (recordsNavigationController != null)
            {
                recordsNavigationController.Active[GetType().Name] = true;
            }
            base.OnDeactivated();
        }
        protected override void OnDeactivated()
        {
            // Unsubscribe from previously subscribed events and release other references and resources.
            if (DeleteController != null)
            {
                DeleteController.Active.RemoveItem(Key);
                DeleteController = null;
            }

            if (NewController != null)
            {
                NewController.Active.RemoveItem(Key);
                NewController = null;
            }

            if (refreshController != null)
            {
                refreshController.Active.RemoveItem(Key);
                refreshController = null;
            }

            if (modificationsController != null)
            {
                modificationsController.Active.RemoveItem(Key);
                modificationsController = null;
            }

            if (recordsNavigationController != null)
            {
                recordsNavigationController.Active.RemoveItem(Key);
                recordsNavigationController = null;
            }

            if (resetViewSettingsController != null)
            {
                resetViewSettingsController.Active.RemoveItem(Key);
                resetViewSettingsController = null;
            }

            if (openObjectController != null)
            {
                openObjectController.Active.RemoveItem(Key);
                openObjectController = null;
            }

            base.OnDeactivated();
        }
예제 #7
0
        protected override void OnActivated()
        {
            base.OnActivated();
            // Perform various tasks depending on the target View.
            resetButton();

            if (View is DetailView)
            {
                ((DetailView)View).ViewEditModeChanged += ClaimTrxPostControllers_ViewEditModeChanged;

                recordnaviator = Frame.GetController <RecordsNavigationController>();
                if (recordnaviator != null)
                {
                    recordnaviator.PreviousObjectAction.Executed += PreviousObjectAction_Executed;
                    recordnaviator.NextObjectAction.Executed     += NextObjectAction_Executed;
                }
            }
        }
예제 #8
0
 protected override void OnActivated()
 {
     base.OnActivated();
     // Perform various tasks depending on the target View.
     // Ẩn một số controller của XAF
     recordsNavigationController = Frame.GetController <RecordsNavigationController>();
     if (recordsNavigationController != null)
     {
         recordsNavigationController.Active[Key] = false;
     }
     viewNavigationController = Frame.GetController <ViewNavigationController>();
     if (viewNavigationController != null)
     {
         viewNavigationController.Active[Key] = false;
     }
     resetViewSettingsController = Frame.GetController <ResetViewSettingsController>();
     if (resetViewSettingsController != null)
     {
         resetViewSettingsController.Active[Key] = false;
     }
 }
예제 #9
0
        protected override void OnDeactivated()
        {
            RefreshController refreshController = Frame.GetController <RefreshController>();

            if (refreshController != null)
            {
                refreshController.Active.RemoveItem(InactiveForWelcomeObject);
            }
            RecordsNavigationController recordsNavigationController = Frame.GetController <RecordsNavigationController>();

            if (recordsNavigationController != null)
            {
                recordsNavigationController.Active.RemoveItem(InactiveForWelcomeObject);
            }
            ModificationsController modificationsController = Frame.GetController <ModificationsController>();

            if (modificationsController != null)
            {
                modificationsController.Active.RemoveItem(InactiveForWelcomeObject);
            }
            base.OnDeactivated();
        }
예제 #10
0
        protected override void OnActivated()
        {
            base.OnActivated();
            RefreshController refreshController = Frame.GetController <RefreshController>();

            if (refreshController != null)
            {
                refreshController.Active[InactiveForWelcomeObject] = (View.ObjectTypeInfo.Type != typeof(WelcomeObject));
            }
            RecordsNavigationController recordsNavigationController = Frame.GetController <RecordsNavigationController>();

            if (recordsNavigationController != null)
            {
                recordsNavigationController.Active[InactiveForWelcomeObject] = (View.ObjectTypeInfo.Type != typeof(WelcomeObject));
            }
            ModificationsController modificationsController = Frame.GetController <ModificationsController>();

            if (modificationsController != null)
            {
                modificationsController.Active[InactiveForWelcomeObject] = (View.ObjectTypeInfo.Type != typeof(WelcomeObject));
            }
        }
        protected override void OnActivated()
        {
            base.OnActivated();
            // Perform various tasks depending on the target View.
            //Delete
            DeleteController =
                Frame.GetController <DeleteObjectsViewController>();
            if (DeleteController != null)
            {
                DeleteController.Active[Key] =
                    !(View.ObjectTypeInfo.Type == typeof(MauIn) && View is ListView);
            }
            //New
            NewController =
                Frame.GetController <NewObjectViewController>();
            if (NewController != null)
            {
                NewController.Active[Key] =
                    !(View.ObjectTypeInfo.Type == typeof(MauIn) && View is ListView);
            }
            //Refresh
            refreshController =
                Frame.GetController <RefreshController>();

            if (refreshController != null)
            {
                refreshController.Active[Key] =
                    !(View.ObjectTypeInfo.Type == typeof(MauIn) && View is ListView);
            }
            //Modification
            modificationsController =
                Frame.GetController <ModificationsController>();
            if (modificationsController != null)
            {
                modificationsController.Active[Key] =
                    !(View.ObjectTypeInfo.Type == typeof(MauIn) && View is ListView);
            }
            //recordsNavigationController
            recordsNavigationController =
                Frame.GetController <RecordsNavigationController>();
            if (recordsNavigationController != null)
            {
                recordsNavigationController.Active[Key] =
                    !(View.ObjectTypeInfo.Type == typeof(MauIn) && View is ListView);
            }
            // Reset View Settings
            resetViewSettingsController =
                Frame.GetController <ResetViewSettingsController>();
            if (resetViewSettingsController != null)
            {
                resetViewSettingsController.Active[Key] =
                    !(View.ObjectTypeInfo.Type == typeof(MauIn) && View is ListView);
            }
            //Open object
            openObjectController =
                Frame.GetController <OpenObjectController>();
            if (openObjectController != null)
            {
                openObjectController.Active[Key] =
                    !(View.ObjectTypeInfo.Type == typeof(MauIn) && View is ListView);
            }
        }