Exemplo n.º 1
0
 public COBieXLSSerialiser(string fileName, string templateFileName)
 {
     FileName = fileName;
     TemplateFileName = templateFileName;
     hasErrorLevel = typeof(COBieError).GetProperties().Where(prop => prop.Name == "ErrorLevel").Any();
     _commentCount = 0;
     Excludes = new FilterValues();//get the rules for excludes for generating COBie
 }
Exemplo n.º 2
0
        public COBieContext()
        {
            RunDate     = DateTime.Now.ToString(Constants.DATE_FORMAT);
            RunDateTime = DateTime.Now.ToString(Constants.DATETIME_FORMAT);
            EMails      = new Dictionary <long, string>();
            Model       = null;
            //if no IfcZones or no IfcSpace property names of "ZoneName" then if DepartmentsUsedAsZones is true we will list
            //any IfcSpace property names "Department" in the Zone sheet and remove the "Department" property from the attribute sheet
            DepartmentsUsedAsZones = false;

            Exclude = new FilterValues();

            ExcludeFromPickList = false;

            //set the row index to report error rows on
            ErrorRowStartIndex = ErrorRowIndexBase.RowTwo; //default for excel sheet
            MapMergeRoles      = new Dictionary <XbimModel, COBieMergeRoles>();
        }
Exemplo n.º 3
0
        public COBieClassFilter(FilterValues userFilters)
        {
            InitializeComponent();

            UserFilters = userFilters; //hold the amendments, as required by the user
            DefaultFilters = new FilterValues(); //gives us the initial list of types

            //initialize the collection classes for the list box's
            ClassFilterComponent = new ObservableCollection<CheckedListItem<Type>>();
            ClassFilterType = new ObservableCollection<CheckedListItem<Type>>();
            ClassFilterAssembly = new ObservableCollection<CheckedListItem<Type>>();

            //fill in the collections to display the check box's in the list box's
            InitExcludes(ClassFilterComponent, DefaultFilters.ObjectType.Component, UserFilters.ObjectType.Component);
            InitExcludes(ClassFilterType, DefaultFilters.ObjectType.Types, UserFilters.ObjectType.Types);
            InitExcludes(ClassFilterAssembly, DefaultFilters.ObjectType.Assembly, UserFilters.ObjectType.Assembly);

            DataContext = this;
        }
Exemplo n.º 4
0
        public COBieContext()
        {
            RunDate = DateTime.Now.ToString(Constants.DATE_FORMAT);
            RunDateTime = DateTime.Now.ToString(Constants.DATETIME_FORMAT);
            RunDateManuallySet = false;
            EMails = new Dictionary<long, string>();
            Model = null;
            //if no IfcZones or no IfcSpace property names of "ZoneName" then if DepartmentsUsedAsZones is true we will list 
            //any IfcSpace property names "Department" in the Zone sheet and remove the "Department" property from the attribute sheet
            DepartmentsUsedAsZones = false;

            Exclude = new FilterValues();

            ExcludeFromPickList = false;

            //set the row index to report error rows on
            ErrorRowStartIndex = ErrorRowIndexBase.RowTwo; //default for excel sheet
            MapMergeRoles = new Dictionary<XbimModel, COBieMergeRoles>();

        }
        /// <summary>
        /// 
        /// </summary>
        public XplorerMainWindow()
        {
            InitializeComponent();
            Closed += XplorerMainWindow_Closed;
            Loaded += XplorerMainWindow_Loaded;
            Closing += XplorerMainWindow_Closing;
            DrawingControl.UserModeledDimensionChangedEvent += DrawingControl_MeasureChangedEvent;
            InitFromSettings();

            RefreshRecentFiles();

            UserFilters = new FilterValues();//COBie Class filters, set to initial defaults
            CoBieTemplate = UkTemplate;

            if (Settings.Default.PluginStartupLoad)
                RefreshPlugins();
        }
Exemplo n.º 6
0
 public COBieGenerator()
 {
     InitializeComponent();
     MergeItemsList = new List<string>();
     UserFilters = new FilterValues(); //class filters
 }
Exemplo n.º 7
0
        public XplorerMainWindow()
        {
            InitializeComponent();
            this.Closed += new EventHandler(XplorerMainWindow_Closed);
            this.Loaded += XplorerMainWindow_Loaded;
            this.Closing += new CancelEventHandler(XplorerMainWindow_Closing);
            this.DrawingControl.UserModeledDimensionChangedEvent += DrawingControl_MeasureChangedEvent;

            UserFilters = new FilterValues();//COBie Class filters, set to initial defaults
            COBieTemplate = _UKTemplate;
        }
Exemplo n.º 8
0
 private void COBieClassFilterCmdExecuted(object sender, ExecutedRoutedEventArgs e)
 {
     COBieClassFilter classFilterDlg = new COBieClassFilter(UserFilters);
     bool? done = classFilterDlg.ShowDialog();
     if (done.HasValue && done.Value == true)
     {
         UserFilters = classFilterDlg.UserFilters; //not needed, but makes intent clear
     }
 }
        private void SetDefaultFilters()
        {
            var defaultFilters = new FilterValues(); //gives us the initial list of types

            //initialize the collection classes for the list box's
            if (ClassFilterComponent == null)
                ClassFilterComponent  = new ObservableCollection<CheckedListItem<Type>>();
            if (ClassFilterType == null)
                ClassFilterType = new ObservableCollection<CheckedListItem<Type>>();
            if (ClassFilterAssembly == null)
                ClassFilterAssembly = new ObservableCollection<CheckedListItem<Type>>();

            //fill in the collections to display the check box's in the list box's
            InitExcludes(ClassFilterComponent, defaultFilters.ObjectType.Component, UserFilters.ObjectType.Component);
            InitExcludes(ClassFilterType, defaultFilters.ObjectType.Types, UserFilters.ObjectType.Types);
            InitExcludes(ClassFilterAssembly, defaultFilters.ObjectType.Assembly, UserFilters.ObjectType.Assembly);
        }
Exemplo n.º 10
0
        public CoBieClassFilter()
        {
            InitializeComponent();

            ConfigureFolder();

            // prepare templates list
            Templates = new ObservableCollection<string>() {UkTemplate, UsTemplate};
            SelectedTemplate = UkTemplate;

            // define filters and set defaults
            UserFilters = new FilterValues();
            SetDefaultFilters();

            DataContext = this;
        }
Exemplo n.º 11
0
        public void ExportCOBie(string path, string template)
        {
            string outputFile = Path.ChangeExtension(path, ".xls"); //enforce xls
            FilterValues UserFilters = new FilterValues();//COBie Class filters, set to initial defaults
            // Build context
            COBieContext context = new COBieContext();
            context.TemplateFileName = template;
            context.Model = _model;
            //set filter option
            context.Exclude = UserFilters;

            //set the UI language to get correct resource file for template
            //if (Path.GetFileName(parameters.TemplateFile).Contains("-UK-"))
            //{
            try
            {
                System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("en-GB");
                System.Threading.Thread.CurrentThread.CurrentUICulture = ci;
            }
            catch (Exception)
            {
                //to nothing Default culture will still be used

            }

            COBieBuilder builder = new COBieBuilder(context);
            COBieXLSSerialiser serialiser = new COBieXLSSerialiser(outputFile, context.TemplateFileName);

            serialiser.Excludes = UserFilters;
            builder.Export(serialiser);
        }
Exemplo n.º 12
0
        /// <summary>
        /// 
        /// </summary>
        public XplorerMainWindow()
        {
            InitializeComponent();
            Closed += XplorerMainWindow_Closed;
            Loaded += XplorerMainWindow_Loaded;
            Closing += XplorerMainWindow_Closing;
            DrawingControl.UserModeledDimensionChangedEvent += DrawingControl_MeasureChangedEvent;
            InitFromSettings();

            RefreshRecentFiles();

            UserFilters = new FilterValues();//COBie Class filters, set to initial defaults
            CoBieTemplate = UkTemplate;

            // testing ways to isolate the plugins from the menu.
            //
            EvaluateXbimUiType(typeof (LogViewer.LogViewer));
            EvaluateXbimUiType(typeof(Querying.WdwQuery));

            if (Settings.Default.PluginStartupLoad)
                RefreshPlugins();
        }