1 write to _toolStripTextBox
System.Windows.Forms.Tests (1)
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
14_toolStripTextBox = new();
245 references to _toolStripTextBox
System.Windows.Forms.Tests (245)
System\Windows\Forms\ToolStripTextBoxTests.cs (245)
19_toolStripTextBox.Dispose(); 27_toolStripTextBox.Name = name; 28_toolStripTextBox.Name.Should().Be(name); 56_toolStripTextBox.BackgroundImage = image; 57_toolStripTextBox.BackgroundImage.Should().Be(image); 59_toolStripTextBox.BackgroundImage = null; 60_toolStripTextBox.BackgroundImage.Should().BeNull(); 69_toolStripTextBox.BackgroundImageLayout = imageLayout; 70_toolStripTextBox.BackgroundImageLayout.Should().Be(imageLayout); 77_toolStripTextBox.AcceptsTabChanged += (sender, e) => eventRaised = true; 79_toolStripTextBox.AcceptsTab = true; 80_toolStripTextBox.AcceptsTab.Should().BeTrue(); 85_toolStripTextBox.AcceptsTab = true; 86_toolStripTextBox.AcceptsTab.Should().BeTrue(); 89_toolStripTextBox.AcceptsTab = false; 90_toolStripTextBox.AcceptsTab.Should().BeFalse(); 99_toolStripTextBox.HideSelectionChanged += (sender, args) => eventRaised = true; 100_toolStripTextBox.HideSelection = !_toolStripTextBox.HideSelection; 109_toolStripTextBox.Modified = modified; 110_toolStripTextBox.Modified.Should().Be(modified); 117_toolStripTextBox.Multiline = multiline; 118_toolStripTextBox.Multiline.Should().Be(multiline); 125_toolStripTextBox.TextBoxTextAlignChanged += (sender, e) => eventRaised = true; 126_toolStripTextBox.TestAccessor().Dynamic.HandleTextBoxTextAlignChanged(null, EventArgs.Empty); 135_toolStripTextBox.AcceptsTabChanged += (sender, e) => eventRaised = true; 136_toolStripTextBox.TestAccessor().Dynamic.OnAcceptsTabChanged(EventArgs.Empty); 145_toolStripTextBox.BorderStyleChanged += (sender, e) => eventRaised = true; 146_toolStripTextBox.TestAccessor().Dynamic.OnBorderStyleChanged(EventArgs.Empty); 155_toolStripTextBox.HideSelectionChanged += (sender, e) => eventRaised = true; 156_toolStripTextBox.TestAccessor().Dynamic.OnHideSelectionChanged(EventArgs.Empty); 165_toolStripTextBox.ModifiedChanged += (sender, e) => eventRaised = true; 166_toolStripTextBox.TestAccessor().Dynamic.OnModifiedChanged(EventArgs.Empty); 175_toolStripTextBox.MultilineChanged += (sender, e) => eventRaised = true; 176_toolStripTextBox.TestAccessor().Dynamic.OnMultilineChanged(EventArgs.Empty); 184_toolStripTextBox.Font = ToolStripManager.DefaultFont; 185bool result = _toolStripTextBox.TestAccessor().Dynamic.ShouldSerializeFont(); 188_toolStripTextBox.Font = new Font("Arial", 8.25f); 189result = _toolStripTextBox.TestAccessor().Dynamic.ShouldSerializeFont(); 197_toolStripTextBox.AcceptsReturn = acceptsReturn; 198_toolStripTextBox.AcceptsReturn.Should().Be(acceptsReturn); 205_toolStripTextBox.AutoCompleteCustomSource = collection; 206_toolStripTextBox.AutoCompleteCustomSource.Should().BeEquivalentTo(collection); 209_toolStripTextBox.AutoCompleteCustomSource = newCollection; 210_toolStripTextBox.AutoCompleteCustomSource.Should().BeEquivalentTo(newCollection); 218_toolStripTextBox.AutoCompleteSource = autoCompleteSource; 219_toolStripTextBox.AutoCompleteSource.Should().Be(autoCompleteSource); 227_toolStripTextBox.BorderStyle = borderStyle; 228_toolStripTextBox.BorderStyle.Should().Be(borderStyle); 236_toolStripTextBox.CharacterCasing = characterCasing; 237_toolStripTextBox.CharacterCasing.Should().Be(characterCasing); 247_toolStripTextBox.Multiline = multiline; 248_toolStripTextBox.Lines = inputLines; 249_toolStripTextBox.Lines.Should().Equal(inputLines ?? Array.Empty<string>()); 257_toolStripTextBox.MaxLength = maxLength; 258_toolStripTextBox.MaxLength.Should().Be(maxLength); 265_toolStripTextBox.ReadOnly = readOnly; 266_toolStripTextBox.ReadOnly.Should().Be(readOnly); 275_toolStripTextBox.Text = initialText; 276_toolStripTextBox.SelectionStart = selectionStart; 277_toolStripTextBox.SelectionLength = selectionLength; 278_toolStripTextBox.SelectedText.Should().Be(expectedSelectedText); 290_toolStripTextBox.Text = new string('a', textLength.Value); 291_toolStripTextBox.SelectionLength = textLength.Value; 292_toolStripTextBox.SelectionLength.Should().Be(textLength.Value); 296_toolStripTextBox.Invoking(t => t.Text = null).Should().NotThrow(); 297_toolStripTextBox.Text.Should().BeNullOrEmpty(); 307_toolStripTextBox.Text = "0123456789"; 308_toolStripTextBox.SelectionStart = value; 309_toolStripTextBox.SelectionStart.Should().Be(value); 316_toolStripTextBox.ShortcutsEnabled = shortcutsEnabled; 317_toolStripTextBox.ShortcutsEnabled.Should().Be(shortcutsEnabled); 327_toolStripTextBox.Text = text; 328_toolStripTextBox.TextLength.Should().Be(expectedLength); 337_toolStripTextBox.TextBoxTextAlign = textAlign; 338_toolStripTextBox.TextBoxTextAlign.Should().Be(textAlign); 345_toolStripTextBox.WordWrap = wordWrap; 346_toolStripTextBox.WordWrap.Should().Be(wordWrap); 355sender.Should().Be(_toolStripTextBox); 360_toolStripTextBox.AcceptsTabChanged += handler; 361_toolStripTextBox.AcceptsTab = !_toolStripTextBox.AcceptsTab; 364_toolStripTextBox.AcceptsTabChanged -= handler; 365_toolStripTextBox.AcceptsTab = !_toolStripTextBox.AcceptsTab; 376_toolStripTextBox.AcceptsTabChanged += handler1; 377_toolStripTextBox.AcceptsTabChanged += handler2; 378_toolStripTextBox.AcceptsTab = !_toolStripTextBox.AcceptsTab; 382_toolStripTextBox.AcceptsTabChanged -= handler1; 383_toolStripTextBox.AcceptsTab = !_toolStripTextBox.AcceptsTab; 387_toolStripTextBox.AcceptsTabChanged -= handler2; 388_toolStripTextBox.AcceptsTab = !_toolStripTextBox.AcceptsTab; 399sender.Should().BeSameAs(_toolStripTextBox); 404_toolStripTextBox.BorderStyleChanged += handler; 405_toolStripTextBox.BorderStyle = BorderStyle.None; 407_toolStripTextBox.BorderStyle.Should().Be(BorderStyle.None); 409_toolStripTextBox.BorderStyleChanged -= handler; 410_toolStripTextBox.BorderStyle = BorderStyle.Fixed3D; 412_toolStripTextBox.BorderStyle.Should().Be(BorderStyle.Fixed3D); 422_toolStripTextBox.BorderStyleChanged += handler1; 423_toolStripTextBox.BorderStyleChanged += handler2; 424_toolStripTextBox.BorderStyle = BorderStyle.None; 427_toolStripTextBox.BorderStyle.Should().Be(BorderStyle.None); 429_toolStripTextBox.BorderStyleChanged -= handler1; 430_toolStripTextBox.BorderStyle = BorderStyle.Fixed3D; 433_toolStripTextBox.BorderStyle.Should().Be(BorderStyle.Fixed3D); 435_toolStripTextBox.BorderStyleChanged -= handler2; 436_toolStripTextBox.BorderStyle = BorderStyle.None; 439_toolStripTextBox.BorderStyle.Should().Be(BorderStyle.None); 448sender.Should().Be(_toolStripTextBox); 453_toolStripTextBox.HideSelectionChanged += handler; 454_toolStripTextBox.HideSelection = false; 456_toolStripTextBox.HideSelection.Should().BeFalse(); 458_toolStripTextBox.HideSelectionChanged -= handler; 459_toolStripTextBox.HideSelection = true; 461_toolStripTextBox.HideSelection.Should().BeTrue(); 471_toolStripTextBox.HideSelectionChanged += handler1; 472_toolStripTextBox.HideSelectionChanged += handler2; 473_toolStripTextBox.HideSelection = false; 476_toolStripTextBox.HideSelection.Should().BeFalse(); 478_toolStripTextBox.HideSelectionChanged -= handler1; 479_toolStripTextBox.HideSelection = true; 482_toolStripTextBox.HideSelection.Should().BeTrue(); 484_toolStripTextBox.HideSelectionChanged -= handler2; 485_toolStripTextBox.HideSelection = false; 488_toolStripTextBox.HideSelection.Should().BeFalse(); 497sender.Should().Be(_toolStripTextBox); 502_toolStripTextBox.ModifiedChanged += handler; 503_toolStripTextBox.Modified = true; 505_toolStripTextBox.Modified.Should().BeTrue(); 507_toolStripTextBox.ModifiedChanged -= handler; 508_toolStripTextBox.Modified = false; 510_toolStripTextBox.Modified.Should().BeFalse(); 520_toolStripTextBox.ModifiedChanged += handler1; 521_toolStripTextBox.ModifiedChanged += handler2; 522_toolStripTextBox.Modified = true; 525_toolStripTextBox.Modified.Should().BeTrue(); 527_toolStripTextBox.ModifiedChanged -= handler1; 528_toolStripTextBox.Modified = false; 531_toolStripTextBox.Modified.Should().BeFalse(); 533_toolStripTextBox.ModifiedChanged -= handler2; 534_toolStripTextBox.Modified = true; 537_toolStripTextBox.Modified.Should().BeTrue(); 546sender.Should().Be(_toolStripTextBox); 551_toolStripTextBox.MultilineChanged += handler; 552_toolStripTextBox.Multiline = true; 554_toolStripTextBox.Multiline.Should().BeTrue(); 556_toolStripTextBox.MultilineChanged -= handler; 557_toolStripTextBox.Multiline = false; 559_toolStripTextBox.Multiline.Should().BeFalse(); 569_toolStripTextBox.MultilineChanged += handler1; 570_toolStripTextBox.MultilineChanged += handler2; 571_toolStripTextBox.Multiline = true; 574_toolStripTextBox.Multiline.Should().BeTrue(); 576_toolStripTextBox.MultilineChanged -= handler1; 577_toolStripTextBox.Multiline = false; 580_toolStripTextBox.Multiline.Should().BeFalse(); 582_toolStripTextBox.MultilineChanged -= handler2; 583_toolStripTextBox.Multiline = true; 586_toolStripTextBox.Multiline.Should().BeTrue(); 595sender.Should().Be(_toolStripTextBox); 600_toolStripTextBox.ReadOnlyChanged += handler; 601_toolStripTextBox.ReadOnly = true; 603_toolStripTextBox.ReadOnly.Should().BeTrue(); 605_toolStripTextBox.ReadOnlyChanged -= handler; 606_toolStripTextBox.ReadOnly = false; 608_toolStripTextBox.ReadOnly.Should().BeFalse(); 618_toolStripTextBox.ReadOnlyChanged += handler1; 619_toolStripTextBox.ReadOnlyChanged += handler2; 620_toolStripTextBox.ReadOnly = true; 623_toolStripTextBox.ReadOnly.Should().BeTrue(); 625_toolStripTextBox.ReadOnlyChanged -= handler1; 626_toolStripTextBox.ReadOnly = false; 629_toolStripTextBox.ReadOnly.Should().BeFalse(); 631_toolStripTextBox.ReadOnlyChanged -= handler2; 632_toolStripTextBox.ReadOnly = true; 635_toolStripTextBox.ReadOnly.Should().BeTrue(); 644sender.Should().Be(_toolStripTextBox); 649_toolStripTextBox.TextBoxTextAlignChanged += handler; 650_toolStripTextBox.TextBoxTextAlign = HorizontalAlignment.Center; 652_toolStripTextBox.TextBoxTextAlign.Should().Be(HorizontalAlignment.Center); 654_toolStripTextBox.TextBoxTextAlignChanged -= handler; 655_toolStripTextBox.TextBoxTextAlign = HorizontalAlignment.Left; 657_toolStripTextBox.TextBoxTextAlign.Should().Be(HorizontalAlignment.Left); 667_toolStripTextBox.TextBoxTextAlignChanged += handler1; 668_toolStripTextBox.TextBoxTextAlignChanged += handler2; 669_toolStripTextBox.TextBoxTextAlign = HorizontalAlignment.Center; 672_toolStripTextBox.TextBoxTextAlign.Should().Be(HorizontalAlignment.Center); 674_toolStripTextBox.TextBoxTextAlignChanged -= handler1; 675_toolStripTextBox.TextBoxTextAlign = HorizontalAlignment.Left; 678_toolStripTextBox.TextBoxTextAlign.Should().Be(HorizontalAlignment.Left); 680_toolStripTextBox.TextBoxTextAlignChanged -= handler2; 681_toolStripTextBox.TextBoxTextAlign = HorizontalAlignment.Center; 684_toolStripTextBox.TextBoxTextAlign.Should().Be(HorizontalAlignment.Center); 690_toolStripTextBox.AppendText("Hello"); 691_toolStripTextBox.Text.Should().Be("Hello"); 697_toolStripTextBox.Text = "Hello"; 698_toolStripTextBox.Clear(); 699_toolStripTextBox.Text.Should().BeEmpty(); 705_toolStripTextBox.Text = "Hello"; 706_toolStripTextBox.ClearUndo(); 707_toolStripTextBox.Undo(); 708_toolStripTextBox.Text.Should().Be("Hello"); 714_toolStripTextBox.Text = "Hello"; 715_toolStripTextBox.SelectAll(); 716_toolStripTextBox.DeselectAll(); 717_toolStripTextBox.SelectionLength.Should().Be(0); 728_toolStripTextBox.Text = text; 729char result = _toolStripTextBox.GetCharFromPosition(new Point(x, y)); 736_toolStripTextBox.Text = "Hello"; 737int result = _toolStripTextBox.GetCharIndexFromPosition(new Point(1, 1)); 744_toolStripTextBox.Multiline = true; 745_toolStripTextBox.Text = "Hello\r\nWorld\r\nTest"; 747_toolStripTextBox.GetFirstCharIndexFromLine(0).Should().Be(0); 748_toolStripTextBox.GetFirstCharIndexFromLine(1).Should().Be(7); 749_toolStripTextBox.GetFirstCharIndexFromLine(2).Should().Be(14); 755_toolStripTextBox.Multiline = true; 756_toolStripTextBox.Text = "Hello\r\nWorld\r\nTest"; 757_toolStripTextBox.SelectionStart = 7; 759_toolStripTextBox.GetFirstCharIndexOfCurrentLine().Should().Be(7); 765_toolStripTextBox.Multiline = true; 766_toolStripTextBox.Text = "Hello\r\nWorld\r\nTest"; 768_toolStripTextBox.GetLineFromCharIndex(0).Should().Be(0); 769_toolStripTextBox.GetLineFromCharIndex(7).Should().Be(1); 770_toolStripTextBox.GetLineFromCharIndex(14).Should().Be(2); 776_toolStripTextBox.Text = "Hello World"; 778_toolStripTextBox.GetPositionFromCharIndex(0).Should().Be(new Point(1, 0)); 779_toolStripTextBox.GetPositionFromCharIndex(5).Should().Be(new Point(29, 0)); 780_toolStripTextBox.GetPositionFromCharIndex(10).Should().Be(new Point(57, 0)); 786_toolStripTextBox.Text = "Hello\nWorld"; 787_toolStripTextBox.SelectionStart = _toolStripTextBox.Text.Length; 788_toolStripTextBox.ScrollToCaret(); 789Point position = _toolStripTextBox.GetPositionFromCharIndex(_toolStripTextBox.SelectionStart); 790position.Y.Should().BeLessOrEqualTo(_toolStripTextBox.Height); 796_toolStripTextBox.Text = "Hello World"; 797_toolStripTextBox.Select(6, 5); 798_toolStripTextBox.SelectedText.Should().Be("World"); 804_toolStripTextBox.Text = "Hello World"; 805_toolStripTextBox.SelectAll(); 806_toolStripTextBox.SelectedText.Should().Be("Hello World");