private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
{
if (ActiveControl.Name == "tbRun")
{
int SelectionIndex = tbRun.SelectionStart;
int SelectionCount = tbRun.SelectionLength;
tbRun.Text = tbRun.Text.Remove(SelectionIndex, SelectionCount);
tbRun.SelectionStart = SelectionIndex;
}
else
{
int SelectionIndex = fileManager.SelectedTabTextBox.SelectionStart;
int SelectionCount = fileManager.SelectedTabTextBox.SelectionLength;
fileManager.SelectedTabTextBox.Text = fileManager.SelectedTabTextBox.Text.Remove(SelectionIndex, SelectionCount);
fileManager.SelectedTabTextBox.SelectionStart = SelectionIndex;
}
}