Пример #1
0
        private CTRL read(FileStream fs)
        {
            action act = CTRL.readact(fs);
            CTRL   o   = null;

            switch (act)
            {
            case action.CTRL_NEW:
                o = new NEW();
                break;

            case action.CTRL_DFF:
                o = new DFF();
                break;

            case action.CTRL_DFX:
                o = new DFX();
                break;

            case action.CTRL_MOV:
                o = new MOV();
                break;

            case action.CTRL_DEL:
                o = new DEL();
                break;
            }
            o.read(fs);
            return(o);
        }
Пример #2
0
        public static CTRL read(byte[] data, ref int off)
        {
            action act = CTRL.readact(data, ref off);
            CTRL   o   = null;

            switch (act)
            {
            case action.CTRL_NEW:
                o = new NEW();
                break;

            case action.CTRL_DFF:
                o = new DFF();
                break;

            case action.CTRL_DFX:
                o = new DFX();
                break;

            case action.CTRL_MOV:
                o = new MOV();
                break;

            case action.CTRL_DEL:
                o = new DEL();
                break;
            }
            o.read(data, ref off);
            return(o);
        }