public SketchToolsView(InteractionContainer sceneSelectedEntity, ActionsGraph actionsGraph)
        {
            _actionsGraph        = actionsGraph;
            _sceneSelectedEntity = sceneSelectedEntity.Entities[0];

            InitializeComponent();
        }
示例#2
0
        public InteractionContainerDTO MapFrom(InteractionContainer interactionContainer)
        {
            var dto = Map <InteractionContainerDTO>(interactionContainer);

            dto.Parameters = interactionContainer.GetChildren <IParameter>().MapAllUsing(_parameterToParameterDTOMapper).Cast <ParameterDTO>();
            return(dto);
        }
 protected override void Context()
 {
     base.Context();
     _parameter            = A.Fake <IParameter>();
     _interactionContainer = A.Fake <InteractionContainer>();
     A.CallTo(() => _interactionContainer.GetChildren <IParameter>()).Returns(new[] { _parameter });
 }
示例#4
0
        public DimensionToolsView(InteractionContainer selectedEntity, ActionsGraph actionsGraph)
        {
            _actionsGraph = actionsGraph;
            var items = selectedEntity[TopAbsShapeEnum.TopAbs_FACE];

            _selectedEntity = items[0];
            InitializeComponent();
        }
示例#5
0
 protected override void Context()
 {
     base.Context();
     _parent = new MoleculeBuilder().WithName("Drug");
     _interactionContainer = new InteractionContainer().WithParentContainer(_parent);
     _parameter            = new Parameter().WithName("P1").WithParentContainer(_parent);
     _transporterMolecule  = new TransporterMoleculeContainer().WithName("PGP").WithParentContainer(_parent);
 }
示例#6
0
 protected override void Context()
 {
     base.Context();
     _newInteractionContainer = new InteractionContainer().WithParentContainer(new MoleculeBuilder());
     _buildingBlock           = new MoleculeBuildingBlock();
     _commands       = new MoBiMacroCommand();
     _modalPresenter = A.Fake <IModalPresenter>();
     A.CallTo(() => _modalPresenter.SubPresenter).Returns(A.Fake <ICreatePresenter <IContainer> >());
     A.CallTo(() => _interactionTaskContext.ApplicationController.GetCreateViewFor <IContainer>(_newInteractionContainer, _commands)).Returns(_modalPresenter);
 }
 protected override void Context()
 {
    base.Context();
    var group = new Group { Name = CoreConstants.Groups.COMPOUND_PROCESSES };
    var drugContainer = new Container().WithName("Drug");
    var reaction = new Container().WithContainerType(ContainerType.Reaction).WithName("R");
    var interactionContainer = new InteractionContainer().WithName("Interac").WithParentContainer(drugContainer);
    _rectionParameter = DomainHelperForSpecs.ConstantParameterWithValue(1).WithParentContainer(reaction);
    _processParameter = DomainHelperForSpecs.ConstantParameterWithValue(1).WithParentContainer(interactionContainer);
    _parameters.AddRange(new[] { _rectionParameter, _processParameter });
    _node = new GroupNode(group);
 }
    public void SwapSprite(string strName, Sprite _newSprite)
    {
        InteractionContainer ic = Get(strName);

        if (ic == null)
        {
            return;
        }
        else
        {
            ic.sprite = _newSprite;
        }
    }
 private void DestroyOldWindow(InteractionContainer entity)
 {
     if (_window == null)
     {
         return;
     }
     if (!IsDifferentEntity(entity == null ? null : entity.Entities[0]))
     {
         return;
     }
     if (_window.IsVisible)
     {
         _window.Close();
     }
     _window = null;
 }
        protected override void Context()
        {
            base.Context();
            _para            = new Parameter().WithName("Para1");
            _moleculeBuilder = new MoleculeBuilder().WithName("Molecule");
            var interactionContainer = new InteractionContainer().WithName("Interaction");

            _moleculeBuilder.AddInteractionContainer(interactionContainer);

            A.CallTo(() => _containerTask.CreateOrRetrieveSubContainerByName(A <IContainer> ._, A <string> ._))
            .ReturnsLazily(x =>
            {
                var parent    = x.GetArgument <IContainer>(0);
                var container = new Container().WithName(x.GetArgument <string>(1));
                parent.Add(container);
                return(container);
            });

            A.CallTo(_parameterCollectionMapper).WithReturnType <IEnumerable <IParameter> >().Returns(new[] { _para });
        }
 protected override void Context()
 {
     base.Context();
     _moleculeBuilder = A.Fake <IMoleculeBuilder>();
     _startFormula    = A.Fake <IFormula>();
     _moleculeBuilder.DefaultStartFormula = _startFormula;
     _moleculeBuilder.Description         = "Description";
     _moleculeBuilder.Icon         = "Icon";
     _moleculeBuilder.Id           = "ID";
     _moleculeBuilder.IsFloating   = true;
     _moleculeBuilder.QuantityType = QuantityType.Drug;
     _activeTransport = A.Fake <ITransportBuilder>();
     _transporterMoleculeContainer = A.Fake <TransporterMoleculeContainer>();
     A.CallTo(() => _moleculeBuilder.TransporterMoleculeContainerCollection).Returns(new[] { _transporterMoleculeContainer });
     A.CallTo(() => _transporterMoleculeContainer.ActiveTransportRealizations).Returns(new[] { _activeTransport });
     _parameter = A.Fake <IParameter>();
     A.CallTo(() => _moleculeBuilder.Parameters).Returns(new[] { _parameter });
     _calculationMethod = A.Fake <UsedCalculationMethod>();
     A.CallTo(() => _moleculeBuilder.UsedCalculationMethods).Returns(new[] { _calculationMethod });
     _interactionContainer = A.Fake <InteractionContainer>();
     A.CallTo(() => _moleculeBuilder.InteractionContainerCollection).Returns(new[] { _interactionContainer });
 }
示例#12
0
 public void RemoveInteractionContainer(InteractionContainer interactionContainer)
 {
     RemoveChild(interactionContainer);
 }
示例#13
0
 public void AddInteractionContainer(InteractionContainer interactionContainer)
 {
     Add(interactionContainer);
 }