/// <summary>
        /// Initialisation des Handlers sur une nouvelle page.
        /// En plus des handlers de base, on initialise les handlers sur :
        /// - DesignerPropertiesPanel
        /// -
        /// - SpreadSheet
        /// -
        /// </summary>
        protected override void initializePageHandlers(EditorItem <Kernel.Domain.ReconciliationContext> page)
        {
            base.initializePageHandlers(page);
            ReconciliationContextEditorItem editorPage = (ReconciliationContextEditorItem)page;

            editorPage.getReconciliationContextForm().ReconciliationContextPanel.ActivatedItem += OnActivatedItem;
            editorPage.getReconciliationContextForm().ReconciliationContextPanel.Change += OnChangeItem;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="oid"></param>
        /// <returns></returns>
        public override OperationState Open(Kernel.Domain.ReconciliationContext reco)
        {
            ReconciliationContextEditorItem page = (ReconciliationContextEditorItem)getEditor().addOrSelectPage(reco);

            initializePageHandlers(page);
            page.getReconciliationContextForm().displayObject();
            getEditor().ListChangeHandler.AddNew(reco);
            return(OperationState.CONTINUE);
        }
        private void OnActivatedItem(object item)
        {
            ReconciliationContextEditorItem page = (ReconciliationContextEditorItem)getReconciliationContextEditor().getActivePage();

            if (page == null)
            {
                return;
            }
            //   page.getReconciliationContextForm().ReconciliationContextPanel.ActiveItem = (ReconciliationContext.ReconciliationContextItem)item;
        }
        /// <summary>
        /// Cette methode permet de créer une nouvelle reco.
        /// </summary>
        /// <returns>CONTINUE si la création de la nouvelle reconciliation se termine avec succès. STOP sinon</returns>
        public override OperationState Create()
        {
            Kernel.Domain.ReconciliationContext reco = getCurrentReconciliationContext();

            ReconciliationContextEditorItem page = (ReconciliationContextEditorItem)getReconciliationContextEditor().addOrSelectPage(reco);

            initializePageHandlers(page);
            page.getReconciliationContextForm().ModelService = GetReconciliationContextService().ModelService;
            page.Title = "Reconciliation Configuration";
            getReconciliationContextEditor().ListChangeHandler.AddNew(reco);
            return(OperationState.CONTINUE);
        }
        private void onSelectMeasureFromSidebar(object sender)
        {
            ReconciliationContextEditorItem page = (ReconciliationContextEditorItem)getReconciliationContextEditor().getActivePage();

            if (page == null)
            {
                return;
            }
            if (sender is Kernel.Domain.Measure)
            {
                page.getReconciliationContextForm().setMeasure((Kernel.Domain.Measure)sender);
            }
        }
 public override OperationState Save(EditorItem <Kernel.Domain.ReconciliationContext> page)
 {
     try
     {
         currentPage = (ReconciliationContextEditorItem)page;
         if (base.Save(page) == OperationState.STOP)
         {
             return(OperationState.STOP);
         }
     }
     catch (Exception)
     {
         DisplayError("Save Reconciliation", "Unable to save Reconciliation.");
         return(OperationState.STOP);
     }
     return(OperationState.CONTINUE);
 }
        /// <summary>
        /// </summary>
        /// <param name="sender">La target sélectionné</param>
        protected void onSelectTargetFromSidebar(object sender)
        {
            ReconciliationContextEditorItem page = (ReconciliationContextEditorItem)getReconciliationContextEditor().getActivePage();

            if (page == null)
            {
                return;
            }
            if (sender is Kernel.Domain.Attribute)
            {
                page.getReconciliationContextForm().setAttribute((Kernel.Domain.Attribute)sender);
            }
            else if (sender is Kernel.Domain.AttributeValue)
            {
                page.getReconciliationContextForm().setValue((Kernel.Domain.AttributeValue)sender);
            }
            else if (sender is Kernel.Domain.Entity)
            {
                page.getReconciliationContextForm().setEntity((Kernel.Domain.Entity)sender);
            }
        }