Control of luminescence in resonant nanodiamonds with NV-centers