예제 #1
0
        /// <summary>
        /// Launch the configure dialog.
        /// </summary>
        /// <param name="commandObject"></param>
        /// <returns></returns>
        public bool OnConfigureXmlDocView(object commandObject)
        {
            CheckDisposed();

            XmlDocConfigureDlg dlg   = new XmlDocConfigureDlg();
            string             sProp = XmlUtils.GetOptionalAttributeValue(m_configurationParameters, "layoutProperty");

            if (String.IsNullOrEmpty(sProp))
            {
                sProp = "DictionaryPublicationLayout";
            }
            dlg.SetConfigDlgInfo(m_configurationParameters, Cache, StyleSheet,
                                 this.FindForm() as IMainWindowDelegateCallbacks, m_mediator, sProp);
            if (dlg.ShowDialog(this) == DialogResult.OK)
            {
                string sNewLayout = m_mediator.PropertyTable.GetStringProperty(sProp, null);
                m_mainView.ResetTables(sNewLayout);
                SelectAndScrollToCurrentRecord();
            }
            return(true);            // we handled it
        }