1) Would you mind not closing the door = literally..."Please don't close the door"
2) Would you mind opening the window = literally... "Please open the window"
1 + a = would you mind not closing the door --> oh, all right
2 + b = Would you mind opening the window --> of course not = literally = I don't mind, i can do it.
1a) is perfect, the other person is just accepting that they won't close the door. All right = Okay! The opposite answer would be "I would mind" or "No, I don't want to".
2b) is again, the other person's response. Of course not, in this sentence STATES it's not a problem, I can do it, it is no trouble.
You are correct, the answers mean the same thing, the other person who says either a) or b) is agreeing to do what the speaker wants (don't close the door = okay) (open the window = okay). They are just two different ways of agreeing and accepting what the other person wants. When you use "of course not" - it is usually to express it's not a problem. "Would you mind" & "Of course not" are a great combination,
I hope this helps