AmandaInterface.mainForm.deleteToolStripMenuItem_Click C# (CSharp) Method

deleteToolStripMenuItem_Click() private method

private deleteToolStripMenuItem_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        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;
            }
        }