/// <summary>
        /// 更新一个主工具栏项目
        /// </summary>
        /// <param name="formEntity"></param>
        public void Update(ToolStripItemAbstract entity)
        {
            Debug.Assert(entity != null, "ToolStripItemAbstract 为 null");

            if (entity == null)
            {
                return;
            }

            //更新索引信息
            XElement element = _indexXml.XPathSelectElement(String.Format(XPATH_Index_SelectToolStrip, entity.Id));

            Debug.Assert(element != null, "更新主工具栏项目索引时未找到指定主菜单的索引记录");
            if (element != null)
            {
                element.ReplaceWith(GetArchiveIndex(entity));
                SaveIndexFile();

                string   xml      = entity.ToXml();
                XElement xElement = XElement.Parse(xml);

                //更新实体文件
                _packageService.Current.AddFileContent(xml,
                                                       Path.Combine(Constant.PACKAGE_NAVIGATION_TOOLSTRIP_FOLDER, entity.Id));

                _cachingService.Add(entity.Id, xElement);

                //发布事件
                ToolStripEventArgs args = new ToolStripEventArgs(entity);
                _eventAggregator.GetEvent <ToolStripItemUpdatedEvent>().Publish(args);
            }
        }
        /// <summary>
        /// 添加一个菜单项
        /// </summary>
        /// <param name="entity"></param>
        public void Add(ToolStripItemAbstract entity)
        {
            Debug.Assert(entity != null, "entity 为 null");

            if (entity == null)
            {
                return;
            }

            //添加索引信息
            _indexXml.XPathSelectElement(XPATH_Index_ToolStrip).Add(GetArchiveIndex(entity));

            string   xml      = entity.ToXml();
            XElement xElement = XElement.Parse(xml);

            SaveIndexFile();

            //添加数据实体文件
            _packageService.Current.AddFileContent(xml,
                                                   Path.Combine(Constant.PACKAGE_NAVIGATION_TOOLSTRIP_FOLDER, entity.Id));

            _cachingService.Add(entity.Id, xElement);

            //发布事件
            ToolStripEventArgs args = new ToolStripEventArgs(entity);

            _eventAggregator.GetEvent <ToolStripItemAddedEvent>().Publish(args);
        }