SetConfigDlgInfo() public method

Initialize the dialog after creating it.
public SetConfigDlgInfo ( XmlNode configurationParameters, FdoCache cache, FwStyleSheet styleSheet, IMainWindowDelegateCallbacks mainWindowDelegateCallbacks, Mediator mediator, string sLayoutPropertyName ) : void
configurationParameters XmlNode
cache FdoCache
styleSheet FwStyleSheet
mainWindowDelegateCallbacks IMainWindowDelegateCallbacks
mediator Mediator
sLayoutPropertyName string
return void
Exemplo n.º 1
0
 private void RunConfigureDialog(string nodePath)
 {
     using (var dlg = new XmlDocConfigureDlg())
     {
         // If this is optional and defaults to DictionaryPublicationLayout,
         // it messes up our Dictionary when we make something else configurable (like Classified Dictionary).
         var sProp = XmlUtils.GetAttributeValue(m_xnSpec, "layoutProperty");
         Debug.Assert(sProp != null, "When making a view configurable you need to put a 'layoutProperty' in the XML configuration.");
         dlg.SetConfigDlgInfo(m_xnSpec, Cache, (FwStyleSheet)StyleSheet,
                              FindForm() as IMainWindowDelegateCallbacks, Mediator, sProp);
         if (nodePath != null)
         {
             dlg.SetActiveNode(nodePath);
         }
         if (dlg.ShowDialog(this) == DialogResult.OK)
         {
             // Configuration may well have changed. Reset XML tables and redraw.
             var sNewLayout = Mediator.PropertyTable.GetStringProperty(sProp, null);
             ResetTables(sNewLayout);
         }
         if (dlg.MasterRefreshRequired)
         {
             m_mediator.SendMessage("MasterRefresh", null);
         }
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Launch the configure dialog.
        /// </summary>
        /// <param name="commandObject"></param>
        /// <returns></returns>
        public bool OnConfigureXmlDocView(object commandObject)
        {
            CheckDisposed();
            string sProp = XmlUtils.GetOptionalAttributeValue(m_configurationParameters, "layoutProperty");

            if (String.IsNullOrEmpty(sProp))
            {
                sProp = "DictionaryPublicationLayout";
            }
            using (var dlg = new XmlDocConfigureDlg())
            {
                dlg.SetConfigDlgInfo(m_configurationParameters, Cache, StyleSheet,
                                     this.FindForm() as IMainWindowDelegateCallbacks, m_mediator, sProp);
                if (dlg.ShowDialog(this) == DialogResult.OK)
                {
                    // LT-8767 When this dialog is launched from the Configure Dictionary View dialog
                    // m_mediator != null && m_rootSite == null so we need to handle this to prevent a crash.
                    if (m_mediator != null && m_rootSite != null)
                    {
                        (m_rootSite as XmlDocItemView).ResetTables(GetLayoutName(m_configurationParameters, m_mediator));
                    }
                }
                if (dlg.MasterRefreshRequired)
                {
                    m_mediator.SendMessage("MasterRefresh", null);
                }
                return(true);                // we handled it
            }
        }
Exemplo n.º 3
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
        }
Exemplo n.º 4
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
		}
Exemplo n.º 5
0
		private void RunConfigureDialog(string nodePath)
		{
			using (XmlDocConfigureDlg dlg = new XmlDocConfigureDlg())
			{
				string sProp = XmlUtils.GetOptionalAttributeValue(m_configurationParameters, "layoutProperty");
				if (String.IsNullOrEmpty(sProp))
					sProp = "DictionaryPublicationLayout";
				dlg.SetConfigDlgInfo(m_configurationParameters, Cache, StyleSheet,
					FindForm() as IMainWindowDelegateCallbacks, m_mediator, sProp);
				dlg.SetActiveNode(nodePath);
				if (dlg.ShowDialog(this) == DialogResult.OK)
				{
					string sNewLayout = m_mediator.PropertyTable.GetStringProperty(sProp, null);
					m_mainView.ResetTables(sNewLayout);
					SelectAndScrollToCurrentRecord();
				}
				if (dlg.MasterRefreshRequired)
					m_mediator.SendMessage("MasterRefresh", null);
			}
		}
Exemplo n.º 6
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)
			{
				// LT-8767 When this dialog is launched from the Configure Dictionary View dialog
				// m_mediator != null && m_rootSite == null so we need to handle this to prevent a crash.
				if (m_mediator != null && m_rootSite != null)
				{
					string sNewLayout = m_mediator.PropertyTable.GetStringProperty(sProp, null);
					(m_rootSite as XmlDocItemView).ResetTables(sNewLayout);
				}
			}
			return true; // we handled it
		}
Exemplo n.º 7
0
 private void RunConfigureDialog(string nodePath)
 {
     using (var dlg = new XmlDocConfigureDlg())
     {
         // If this is optional and defaults to DictionaryPublicationLayout,
         // it messes up our Dictionary when we make something else configurable (like Classified Dictionary).
         var sProp = XmlUtils.GetAttributeValue(m_xnSpec, "layoutProperty");
         Debug.Assert(sProp != null, "When making a view configurable you need to put a 'layoutProperty' in the XML configuration.");
         dlg.SetConfigDlgInfo(m_xnSpec, Cache, (FwStyleSheet)StyleSheet,
             FindForm() as IMainWindowDelegateCallbacks, Mediator, sProp);
         if (nodePath != null)
             dlg.SetActiveNode(nodePath);
         if (dlg.ShowDialog(this) == DialogResult.OK)
         {
             // Configuration may well have changed. Reset XML tables and redraw.
             var sNewLayout = Mediator.PropertyTable.GetStringProperty(sProp, null);
             ResetTables(sNewLayout);
         }
         if (dlg.MasterRefreshRequired)
             m_mediator.SendMessage("MasterRefresh", null);
     }
 }