private void AssemblyDetailsForm_Load(object sender, EventArgs e)
        {
            manager = new DBManager(RevitDocument);

            //if (this.IsAdd)
            //{
            //    lblTitle.Text = "";
            //}
            //else
            //{
                toSwap = CurrentAssembly;
            //    lblToSwap.Text = toSwap.AssemblyName;
                loadInformation(toSwap);
            //}
            List<Assembly> fromModel = manager.RetrieveWallInfo();
            //List<Assembly> options = null;
            //if (this.IsAdd)
            //options = manager.getAllAssemblies();
            //options.AddRange(fromModel);

            //else
            //    options = manager.getAssembliesByCode(toSwap.AssemblyCode);
            //if (options != null)
            //{
            //    foreach (Assembly a in options)
            //        cboAlternatives.Items.Add(a);
            //}
        }
        private void ComponentBuilderForm_Load(object sender, EventArgs e)
        {
            worker = new BackgroundWorker();
            worker.WorkerSupportsCancellation = true;
            worker.WorkerReportsProgress = true;
            worker.DoWork += bw_getOptions;
            worker.RunWorkerCompleted += bw_getOptionsComplete;
            worker.ProgressChanged += bw_ProgressChanged;

            manager = new DBManager(this.RevitDocument);

            foundInModel = manager.RetrieveWallInfo();
            foundInModel.AddRange(manager.RetrieveRoofingInfo());
            foundInModel.AddRange(manager.RetrieveFloorInfo());

            if (foundInModel.Count > 0)
                calculateAreas_Volumes(foundInModel);

            foreach (Assembly assem in Assemblies.Values)
            {
                if (!cboFoundInModel.Items.Contains(assem))
                    cboFoundInModel.Items.Add(assem);
            }
        }