Exemple #1
0
        private void addPartToList(ElementData part)
        {
            if (part.status == 1)
            {
                string pathShort = part.pdfPath + " " + part.dwgPath;
                pathShort = pathShort.Replace(_pdfFolderPath, "");
                pathShort = pathShort.Replace(_dwgFolderPath, "");

                lv_csv_results.Items.Add(part.ToString()).SubItems.Add(pathShort);
                lv_csv_results.Items[lv_csv_results.Items.Count - 1].BackColor = ABI.colorOfField(part);
            }
            else
            {
                lv_csv_results.Items.Add(part.ToString()).SubItems.Add(part.statusMessage);
                lv_csv_results.Items[lv_csv_results.Items.Count - 1].BackColor = ABI.colorOfField(part);
            }
        }
Exemple #2
0
        private void update_export_list_values(List <ElementData> toExportParts)
        {
            lv_exportedParts.Clear();
            lv_exportedParts.Columns.Add("Name");
            lv_exportedParts.Columns.Add("Path");

            foreach (ElementData part in toExportParts)
            {
                string pathShort = part.pdfPath + " " + part.dwgPath;
                pathShort = pathShort.Replace(_pdfFolderPath, "");
                pathShort = pathShort.Replace(_dwgFolderPath, "");

                lv_exportedParts.Items.Add(part.ToString()).SubItems.Add(pathShort);
                lv_exportedParts.Items[lv_exportedParts.Items.Count - 1].BackColor = ABI.colorOfField(part);
            }

            lv_exportedParts.Columns[0].Width = -2;
            lv_exportedParts.Columns[1].Width = -2;
        }