33 references to SelectionService
System.Windows.Forms.Design (32)
System\Windows\Forms\Design\ToolStripDesigner.cs (32)
419if (ToolStrip.Visible != value && !SelectionService.GetComponentSelected(ToolStrip)) 605SelectionService.SetSelectedComponents(null, SelectionTypes.Replace); 613SelectionService.SetSelectedComponents(new IComponent[] { item }, SelectionTypes.Replace); 622SelectionService.SetSelectedComponents(null, SelectionTypes.Replace); 704object comp = SelectionService.PrimarySelection; 781if (SelectionService.PrimarySelection is ToolStripDropDownItem selectedItem) 809if (SelectionService.PrimarySelection is ToolStripItem toolItem) 880if (SelectionService.PrimarySelection is ToolStripItem selectedItem) 937object selectedItem = SelectionService.PrimarySelection; 1059SelectionService.SetSelectedComponents(null, SelectionTypes.Replace); 1063SelectionService.SetSelectedComponents(new IComponent[] { targetSelection }, SelectionTypes.Replace); 1212IComponent selectedItem = SelectionService.PrimarySelection as IComponent; 1252object primarySelection = SelectionService.PrimarySelection; 1330ICollection selComponents = SelectionService.GetSelectedComponents(); 1433SelectionService.SelectionChanging += SelSvc_SelectionChanging; 1434SelectionService.SelectionChanged += SelSvc_SelectionChanged; 1794Component selComp = SelectionService.PrimarySelection as Component; 1934SelectionService.SetSelectedComponents(new IComponent[] { primaryItem }, SelectionTypes.Primary | SelectionTypes.Replace); 1991if (!SelectionService.GetComponentSelected(ToolStrip)) 2018if (SelectionService.PrimarySelection is ToolStripItem curSel && curSel.IsOnOverflow) 2023SelectionService.SetSelectedComponents(new IComponent[] { nextItem }, SelectionTypes.Replace); 2048if (!(SelectionService.PrimarySelection is ToolStripItem curSel) || (curSel is not null && !curSel.IsOnOverflow)) 2053SelectionService.SetSelectedComponents(new IComponent[] { nextItem }, SelectionTypes.Replace); 2069&& SelectionService.GetComponentSelected(item) 2151if (SelectionService.PrimarySelection is ToolStripDropDownItem selectedItem) 2171if (CheckIfItemSelected() || SelectionService.GetComponentSelected(ToolStrip)) 2183if (SelectionService.GetComponentSelected(ToolStrip)) 2317if (!showToolStrip && !SelectionService.GetComponentSelected(ToolStrip)) 2348bool showToolStrip = itemSelected || SelectionService.GetComponentSelected(ToolStrip); 2354if (SelectionService.GetComponentSelected(ToolStrip)) 2381if (_editorNode is not null && (SelectionService.PrimarySelection == ToolStrip || itemSelected)) 2494if (!_addingDummyItem && !_disposed && (CheckIfItemSelected() || SelectionService.GetComponentSelected(ToolStrip)))
System.Windows.Forms.Design.Tests (1)
ToolStripDesignerTests.cs (1)
67Assert.NotNull(toolStripDesigner.SelectionService);