示例#1
0
        private void btnDelPoint_Click(object sender, EventArgs e)
        {
            if (tour != null && selectPointIndex != -1)
            {
                tour.DeleteWaypoint(selectPointIndex);

                //更新表格
                dt.Rows.RemoveAt(selectPointIndex);
                for (int i = selectPointIndex; i < dt.Rows.Count; i++)
                {
                    DataRow dr = dt.Rows[i];
                    dr[0] = i;
                }

                //更新Time滑动条最大值
                decimal mathRound = Math.Round((decimal)tour.TotalTime, 2);
                this.trackBarTime.Maximum = int.Parse(((double)mathRound * 100.0).ToString());
            }
        }