partial void btnCreate_Clicked(MonoMac.Foundation.NSObject sender) { if (txtData.Cell.Title.Length > 0 && txtIpBin.Cell.Title.Length > 0 && txtOutput.Cell.Title.Length > 0) { List <string> cdTracks = new List <string>(); foreach (CddaItem lvi in _tracks.Rows) { cdTracks.Add(lvi.FilePath); } string checkMsg = _builder.CheckOutputExists(cdTracks, txtOutput.Cell.Title); if (checkMsg != null) { NSAlert dialog = NSAlert.WithMessage("Warning", "No", "Yes", null, checkMsg); if (dialog.RunModal() == 1) { return; } } DisableButtons(); _builder.RawMode = (chkRawMode.State == NSCellStateValue.On); _builder.ReportProgress = UpdateProgress; string dataPath = txtData.Cell.Title; string ipBinPath = txtIpBin.Cell.Title; string outputPath = txtOutput.Cell.Title; _worker = new Thread(() => DoDiscBuild(dataPath, ipBinPath, cdTracks, outputPath)); _worker.Start(); } else { NSAlert.WithMessage("Error", "OK", null, null, "Not ready to build disc. Please provide more information above.").RunModal(); } }
private void btnMake_Click(object sender, EventArgs e) { if (txtData.Text.Length > 0 && txtIpBin.Text.Length > 0 && txtOutdir.Text.Length > 0) { List <string> cdTracks = new List <string>(); foreach (CddaItem lvi in lstCdda.Items) { cdTracks.Add(lvi.FilePath); } string checkMsg = _builder.CheckOutputExists(cdTracks, txtOutdir.Text); if (checkMsg != null) { if (MessageBox.Show(checkMsg, "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { return; } } DisableButtons(); _builder.RawMode = chkRawMode.Checked; _builder.ReportProgress = UpdateProgress; _worker = new Thread(() => DoDiscBuild(txtData.Text, txtIpBin.Text, cdTracks, txtOutdir.Text)); _worker.Start(); } else { MessageBox.Show("Not ready to build disc. Please provide more information above.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }