Exemplo n.º 1
0
        /// <summary>
        /// 写XML
        /// </summary>
        public override void XmlOut(Filer.XmlFiler filer)
        {
            base.XmlOut(filer);

            filer.Write("basePoint", _basePoint);
            filer.Write("direction", _direction);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 读XML
        /// </summary>
        public override void XmlIn(Filer.XmlFiler filer)
        {
            base.XmlIn(filer);

            filer.Read("center", out _center);
            filer.Read("radius", out _radius);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 写XML
        /// </summary>
        public override void XmlOut(Filer.XmlFiler filer)
        {
            base.XmlOut(filer);

            filer.Write("startPoint", _startPoint);
            filer.Write("endPoint", _endPoint);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 写XML
        /// </summary>
        public override void XmlOut(Filer.XmlFiler filer)
        {
            base.XmlOut(filer);

            filer.Write("center", _center);
            filer.Write("radius", _radius);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 读XML
        /// </summary>
        public override void XmlIn(Filer.XmlFiler filer)
        {
            base.XmlIn(filer);

            filer.Read("startPoint", out _startPoint);
            filer.Read("endPoint", out _endPoint);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 读XML
        /// </summary>
        public override void XmlIn(Filer.XmlFiler filer)
        {
            Filer.XmlFilerImpl filerImpl = filer as Filer.XmlFilerImpl;

            base.XmlIn(filerImpl);

            XmlNode curXmlNode   = filerImpl.curXmlNode;
            XmlNode entitiesNode = curXmlNode.SelectSingleNode("entities");

            if (entitiesNode != null && entitiesNode.ChildNodes != null)
            {
                foreach (XmlNode entityNode in entitiesNode.ChildNodes)
                {
                    Type type = Type.GetType("SharpCAD.DatabaseServices." + entityNode.Name);
                    if (type == null)
                    {
                        continue;
                    }
                    Entity ent = Activator.CreateInstance(type) as Entity;
                    if (ent == null)
                    {
                        continue;
                    }
                    filerImpl.curXmlNode = entityNode;
                    ent.XmlIn(filerImpl);
                    this._AppendEntity(ent);
                }
            }
            filerImpl.curXmlNode = curXmlNode;
        }
Exemplo n.º 7
0
        /// <summary>
        /// 读XML
        /// </summary>
        public override void XmlIn(Filer.XmlFiler filer)
        {
            base.XmlIn(filer);

            //
            filer.Read("closed", out _closed);
            //
            string strVertices;

            filer.Read("vertices", out strVertices);
            string[] vts = strVertices.Split('|');
            double   x   = 0;
            double   y   = 0;

            string[] xy = null;
            foreach (string vtx in vts)
            {
                xy = vtx.Split(';');
                if (xy.Length != 2)
                {
                    continue;
                }
                if (!double.TryParse(xy[0], out x))
                {
                    continue;
                }
                if (!double.TryParse(xy[1], out y))
                {
                    continue;
                }

                _vertices.Add(new LitMath.Vector2(x, y));
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// 读XML
        /// </summary>
        public override void XmlIn(Filer.XmlFiler filer)
        {
            base.XmlIn(filer);

            filer.Read("basePoint", out _basePoint);
            filer.Read("direction", out _direction);
        }
Exemplo n.º 9
0
        /// <summary>
        /// 读XML
        /// </summary>
        public override void XmlIn(Filer.XmlFiler filer)
        {
            base.XmlIn(filer);

            filer.Read("color", out _color);
            filer.Read("lineWeight", out _lineWeight);
            filer.Read("layer", out _layerId);
        }
Exemplo n.º 10
0
        /// <summary>
        /// 写XML
        /// </summary>
        public override void XmlOut(Filer.XmlFiler filer)
        {
            base.XmlOut(filer);

            filer.Write("color", _color);
            filer.Write("lineWeight", _lineWeight.ToString());
            filer.Write("layer", _layerId);
        }
Exemplo n.º 11
0
        /// <summary>
        /// 写XML
        /// </summary>
        public override void XmlOut(Filer.XmlFiler filer)
        {
            base.XmlOut(filer);

            filer.Write("color", _color);
            filer.Write("lineWeight", _lineWeight);
            filer.Write("lineType", _lineType);
            filer.Write("description", _description);
        }
Exemplo n.º 12
0
        /// <summary>
        /// 写XML
        /// </summary>
        public override void XmlOut(Filer.XmlFiler filer)
        {
            base.XmlOut(filer);

            filer.Write("center", _center);
            filer.Write("radius", _radius);
            filer.Write("startAngle", _startAngle);
            filer.Write("endAngle", _endAngle);
        }
Exemplo n.º 13
0
        /// <summary>
        /// 读XML
        /// </summary>
        public override void XmlIn(Filer.XmlFiler filer)
        {
            base.XmlIn(filer);

            filer.Read("color", out _color);
            filer.Read("lineWeight", out _lineWeight);
            filer.Read("lineType", out _lineType);
            filer.Read("_description", out _description);
        }
Exemplo n.º 14
0
        /// <summary>
        /// 读XML
        /// </summary>
        public override void XmlIn(Filer.XmlFiler filer)
        {
            base.XmlIn(filer);

            filer.Read("center", out _center);
            filer.Read("radius", out _radius);
            filer.Read("startAngle", out _startAngle);
            filer.Read("endAngle", out _endAngle);
        }
Exemplo n.º 15
0
        /// <summary>
        /// 写XML
        /// </summary>
        public override void XmlOut(Filer.XmlFiler filer)
        {
            Filer.XmlFilerImpl filerImpl = filer as Filer.XmlFilerImpl;

            base.XmlOut(filer);
            foreach (DBTableRecord item in _items)
            {
                filerImpl.NewSubNodeAndInsert(item.className);
                item.XmlOut(filer);
                filerImpl.Pop();
            }
        }
Exemplo n.º 16
0
        /// <summary>
        /// 写XML
        /// </summary>
        public override void XmlOut(Filer.XmlFiler filer)
        {
            Filer.XmlFilerImpl filerImpl = filer as Filer.XmlFilerImpl;

            //
            base.XmlOut(filer);

            //
            filerImpl.NewSubNodeAndInsert("entities");
            foreach (Entity item in _items)
            {
                filerImpl.NewSubNodeAndInsert(item.className);
                item.XmlOut(filer);
                filerImpl.Pop();
            }
            filerImpl.Pop();
        }
Exemplo n.º 17
0
        /// <summary>
        /// 读XML
        /// </summary>
        public override void XmlIn(Filer.XmlFiler filer)
        {
            Filer.XmlFilerImpl filerImpl = filer as Filer.XmlFilerImpl;

            base.XmlIn(filer);

            XmlNode     curXmlNode = filerImpl.curXmlNode;
            XmlNodeList layers     = curXmlNode.SelectNodes("Layer");

            foreach (XmlNode layerNode in layers)
            {
                Layer layer = new Layer();
                filerImpl.curXmlNode = layerNode;
                layer.XmlIn(filerImpl);
                this._Add(layer);
            }
            filerImpl.curXmlNode = curXmlNode;
        }
Exemplo n.º 18
0
        /// <summary>
        /// 读XML
        /// </summary>
        public override void XmlIn(Filer.XmlFiler filer)
        {
            Filer.XmlFilerImpl filerImpl = filer as Filer.XmlFilerImpl;

            base.XmlIn(filer);

            XmlNode     curXmlNode = filerImpl.curXmlNode;
            XmlNodeList blocks     = curXmlNode.SelectNodes("Block");

            foreach (XmlNode blockNode in blocks)
            {
                Block block = new Block();
                block._dbtable       = this;
                filerImpl.curXmlNode = blockNode;
                block.XmlIn(filerImpl);
                this._Add(block);
            }
            filerImpl.curXmlNode = curXmlNode;
        }
Exemplo n.º 19
0
        /// <summary>
        /// 写XML
        /// </summary>
        public override void XmlOut(Filer.XmlFiler filer)
        {
            base.XmlOut(filer);

            //
            filer.Write("closed", _closed);
            //
            string strVertices = "";
            int    i           = 0;

            foreach (LitMath.Vector2 vertex in _vertices)
            {
                if (++i > 1)
                {
                    strVertices += "|";
                }
                strVertices += vertex.x.ToString() + ";" + vertex.y.ToString();
            }
            filer.Write("vertices", strVertices);
        }
Exemplo n.º 20
0
 /// <summary>
 /// 读XML
 /// </summary>
 public virtual void XmlIn(Filer.XmlFiler filer)
 {
     filer.Read("id", out _id);
 }
Exemplo n.º 21
0
 /// <summary>
 /// 写XML
 /// </summary>
 public virtual void XmlOut(Filer.XmlFiler filer)
 {
     filer.Write("id", _id);
 }
Exemplo n.º 22
0
        /// <summary>
        /// 读XML
        /// </summary>
        public override void XmlIn(Filer.XmlFiler filer)
        {
            base.XmlIn(filer);

            filer.Read("name", out _name);
        }
Exemplo n.º 23
0
        /// <summary>
        /// 写XML
        /// </summary>
        public override void XmlOut(Filer.XmlFiler filer)
        {
            base.XmlOut(filer);

            filer.Write("name", _name);
        }
Exemplo n.º 24
0
 /// <summary>
 /// 读XML
 /// </summary>
 public override void XmlIn(Filer.XmlFiler filer)
 {
     base.XmlIn(filer);
 }
Exemplo n.º 25
0
 /// <summary>
 /// 写XML
 /// </summary>
 public override void XmlOut(Filer.XmlFiler filer)
 {
     base.XmlOut(filer);
 }