public void DeleteChildCategory(IMasterFormsCategory category)
Public Sub DeleteChildCategory( _ByVal category As IMasterFormsCategory _)
public void deleteChildCategory(IMasterFormsCategory);
public:void DeleteChildCategory(IMasterFormsCategory^ category)
category
The category object to be deleted.
The source code for this interface implementation class is available at <Install Directory>\Examples\DotNet\CS\AutoMasterFormsRepository.
The category directory will be deleted and cannot be restored. If the user wants to do different action he can inherit this class and override this method or do a custom implementation of IMasterFormsCategory. Be advised to have a back up copy of all Master Forms if this used this class, in case you have deleted the wrong Category.
There is no need to call DiskMasterFormsRepository.Refresh since the repository that this category belongs will be updated with this deletion.
//
using Leadtools;using Leadtools.Codecs;using Leadtools.Forms.Common;using Leadtools.Forms.Auto;using Leadtools.Ocr;using Leadtools.Forms.Recognition;using Leadtools.Forms.Processing;using Leadtools.Barcode;public void AutoFormsDeleteCategory(DiskMasterFormsRepository repository, string name){DeleteCategory(repository.RootCategory, name);}public void DeleteCategory(IMasterFormsCategory category, string name){if (category.Name == name && category.Parent != null)category.Parent.DeleteChildCategory(category);foreach (IMasterFormsCategory childCategory in category.ChildCategories){DeleteCategory(childCategory, name);}}
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.Forms.CommonImports Leadtools.Forms.AutoImports Leadtools.OcrImports Leadtools.Forms.RecognitionImports Leadtools.Forms.ProcessingImports Leadtools.BarcodePublic Sub AutoFormsDeleteCategory(ByVal repository As DiskMasterFormsRepository, ByVal name As String)DeleteCategory(repository.RootCategory, name)End SubPrivate Sub DeleteCategory(ByVal category As IMasterFormsCategory, ByVal name As String)If category.Name = name AndAlso Not category.Parent Is Nothing Thencategory.Parent.DeleteChildCategory(category)End IfFor Each childCategory As IMasterFormsCategory In category.ChildCategoriesDeleteCategory(childCategory, name)Next childCategoryEnd Sub
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
