|
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using Accessibility;
using Office2007UIModel;
using MSAALayer;
namespace Office2007UIModel
{
public class OfficeRibbon : OfficeUIItem
{
Dictionary<string, OfficeRibbonTab> _tabList = new Dictionary<string, OfficeRibbonTab>();
public Dictionary<string, OfficeRibbonTab> Tabs
{
get{return _tabList;}
}
public OfficeRibbon(IAccessible parentAccObject, string name, bool ignoreInvisible)
: base(parentAccObject, name, ignoreInvisible)
{
PopulateRibbonTabList();
}
public OfficeRibbon(IAccessible parentAccObject, string name, AccessibleUIItemType uiItemType, bool ignoreInvisible)
: base(parentAccObject, name, uiItemType, ignoreInvisible)
{
PopulateRibbonTabList();
}
private void PopulateRibbonTabList()
{
_tabList.Clear();
foreach (var msaaUIItem in GetAllUIItemsOfType(AccessibleUIItemType.PageTab, true))
{
if (!string.IsNullOrEmpty(msaaUIItem.Properties.Name))
{
_tabList.Add(msaaUIItem.Properties.Name, new OfficeRibbonTab(msaaUIItem.Accessible));
}
}
}
public void ReloadTabs()
{
PopulateRibbonTabList();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.