Well there are 2 timer1 references in your code;
timer1.Enabled = !(timer1.Enabled);
but do not see any reference to the timer acutally being created.
If you do not use a timer, bin the code and the timer tick method or comment it out at the moment.
If you need a timer then add one;
Timer timer1 = new Timer();