Пример #1
0
        /// ------------------------------------------------------------------------------------
        private void LoadToolbarAndContextMenus()
        {
            if (App.DesignMode)
            {
                return;
            }

            if (_tmAdapter != null)
            {
                _tmAdapter.Dispose();
            }

            _tmAdapter = AdapterHelper.CreateTMAdapter();

            if (_tmAdapter != null)
            {
                var defs = new[] { FileLocator.GetFileDistributedWithApplication(App.ConfigFolderName,
                                                                                 "CVChartsTMDefinition.xml") };

                _tmAdapter.Initialize(this, App.MsgMediator, App.ApplicationRegKeyPath, defs);
                _tmAdapter.AllowUpdates = true;
            }

            // Give the chart Phone search toolbar button a default image.
            var childItemProps  = _tmAdapter.GetItemProperties("tbbChartPhoneSearchAnywhere");
            var parentItemProps = _tmAdapter.GetItemProperties("tbbChartPhoneSearch");

            if (parentItemProps != null && childItemProps != null)
            {
                parentItemProps.Image   = childItemProps.Image;
                parentItemProps.Visible = true;
                parentItemProps.Update  = true;
                _tmAdapter.SetItemProperties("tbbChartPhoneSearch", parentItemProps);
            }
        }
Пример #2
0
        /// ------------------------------------------------------------------------------------
        private void LoadToolbar()
        {
            if (m_tmAdapter != null)
            {
                m_tmAdapter.Dispose();
            }

            m_tmAdapter = AdapterHelper.CreateTMAdapter();

            if (WordListGrid != null)
            {
                WordListGrid.TMAdapter = m_tmAdapter;
            }

            if (m_tmAdapter != null)
            {
                m_tmAdapter.LoadControlContainerItem += m_tmAdapter_LoadControlContainerItem;
                var defs = new[] { FileLocator.GetFileDistributedWithApplication(App.ConfigFolderName,
                                                                                 "DataCorpusTMDefinition.xml") };

                m_tmAdapter.Initialize(this, App.MsgMediator, App.ApplicationRegKeyPath, defs);
                m_tmAdapter.AllowUpdates = true;
            }
        }