If you find yourself in such a situation, whether as a supervisor or as a doctoral student, it is our recommendation that a neutral party is consulted to help sort out the problems. No one should ever make any rash decision; think and consult with others before doing anything.
In no event should anyone resign a post or position in haste and under pressure. Instead, it is important to consult the thesis committee or some other party.
Before sending that nasty letter, wait until you cool off and then reconsider what you are doing - nothing destroys any future relations and cooperation like a nasty letter, especially when it comes as an unexpected surprise. Remember several things: Humans are not mind readers and what is obvious to you another person may be blind to. Colliding objects interact with equal but opposite forces - the same happens in human relations - the "eye-for-an-eye" syndrome. So, if possible, try to bring-up issues without getting emotional and try to resolve issues early before they become real problems and get out of control.
In the case of Ministry of Education sponsored positions, funding is made to the doctoral student and not to the supervisor, and on very rare occasion we may allow the student to transfer to another laboratory.
If you need to consult someone in private and in confidence about a "difficult situation", you can always contact the iBioMEP office and those of us in the office can give you advice and/or make contacts to arrange a meeting with another party to help sort the problem out.