Example #1
0
        private void raiseEntitySelectedEvent(IObjectBaseDTO objectBaseDTO)
        {
            var objectBase = _context.Get <IObjectBase>(objectBaseDTO.Id);

            _context.PublishEvent(new EntitySelectedEvent(objectBase, this));
        }
 public ITreeNode CreateFor(IObjectBaseDTO objectBase)
 {
     return(new ObjectWithIdAndNameNode <IObjectBaseDTO>(objectBase));
 }
Example #3
0
 private ReferenceDTO createPathFromParameterDummy(IObjectBaseDTO dtoObjectBase)
 {
     return(_objectPathCreator.CreatePathFromParameterDummy(dtoObjectBase, shouldCreateAbsolutePaths, _refObject, _editedObject));
 }
 public void AddRoot(IObjectBaseDTO dto)
 {
     treeView.AddNode(_spatialStructureNodeMapper.MapFrom(dto));
 }
Example #5
0
 protected static bool IsMoleculeReference(IObjectBaseDTO dtoObjectBase)
 {
     return(dtoObjectBase.Id.Equals(ObjectPathKeywords.MOLECULE));
 }
 public void BindTo(IObjectBaseDTO dto)
 {
     _screenBinder.BindToSource(dto);
 }
Example #7
0
        public DummyParameterDTO MapFrom(IParameter parameter, IContainer structureParent, IObjectBaseDTO modelParent)
        {
            var dto = Map <DummyParameterDTO>(parameter);

            dto.ParameterToUse  = Map <ObjectBaseDTO>(parameter);
            dto.Parent          = structureParent;
            dto.ModelParentName = modelParent.Name;
            dto.Id = ShortGuid.NewGuid();
            return(dto);
        }
        public override IContextMenu CreateFor(IObjectBaseDTO objectBaseDTO, IPresenterWithContextMenu <IViewItem> presenter)
        {
            var contextMenu = IoC.Resolve <IContextMenuForContainer>();

            return(contextMenu.InitializeWith(objectBaseDTO, presenter));
        }
Example #9
0
 public abstract IContextMenu CreateFor(IObjectBaseDTO objectBaseDTO, IPresenterWithContextMenu <IViewItem> presenter);
        public void SetPropertyValueFromViewFor <T>(IObjectBaseDTO dtoObserverBuilder, string propertyName, T newValue, T oldValue)
        {
            var observerBuilder = _context.Get <IObserverBuilder>(dtoObserverBuilder.Id);

            AddCommand(new EditObjectBasePropertyInBuildingBlockCommand(propertyName, newValue, oldValue, observerBuilder, BuildingBlock).Run(_context)); // <T>
        }
 public MoleculeTreeNode(IObjectBaseDTO tag)
 {
     _tag = tag;
     _tag.PropertyChanged += OnPropertyChanged;
 }
 private bool objectIdMatches(IObjectBaseDTO objectBaseDTO, string id)
 {
     return(string.Equals(objectBaseDTO.Id, id));
 }
Example #13
0
 public void BindTo(IObjectBaseDTO simulationDTO)
 {
     _screenBinder.BindToSource(simulationDTO);
     NotifyViewChanged();
 }
Example #14
0
        public virtual IReadOnlyList <IObjectBaseDTO> GetChildObjects(IObjectBaseDTO dto, Func <IEntity, bool> predicate)
        {
            var container = _context.Get <IContainer>(dto.Id);

            return(container == null ? new List <IObjectBaseDTO>() : GetChildrenSorted(container, predicate));
        }