1 implementation of CreateTransaction
System.Windows.Forms.Design (1)
System\ComponentModel\Design\DesignerHost.cs (1)
994DesignerTransaction IDesignerHost.CreateTransaction(string description) =>
147 references to CreateTransaction
DesignSurface (1)
CustomControls\CustomButtonDesignerActionList.cs (1)
77using DesignerTransaction t = _host.CreateTransaction(designerVerb.Text);
System.Windows.Forms (4)
System\Windows\Forms\ActiveX\AxHost.cs (1)
3023transaction = host?.CreateTransaction(SR.AXEditProperties);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (1)
275DesignerTransaction? transaction = host?.CreateTransaction(string.Format(SR.PropertyGridResetValue, PropertyName));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (2)
570transaction = host?.CreateTransaction(undoText ?? string.Format(SR.PropertyGridSetValue, PropertyDescriptor.Name)); 847transaction = host.CreateTransaction(string.Format(
System.Windows.Forms.Design (84)
System\ComponentModel\Design\CollectionEditor.cs (1)
244transaction = host?.CreateTransaction(string.Format(SR.CollectionEditorUndoBatchDesc, CollectionItemType.Name));
System\ComponentModel\Design\ComponentDesigner.cs (1)
291t = host.CreateTransaction(string.Format(SR.ComponentDesignerAddEvent, defaultEvent.Name));
System\ComponentModel\Design\DesignerHost.cs (2)
992((IDesignerHost)this).CreateTransaction(SR.DesignerHostGenericTransactionName); 1020using (t = ((IDesignerHost)this).CreateTransaction(string.Format(SR.DesignerHostDestroyComponentTransaction, name)))
System\ComponentModel\Design\EventBindingService.EventPropertyDescriptor.cs (1)
215transaction = host.CreateTransaction(string.Format(SR.EventBindingServiceSetValue, site.Name, name));
System\ComponentModel\Design\ToolStripContainerActionList.cs (1)
147DesignerTransaction? changeParent = _designerHost.CreateTransaction(string.Format(SR._0_reparent_controls_transaction, nameof(ToolStripContainer)));
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (2)
381transSource = _srcHost.CreateTransaction(transDesc); 386transTarget = _destHost.CreateTransaction(transDesc);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (1)
252_resizeTransaction = host.CreateTransaction(locString);
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (1)
119_resizeTransaction = host.CreateTransaction(string.Format(SR.TableLayoutPanelRowColResize, (isColumn ? "Column" : "Row"), _designer.Control.Site.Name));
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (1)
36DesignerTransaction changeParent = _host.CreateTransaction("Add ToolStripContainer Transaction");
System\Windows\Forms\Design\CommandSet.cs (12)
784? host.CreateTransaction(string.Format(SR.DragDropMoveComponents, SelectionService.SelectionCount)) 785: host.CreateTransaction(string.Format(SR.DragDropMoveComponent, comp.Site?.Name)); 990trans = host?.CreateTransaction(string.Format(SR.CommandSetAlignByPrimary, comps.Count)); 1138trans = host.CreateTransaction(string.Format(SR.CommandSetAlignToGrid, selectedComponents.Count)); 1265trans = host.CreateTransaction(batchString); 1474trans = host.CreateTransaction(string.Format(SR.CommandSetCutMultiple, cutCount)); 1605trans = host.CreateTransaction(desc); 1860using DesignerTransaction trans = host.CreateTransaction(SR.CommandSetPaste); 2320trans = host?.CreateTransaction(string.Format(SR.CommandSetSize, selectedObjects.Length)); 2399trans = host.CreateTransaction(string.Format(SR.CommandSetSizeToGrid, selectedObjects.Length)); 2483trans = host.CreateTransaction(string.Format(SR.CommandSetPaste, 0)); 2536trans = host.CreateTransaction(string.Format(SR.CommandSetFormatSpacing, selectedObjects.Length));
System\Windows\Forms\Design\ComponentTray.cs (4)
305t = host.CreateTransaction(SR.TrayShowLargeIcons); 321t = host.CreateTransaction(SR.TrayLineUpIcons); 410t = host.CreateTransaction(SR.TrayAutoArrange); 2502trans = host.CreateTransaction(string.Format(SR.WindowsFormsAddEvent, defaultEvent.Name));
System\Windows\Forms\Design\ControlCommandSet.cs (4)
600trans = host.CreateTransaction(string.Format(SR.DragDropSizeComponents, selSvc.SelectionCount)); 604trans = host.CreateTransaction(string.Format(SR.DragDropSizeComponent, comp.Site.Name)); 862trans = host.CreateTransaction(string.Format(SR.CommandSetLockControls, components.Count)); 1008trans = designerHost.CreateTransaction(batchString);
System\Windows\Forms\Design\ControlDesigner.DockingActionList.cs (1)
61using DesignerTransaction t = _host.CreateTransaction(designerVerb.Text);
System\Windows\Forms\Design\DataGridViewDesigner.cs (11)
748DesignerTransaction? transaction = host?.CreateTransaction(SR.DataGridViewEditColumnsTransactionString); 771DesignerTransaction? transaction = host?.CreateTransaction(SR.DataGridViewAddColumnTransactionString); 845DesignerTransaction? transaction = host?.CreateTransaction(string.Format(SR.DataGridViewChooseDataSourceTransactionString, dataGridView.Name)); 927transaction = host?.CreateTransaction(SR.DataGridViewEnableAddingTransactionString); 931transaction = host?.CreateTransaction(SR.DataGridViewDisableAddingTransactionString); 970transaction = host?.CreateTransaction(SR.DataGridViewEnableDeletingTransactionString); 974transaction = host?.CreateTransaction(SR.DataGridViewDisableDeletingTransactionString); 1013transaction = host?.CreateTransaction(SR.DataGridViewEnableColumnReorderingTransactionString); 1017transaction = host?.CreateTransaction(SR.DataGridViewDisableColumnReorderingTransactionString); 1056transaction = host?.CreateTransaction(SR.DataGridViewEnableEditingTransactionString); 1060transaction = host?.CreateTransaction(SR.DataGridViewDisableEditingTransactionString);
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
1280DesignerTransaction? trans = _designerHost.CreateTransaction(string.Format(SR.DesignerBatchCreateTool, uniqueSiteName));
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
568? host.CreateTransaction(GetTransactionDescription(performCopy))
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
231trans = host.CreateTransaction(string.Format(SR.DragDropMoveComponents, _components.Length));
System\Windows\Forms\Design\OleDragDropHandler.cs (3)
155trans = host?.CreateTransaction(string.Format(SR.DesignerBatchCreateTool, tool)); 524trans = host.CreateTransaction(string.Format(SR.DragDropDragComponents, components.Length)); 732trans = host.CreateTransaction(SR.DragDropDropComponents);
System\Windows\Forms\Design\ParentControlDesigner.cs (1)
2134using DesignerTransaction dt = host.CreateTransaction(transactionName);
System\Windows\Forms\Design\SelectionUIService.cs (3)
1022_dragTransaction = _host.CreateTransaction(transactionName); 1126trans = _host.CreateTransaction(string.Format(SR.DragDropMoveComponents, components.Length)); 1132trans = _host.CreateTransaction(string.Format(SR.DragDropMoveComponent, comp.Site!.Name));
System\Windows\Forms\Design\StandardMenuStripVerb.cs (2)
105DesignerTransaction createMenu = _host.CreateTransaction(SR.StandardMenuCreateDesc); 280DesignerTransaction createMenu = _host.CreateTransaction(SR.StandardMenuCreateDesc);
System\Windows\Forms\Design\TabControlDesigner.cs (2)
250t = host.CreateTransaction(string.Format(SR.TabControlAddTab, Component.Site.Name)); 345t = host.CreateTransaction(string.Format(SR.TabControlRemoveTab, ((IComponent)tp).Site.Name, Component.Site.Name));
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (7)
505trans = host.CreateTransaction(string.Format(SR.BehaviorServiceCopyControl, control.Site.Name)); 524trans = host.CreateTransaction(string.Format(SR.TableLayoutPanelDesignerControlsSwapped, control.Site.Name, existingControl.Site.Name)); 552trans = host.CreateTransaction(string.Format(SR.BehaviorServiceMoveControl, control.Site.Name)); 1639using DesignerTransaction t = host.CreateTransaction( 1755using DesignerTransaction t = host.CreateTransaction(string.Format( 1878using DesignerTransaction t = host.CreateTransaction(string.Format( 1975using DesignerTransaction t = host.CreateTransaction(string.Format(SR.TableLayoutPanelDesignerChangeSizeTypeUndoUnit, Table.Site.Name));
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (1)
69DesignerTransaction newItemTransaction = designerHost.CreateTransaction(SR.ToolStripAddingItem);
System\Windows\Forms\Design\ToolStripDesigner.cs (5)
510NewItemTransaction = _host.CreateTransaction(SR.ToolStripCreatingNewItemTransaction); 566DesignerTransaction outerTransaction = _host.CreateTransaction(string.Format(SR.ToolStripAddingItem, t.Name)); 999_insertMenuItemTransaction = _pendingTransaction = _host.CreateTransaction(SR.ToolStripDesignerTransactionAddingItem); 1116_pendingTransaction = _host.CreateTransaction(SR.ToolStripDesignerTransactionRemovingItem); 1853DesignerTransaction changeParent = _host.CreateTransaction(transDesc);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
676DesignerTransaction designerTransaction = designerHost.CreateTransaction(transDesc);
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (4)
386DesignerTransaction newItemTransaction = designerHost.CreateTransaction(SR.ToolStripAddingItem); 437DesignerTransaction newItemTransaction = designerHost.CreateTransaction(SR.ToolStripAddingItem); 476DesignerTransaction newItemTransaction = designerHost.CreateTransaction(SR.ToolStripAddingItem); 516DesignerTransaction newItemTransaction = designerHost.CreateTransaction(SR.ToolStripAddingItem);
System\Windows\Forms\Design\ToolStripItemDesigner.cs (2)
370DesignerTransaction designerTransaction = designerHost.CreateTransaction(SR.ToolStripItemPropertyChangeTransaction); 723DesignerTransaction designerTransaction = host.CreateTransaction(SR.ToolStripMorphingItemTransaction);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (7)
538DesignerTransaction designerTransaction = _designerHost.CreateTransaction(SR.ToolStripItemPropertyChangeTransaction); 791_newMenuItemTransaction ??= _designerHost.CreateTransaction(SR.ToolStripCreatingNewItemTransaction); 856DesignerTransaction outerTransaction = _designerHost.CreateTransaction(SR.ToolStripCreatingNewItemTransaction); 1857mainStripDesigner.InsertTransaction = _designerHost.CreateTransaction(SR.ToolStripInsertingIntoDropDownTransaction); 1866_insertMenuItemTransaction = _designerHost.CreateTransaction(SR.ToolStripInsertingIntoDropDownTransaction); 1981_pendingTransaction = _designerHost.CreateTransaction(SR.ToolStripDesignerTransactionRemovingItem); 2713DesignerTransaction changeParent = host.CreateTransaction(transDesc);
System.Windows.Forms.Design.Tests (58)
System\ComponentModel\Design\CollectionEditorTests.cs (8)
207.Setup(h => h.CreateTransaction("Add or remove Int32 objects")) 254.Setup(h => h.CreateTransaction("Add or remove Int32 objects")) 311.Setup(h => h.CreateTransaction("Add or remove Int32 objects")) 461.Setup(h => h.CreateTransaction("Add or remove Int32 objects")) 566.Setup(h => h.CreateTransaction("Add or remove Int32 objects")) 612.Setup(h => h.CreateTransaction("Add or remove Int32 objects")) 659.Setup(h => h.CreateTransaction("Add or remove Int32 objects")) 702.Setup(h => h.CreateTransaction("Add or remove Int32 objects"))
System\ComponentModel\Design\CollectionFormTests.cs (3)
558.Setup(h => h.CreateTransaction("Add or remove Int32 objects")) 606.Setup(h => h.CreateTransaction("Add or remove Int32 objects")) 664.Setup(h => h.CreateTransaction("Add or remove Int32 objects"))
System\ComponentModel\Design\ComponentDesignerTests.cs (25)
798.Setup(h => h.CreateTransaction(It.IsAny<string>())) 844mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Exactly(3)); 865mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Exactly(6)); 913.Setup(h => h.CreateTransaction(It.IsAny<string>())) 959mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Once()); 972mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Exactly(2)); 1022.Setup(h => h.CreateTransaction(It.IsAny<string>())) 1072mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Once()); 1096mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Exactly(2)); 1130.Setup(h => h.CreateTransaction(It.IsAny<string>())) 1178mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Once()); 1189mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Exactly(2)); 1223.Setup(h => h.CreateTransaction(It.IsAny<string>())) 1271mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Once()); 1282mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Exactly(2)); 1314.Setup(h => h.CreateTransaction(It.IsAny<string>())) 1361mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Once()); 1372mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Exactly(2)); 1408.Setup(h => h.CreateTransaction(It.IsAny<string>())) 1457mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Once()); 1470mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Exactly(2)); 1515.Setup(h => h.CreateTransaction(It.IsAny<string>())) 1564mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Once()); 1577mockDesignerHost.Verify(h => h.CreateTransaction(It.IsAny<string>()), Times.Exactly(2)); 1613.Setup(h => h.CreateTransaction(It.IsAny<string>()))
System\ComponentModel\Design\DesignerHostTests.cs (19)
1896DesignerTransaction transaction1 = host.CreateTransaction(description); 1903DesignerTransaction transaction2 = host.CreateTransaction("CustomDescription"); 1938DesignerTransaction transaction1 = host.CreateTransaction("Description1"); 1943DesignerTransaction transaction2 = host.CreateTransaction("Description2"); 1950DesignerTransaction transaction3 = host.CreateTransaction("Description2"); 1964DesignerTransaction transaction1 = host.CreateTransaction("Description1"); 1965DesignerTransaction transaction2 = host.CreateTransaction("Description2"); 2006DesignerTransaction transaction1 = host.CreateTransaction("Description1"); 2007DesignerTransaction transaction2 = host.CreateTransaction("Description2"); 2055DesignerTransaction transaction3 = host.CreateTransaction("Description1"); 2067DesignerTransaction transaction1 = host.CreateTransaction("Description1"); 2068DesignerTransaction transaction2 = host.CreateTransaction("Description2"); 2077DesignerTransaction transaction1 = host.CreateTransaction("Description1"); 2078DesignerTransaction transaction2 = host.CreateTransaction("Description2"); 2119DesignerTransaction transaction1 = host.CreateTransaction("Description1"); 2120DesignerTransaction transaction2 = host.CreateTransaction("Description2"); 2168DesignerTransaction transaction3 = host.CreateTransaction("Description1"); 2180DesignerTransaction transaction1 = host.CreateTransaction("Description1"); 2181DesignerTransaction transaction2 = host.CreateTransaction("Description2");
System\ComponentModel\Design\DesignSurfaceTests.cs (3)
1206DesignerTransaction transaction = host.CreateTransaction("Transaction1"); 1325DesignerTransaction transaction = host.CreateTransaction("Transaction1"); 1350DesignerTransaction transaction = host.CreateTransaction("Transaction1");