Beispiel #1
0
    /// <summary>
    /// 打开路径选择界面,选择路径,将csv点表中的信息存储在cps中
    /// </summary>
    public void GetCps()
    {
        string path = SaveDialog.SelectPath();

        cps = GetPoint(path);
        Debug.Log(cps["P1"].name);
    }
Beispiel #2
0
    // Start is called before the first frame update
    void Start()
    {
        string       path = SaveDialog.SelectPath();
        StreamReader sr   = new StreamReader(path, Encoding.Default);

        while (true)
        {
            string fileDataLine;

            fileDataLine = sr.ReadLine();
            if (fileDataLine == null)
            {
                break;
            }
            Debug.Log(fileDataLine);
        }
        sr.Close();
    }
Beispiel #3
0
    /// <summary>
    /// 选择指令文件,并进行每行解析
    /// </summary>
    public void GetCommand()
    {
        string path = SaveDialog.SelectPath();

        StreamReader sr = new StreamReader(path, Encoding.Default);

        while (true)
        {
            string fileDataLine;
            fileDataLine = sr.ReadLine();
            if (fileDataLine == null)
            {
                break;
            }
            ReadCommand(fileDataLine);
        }
        sr.Close();
    }