예제 #1
0
 private void addToExistingRunnersButton_Click(object sender, EventArgs e)
 {
     if (RunnerAliasesHelper.AddRunner(newRunnerNameTextBox.Text))
     {
         LoadData(existingRunnersListBox.Items.Count);
     }
 }
예제 #2
0
 private void addAliasButton_Click(object sender, EventArgs e)
 {
     if (RunnerAliasesHelper.AddAlias(newAliasTextBox.Text, existingRunnersListBox.SelectedItem.ToString()))
     {
         LoadData(existingRunnersListBox.SelectedIndex);
     }
 }
예제 #3
0
 private void LoadData(int selectedRunnerIndex = 0, bool clearTextBoxes = true)
 {
     _runnerAliases = RunnerAliasesHelper.LoadAllRunners();
     existingRunnersListBox.DataSource    = _runnerAliases.Keys.ToList();
     existingRunnersListBox.SelectedIndex = selectedRunnerIndex;
     newRunnerNameTextBox.Text            = string.Empty;
     newAliasTextBox.Text = string.Empty;
     SetAliases();
 }