Moved click event handler from c# to f# to support gui generation in f#