static void Connect(string username, string password) { try { client = new GCalClient(username, password); } catch (Exception) { Log.Error(ConnectionErrorMessage); } }
public static bool TryConnect(string username, string password) { GCalClient test; try { test = new GCalClient(username, password); test.UpdateCalendars(); Connect(username, password); } catch (Exception) { Log.Error(ConnectionErrorMessage); return(false); } return(true); }