Removes the first appearance of the specified category object from ChildCategories and deletes it from the local disk.
public void DeleteChildCategory(
Leadtools.Forms.Auto.IMasterFormsCategory category
)
Public Sub DeleteChildCategory( _
ByVal category As Leadtools.Forms.Auto.IMasterFormsCategory _
)
public:
void DeleteChildCategory(
Leadtools.Forms.Auto.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.
//
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Forms
Imports Leadtools.Forms.Auto
Imports Leadtools.Forms.Ocr
Imports Leadtools.Forms.Recognition
Imports Leadtools.Forms.Processing
Imports Leadtools.Barcode
<TestMethod>
Public Sub AutoFormsDeleteCategory(ByVal repository As DiskMasterFormsRepository, ByVal name As String)
DeleteCategory(repository.RootCategory, name)
End Sub
Private Sub DeleteCategory(ByVal category As IMasterFormsCategory, ByVal name As String)
If category.Name = name AndAlso Not category.Parent Is Nothing Then
category.Parent.DeleteChildCategory(category)
End If
For Each childCategory As IMasterFormsCategory In category.ChildCategories
DeleteCategory(childCategory, name)
Next childCategory
End Sub
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Forms;
using Leadtools.Forms.Auto;
using Leadtools.Forms.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);
}
}
Products |
Support |
Feedback: DeleteChildCategory Method (DiskMasterFormsCategory) - Leadtools.Forms.Auto |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.