Beispiel #1
0
        public IFormat HandleRequest(int format)
        {
            IFormat extension = null;

            if (format == 6)
            {
                extension = new XpsFormat();
            }
            else if (Successor != null)
            {
                Successor.HandleRequest(format);
            }
            return(extension);
        }
Beispiel #2
0
        public static IFormat ChooseFormat(int index)
        {
            IFormat format = null;

            switch (index)
            {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 5: format = new BaseFormats(); break;

            case 6: format = new XpsFormat(); break;

            case 7: format = new PdfFormat(); break;

            case 8: format = new PsdFormat(); break;

            default: break;
            }

            return(format);
        }