Example #1
0
 static void Connect(string username, string password)
 {
     try {
         client = new GCalClient(username, password);
     } catch (Exception) {
         Log.Error(ConnectionErrorMessage);
     }
 }
Example #2
0
        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);
        }