private void edit_code_button_Click(object sender, EventArgs e) { var form = new CodeInsertForm(); form.Code = SelectedContent.Properties["code"]; var result = form.ShowDialog(this); if (result == DialogResult.OK) { SelectedContent.Properties["code"] = form.Code; SelectedContent.Properties.Remove("html"); OnContentEdited(); } }
public override DialogResult CreateContent(IWin32Window dialogOwner, ISmartContent newContent) { var form = new CodeInsertForm(); var result = form.ShowDialog(dialogOwner); if (result == DialogResult.OK) { if (form.Code.Trim().Length == 0) { return(DialogResult.Cancel); } newContent.Properties["code"] = form.Code; } return(result); }
public override DialogResult CreateContent(IWin32Window dialogOwner, ISmartContent newContent) { var form = new CodeInsertForm(); var result = form.ShowDialog(dialogOwner); if (result == DialogResult.OK) { if (form.Code.Trim().Length == 0) return DialogResult.Cancel; newContent.Properties["code"] = form.Code; } return result; }