private void _ResetViewSettingsControllerHideAction(ResetViewSettingsController resetViewSettingsController) { if (resetViewSettingsController != null) { resetViewSettingsController.ResetViewSettingsAction.Active .SetItemValue("Visible", HideActionOptions.ShowResetViewSettingsActionDetailView); } }
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(); }
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; } }
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); } }