qinjie
2023-12-20 1b529841a77db239d7dae96ff480f40e50fa9553
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Hydro.Model
{
    public abstract class VisualObject
    {
        public VisualObject() { }
        public VisualObject(VisualObject obj) 
        {
            this.ID = obj.ID;
            this.Name = obj.Name;
            this.ObjectType = obj.ObjectType;
            this.Tag = obj.Tag;
        }
        /// <summary>
        /// 
        /// </summary>
        public string ID { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public eObjectType ObjectType { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public object Tag { get; set; }
 
        /// <summary>
        /// 
        /// </summary>
        public bool IsNode
        {
            get { if (ObjectType == eObjectType.Node) return true; else return false; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool IsLink
        {
            get { if (ObjectType == eObjectType.Link) return true; else return false; }
        }
    }
}