private void OK_Click(object sender, System.EventArgs e) { string fullFileName = UIMisc.CheckFileName(2, FileName, InitialName, ClientDirs.DefaultMobiusUserDocumentsFolder, ".sdf"); if (fullFileName == "") { return; } if (!UIMisc.CanWriteFile(fullFileName, true)) { return; } FileName.Text = fullFileName; if (ExportInBackground.Checked) { // if background export of unc file tell user if we can't write directly to the file if (UIMisc.CanWriteFileFromServiceAccount(fullFileName) == DialogResult.Cancel) { return; } if (_alertExport && UIMisc.PathContainsDrive(fullFileName) == DialogResult.Cancel) { return; } } DialogResult = DialogResult.OK; }