Select() public method

Selects an item in the ListBox according to its index.
public Select ( int i ) : void
i int the index to select.
return void
Ejemplo n.º 1
0
 public void SelectingThemePageLoadsSettings()
 {
     ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm);
     listViewTester.Select("Theme");
     ButtonTester buttonTester = new ButtonTester("btnThemeNew", _optionsForm);
     Assert.That(buttonTester.Text, Does.Match("New"));
 }
 public void SelectingTabsPanelPageLoadsSettings()
 {
     ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm);
     listViewTester.Select("Tabs & Panels");
     CheckBoxTester checkboxTester = new CheckBoxTester("chkAlwaysShowPanelTabs", _optionsForm);
     Assert.That(checkboxTester.Text, Does.Match("Always show panel tabs"));
 }
 public void SelectingAdvancedPageLoadsSettings()
 {
     ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm);
     listViewTester.Select("Advanced");
     CheckBoxTester checkboxTester = new CheckBoxTester("chkWriteLogFile", _optionsForm);
     Assert.That(checkboxTester.Text, Does.Match("Write log file"));
 }
Ejemplo n.º 4
0
 public void SelectingSQLPageLoadsSettings()
 {
     ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm);
     listViewTester.Select("SQL Server");
     CheckBoxTester checkboxTester = new CheckBoxTester("chkUseSQLServer", _optionsForm);
     Assert.That(checkboxTester.Text, Does.Match("Use SQL"));
 }
Ejemplo n.º 5
0
 public void SelectingUpdatesPageLoadsSettings()
 {
     ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm);
     listViewTester.Select("Updates");
     CheckBoxTester checkboxTester = new CheckBoxTester("chkCheckForUpdatesOnStartup", _optionsForm);
     Assert.That(checkboxTester.Text, Does.Match("Check for updates"));
 }
 public void SelectingConnectionsPageLoadsSettings()
 {
     ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm);
     listViewTester.Select("Connections");
     CheckBoxTester checkboxTester = new CheckBoxTester("chkSingleClickOnConnectionOpensIt", _optionsForm);
     Assert.That(checkboxTester.Text, Does.Match("Single click on connection"));
 }
 public void SelectingAppearancePageLoadsSettings()
 {
     ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm);
     listViewTester.Select("Appearance");
     CheckBoxTester checkboxTester = new CheckBoxTester("chkShowSystemTrayIcon", _optionsForm);
     Assert.That(checkboxTester.Text, Does.Match("show notification area icon"));
 }
 public void SelectingStartupExitPageLoadsSettings()
 {
     ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm);
     listViewTester.Select("Startup/Exit");
     CheckBoxTester checkboxTester = new CheckBoxTester("chkSaveConsOnExit", _optionsForm);
     Assert.That(checkboxTester.Text, Does.Match("Save connections"));
 }
Ejemplo n.º 9
0
 public void ClickOnWhiteSpaceToRightOfEntry_ThenKeyboardNavigate_CorrectEntrySelected()
 {
     ListViewTester l = new ListViewTester("_listView", _window);
     using (MouseController mc = new MouseController(l))
     {
         using (KeyboardController kc = new KeyboardController(l))
         {
             l.Select(0);
             Rectangle r = l.Properties.GetItemRect(1);
             mc.Click(r.Right + 1, r.Top + 1);
             kc.Press("{DOWN}");
             kc.Release("{DOWN}");
         }
     }
     Assert.AreEqual(2, l.Properties.SelectedIndices[0]);
 }
Ejemplo n.º 10
0
		public void NewWord_DictionaryContainsWordEmpty_ContainsBlankAndEmpty()
		{
			//review: I (jh) find this test confusing.  if "empty" is a special word, can
			//someone add a comment explaining it?  Else, why not just use, like, "hello"?

			Application.DoEvents();
			StartWithEmpty();
			ClickAddWord();
			Application.DoEvents();
			var form = "hello";// "(Empty)";
			TypeInLexicalForm(form);
			Application.DoEvents();
			ClickAddWord();
			Application.DoEvents();
			Assert.AreEqual(2, _lexEntryRepository.CountAllItems());
			LexicalFormMustMatch(string.Empty);
			ListViewTester l = new ListViewTester("_recordsListBox", _window);
			// select other entry
			l.Select((l.Properties.SelectedIndices[0] + 1) % 2);
			LexicalFormMustMatch(form);
		}