Esempio n. 1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initialize this as an IxCoreColleague
        /// </summary>
        /// <param name="mediator"></param>
        /// <param name="configurationParameters"></param>
        /// ------------------------------------------------------------------------------------
        public override void Init(Mediator mediator, XmlNode configurationParameters)
        {
            CheckDisposed();

            InitBase(mediator, configurationParameters);

            // retrieve persisted clerk index and set it.
            int idx = m_mediator.PropertyTable.GetIntProperty(Clerk.PersistedIndexProperty, -1, PropertyTable.SettingsGroup.LocalSettings);
            int lim = Clerk.ListSize;

            if (idx >= 0 && idx < lim)
            {
                int idxOld = Clerk.CurrentIndex;
                try
                {
                    Clerk.JumpToIndex(idx);
                }
                catch
                {
                    if (lim > idxOld && lim > 0)
                    {
                        Clerk.JumpToIndex(idxOld >= 0 ? idxOld : 0);
                    }
                }
            }

            // If possible make it use the style sheet appropriate for its main window.
            IMainWindowDelegatedFunctions containingForm = this.FindForm() as IMainWindowDelegatedFunctions;

            if (containingForm != null)
            {
                m_dataEntryForm.StyleSheet = containingForm.StyleSheet;
            }
            m_fullyInitialized = true;
        }
Esempio n. 2
0
        private void SetupStylesheet()
        {
            // If possible make it use the style sheet appropriate for its main window.
            IMainWindowDelegatedFunctions continingForm = this.FindForm() as IMainWindowDelegatedFunctions;

            if (continingForm != null)
            {
                StyleSheet = continingForm.StyleSheet;
            }
        }
Esempio n. 3
0
        private void SetStyleSheet()
        {
            if (m_browseViewer == null || m_browseViewer.StyleSheet != null)
            {
                return;
            }

            IMainWindowDelegatedFunctions containingForm = FindForm() as IMainWindowDelegatedFunctions;

            if (containingForm == null)
            {
                // Now try to get it from the mediator's window,
                // since this control be in a dlg's form,
                // rather than the main window. Cf. LT-5009.
                containingForm = m_mediator.PropertyTable.GetValue("window", null) as IMainWindowDelegatedFunctions;
            }

            if (containingForm != null)
            {
                m_browseViewer.StyleSheet = containingForm.StyleSheet;
            }
        }