コード例 #1
0
        public static string GetItemCategoryText(Constants.ITEM_CATEGORY itemCategory)
        {
            string category = null;

            switch (itemCategory)
            {
            case Constants.ITEM_CATEGORY.CLIP:
                category = "Clip";
                break;

            case Constants.ITEM_CATEGORY.DISK:
                category = "Disk";
                break;

            case Constants.ITEM_CATEGORY.ENVELOPE:
                category = "Envelope";
                break;

            case Constants.ITEM_CATEGORY.ERASER:
                category = "Eraser";
                break;

            case Constants.ITEM_CATEGORY.EXERCISE:
                category = "Exercise";
                break;

            case Constants.ITEM_CATEGORY.FILE:
                category = "File";
                break;

            case Constants.ITEM_CATEGORY.PAD:
                category = "Pad";
                break;

            case Constants.ITEM_CATEGORY.PAPER:
                category = "Paper";
                break;

            case Constants.ITEM_CATEGORY.PEN:
                category = "Pen";
                break;

            case Constants.ITEM_CATEGORY.PUNCHER:
                category = "Puncher";
                break;

            case Constants.ITEM_CATEGORY.RULER:
                category = "Ruler";
                break;

            case Constants.ITEM_CATEGORY.SCISSORS:
                category = "Scissors";
                break;

            case Constants.ITEM_CATEGORY.SHARPENER:
                category = "Sharpener";
                break;

            case Constants.ITEM_CATEGORY.SHORTHAND:
                category = "Shorthand";
                break;

            case Constants.ITEM_CATEGORY.STAPLER:
                category = "Stapler";
                break;

            case Constants.ITEM_CATEGORY.TACKS:
                category = "Tacks";
                break;

            case Constants.ITEM_CATEGORY.TAPE:
                category = "Tape";
                break;

            case Constants.ITEM_CATEGORY.TPARENCY:
                category = "Trapency";
                break;

            case Constants.ITEM_CATEGORY.TRAY:
                category = "Tray";
                break;
            }
            return(category);
        }
コード例 #2
0
        public static Constants.ITEM_CATEGORY objToItemCategory(object obj)
        {
            Constants.ITEM_CATEGORY category = Constants.ITEM_CATEGORY.UNKNOWN;

            switch (objToShort(obj))
            {
            case 1:
                category = Constants.ITEM_CATEGORY.CLIP;
                break;

            case 2:
                category = Constants.ITEM_CATEGORY.ENVELOPE;
                break;

            case 3:
                category = Constants.ITEM_CATEGORY.ERASER;
                break;

            case 4:
                category = Constants.ITEM_CATEGORY.EXERCISE;
                break;

            case 5:
                category = Constants.ITEM_CATEGORY.FILE;
                break;

            case 6:
                category = Constants.ITEM_CATEGORY.PAD;
                break;

            case 7:
                category = Constants.ITEM_CATEGORY.PAPER;
                break;

            case 8:
                category = Constants.ITEM_CATEGORY.PEN;
                break;

            case 9:
                category = Constants.ITEM_CATEGORY.PUNCHER;
                break;

            case 10:
                category = Constants.ITEM_CATEGORY.RULER;
                break;

            case 11:
                category = Constants.ITEM_CATEGORY.SCISSORS;
                break;

            case 12:
                category = Constants.ITEM_CATEGORY.SHARPENER;
                break;

            case 13:
                category = Constants.ITEM_CATEGORY.SHORTHAND;
                break;

            case 14:
                category = Constants.ITEM_CATEGORY.STAPLER;
                break;

            case 15:
                category = Constants.ITEM_CATEGORY.TACKS;
                break;

            case 16:
                category = Constants.ITEM_CATEGORY.TAPE;
                break;

            case 17:
                category = Constants.ITEM_CATEGORY.TPARENCY;
                break;

            case 18:
                category = Constants.ITEM_CATEGORY.TRAY;
                break;

            case 19:
                category = Constants.ITEM_CATEGORY.DISK;
                break;
            }
            return(category);
        }