Пример #1
0
        public void AddPath(PhysicistPath path)
        {
            if (path != null)
            {
                this.paths.Add(path);

                if (string.IsNullOrEmpty(this.startingPath) && this.paths.Count == 1)
                {
                    this.CurrentPath = path.Name;
                }
            }
        }
Пример #2
0
        public void AddPath(PhysicistPath path)
        {
            if (path != null)
            {
                this.paths.Add(path.Name, path);

                if (this.paths.Count == 1)
                {
                    this.CurrentPath = path.Name;
                }
            }
        }
Пример #3
0
        public override void XmlDeserialize(XElement element)
        {
            if (element != null)
            {
                this.startingPath = element.GetAttribute("startingPath", string.Empty);
                this.currentPath  = this.startingPath;

                foreach (var pathEle in element.Elements())
                {
                    PhysicistPath path = (PhysicistPath)MapLoader.CreateInstance(pathEle, "class");
                    path.Screen = this.Screen;
                    path.XmlDeserialize(pathEle);
                    if (path != null)
                    {
                        path.Target = this.target;
                        this.AddPath(path);
                    }
                }
            }
        }