Beispiel #1
0
        protected override void OnActivated()
        {
            base.OnActivated();
            // Perform various tasks depending on the target View.
            genCon  = Frame.GetController <GenController>();
            copyCon = Frame.GetController <CopyController>();

            this.DuplicateDetail.Active.SetItemValue("Enabled", false);

            if (View is ListView && !View.IsRoot)
            {
                NewObjectViewController controller = Frame.GetController <NewObjectViewController>();
                if (controller != null)
                {
                    //controller.NewObjectAction.Execute += NewObjectAction_Execute;
                    controller.ObjectCreated += Controller_ObjectCreated;
                }

                if (typeof(ClassStockTransferDocumentDetail).IsAssignableFrom(View.ObjectTypeInfo.Type))
                {
                    this.DuplicateDetail.Active.SetItemValue("Enabled", true);
                }
                if (typeof(ClassDocumentDetail).IsAssignableFrom(View.ObjectTypeInfo.Type))
                {
                    this.DuplicateDetail.Active.SetItemValue("Enabled", true);
                }
            }
        }
Beispiel #2
0
        protected override void OnActivated()
        {
            base.OnActivated();
            // Perform various tasks depending on the target View.
            genCon  = Frame.GetController <GenController>();
            copyCon = Frame.GetController <CopyController>();
            if (View is DetailView)
            {
                ((DetailView)View).ViewEditModeChanged += GenController_ViewEditModeChanged;

                recordnaviator = Frame.GetController <RecordsNavigationController>();
                if (recordnaviator != null)
                {
                    recordnaviator.PreviousObjectAction.Executed += PreviousObjectAction_Executed;
                    recordnaviator.NextObjectAction.Executed     += NextObjectAction_Executed;
                }
                resetButton();
                enableButton();
            }
        }