Exemple #1
0
        private void CreateNodeViewContent()
        {
            if (node.Link != null)
            {
                this.link = new Link(node.Link, node.GetLinkType());
                width += (link.Size.Width + INTER_CONTROL_PADDING);
            }

            if (node.HasNoteText)
            {
                this.noteIcon = new NoteIcon();
                width += (noteIcon.Size.Width + INTER_CONTROL_PADDING);
            }

            for (int i = 0; i < MetaModel.MetaModel.Instance.SystemIconList.Count; i++)
            {
                var systemIcon = MetaModel.MetaModel.Instance.SystemIconList[i];
                if(systemIcon.ShowIcon(node))
                {
                    recIcons.Add(new IconView(systemIcon));
                }
            }

            for (int i = 0; i < node.Icons.Count; i++)
            {
                IconView icon = new IconView(node.Icons[i]);
                this.recIcons.Add(icon);
                width += (icon.Size.Width + INTER_CONTROL_PADDING);
            }

            RefreshFont();
        }
Exemple #2
0
        public void RefreshLink()
        {
            if (node.Link == null)
                this.link = null;
            else
            {
                if (this.link == null)
                    this.link = new Link(node.Link, node.GetLinkType());
                else
                    this.link.ChangeLink(node.Link, node.GetLinkType());
            }

            this.RefreshNodeViewSize();
        }