/// <summary>
        /// 新增.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            FormEditAutoReplace editFrom = new FormEditAutoReplace();


            if (editFrom.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ReloadData();
            }
        }
        /// <summary>
        /// 双击编辑.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvAutoReplace_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            // 取得行号.
            int index = e.RowIndex;

            if (index < 0)
            {
                // 忽略为 负数的行号.
                return;
            }


            // 取得指定行的数据.
            AutoReplace currentData = mainDataList[index];

            FormEditAutoReplace editFrom = new FormEditAutoReplace();

            editFrom.EditAutoReplace = currentData;

            editFrom.ShowDialog();
        }