private void Ext_Link_Click() { FormExternalLink FormWEL = new FormExternalLink(); FormWEL.ShowDialog(); int tempStart = textContent.SelectionStart; if (FormWEL.DialogResult != DialogResult.OK) { return; } if (FormWEL.URL == "" && FormWEL.DisplayText == "") { textContent.SelectionLength = 0; textContent.SelectedText = "<a href=\"\"></a>"; textContent.SelectionStart = tempStart + 11; textContent.SelectionLength = 0; } else { textContent.SelectionLength = 0; textContent.SelectedText = "<a href=\"" + FormWEL.URL + "\">" + FormWEL.DisplayText + "</a>"; } textContent.Focus(); }
private void Bookmark_Click() { FormExternalLink FormWEL = new FormExternalLink(Lan.g(this, "Insert Internal Bookmark"), Lan.g(this, "ID")); FormWEL.ShowDialog(); int tempStart = textContent.SelectionStart; if (FormWEL.DialogResult != DialogResult.OK) { return; } if (FormWEL.URL == "" && FormWEL.DisplayText == "") { textContent.SelectionLength = 0; textContent.SelectedText = "<a href=\"#\"></a>\n<div id=\"\"></div>"; textContent.SelectionStart = tempStart + 12; textContent.SelectionLength = 0; } else { textContent.SelectionLength = 0; textContent.SelectedText = "<a href=\"#" + FormWEL.URL + "\">" + FormWEL.DisplayText + "</a>\n<div id=\"" + FormWEL.URL + "\"></div>"; } textContent.Focus(); }