private void IFCExportConfigurationCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) { IFCExportConfigurationCustom selectedConfiguration = IFCExportConfigurationCombobox.SelectedItem as IFCExportConfigurationCustom; if (Enum.GetName(typeof(IFCVersion), selectedConfiguration.IFCVersion) == null) { info.Content = "This configuration is not supported by your version of Revit, please select another setup."; info.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("Red")); } else if (Enum.GetName(typeof(IFCVersion), selectedConfiguration.IFCVersion).Contains("IFC4")) /*== IFCVersion.IFC4 || * selectedConfiguration.IFCVersion == IFCVersion.IFC4DTV || * selectedConfiguration.IFCVersion == IFCVersion.IFC4RV)*/ { info.Content = "bimsync does not support IFC 4, please select another setup."; info.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("Red")); } else { info.Content = "To create a new setup, please use the IFC Export interface."; info.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("Black")); } //To create a new setup, please use the IFC Export interface. //bimsync does not support IFC 4, please select another setup }
private void Upload_Button_Click(object sender, RoutedEventArgs e) { _configuration = IFCExportConfigurationCombobox.SelectedItem as IFCExportConfigurationCustom; Comment = commentTextBox.Text; this.DialogResult = true; this.Close(); }
private void LoadIFCExportConfigurationList() { //Get a list of configurationsCustom IFCExportConfigurationsMapCustom configurationsMap = new IFCExportConfigurationsMapCustom(); IFCExportConfigurationList.Clear(); foreach (IFCExportConfigurationCustom IFCExportConfiguration in configurationsMap.Values) { IFCExportConfigurationList.Add(IFCExportConfiguration); } _configuration = IFCExportConfigurationList.FirstOrDefault(); IFCExportConfigurationCombobox.SelectedItem = _configuration; }