Update Form1.cs

GUI and fixed algorithm