road.cs

来自「This is a document about routing [a spat」· CS 代码 · 共 79 行

CS
79
字号
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace MapService
{
    public class Road
    {
        private string  name;
        private ArrayList segments;

        public string  Name
        {
            get { return name; }
            set { name = value; }
        }
        public ArrayList Segments
        {
            get { return segments; }
            set { segments = value; }
        }
        public Road(string name)
        {
            this.name = name;
            segments = new ArrayList();
        }
    }

    public class Segment
    {
        private int fromleft;
        private int toleft;
        private int fromright;
        private int toright;
        private ArrayList nodes;
        private int len;

        public int FromLeft
        {
            get { return fromleft; }
            set { fromleft = value; }
        }
        public int ToLeft
        {
            get { return toleft; }
            set { toleft = value; }
        }
        public int FromRight
        {
            get { return fromright; }
            set { fromright = value; }
        }
        public int ToRight
        {
            get { return toright; }
            set { toright = value; }
        }
        public int Len
        {
            get { return len; }
            set { len = value; }
        }
        public ArrayList Nodes
        {
            get { return nodes; }
            set { nodes = value; }
        }
        public Segment(int fromleft, int toleft, int fromright, int toright)
        {
            this.fromleft = fromleft;
            this.toleft = toleft;
            this.fromright = fromright;
            this.toright = toright;
            nodes = new ArrayList();
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?