In a medium saucepan, whisk together the sugar, flour, cornstarch and salt.
In a medium bowl, use an electric mixer to combine the milk and egg yolks. Gradually whisk the milk/eggs into the saucepan to combine with the sugar mixture. Turn heat to medium and continue to whisk the mixture until the mixture thickens. This is the bummer part because it will take about 15 minutes. Just keep stirring gently (or put a kid on the task to stir for you), until the mixture comes to a full boil and has thickened to the consistency in the photo shown (pudding-like). Remove the pan from heat and stir in the chocolate, butter and vanilla. Whisk until the chocolate is fully incorporated.
Pour the chocolate custard into the baked pie shell. Set it aside to cool completely. If serving same day, whip the cream with the powdered sugar and spread it on top of the chocolate layer. Shave curls of chocolate onto the whipped cream. Refrigerate for several hours until ready to serve. If serving tomorrow, place plastic wrap over the pie, then add the whipped cream and shaved chocolate the next day, at least an hour before serving.
To shave the chocolate bar: I like to soften up the chocolate a little bit before shaving. I just place it on a paper towel and microwave it for about 5 seconds. Then take a potato peeler and shave the edges of the bar to gather some shavings onto the top of the whipped cream.