private void cmSetupConfig_Click(object sender, EventArgs e) { SetupConfigForm setupForm = new SetupConfigForm(); setupForm.StartPosition = FormStartPosition.CenterParent; setupForm.SetupChanged += delegate(object s, EventArgs arg) { MessageBox.Show("設定已變更, 請重啟本程式!", "通知", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); this.Close(); }; setupForm.ShowDialog(); }