System.ComponentModel.Design.DesignerTransaction.Commit C# (CSharp) Method

Commit() public method

public Commit ( ) : void
return void
        public void Commit() {
            if (!committed && !canceled) {
                committed = true;
                GC.SuppressFinalize(this);
                suppressedFinalization = true;
                OnCommit();
            }
        }
        

Usage Example

 private void EndTransaction(object obj, System.ComponentModel.Design.DesignerTransaction tran, object oldValue, object newValue, bool commit)
 {
     if (tran == null)
     {
         this.OnValueChanged(obj, new PropertyChangedEventArgs(this.Name));
         return;
     }
     if (commit)
     {
         IComponent component = obj as IComponent;
         System.ComponentModel.Design.IComponentChangeService componentChangeService = (System.ComponentModel.Design.IComponentChangeService)component.Site.GetService(typeof(System.ComponentModel.Design.IComponentChangeService));
         if (componentChangeService != null)
         {
             componentChangeService.OnComponentChanged(component, this, oldValue, newValue);
         }
         tran.Commit();
         this.OnValueChanged(obj, new PropertyChangedEventArgs(this.Name));
     }
     else
     {
         tran.Cancel();
     }
 }
All Usage Examples Of System.ComponentModel.Design.DesignerTransaction::Commit