Example #1
0
        public INodeSkin GetSkin(INodeTypeProxy nodeTypeProxy, string skinName)
        {
            //Dictionary<INodeTypeProxy, Dictionary<string, INodeSkin>> nodeTypes = _themes[_currentThemeName];
            //Dictionary<string, INodeSkin> nodeSkins = nodeTypes[nodeTypeProxy];

            foreach (ThemeSkin skin in _themes2[_currentThemeName].Skin)
            {
                if (skin.Name == skinName && skin.NodeType == nodeTypeProxy.Name)
                {
                    object skinObject = Assembly.GetExecutingAssembly().CreateInstance(skin.Class);
                    if (skinObject is INodeSkin)
                    {
                        INodeSkin skinObj = skinObject as INodeSkin;
                        foreach (ThemeSkinProperty skinProperty in skin.Property)
                        {
                            skinObj.SkinProperties[skinProperty.Name] = skinProperty.Value;
                        }
                        return skinObj;
                    }
                }
            }
            return null;
            //INodeSkin nodeSkin = nodeSkins[skinName];

           // return nodeSkin;
        }
 public void AddNode(Guid domainId, INodeTypeProxy nodeType, string originalId, Point location)
 {
     MapLocationState addParam = new MapLocationState() { Location = location};
     Client.AddNodeAsync(domainId, new SoapNodeType() { Id = nodeType.Id, Name = nodeType.Name }, originalId, addParam);
 }
Example #3
0
        public void InitialiseNodeType(INodeTypeProxy nodeType)
        {
            if (!_isNodeTypeInitialised)
            {
                throw new NotSupportedException("This method has already been invoked.");
            }

            NodeType = nodeType;
        }
Example #4
0
 public virtual void AddNode(INodeTypeProxy nodeType, string originalId, Point location)
 {
     NodeService.AddNode(DomainId, nodeType, originalId, location);
 }