Ejemplo n.º 1
0
 private void fillIf(ISubPresenterItem current, IView view, ISubPresenterItem target, LayoutControlItem layoutControlItem)
 {
     if (current == target)
     {
         AddViewTo(layoutControlItem, view);
     }
 }
Ejemplo n.º 2
0
        public static void SetTabVisibility(this ITabbedView view, ISubPresenterItem subPresenterItem, bool visible)
        {
            var tab = view.PageFrom(subPresenterItem);

            tab.SuspendLayout();
            tab.PageVisible = visible;
            tab.ResumeLayout(true);
        }
        private void setControlEnabled(ISubPresenterItem subPresenterItem, bool configReady)
        {
            if (subPresenterItem == SimulationItems.BuildConfiguration)
            {
                return;
            }

            View.SetControlEnabled(subPresenterItem, configReady);
        }
Ejemplo n.º 4
0
        public override void AddSubItemView(ISubPresenterItem subPresenterItem, IView viewToAdd)
        {
            if (subPresenterItem == ObservedDataItems.Chart)
            {
                splitControlDataToChart.Panel2.FillWith(viewToAdd);
            }

            else if (subPresenterItem == ObservedDataItems.Data)
            {
                splitControlDataToChart.Panel1.FillWith(viewToAdd);
            }

            else if (subPresenterItem == ObservedDataItems.MetaData)
            {
                splitControlMetaDataToData.Panel1.FillWith(viewToAdd);
            }
        }
Ejemplo n.º 5
0
        private IPKSimCommand configureSimulation(Simulation simulation, ISubPresenterItem subPresenterItem, Action actionToPerformBeforeDisplayingView)
        {
            _originalSimulation    = simulation;
            _simulationToConfigure = createSimulationToConfigureBasedOn();
            PresenterAt(SimulationItems.Model).EditSimulation(_simulationToConfigure, _creationMode);
            editSimulation(_simulationToConfigure);
            _view.ActivateControl(subPresenterItem);
            SetWizardButtonEnabled(subPresenterItem);
            actionToPerformBeforeDisplayingView();
            _view.Caption = ViewCaption(simulation);
            _view.Display();

            if (_view.Canceled)
            {
                return(new PKSimEmptyCommand());
            }

            //simulationToClone only returns an empty macro command as create simulationToClone is an atomic process
            return(new PKSimMacroCommand());
        }
Ejemplo n.º 6
0
        public IPKSimCommand ConfigureSimulationWithBuildingBlock(Simulation simulation, IPKSimBuildingBlock templateBuildingBlock)
        {
            Action            updateAction   = () => { };
            ISubPresenterItem itemToActivate = SimulationItems.Model;

            switch (templateBuildingBlock.BuildingBlockType)
            {
            case PKSimBuildingBlockType.Individual:
            case PKSimBuildingBlockType.Population:
                itemToActivate = SimulationItems.Model;
                updateAction   = () => PresenterAt(SimulationItems.Model).UpdateSelectedSubject(templateBuildingBlock.DowncastTo <ISimulationSubject>());
                break;

            case PKSimBuildingBlockType.Compound:
                itemToActivate = SimulationItems.Model;
                updateAction   = () => PresenterAt(SimulationItems.Model).UpdateSelectedCompound(templateBuildingBlock.DowncastTo <Compound>());
                break;

            case PKSimBuildingBlockType.Formulation:
                itemToActivate = SimulationItems.CompoundProtocols;
                updateAction   = () => PresenterAt(SimulationItems.CompoundProtocols).UpdateSelectedFormulation(templateBuildingBlock.DowncastTo <Formulation>());
                break;

            case PKSimBuildingBlockType.Protocol:
                itemToActivate = SimulationItems.CompoundProtocols;
                updateAction   = () => PresenterAt(SimulationItems.CompoundProtocols).UpdateSelectedProtocol(templateBuildingBlock.DowncastTo <Protocol>());
                break;

            case PKSimBuildingBlockType.Event:
                break;

            case PKSimBuildingBlockType.ObserverSet:
                itemToActivate = SimulationItems.Observers;
                break;

            default:
                throw new ArgumentOutOfRangeException(templateBuildingBlock.BuildingBlockType.ToString());
            }
            return(configureSimulation(simulation, itemToActivate, updateAction));
        }
Ejemplo n.º 7
0
 protected T PresenterAt <T>(ISubPresenterItem <T> subPresenterItem) where T : TSubPresenter
 {
     return(_subPresenterItemManager.PresenterAt(subPresenterItem));
 }
Ejemplo n.º 8
0
 public override void AddSubItemView(ISubPresenterItem subPresenterItem, IView viewToAdd)
 {
     panelControl.FillWith(viewToAdd);
 }
Ejemplo n.º 9
0
 public virtual void ActivateControl(ISubPresenterItem subPresenterItem)
 {
     //nothing to do
 }
Ejemplo n.º 10
0
 public virtual void SetControlVisible(ISubPresenterItem subPresenterItem, bool visible)
 {
     //nothing to do
 }
Ejemplo n.º 11
0
 public void SetControlIcon(ISubPresenterItem subPresenterItem, ApplicationIcon icon)
 {
     //nothing to do
 }
Ejemplo n.º 12
0
        public void AddViewForGroup(ISubPresenterItem subPresenterItem, IView view)
        {
            var layoutControlItem = AddViewToLayout(view);

            layoutControlItem.Text = view.Caption.FormatForLabel(checkCase: false);
        }
Ejemplo n.º 13
0
        public override void AddSubItemView(ISubPresenterItem simulationItem, IView viewToAdd)
        {
            var page = AddPageFor(simulationItem, viewToAdd);

            page.ShowCloseButton = DefaultBoolean.False;
        }
Ejemplo n.º 14
0
 protected void SetWizardButtonEnabled(ISubPresenterItem subPresenter)
 {
     SetWizardButtonEnabled(subPresenter.Index);
 }
Ejemplo n.º 15
0
 protected void ActivateControl(ISubPresenterItem subPresenterItem)
 {
     ActivateControl(subPresenterItem.Index);
 }
 public override void AddSubItemView(ISubPresenterItem subPresenterItem, IView viewToAdd)
 {
     UpdateEditControl(viewToAdd);
 }
Ejemplo n.º 17
0
 public override void AddSubItemView(ISubPresenterItem subPresenterItem, IView viewToAdd)
 {
     this.FillWith(viewToAdd);
 }
Ejemplo n.º 18
0
 public override void AddSubItemView(ISubPresenterItem subPresenterItem, IView viewToAdd)
 {
     AddPageFor(subPresenterItem, viewToAdd);
 }
Ejemplo n.º 19
0
 public virtual void SetControlEnabled(ISubPresenterItem subPresenterItem, bool enabled)
 {
     //nothing to do
 }
Ejemplo n.º 20
0
 protected XtraTabPage AddPageFor(ISubPresenterItem subPresenterItem, IView viewToAdd)
 {
     return(AddPageFor(subPresenterItem.Index, viewToAdd));
 }
Ejemplo n.º 21
0
 public void SetControlToolTip(ISubPresenterItem subPresenterItem, string toolTip)
 {
     //nothing to do
 }
Ejemplo n.º 22
0
 public override void SetControlEnabled(ISubPresenterItem subPresenterItem, bool enabled)
 {
     this.SetTabEnabled(subPresenterItem, enabled);
 }
Ejemplo n.º 23
0
 public virtual bool IsControlVisible(ISubPresenterItem subPresenterItem)
 {
     return(true);
 }
Ejemplo n.º 24
0
 public override void SetControlVisible(ISubPresenterItem subPresenterItem, bool visible)
 {
     this.SetTabVisibility(subPresenterItem, visible);
 }
Ejemplo n.º 25
0
 public virtual void AddSubItemView(ISubPresenterItem subPresenterItem, IView viewToAdd)
 {
     //nothing to do
 }
Ejemplo n.º 26
0
 public override void ActivateControl(ISubPresenterItem subPresenterItem)
 {
     this.ActivateTab(subPresenterItem);
 }
Ejemplo n.º 27
0
 public virtual void AddSubItemView(ISubPresenterItem subPresenterItem, IView view)
 {
     View.AddSubItemView(subPresenterItem, view);
 }
Ejemplo n.º 28
0
 public override bool IsControlVisible(ISubPresenterItem subPresenterItem)
 {
     return(this.IsTabVisible(subPresenterItem));
 }
Ejemplo n.º 29
0
 public override void AddSubItemView(ISubPresenterItem subPresenterItem, IView view)
 {
     View.AddViewForGroup(subPresenterItem, view);
 }
Ejemplo n.º 30
0
 public override void SetControlIcon(ISubPresenterItem subPresenterItem, ApplicationIcon icon)
 {
     this.SetTabIcon(subPresenterItem, icon);
 }