DotNet 4.8.1 build of DotNetBar

This commit is contained in:
2025-02-07 10:35:23 -05:00
parent 33439b63a0
commit 6b0a5d60f4
2609 changed files with 989814 additions and 7 deletions

View File

@@ -0,0 +1,41 @@
using System;
using System.Text;
namespace DevComponents.DotNetBar.Ribbon
{
internal class SubItemsQatCollection : SubItemsCollection
{
private Ribbon.QatToolbar m_QatToolbar = null;
public SubItemsQatCollection(Ribbon.QatToolbar qatToolbar):base(null)
{
m_QatToolbar = qatToolbar;
}
protected override void OnInsert(int index, object value) {}
protected override void OnInsertComplete(int index, object value)
{
if (!m_IgnoreEvents)
{
if(m_QatToolbar.Items.Count<=index)
m_QatToolbar.Items.Add(value as BaseItem);
else
m_QatToolbar.Items.Insert(index, value as BaseItem);
}
}
protected override void RemoveInternal(int index, object value)
{
// Raise event before item is actualy removed so the item is able to clean its state
// See override in PopupItem
if (!m_IgnoreEvents)
{
m_QatToolbar.Items.Remove(value as BaseItem);
}
}
protected override void RemoveCompleteInternal(int index, object value)
{
}
}
}