Example #1
0
        private void btnStopRec_Click(object sender, EventArgs e)
        {
            DialogResult stopRecDialogResult = MessageBox.Show("Bạn có muốn dừng ghi lại phiên hỏi cung?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (stopRecDialogResult == DialogResult.Yes)
            {
                vlcRecorder.Stop();
                vlcRecorder.Dispose();
                timer1.Stop();
                label43.Visible = false;
                //btnStartRec.Enabled = true;
                btnStopRec.Enabled = false;
                btnPause.Enabled   = false;
                btnFinish.Enabled  = true;
                if (MessageBox.Show("Dữ liệu video đã được ghi tại " + CommonParam.ProgramPath + CommonParam.SessionFolderName + ". Mở thư mục ghi lưu?",
                                    "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Information)
                    == DialogResult.Yes)
                {
                    Process.Start("explorer.exe", CommonParam.ProgramPath + CommonParam.SessionFolderName);
                }

                lblVideoPath.Text = CommonParam.ProgramPath + CommonParam.SessionFolderName;
            }
            else if (stopRecDialogResult == DialogResult.No)
            {
                //do something else
            }
        }