示例#1
0
    public void OnPointerClick(PointerEventData eventData)
    {
        if (CanCompute)
        {
            inter = Compute.Computes(T, Speed, start, end);
            string s = "\t\t采样插补点计算完毕: \n";
            int    i = 0;
            int    j = 0;

            foreach (var item in inter)
            {
                j++;
                if (i < 2)
                {
                    s += "\t\t#" + string.Format("{0:d3}", j) + ": " + item.ToString() + ",";
                }
                else if (i == 2)
                {
                    s += "\n";
                    s += "\t\t#" + string.Format("{0:d3}", j) + ": " + item.ToString() + ",";
                    i  = 0;
                    continue;
                }

                i++;
            }
            text.AddText(s);

            CanCompute = false;
        }
    }