Beispiel #1
0
 public Transition()
 {
     ElementName = "transition";
     Properties = new Dictionary<string, object>();
     BendPoints = new List<BendPoint>();
     SourcePoint = new Point3D();
     SinkPoint = new Point3D();
 }
Beispiel #2
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="xml">字符串参数</param>
        /// <param name="isXmlFile">是否是xml文件</param>
        public Transition(ConfigureElement parent, XElement xElem)
            : base(parent, "transition", xElem)
        {
            XElement sourceElem = xElem.Element("source");
            XElement sinkElem = xElem.Element("sink");

            SourceOrientation = sourceElem.ChildElementValue("orientation");
            SinkOrientation = sinkElem.ChildElementValue("orientation");
            SourcePoint = new Point3D() { X = sourceElem.ChildElementValue("x").ToDouble(), Y = sourceElem.ChildElementValue("y").ToDouble() };
            SinkPoint = new Point3D() { X = sinkElem.ChildElementValue("x").ToDouble(), Y = sinkElem.ChildElementValue("y").ToDouble() };
            BendPoints = xElem.Element("bendPoints").Elements("bendPoint").Select(e => new BendPoint(this, e)).ToList();

            ProcessDefine wd = parent as ProcessDefine;
            SrcActivity = sourceElem.ChildElementValue("activityID");
            DestActivity = sinkElem.ChildElementValue("activityID");
        }