Пример #1
0
        private void btnSetting_Click(object sender, EventArgs e)
        {
            if (worker.IsBusy)
            {
                MessageBox.Show(this, "任务正在运行!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            using (var dlg = new SettingDialog())
            {
                var result = dlg.ShowDialog(this);
                if (result != DialogResult.OK)
                {
                    return;
                }

                Init(WorkerType.Gen);
            }
        }
Пример #2
0
        private void btnSetting_Click(object sender, EventArgs e)
        {
            if (worker.IsBusy)
            {
                MessageBox.Show(this, "任务正在运行!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            using (var dlg = new SettingDialog())
            {
                var result = dlg.ShowDialog(this);
                if (result != DialogResult.OK)
                    return;

                Init(WorkerType.Gen);
            }
        }