Esempio n. 1
0
        private void BT_ok_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("路径排序,由于趋近点可能会碰撞,继续吗?", "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
            {
                return;
            }

            int []   NewId = new int [TrajCount];
            string[] Buff  = db.GetTrajInfor(RecipeName);

            for (int i = 0; i < TrajCount; i++)
            {
                NewId[i] = Array.IndexOf(TrajInfor, Buff[i]) + 1;
            }

            string[] TrajName = db.GetTrajName(RecipeName, 1, TrajCount);
            if (db.EditTrajIndex(TrajName, NewId))
            {
                this.Close();
            }
            else
            {
                MessageBox.Show("数据库异常!");
            }
        }