Update Form1.cs

fixed invalid cast