private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dgData.SelectedRows.Count == 0)
            {
                FISCA.Presentation.Controls.MsgBox.Show("請選擇項目");
            }
            else
            {
                SetEditButtonEnable(false);
                UDT.Events   selectEvent = dgData.SelectedRows[0].Tag as UDT.Events;
                frmSubEvents editForm    = new frmSubEvents();
                editForm.SetEvents(selectEvent);
                editForm.SetIsAddMode(false);
                editForm.SetGameTypesDict(_GameTypesDict);
                editForm.SetGroupTypesDict(_GroupTypesDict);
                editForm.SetScoreTypesDict(_ScoreTypesDict);

                if (editForm.ShowDialog() == DialogResult.OK)
                {
                    // 資料重整
                    _bgw.RunWorkerAsync();
                }
                else
                {
                    SetEditButtonEnable(true);
                }
            }
        }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            UDT.Events addEvents = null;
            SetEditButtonEnable(false);
            // 因為之後使用複製功能,樣板先不用
            //frmEventsTemplateAdd1 feta = new frmEventsTemplateAdd1();
            //if (feta.ShowDialog() == DialogResult.OK)
            //{
            //    addEvents = feta.GetEvents();
            //}

            frmSubEvents addForm = new frmSubEvents();

            addForm.SetEvents(addEvents);
            addForm.SetIsAddMode(true);
            addForm.SetGameTypesDict(_GameTypesDict);
            addForm.SetGroupTypesDict(_GroupTypesDict);
            addForm.SetScoreTypesDict(_ScoreTypesDict);
            if (addForm.ShowDialog() == DialogResult.OK)
            {
                addEvents = addForm.GetEventData();
                // 資料重整
                _bgw.RunWorkerAsync();
            }
            else
            {
                SetEditButtonEnable(true);
            }
        }