private void btnConfiguration_Click(object sender, EventArgs e) { using (ConfigurationRecord frm = new ConfigurationRecord()) { frm.PathImage = PathBin + "\\" + PathImage; frm.FPS = FPS; frm.Quality = Quality; if (frm.ShowDialog() == DialogResult.OK) { IsChange = true; } } }
private void btnStart_Click(object sender, EventArgs e) { if (!IsChange && UI.Quesion("Quay màn hình với cấu hình mặc định?")) { rec = new Recorder(new RecorderParams(PathImage, FPS, Quality)); lblTime.Visible = true; Alarm(); } else { if (!IsChange) { using (ConfigurationRecord frm = new ConfigurationRecord()) { frm.PathImage = PathBin + "\\" + PathImage; frm.FPS = FPS; frm.Quality = Quality; if (frm.ShowDialog() == DialogResult.OK) { rec = new Recorder(new RecorderParams(frm.PathImage, frm.FPS, frm.Quality)); } else { if (UI.Quesion("Quay màn hình với cấu hình mặc định?")) { rec = new Recorder(new RecorderParams(PathImage, FPS, Quality)); lblTime.Visible = true; Alarm(); } } } } else { rec = new Recorder(new RecorderParams(PathImage, FPS, Quality)); lblTime.Visible = true; Alarm(); } } btnStop.Visible = true; btnStart.Visible = false; }