implement the function of auto set default tray no