方法1改为:
private bool checkFields()
{
  if(text1.text.trim()=="")
  {
    提示信息...
    return false;
   }
   if(text2.text.trim()=="")
   {
     提示信息...
     return false;
    }
return true;
}方法2改为:private void click()
{
  if(checkFields()){
  try
  {
    语句1;
    语句2;
   }
catch{}
}
}