public bool Connect( ) { if ( !port.IsOpen ) { // try to connect try { port.Open( ); } catch { return false; } } return true; }