public void bPuTTYPath_Click(string type) { bPuTTYPath_Click(new object(), new EventArgs()); mainform.Connect(type); }