示例#1
0
        /// <summary>
        /// Shows the IFC export setup window when clicking the buttonEditSetup.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">Event arguments that contains the event data.</param>
        private void buttonEditSetup_Click(object sender, RoutedEventArgs args)
        {
            IFCExportConfiguration     selectedConfig    = GetSelectedConfiguration();
            IFCExportConfigurationsMap configurationsMap = new IFCExportConfigurationsMap(m_configMap);
            IFCExporterUIWindow        editorWindow      = new IFCExporterUIWindow(configurationsMap, selectedConfig.Name);

            // the SelectionChanged event will be temporary disabled when the Modify Config Window is active
            //   (it is particularly useful for COBie v2.4 setup to avoid the function is called repeatedly)
            currentSelectedSetup.SelectionChanged -= currentSelectedSetup_SelectionChanged;

            editorWindow.Owner = this;
            bool?ret = editorWindow.ShowDialog();

            if (ret.HasValue)
            {
                m_EditConfigVisited = ret.Value;
            }

            if (editorWindow.DialogResult.HasValue && editorWindow.DialogResult.Value)
            {
                // Check here for changes in configurations. If changed, the changes will be saved into the storage
                configurationsMap.UpdateSavedConfigurations(m_configMap);
                currentSelectedSetup.Items.Clear();
                m_configMap = configurationsMap;
                string selectedConfigName = editorWindow.GetSelectedConfigurationName();

                UpdateCurrentSelectedSetupCombo(selectedConfigName);

                updateFileName();
            }

            // The SelectionChanged event will be activated again after the Modify Config Window is closed
            currentSelectedSetup.SelectionChanged += currentSelectedSetup_SelectionChanged;
        }
        /// <summary>
        /// Shows the IFC export setup window when clicking the buttonEditSetup.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">Event arguments that contains the event data.</param>
        private void buttonEditSetup_Click(object sender, RoutedEventArgs args)
        {
            IFCExportConfiguration     selectedConfig    = GetSelectedConfiguration();
            IFCExportConfigurationsMap configurationsMap = new IFCExportConfigurationsMap(m_configMap);
            IFCExporterUIWindow        editorWindow      = new IFCExporterUIWindow(configurationsMap, selectedConfig.Name);

            // the SelectionChanged event will be temporary disabled when the Modify Config Window is active
            //   (it is particularly useful for COBie v2.4 setup to avoid the function is called repeatedly)
            currentSelectedSetup.SelectionChanged -= currentSelectedSetup_SelectionChanged;

            editorWindow.ShowDialog();
            if (editorWindow.DialogResult.HasValue && editorWindow.DialogResult.Value)
            {
                IFCCommandOverrideApplication.PotentiallyUpdatedConfigurations = true;
                currentSelectedSetup.Items.Clear();
                m_configMap = configurationsMap;
                String selectedConfigName = editorWindow.GetSelectedConfigurationName();

                UpdateCurrentSelectedSetupCombo(selectedConfigName);

                updateFileName();
            }

            // The SelectionChanged event will be activated again after the Modify Config Window is closed
            currentSelectedSetup.SelectionChanged += currentSelectedSetup_SelectionChanged;
        }
示例#3
0
        /// <summary>
        /// Shows the IFC export setup window when clicking the buttonEditSetup.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">Event arguments that contains the event data.</param>
        private void buttonEditSetup_Click(object sender, RoutedEventArgs args)
        {
            IFCExportConfiguration     selectedConfig    = GetSelectedConfiguration();
            IFCExportConfigurationsMap configurationsMap = new IFCExportConfigurationsMap(m_configMap);
            IFCExporterUIWindow        editorWindow      = new IFCExporterUIWindow(configurationsMap, selectedConfig.Name);

            editorWindow.ShowDialog();
            if (editorWindow.DialogResult.HasValue && editorWindow.DialogResult.Value)
            {
                currentSelectedSetup.Items.Clear();
                m_configMap = configurationsMap;
                String selectedConfigName = editorWindow.GetSelectedConfigurationName();
                UpdateCurrentSelectedSetupCombo(selectedConfigName);
            }
        }
 /// <summary>
 /// Shows the IFC export setup window when clicking the buttonEditSetup.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="args">Event arguments that contains the event data.</param>
 private void buttonEditSetup_Click(object sender, RoutedEventArgs args)
 {
     IFCExportConfiguration selectedConfig = GetSelectedConfiguration();
     IFCExportConfigurationsMap configurationsMap = new IFCExportConfigurationsMap(m_configMap);
     IFCExporterUIWindow editorWindow = new IFCExporterUIWindow(configurationsMap, selectedConfig.Name);
     editorWindow.ShowDialog();
     if (editorWindow.DialogResult.HasValue && editorWindow.DialogResult.Value)
     {
         IFCCommandOverrideApplication.PotentiallyUpdatedConfigurations = true;
         currentSelectedSetup.Items.Clear();
         m_configMap = configurationsMap;
         String selectedConfigName = editorWindow.GetSelectedConfigurationName();
         UpdateCurrentSelectedSetupCombo(selectedConfigName);
     }
 }