That's a very common symptom in modern society. If you have concentrated on something too long( like a whole afternoon) , you may have overused your brain which may cause the pain in facial nerves so that lead to the eye pain. Headache can be the sign of asthenopia that induced by neurasthenia or body strain.
I wonder if you have felt better now after so long a rest, if not, you'd better have a body check to confirm the type of your headache is that the primary headaches, the secondary headaches or others.
Hope that will help.
You should be careful that your headache may be an omen of migraine. Migraine can easily cause complications such as hurting eyes. You should pay attention not to catch a cold. You should have adequate rest and sleep, and do not get over-fatigue. Apply some eye drops or oculentum to your eyes to reduce the pain in your eyes. Besides, eat more vegetables and fruits to supplement more vitamines and minerals to your eyes. Do some moderate sports to enhance your body immunity.