Example #1
0
        public static void listSheets(SheetManager sheetManager)
        {
            List <SheetTypeInfo> sheetTypeInfo =
                SheetSystemManager.SheetTypeManager.SheetTypes;

            SheetPartsDescriptor sheetDescriptor;

            SheetPartData sheetPartData;


            TbxClear();

            foreach (Sheet sheet in sheetManager.SheetList)
            {
                sheetDescriptor =
                    sheetTypeInfo[sheet.SheetTypeIdx].SheetPartsDescriptor;

                AppendLine("\nSheetId     | " + sheet.SheetId);
                AppendLine("is reference| " + sheet.IsForRefernce);
                AppendLine("sheet type  | "
                           + sheetTypeInfo[sheet.SheetTypeIdx].Description);

                AppendLine("sheet num   | " + sheet.SheetNumber);
                AppendLine("sheet name  | " + sheet.SheetName);

                ListParts(sheet, sheet.SheetIdPartsSheetNumber);
                ListParts(sheet, sheet.SheetIdPartsSheetName);
            }
        }
Example #2
0
        public static void test()
        {
            SheetManager sheetManager = new SheetManager();

            Config();

            bool result = false;

            foreach (string sheet in Samples.fullRange)
            {
                result = sheetManager.Add(sheet);

                if (!result)
                {
                    break;
                }
            }

            if (!result)
            {
                AppendLine("*** parse sheets failed ***");
            }
            else
            {
                listSheets(sheetManager);
            }
        }