Exemple #1
0
 /// <summary>
 /// Checks permission and disposes a container (does not post changes!)
 /// </summary>
 public void Dispose(bool OverridePermissions = false)
 {
     if (OverridePermissions || CswNbtObjClassContainer.canContainer(_CswNbtResources, _CswNbtResources.Actions[CswEnumNbtActionName.DisposeContainer], _Container.getPermissionGroupId()))
     {
         _ContainerDispenseTransactionBuilder.create(CswEnumNbtContainerDispenseType.Dispose, -_Container.Quantity.Quantity, _Container.Quantity.UnitId, SrcContainer: _Container);
         _Container.Quantity.Quantity = 0;
         _Container.Disposed.Checked  = CswEnumTristate.True;
         _Container.CreateContainerLocationNode(CswEnumNbtContainerLocationTypeOptions.Dispose);
         _Container.Node.IconFileNameOverride = "x.png";
         _Container.Node.Searchable           = false;
     }
 }