private void InputBox_Load(object sender, EventArgs e) { // when the dialog loads, set its members' values with the properties of the current instance lblPrompt.Text = FormPrompt; Text = FormCaption; txtInput.SelectionStart = 0; txtInput.SelectionLength = txtInput.Text.Length; txtInput.Focus(); btnOK.Enabled = false; Response = new SaveDialogResponse(); Tools.PopulateFoldersForComboBox(cmbSaveFolder, true); // let's also check if we had to add the default folder if (cmbSaveFolder.Items.Cast<Document>().Any(doc => doc.Id == "draft" && doc.Title == "Nocs")) { Response.CreateDefaultFolder = true; } }
public void SaveAs(SaveDialogResponse response) { Save(response.Folder, response.DocumentName, true, response.CreateDefaultFolder); }