Пример #1
0
        static SizeF PreRenderItem(Graphics graphics, NodeItem item, PointF position)
        {
            var itemSize = item.Measure(graphics);

            item.bounds = new RectangleF(position, itemSize);
            return(itemSize);
        }
Пример #2
0
Файл: Node.cs Проект: taknim/XLE
 public void RemoveItem(NodeItem item)
 {
     if (!nodeItems.Contains(item))
     {
         return;
     }
     item.Node = null;
     nodeItems.Remove(item);
 }
Пример #3
0
 public static uint GetSide(NodeItem item)
 {
     if (item.Input != null && item.Input.Enabled)
     {
         return(0);
     }
     else if (item.Output != null && item.Output.Enabled)
     {
         return(2);
     }
     return(1);
 }
Пример #4
0
Файл: Node.cs Проект: taknim/XLE
 public void AddItem(NodeItem item)
 {
     if (nodeItems.Contains(item))
     {
         return;
     }
     if (item.Node != null)
     {
         item.Node.RemoveItem(item);
     }
     nodeItems.Add(item);
     item.Node = this;
 }
Пример #5
0
 static void RenderItem(Graphics graphics, SizeF minimumSize, NodeItem item, PointF position, object context)
 {
     item.Render(graphics, minimumSize, position, context);
 }
Пример #6
0
 public NodeConnection Connect(NodeItem from, NodeItem to, string name)
 {
     return(Connect(from.Output, to.Input, name));
 }
Пример #7
0
 static void RenderItem(Graphics graphics, SizeF minimumSize, NodeItem item, PointF position)
 {
     item.Render(graphics, minimumSize, position);
 }
Пример #8
0
		public void AddItem(NodeItem item)
		{
			if (nodeItems.Contains(item))
				return;
			if (item.Node != null)
				item.Node.RemoveItem(item);
			nodeItems.Add(item);
			item.Node = this;
		}
Пример #9
0
 static SizeF PreRenderItem(Graphics graphics, NodeItem item, PointF position)
 {
     var itemSize = (SizeF)item.Measure(graphics);
     item.bounds = new RectangleF(position, itemSize);
     return itemSize;
 }
Пример #10
0
 public NodeOutputConnector(NodeItem item, bool enabled) : base(item, enabled)
 {
 }
Пример #11
0
 public static uint GetSide(NodeItem item)
 {
     if (item.Input != null && item.Input.Enabled) return 0;
     else if (item.Output != null && item.Output.Enabled) return 2;
     return 1;
 }
Пример #12
0
		static void RenderItem(Graphics graphics, SizeF minimumSize, NodeItem item, PointF position, object context)
		{
			item.Render(graphics, minimumSize, position, context);
		}
Пример #13
0
 public NodeConnection Connect(NodeItem from, NodeItem to)
 {
     return Connect(from.Output, to.Input);
 }
Пример #14
0
 public NodeItemEventArgs(NodeItem item)
 {
     Item = item;
 }
Пример #15
0
 public NodeConnector(NodeItem item, bool enabled)
 {
     Item = item; Enabled = enabled;
 }
Пример #16
0
		public NodeItemEventArgs(NodeItem item) { Item = item; }
Пример #17
0
 public NodeOutputConnector(NodeItem item, bool enabled)
     : base(item, enabled)
 {
 }
Пример #18
0
 static void RenderItem(Graphics graphics, SizeF minimumSize, NodeItem item, PointF position)
 {
     item.Render(graphics, minimumSize, position);
 }
Пример #19
0
 public NodeConnector(NodeItem item, bool enabled)
 {
     Item = item; Enabled = enabled;
 }
Пример #20
0
		public void RemoveItem(NodeItem item)
		{
			if (!nodeItems.Contains(item))
				return;
			item.Node = null;
			nodeItems.Remove(item);
		}
Пример #21
0
 public NodeConnection Connect(NodeItem from, NodeItem to, string name)
 {
     return Connect(from.Output, to.Input, name);
 }